I have imported the pbf data to postgres using osm2pgsql.

osm2pgsql -U postgres -W -d osmdbv4 --output-pgsql-schema=db_snapshot --latlong -H localhost -C 20480 --middle-schema=db_snapshot -S default.style  --prefix=aut --hstore-all --number-processes=24 --slim "country-latest.osm.pbf"

Now I want to create pbf file from this database. I see the option of osmosis, but the database schema of osm2psql and osmosis are different.

How I can export the data in pbf format, which is imported using osm2pgsql tool?


1 Answer 1


There is no way to convert pgsql to pbf for osm2pgsql generated data.

osm2pgsql is only one way process, currently there is no way for pgsql2osm


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.