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 anybody know if there's a sw/extension to convert an SLD to Esri. lyr format, or to import the SLD directly?

share|improve this question
    
Interesting question. Someone voted it down by one, probably figuring they'd seen it before, but all the other questions are from ESRI to SLD. Some searching doesn't find anything in this direction or an obvious way to import it. Even FME doesn't seem to manage it (it has no Layer writer, only a reader). Doesn't mean its not out there though. Maybe ESRI have their own bespoke one. –  GIS-Jonathan Nov 14 '12 at 15:58
    
giohappy, did you find an answer to this? –  GeorgeC Nov 19 '13 at 23:18
    
No GeorgeC, I don't need it anymore. However I haven't heard of solutions unless using writing some custom code based on ESRI APIs –  giohappy Nov 20 '13 at 10:11
add comment

2 Answers

If SLD is declared you can get layer parameters with parsing XML.

In Arcgis you need add a local feature class and load it as feature layer. Next, identifying type of symbology of your layer in SLD and next generate symbols with appropriate type in ArcGIS. Finally save your symbology to LYR.

I don't know if this script is dev... I find lot of subject for convert LYR to SLD but no reverse.

You can do a script for this conversion with arcpy and xml packages in Python environnement if you want. I think lot of persons are interested in.

share|improve this answer
add comment

You can use this example: http://openlayers.org/dev/examples/sld.html.

And it's possible with programmation to read your SDL (xml) and add the specifications to lyr

import arcpy 
lyrFile =arcpy.mapping.Layer(r"C:\Project\Data\Streets.lyr") 
for lyr in arcpy.mapping.ListLayers(lyrFile):
if lyr.name.lower() == "highways":
    lyr.showLabels = True
lyr.saveACopy(r"C:\Project\Data\StreetsWithLabels.lyr") 
del lyrFile
share|improve this answer
3  
I fail to see how this reads a SLD and outputs an ESRI .lyr file. –  til_b Nov 11 '13 at 12:15
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.