3

I need a tool like osm2po or osm2pgsql but that does the opposite thing, convert a postgis table to a pbf file. I think qgis can do this but I can't find that option.

4

GDAL can only read pbf files, so no chance to write it with GDAL or QGIS.

Osmosis is able to read from a postgis database and write to pbf, but only for its own snapshot or simple data scheme. These schemes use nodes, ways and relations (like they are stored in the OSM database), while a "usual" Postgis data scheme uses points, lines, multilines, polygons and multipolygons.

Converting from one scheme to the other is one of the difficult and time consuming parts of osm2pgsql.

| improve this answer | |
  • thanks, this command osmosis --read-pgsql --write-pbf does the trick( many parameters are missing, leaving this for future reference : Osmosis: Detailed Usage ). – Francisco Valdez Nov 11 '14 at 16:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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