I have an .svg file that has a map of the United States with each county being a different object. I want a list of all these objects along with their ID. When I right click an object and select "object properties" I can see the ID and the Label of the object, but is there any way to export a list of these?

Picture is what I'm working with enter image description here

  • 2
    Please provide sample file and sample expected output. I think I could create a simple script to fit your needs. Mar 3, 2018 at 7:24
  • Do you want one SVG-file for each country - maybe resized to fit that country? Just the core values of the groups? Something else? Show some sample part of the SVG and what you consider an object to be. All objects into one file, or one file per object? Or maybe one exported png per state? Mar 4, 2018 at 8:19
  • 1
    @userunknown: each county, not country. In the image, you can see lots of them. Mar 5, 2018 at 18:44

1 Answer 1


I didn't have an SVG file of the USA with each county being a different object, but found a map of the USA with each state being a different object.

When I opened that file in a text editor, I was able to see the individual path IDs that are part of the file.

State listing in SVG file

Unfortunately, I'm not a script wizard, but I suspect that someone with reasonably simple scripting skills would be able to parse the path IDs for your document.

If it was a one-off project, you could manually edit the file by deleting everything else, although every county in every state in the USA would be rather excessive.

I have a macro program that I would use, creating a simple "manual" editing script, turning a tedious process into a brute force process instead.

I suspect that if one were skilled in Python, the process would be even simpler.

  • I should have thought of this off the bat, thanks this will work perfectly
    – Gramatik
    Mar 5, 2018 at 14:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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