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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With