QGIS – How to Export as SVG with Path and Polygon IDs in QGIS 2

exportqgis-2svg

I imported two layers to my Project (one is a shapefile from natural earth, the other is built out of lon/lat Points in a csv-data-file) QGIS fits the two graphics perfect together. Now my goal is to export this as an svg-file. This works fine, too.

Is there a way to store id-names for the paths and objects in the svg-file?

The ids should be based on the underlying attribute-tables of each layer. I have to do this automatically because of the amount of data-points. I read something about layer splitting. But I cannot even find the names of layers in my svg output file so I guess this will not help me. If there is no way to manipulate the svg directly, can it be done with a workaround? (I think about putting shapefiles with all informations together and transforming it to svg in another way?)

I am using QGIS 2.18.17 Las Palmas

I want to identify the polygons in the underlying svg data, like i have a polygon in my Image, and I open the svg-file with a text Editor, I want to have <path id="USA"><\path>. I want to have the Information stored in the metadata of the vector-graphic, but I don't want to see the data in the picture. Afterwards I want to adjust the file to fit into html and therefore I have to be able to identify single parts of the picture.

Best Answer

So I found a solution for my problem:

  1. import the layers you need as usual
  2. split the layers by the attribute you want to have as an id
  3. re-import the splitted layers (so layer names will be ids)
  4. use add-in simple svg to export as svg
  5. be happy :)

Best regards to all readers