Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Conversion of .osm file extension to .osm.pbf [closed]

I am trying to use osm2pgsql which requires me have a .pbf file extension. Is it possible to convert .osm file to .osm.pbf file?

like image 854
codego123 Avatar asked Nov 18 '25 11:11

codego123


1 Answers

osm2pgsql can read .osm files directly. .osm.pbf is just a compressed .osm file (see PBF Format in the OSM wiki).

If you still need to convert between those files for whatever reason then take a look at osmium-tool (the fastest and more modern), osmosis or osmconvert.

like image 80
scai Avatar answered Nov 20 '25 19:11

scai



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!