[mapserver-users] SLD and Offset

Kickinger Johann hannes.kickinger at gmail.com
Thu Apr 14 11:05:33 EDT 2011


I have real time traffic data which has values for one link/line in both
directions e.g. value 0 (green) in the digitalisation direction and value 3
(red) against the digitalisation direction.
At the moment this is done with OFFSET x -99 and works well. I see the link
two times with, if available, two different values

       CLASS
            NAME C_0_0
            EXPRESSION (([value_los] = 0) && ([linkdirection] = 0))
            STYLE
                        COLOR 0 117 0
                        WIDTH 3
                        ANTIALIAS TRUE
                   OFFSET 2 -99
                END
        END
        CLASS
            NAME C_0_1
            EXPRESSION (([value_los] = 0) && ([linkdirection] = 1))
            STYLE
                        COLOR 0 117 0
                        WIDTH 3
                        ANTIALIAS TRUE
                   OFFSET -2 -99


Now I wanted to use SLD with UserStyle - the color and width is changeable,
but I noticed that the OFFSET was overruled and so I dont see different
values for separate directions. I found no parameter in the SLD for the
Offset of a line.
So my workaround is SLD with NamedStyle - I copied the Classes and the first
are in group1 the last in group2. I switch in the one layer with the name of
the group.
So my question is - is it possible to use UserStyle SLD with the possibility
to set a usefull offset or could the offset in the mapfile could be used
even if nothing more is defined in the SLD.
Thanks for your support/ideas.
BR,
Hannes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20110414/60e6e13b/attachment.html


More information about the mapserver-users mailing list