Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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.)

share|improve this question
add comment

2 Answers 2

up vote 4 down vote accepted

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

share|improve this answer
add comment

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:

share|improve this answer
    
Interesting idea. will need check this way. Thanx) –  Andrey Maraev Apr 29 at 10:39
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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