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:



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?


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

    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!


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:


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.