1

Does anyone know where I can find the converter from .map to .sld?

I have a big mapfile of styles for OSM and I have the styles mapnik.xml for OSM but I use Geoserver for my work. Or does anyone have some sld styles of OSM for PostGIS layers planet_osm_point and planet_osm_polygon? (I already have the style for planet_osm_line.)

4

There is a converter being developed by Dave Winslow at https://github.com/dwins/mapnik2geotools that may be able to do what you want. If you just want SLD to style OSM then you could look at https://github.com/darrell/openstreetmap-sld

2

You can use the map file to create a MapServer WMS, then you can perform a GetStyles request which will generate an SLD file. For example looking at the BGS 625k Geology WMS:

The response shows that GetStyles is supported:

<ms:GetStyles>
    <Format>text/xml</Format>
    <DCPType>
        <HTTP>
            <Get>
                <OnlineResource 
                    xmlns:xlink="http://www.w3.org/1999/xlink"
                    xlink:href="http://ogc.bgs.ac.uk/cgi-bin/BGS_Bedrock_and_Superficial_Geology/wms?language=eng&"/>
            </Get>
            <Post>
                <OnlineResource 
                    xmlns:xlink="http://www.w3.org/1999/xlink"
                    xlink:href="http://ogc.bgs.ac.uk/cgi-bin/BGS_Bedrock_and_Superficial_Geology/wms?language=eng&"/>
            </Post>
        </HTTP>
    </DCPType>
</ms:GetStyles>

and gives us us the list of layer names including GBR_BGS_625k_BLT, to which we can apply the request, like:

  • Interesting idea. will need check this way. Thanx) – Andrey Maraev Apr 29 '14 at 10:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.