Opened 16 years ago

Last modified 14 years ago

#2804 new defect

named styles (rfc-39) for raster and annotation layers missing

Reported by: mko Owned by: assefa
Priority: normal Milestone: 5.6 release
Component: MapServer C Library Version: 5.2
Severity: normal Keywords: styles, raster, rfc39
Cc: mko, jmckenna

Description

Mapserver ignores classgroup and corresponding class/group parameters for raster layers. A url parameter &STYLES=xxx will apply to vector layers only.

Possible fix in msGetClass():

  for(i=0; i<layer->numclasses; i++) {
+    if ( layer->class[i]->group && layer->classgroup && strcasecmp(layer->class[i]->group, layer->classgroup) != 0 )
+        continue;
     if (layer->class[i]->expression.string == NULL) /* Empty expression - always matches */
         return(i);

Attachments (2)

mapraster.c.patch (596 bytes ) - added by mko 15 years ago.
named styles for raster layers
maputil.c.patch (1.6 KB ) - added by mko 15 years ago.
named styles for annotation layers

Download all attachments as: .zip

Change History (10)

by mko, 15 years ago

Attachment: mapraster.c.patch added

named styles for raster layers

by mko, 15 years ago

Attachment: maputil.c.patch added

named styles for annotation layers

comment:1 by mko, 15 years ago

Summary: named styles (rfc-39) for raster layers missingnamed styles (rfc-39) for raster and annotation layers missing

title changed

comment:2 by jmckenna, 15 years ago

Cc: jmckenna added

comment:3 by jmckenna, 15 years ago

note that the maputil.c patch contains all commented lines.

comment:4 by mko, 15 years ago

... and php_mapscript.c should contain a set function for the classgroup parameter:

else IF_SET_STRING("classgroup",   self->classgroup)

comment:5 by assefa, 15 years ago

Milestone: 5.6.0 release

php mapscript updated. changed the milestone. Will fix it for next release.

comment:6 by dmorissette, 14 years ago

What's the status of this?

in reply to:  6 comment:7 by mko, 14 years ago

Cc: mko added; m.kofahl@… removed

Replying to dmorissette:

What's the status of this?

I did apply the changes for mapraster and maputil to the 5.6.0 release and it still works as expected, making (in case of WMS) &STYLES=color|gray possible for palette raster data and annotations.

comment:8 by mko, 14 years ago

By the way, at http://www.mapserver.org/ogc/wms_server.html NOTE that MapServer does not support named styles should be changed to NOTE that MapServer supports named styles for vector data only (as long this ticket is'nt fully discussed).

Note: See TracTickets for help on using tickets.