[mapserver-users] Remote SLD doesn't work with ms4w

Andrey Maraev asmaraev at gmail.com
Tue Oct 11 07:19:25 PDT 2011


hello there! Can anyone show me an example of SLD for mapserver which using
OSM data (shapes). I have already done the styles for geoserver but it
doesn't work like SLD files in the mapserver.
First, when I used osm-style for roads:
..........
<TextSymbolizer>
            <Label>
                <ogc:PropertyName>REF</ogc:PropertyName>
            </Label>
            <Font>
                <CssParameter name="font-family">Lucida Sans</CssParameter>
                <CssParameter name="font-size">10</CssParameter>
                <CssParameter name="font-style">normal</CssParameter>
                <CssParameter name="font-weight">bold</CssParameter>
            </Font>
            <Fill>
                <CssParameter name="fill">#ffffff</CssParameter>
                <CssParameter name="fill-opacity">1.0</CssParameter>
            </Fill>
            <VendorOption name="group">yes</VendorOption>
            <VendorOption name="spaceAround">0</VendorOption>
            <VendorOption name="repeat">750</VendorOption>
            <Graphic>
                <ExternalGraphic>
                    <OnlineResource xlink:type="simple"
xlink:href="symbols/tru_shield5.png"/>
                    <Format>image/png</Format>
                </ExternalGraphic>
                <Size>18</Size>
            </Graphic>
          </TextSymbolizer>
........
I got this:
..........
 LABEL
        SIZE MEDIUM
        TYPE BITMAP
        BUFFER 0
        COLOR 255 255 255
        FORCE FALSE
        MINDISTANCE -1
        MINFEATURESIZE -1
        OFFSET 0 0
        PARTIALS TRUE
        POSITION CC
      END
      STYLE
        ANGLE 360
        COLOR 168 218 168
        SIZE 2
        SYMBOL "sld_line_symbol"
        WIDTH 1
      END
      TEXT ([REF])
    END
SYMBOL
    NAME "sld_line_symbol"
    TYPE ELLIPSE
    FILLED TRUE
    POINTS
      1 1
    END
  END
.............
 Second, I tried to get style for the railroads like
<LineSymbolizer>
                        <Stroke>
                            <CssParameter
name="stroke">#ffffff</CssParameter>
                            <CssParameter
name="stroke-width">5</CssParameter>
                            <CssParameter
name="stroke-linejoin">round</CssParameter>
                        </Stroke>
                    </LineSymbolizer>
                    <LineSymbolizer>
                        <Stroke>
                            <CssParameter
name="stroke">#4B4B4B</CssParameter>
                            <CssParameter
name="stroke-width">3</CssParameter>
                            <CssParameter
name="stroke-linejoin">round</CssParameter>
                        </Stroke>
                    </LineSymbolizer>
                    <LineSymbolizer>
                        <Stroke>
                            <CssParameter
name="stroke">#ffffff</CssParameter>
                            <CssParameter
name="stroke-width">2</CssParameter>
                            <CssParameter
name="stroke-linejoin">round</CssParameter>
                        </Stroke>
                    </LineSymbolizer>
                    <LineSymbolizer>
                        <Stroke>
                            <CssParameter
name="stroke">#878787</CssParameter>
                            <CssParameter
name="stroke-width">4</CssParameter>
                            <CssParameter
name="stroke-linejoin">round</CssParameter>
                            <CssParameter name="stroke-dasharray">1
8</CssParameter>
                        </Stroke>
                    </LineSymbolizer>
.................
but I got the poor style.

Please, help me in this issue! I need osm-style.sld for
roads,railroads,landuse... Mapserver version 5.6.6

-- 
lernen,lernen und lernen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20111011/a20c84ab/attachment.htm>


More information about the MapServer-users mailing list