How can we export data from PostgreSQL database into *.osm.pbf?


I found multiple tool that convert osm file into PostgreSQL database, but they all seem to not support the reverse process. Did you know if there’s tool for that?

What we want to achieve is to have a central database that is easy to manage osm data for adding tags and be able to convert it back for use on other software that use this format.

I’m on a Linux OS.

Thank you.

Hi Richard,

That seem awsome. The only part I’m not sure is what tools that load the data into PostgreSQL to be formated for this tool to be able to extract it.

It’s written for the main OSM database itself, so it expects data in the database schema of openstreetmap-website (the site code).

If you’re not directly generating data with an openstreetmap-website instance, you probably want to look at Osmosis as well/instead:

1 Like

I’ll then look at the Osmosis tool.

Thank you.