Ticket #1925 (closed defect: fixed)

Opened 2 years ago

Last modified 1 year ago

when reading an SLD, sequence of classes is reversed

Reported by: bartvde@osgis.nl Assigned to: assefa
Priority: high Milestone: 5.0 release
Component: WMS Server Version: 4.8
Severity: normal Keywords:
Cc:

Description

When reading in an SLD, Mapserver reverses the sequence of the rules/classes.
This does not make sense, since the Legend will also show the reverse of what
you would expect.

Here is a patch:

--- mapogcsld.c 2006-09-04 08:43:21.000000000 +0200
+++ mapogcsld.c 2006-09-04 08:57:57.000000000 +0200
@@ -404,7 +404,8 @@
                     map->layers[i].type = pasLayers[j].type;
                     map->layers[i].numclasses = 0;
                     iClass = 0;
-                    for (k=pasLayers[j].numclasses-1; k>=0; k--)
+                    //for (k=pasLayers[j].numclasses-1; k>=0; k--)
+                    for (k=0; k < pasLayers[j].numclasses; k++)
                     {
                         initClass(&map->layers[i].class[iClass]);
                         msCopyClass(&map->layers[i].class[iClass],

Change History

09/29/06 19:49:08 changed by assefa


 Daniel : are commits allowed after rc1 or shoud we wait for release before fixing 
?

10/02/06 13:34:15 changed by dmorissette

  • owner changed from mapserverbugs to assefa.
  • cc set to dmorissette@mapgears.com.
  • milestone set to 5.0 release.
Too late for 4.10.0, I'll let you and Bart decide if the fix should go in 4.10.1
or 5.0 only since this is not a new issue, it was apparently like this in 4.8 as
well.

Setting target milestone to 5.0 release in the meantime. 

10/31/06 14:17:05 changed by tomkralidis

Has this been put in CVS HEAD?

10/31/06 14:46:28 changed by assefa

updated in cvs head. Bart do you need it in 4.10.x branch ?

10/31/06 15:46:27 changed by bartvde@osgis.nl

4.10.X would be really nice if possible.

12/28/06 02:55:40 changed by bartvde@osgis.nl

Assefa, was this fix ever backported to 4.10.X?

01/03/07 08:11:00 changed by bartvde@osgis.nl

I just found out this patch has a nasty side-effect. ElseFilters will now always
end up at the top of the class hierarchy in the MAP file ....... so mone of the
other rules will be drawn when an ElseFilter is present.

Assefa, do you know a fix for that?

01/03/07 08:56:07 changed by assefa

looking into this.

01/03/07 11:19:57 changed by assefa

Bart,

 I did an update on the mapserver cvs (mapogcsld.c). The else filters should now
be generated at the end of classes.

01/03/07 12:11:57 changed by bartvde@osgis.nl

Thanks Assefa, I'll test this tomorrow and if resolved I will close the bug.

05/03/07 10:25:10 changed by assefa

  • status changed from new to closed.
  • resolution set to fixed.

backported to 4.10.x r6079.

05/04/07 08:55:40 changed by bartvde

  • status changed from closed to reopened.
  • resolution deleted.

Assefa, I think you accidentally committed this line:

msSaveMap(map, "c:/temp/bug1925.map");

or not?

05/04/07 09:02:34 changed by bartvde

  • status changed from reopened to closed.
  • resolution set to fixed.

it was already removed by Assefa in changeset:6080