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

osmium export with node id

0

Hi. I use osmium for export map.osm to map.geojson (use in mobile app). How can i add node id to geojson file?

My code:

osmium export map.osm -o data.geojson

asked 12 Oct '22, 11:55

kadi4's gravatar image

kadi4
36112
accept rate: 100%


One Answer:

0

I close ticket.

I edit config file:

"id":        true,

and then:

osmium export -c config map.osm -o data.geojson

Result:

{"type":"Feature","geometry":{"type":"Point","coordinates":[40.5024238,55.9909894]},"properties":{"@id":1562589184,"power":"tower"}}

answered 12 Oct '22, 12:39

kadi4's gravatar image

kadi4
36112
accept rate: 100%

Source code available on GitHub .