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?
-
2Please provide sample file and sample expected output. I think I could create a simple script to fit your needs.– Mattia GalatiCommented 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?– user unknownCommented Mar 4, 2018 at 8:19
-
1@userunknown: each county, not country. In the image, you can see lots of them.– Rudy VelthuisCommented Mar 5, 2018 at 18:44
1 Answer
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.
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– GramatikCommented Mar 5, 2018 at 14:47