This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

How to convert .osm to KML format?

3
1

How can I convert data in .osm XML format to KML format?

eg I would like to download all of a certain type of POI from XAPI in .osm format. Then I want to convert it to KML, so I can use it as an overlay in Google Earth or OpenLayers. I would like to convert particular OSM tags to the name and description in the KML overlay, plus show different icons depending on the tags.

Is there any software to do this easily? I have tried GPSBabel, which can do the basic conversion, but it seems limited in which .osm tags it can read and process.

asked 19 Sep '10, 00:15

Vclaw's gravatar image

Vclaw
9.2k895141
accept rate: 22%

edited 06 Apr '15, 19:37

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554


One Answer:

3

Take a look at the Ruby osmlib and its associated "export" tool. It can create KML files according to a specification you write.

answered 19 Sep '10, 01:36

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

Source code available on GitHub .