I can find lots of documentation on how to convert KML polygons to SVG objects but nothing to do the reverse. Does such a script exist, or does anyone have any idea of how to write one?
Basically I'd like to take some of the GPL SVG maps from wikimedia commons e.g. this, which make individual shapes for each nation/province (and possibly include other geographical overlays), and convert them into KMLs. I'm guessing that a script provided with the coordinate system of the SVG map and the lat/lon of the origin could make this conversion, but this looks like a non-trivial task so I'm hoping something has already been done.
I found the tools at http://kml2svg.free.fr/, but this can only convert SVG files that were produced by the KML->SVG converter on the same site.
I also thought that I could maybe reverse the jsfiddle example posted on convert kml polygons to svg paths, but I've not been able to get the example working in a local web project (I'm pretty new to both SVG/KML development and Javascript, and am unfamiliar with the workings of the Proj.4 library).
Alternatively, if anyone can think of a better approach to solving the original problem of quickly creating "political map" style KML layers I'm open to suggestions.
Just looking for the same I found your post, so here's another hit from my google list.
For an initial step, you may want to look at this page:
https://github.com/tbrugz/kmlutils
The purpose of this project is to provide functions for XML-based "visual" file formats. Main Focus is KML, SVG and GraphML file formats.
The main functionality of this project is a tool for converting SVG files into KML files. Currently it (svg2kml) partially converts polygons (tbrugz.geo.SVG2KML)
This project also provides a conversion tool for SVG to GraphML (tbrugz.geo.SVG2GraphML)
Good luck!