I want to extract some information from a .osm.pbf
file. I looked through OpenStreetMapX.jl
package but didn't find a function to read this data. I am wondering if anyone know a method to read this data. Alternatively is there a way to convert .osm.pbf
to .osm
file so that I found just use the get_map_data()
method offered by OpenStreetMapX
package
Asked
Active
Viewed 6,567 times
7

imantha
- 2,676
- 4
- 23
- 46
-
1You can try https://wiki.openstreetmap.org/wiki/Osmconvert, i.e. `osmconvert myfile.osm.pbf > myfile.osm`. – carstenbauer Feb 17 '21 at 09:45
2 Answers
11
I would use Osmosis for that:
osmosis --read-pbf myFile.osm.pbf --write-xml myFile.osm

matthieun
- 763
- 5
- 13
-
Additional tip - when working with larger maps always run it through OSM filter (https://wiki.openstreetmap.org/wiki/Osmfilter) before processing with OpenStreetMapX – Przemyslaw Szufel Feb 17 '21 at 22:34
-
The wiki says osmosis won't continue development, one should look into new tools especially when first learning them. – xeruf Dec 09 '21 at 10:30