Hey, is it possible to pull out a .osm file from a postgres database. ive got osm data inputted inside a postgresql datbase on my linux server, is it now possible to pull that data out into an osm file Thanks in advance :) asked 27 Jan '21, 13:02 shafi-as |
If you have imported with osm2pgsql or imposm then the answer is no, you can never go back to the original OSM file because metadata has been lost. You could possibly write code to generate a "pseudo" OpenSteetMap XML but how you would do that, and how useful it would be, depends on the data structure in your PostgreSQL and on what you want to do with the resulting OSM file. answered 27 Jan '21, 13:52 Frederik Ramm ♦ 2
yes, it's just a reverse of the write to api-db https://wiki.openstreetmap.org/wiki/Osmosis/Detailed_Usage_0.48#--read-apidb-current_.28--rdcur.29
(27 Jan '21, 14:21)
SK53 ♦
Thanks Frederik for the insight, Also SK53 solution has allowed me to create an osm file from an API DB, for anyone who is looking for a command
(28 Jan '21, 09:40)
shafi-as
|