1. tbrugz
  2. kmlutils


Clone wiki

kmlutils / HOWTO.en

Download the file https://bitbucket.org/tbrugz/kmlutils/downloads/svg2kml.jar to a folder of your choice

Download the file https://bitbucket.org/tbrugz/sqldump/downloads/commons-logging-1.1.1.jar to the same folder

Download the file https://bitbucket.org/tbrugz/kmlutils/raw/tip/svg2kml.properties.template to the same folder (rename it to svg2kml.properties)

Download the file https://bitbucket.org/tbrugz/kmlutils/raw/tip/snippets.properties to the same folder (make sure its name is snippets.properties)

Download the file https://bitbucket.org/tbrugz/kmlutils/raw/tip/work/input/Municipalities_of_RS.svg to the same folder

Edit the file svg2kml.properties, so that the last lines are like this:

# the input SVG file to read from

# prop file with id mappings (optional)

# the output KML file to write to

in the command line, run:

cd <where the downloaded files are>
unix: java -cp svg2kml.jar:commons-logging-1.1.1.jar tbrugz/geo/SVG2KML
windows: java -cp svg2kml.jar;commons-logging-1.1.1.jar tbrugz/geo/SVG2KML

If everything runs OK, you'll have a file named Municipalities_of_RS.kml in your folder.

Then, to transform your svg files into kml, you must edit svg2kml.properties, changing the path for your svg (property svg2kml.svgin) and where you want your kml (property svg2kml.kmlout).

For a good result, you should also change the properties svg2kml.maxX, svg2kml.minX, svg2kml.maxY & svg2kml.minY in the svg2kml.properties file according to your file.