3

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?

Thanks in advance :)

codego123
  • 171
  • 2
  • 12

1 Answers1

7

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.

scai
  • 20,297
  • 4
  • 56
  • 72