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

question about parsing osm file

0

Hi everyone,I have participated in a small contest using OpenStreetMap data.

The map data format that the contest provided was "<wayid>^<name>^<lat_1>^<lon_1>^...^<lat_n>^<lon_n>"

I'd like to convert the osm file into the similar format above.

Is there any tool can help?

asked 20 Oct '12, 21:52

jeffreyshe's gravatar image

jeffreyshe
1112
accept rate: 0%

edited 20 Oct '12, 21:53


2 Answers:

0

You should be able to do this with osmjs. See https://wiki.openstreetmap.org/wiki/Osmium/Quick_Start and play around with the osmjs examples. You can use the CSV output class which is basically a file output.

answered 21 Oct '12, 09:04

Jochen%20Topf's gravatar image

Jochen Topf
5.2k55074
accept rate: 31%

Osmium seems really difficult. I will try to figure out how to use it. So where can i find the osmjs examples?

(21 Oct '12, 10:16) jeffreyshe

0

Try Osmconvert ... it has an option to output CSV data from osm files.

answered 21 Oct '12, 18:13

stephan75's gravatar image

stephan75
12.6k556210
accept rate: 6%

Source code available on GitHub .