How to convert SVG to SHP (Shape File) format?

I am trying to convert an SVG file to SHP (form file format) and then import it into GeoServer.

Is there any converter available OR is there any intermediary format in which I can convert it and finally get it in SHP format?

I already have an India Map form file. Now in recent years, several odd 60 districts have appeared. New areas are separated from the old. Thus, the total area of ​​the country has not changed, but divided.

I think that if I can combine the new layer that I have in the new districts in SVG format into the original data of the SHP file and get the final coordinates displayed according to the SHP file, then the problem can be sorted.

If someone did this and can help, it will be great !! Thank you !!

+6
source share
1 answer

Very unlikely. SVG is a "drawing" format, and therefore there is no guarantee that the lines have coordinates that are in the real world - they can be in centimeters based on a piece of A4 paper.

Thus, you will need to at least work out a transformation from these coordinates to lat-long or some other coordinate system. It may be non-linear ...

However, SVG is an XML file, so you can open it in a text editor and look at it. If you can figure out which elements contain the required coordinates, you can write a script (I would do it in Python, but any language that you can program in that has XML support will do) to cross out the coordinates. Then you could think about converting them to a shapefile - or maybe to GML - the standard XML format for geographic data.

But honestly, it would be much easier to create a shapefile with the borders you want in it.

+4
source

All Articles