NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I have a pretty big, custom .kml file (it is the property of my company, and I can legally use it), what I want to import into an .osm file, downloaded from here: download.geofabrik.de. I can open this .osm map in softwares, for completely offline usage, such as Marble.

My question is: can I somehow merge this kml and osm file, so when I open the merged file in Marble, the routes described by the kml are also visible? So basically, I want to merge a.kml with b.osm, resulting in c.osm, what I can use offline.

Is it possible? If yes, can you direct me in the right direction?

Any help is appreciated, thanks!

EDIT: with "custom .kml" I meant standard kml file format, and it contains routes only, no idea why I wrote that :)

EDIT2: I have tried GPSBabel, it indicates that it can convert .kml to .osm. It generates a 65MB .osm file from my 12MB .kml, but when I open it in Marble, it does not show any routes, so it looks like a dead end. :/

EDIT3: Well, GPSBabel produced an input what QGIS could open. I merged the two .osm file with osmosis, but the problem is, the output is invalid, nothing can open it. Any idea?

EDIT4: I guess this will be the last edit, sort of a "bump", since I'm still stuck on the issue, and maybe someone will notice, who has a solution, which I would be very happy to hear. :)

asked 06 Aug '13, 14:49

hundeva's gravatar image

hundeva
16112
accept rate: 0%

edited 13 Aug '13, 13:49

As I just discovered, ogr2ogr can read OSM files but apparently not write them. So it seems not to be possible using ogr2ogr.

(06 Aug '13, 15:24) gormo

You can open KML and OSM files using QGIS.

Here is a basic tutorial on importing KML files into QGIS.

Here is a wiki page and another wiki page on using OSM data in QGIS.

You will probably then be able to save the various files into formats that can be manipulated by other software if needed. Alternatively, you may be able to meet your needs using QGIS.

permanent link

answered 07 Aug '13, 08:05

rovingmedic's gravatar image

rovingmedic
1.1k41321
accept rate: 5%

edited 07 Aug '13, 08:06

1

Thanks, I will take a look at this!

(07 Aug '13, 08:24) hundeva
1

Unfortunately, this does not seem to work. After opening the kml, and trying to save as osm, I get the following error: "No OSM data are loaded/downloaded or no OSM layer is selected in Layers panel. Please change this situation first, because OSM Plugin doesn't know what to save." The layers are selected, so it does not seem to recognize it.

(07 Aug '13, 11:59) hundeva

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×710
×362
×49
×41

question asked: 06 Aug '13, 14:49

question was seen: 10,544 times

last updated: 13 Aug '13, 13:49

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum