I have a collection of SVG vector images I need to display on a map, probably using OpenLayers/KML. Is there any way to convert a vector image from SVG to KML? Or would it make more sense just to use PNG? I would prefer to use vectors because the images will be rotated and need to scale properly when zooming.
[GIS] How to prepare SVG images for presentation in OpenLayers
kmlopenlayers-2svgvector
Related Solutions
Simple as in SVG to KML and KML to SVG?
This tool converts Google Earth files(kml and kmz) into vectorial SVG files, usable in Inkscape, Illustrator and other software.
kml2svg.free.fr converts most of the elements that contains a GE document:
folders
placemarks (points, lines, polygones, multigeometries and embeded images)
tours
Sketchup resources (depending of the resources..)
using the desired earth projection:
Mercator,
Miller,
Cylindrical Equal-Area (Lambert, Behrmann, Tristan Edwards, Peters, Galls, Balthasart),
Cylindrical Equidistant,
Sinusoidal,
Van der Grinten I,
Polyconic,
Albers Equal-Area Conic,
Conic Equidistant,
Bonne,
Lambert Conformal Conic,
Lambert Azimuthal Equal-Area,
Cassini
If you render raster data into map tiles you have to choose whether you want to create a Google Earth tiles (in Plate Carree) for displaying in KML/KMZ or Google Maps tiles (Mercator) for displaying in the web viewers such as OpenLayers, Google Maps, Leaflet, etc.
These uses two different map projections. Cartographically correct solution is to render two different tile sets with MapTiler (http://www.maptiler.com/) and host these separately.
In the MapTiler in the first screen you can make this choice, either "Mercator tiles" or "Google Earth".
I would recommend to go for two different datasets.
Technically, a hack which would display the Mercator tiles in Google Earth could be done as well - this could run for the deep-zoomed viewes - but if your data covers large regions (countries,states,continents) the differences between the map projections would already be visible as a north-south shift while zooming. See my documentation and source code in python at http://www.maptiler.org/google-maps-coordinates-tile-bounds-projection/ if you are into this approach. Still this is a hack and proper solution is mentioned above - with two distinct tilesets.
Best Answer
As SVG is a vector format (image is made on the fly by client software), you can check GDAL/Ogr utility ogr2ogr, I guess it can convert svg to kml.