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 how to export the Natural Earth 1:110m shapefile to SVG with ArcMap while retaining the country attributes?

From SVG I'm gonna try to convert it again over to RaphaelJS to achieve something like:

http://backspace.com/mapapp/javascript_world/

http://backspace.com/mapapp/javascript_world/js/world_570.js

But I'm new to all of this so I'm not sure how to go about it. Maybe there's no way but to manually add the country codes for the JS?

share|improve this question

2 Answers 2

up vote 4 down vote accepted

I created those maps, so I can describe the process I used. There's probably a better way to do it, but here's how it works for me:

  1. In ArcMap, give each state its own layer. I use layer ID's from the source layer attributes table and then a bit of ArcMap Python:

    import arcgisscripting
    gp = arcgisscripting.create()
    gp.MakeFeatureLayer_management('ne_110m_admin_0_countries','AF','"ABBREV" = \'Afg.\'')
    gp.MakeFeatureLayer_management('ne_110m_admin_0_countries','AO', '"ABBREV" = \'Ang.\'')
    gp.MakeFeatureLayer_management('ne_110m_admin_0_countries','AL', '"ABBREV" = \'Alb.\'')
    ...etc...
    

    This creates a new layer for each state named with that stat's two-letter ISO code.

  2. I export from ArcMap as Adobe Illustrator. In Illustrator, the layers are preserved and named as they were in ArcMap. In Illustrator I size up the shapes appropriately and do some fine-tuning on the styles. Then export as SVG.

  3. Run this perl script to convert SVG file to Raphael.js friendly json: https://gist.github.com/2655111

And that's that!

share|improve this answer

Not sure whether this will work for you (I'm guessing it's a lot easier to use on a Linux system), but this project looks promising, especially if you know any Perl:

https://github.com/kbh3rd/shptosvg/wiki

share|improve this answer

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.