MapServer / MapServer-import

3 stars 2 forks source link

when reading an SLD, sequence of classes is reversed #1925

Open tbonfort opened 12 years ago

tbonfort commented 12 years ago

Reporter: bartvde@osgis.nl Date: 2006/09/29 - 16:29

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],
tbonfort commented 12 years ago

Author: assefa Date: 2006/09/30 - 01:49


 Daniel : are commits allowed after rc1 or shoud we wait for release before fixing 
?
tbonfort commented 12 years ago

Author: dmorissette Date: 2006/10/02 - 19:34

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. 
tbonfort commented 12 years ago

Author: tomkralidis Date: 2006/10/31 - 20:17


Has this been put in CVS HEAD?
tbonfort commented 12 years ago

Author: assefa Date: 2006/10/31 - 20:46

updated in cvs head. Bart do you need it in 4.10.x branch ?
tbonfort commented 12 years ago

Author: bartvde@osgis.nl Date: 2006/10/31 - 21:46

4.10.X would be really nice if possible.
tbonfort commented 12 years ago

Author: bartvde@osgis.nl Date: 2006/12/28 - 08:55

Assefa, was this fix ever backported to 4.10.X?
tbonfort commented 12 years ago

Author: bartvde@osgis.nl Date: 2007/01/03 - 14:11

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?
tbonfort commented 12 years ago

Author: assefa Date: 2007/01/03 - 14:56

looking into this.
tbonfort commented 12 years ago

Author: assefa Date: 2007/01/03 - 17:19

Bart,

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

Author: bartvde@osgis.nl Date: 2007/01/03 - 18:11

Thanks Assefa, I'll test this tomorrow and if resolved I will close the bug.
tbonfort commented 12 years ago

Author: assefa Date: 2007/05/03 - 16:25 backported to 4.10.x 37059649db66a01a095cfcca2707480fce41c681 (r6079).

tbonfort commented 12 years ago

Author: bartvde Date: 2007/05/04 - 14:55 Assefa, I think you accidentally committed this line:

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

or not?

tbonfort commented 12 years ago

Author: bartvde Date: 2007/05/04 - 15:02 it was already removed by Assefa in changeset:6080