13

Is there a simple means to convert, say, an SVG or other vector image format file to KML and vise versa?

There are incredibly powerful vector editing tools which attempt to replicate the way reality works, or at least the way it presents itself to the artist's eye. GIS manipulation tools are much more focused on the data itself, as opposed to the "whys" of the data.

There are cases where I would like to import a KML file into GIMP or Fireworks, re-touch it, and convert it back. Anyone?

1
  • Nice question. It is interesting to point that they are both XML, so, in a way, they are "almost the same stuff" (although quite different, of course). It should basically involve two-way mapping each equivalent datatype from one domain to the other. One interesting food for thought would be to map KML styles to CSS styles and back... Dec 17, 2014 at 17:16

3 Answers 3

6

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

http://kml2svg.free.fr/

4
  • Here is another small tool that converts the other way: bitbucket.org/tbrugz/kmlutils/changesets There are also tools that will rectify a "flat" vector or raster image to WGS84, etc: labs.metacarta.com/rectifier <-- which, I think, is a web service wrapped around a tool written for GRASS
    – user2479
    Mar 28, 2011 at 17:27
  • Also, here < bit.ly/gNZ53A > is an answer recommending Illustrator --> GlobalMapper (350USD) --> KML, and possibly vise versa. globalmapper.com/product/features.htm claims to be able to, "Crop, reproject, and merge/mosaic any combination of raster data and elevation data" and "...edit existing vector features. Newly created and edited features can be saved to any of the supported export formats. Shapes like rectangles, circles, ellipses, arcs, buffers around existing features, and concentric range rings can be easily created." Now I need $350... meh.
    – user2479
    Mar 28, 2011 at 17:49
  • Another tool that might work (though I have not completely figured out how) is Potlatch 2 by mapquest < open.mapquestapi.com/dataedit > or < josm.openstreetmap.de > by openstreetmap. For more info, see this blog post: mapperz.blogspot.com/2010/11/… (mapperz, is that you?)
    – user2479
    Mar 28, 2011 at 18:27
  • Yes it's my blog - thanks for the PR. More Potlatch 2 (OSM Development) is here wiki.openstreetmap.org/wiki/Potlatch_2
    – Mapperz
    Mar 28, 2011 at 19:23
5

Some notes:

  1. You'd need an editor which could work with geo coordinates instead of simple X,Y ones. Or you would need to reproject coordinates when converting.
  2. Converting from KML to SVG would mean potentially losing KML-specific information which is not stored by the SVG format.
  3. Converting from SVG to KML would mean potentially losing SVG styling and other features not covered in KML.
  4. GIMP is not a vector graphics editor (AFAIK), you probably mean Inkscape.

Other than that, there are quite a few tools which claim to do what you're looking for.

1
  • 1) 3d vs 2d... forgot about that. 4) GIMP now has limited vector tools built in
    – user2479
    Mar 28, 2011 at 17:39
3

I wanted to get a geographic area from a KML file into Microsoft Visio. I got it working like this:

  1. Open the KML file in the web app.
  2. Get the projection in the way you want
  3. Export to SVG file
  4. Import the SVG file in Inkscape
  5. Save the file as EMF file
  6. Insert the EMF file in Visio as a picture

Visio supports insertion of SVG files, but for some reason it didn't work, so I had to go via Inkscape.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.