Geographic Information Systems Asked on August 12, 2021
I want a method to export osm files from a Postgres database. I already have an osm2pgsql database, an apidb database, and a nominatim database in which I have imported osm files. Now I need to export osm files from a database with an osm2pgsql schema and use it with the nominatim and api-db(openstreetmap-website) database.
I know that the osm2pgsql is a tool for populating a PostGIS database that allows us to run the Mapnik rendering software, Nominatim search software, or our geospatial queries and have a different database table structure to that required by the openstreetmap-website rails app.
But, I need to create for use in future imports using osmosis and osm2pgsql tools and for backup purposes.
Can anyone help me with how to do this?
There is no way to export an osm
file from a database with osm2pgsql schema.
So I solved my problem creating a database with the snapshot schema that is a modified and simplified version of the main OSM DB schema.
I've imported my osm file and I recreated the changes that I had made in the database with the osm2pgsql schema in the database with the snapshot schema.
Now, I can import a osm file with osmosis of the database with snapshot using the command:
osmosis --read-pgsql host="" database="" user="" password="" outPipe.0=pg --dd inPipe.0=pg outPipe.0=dd --write-xml inPipe.0=dd file=file.osm
So, I used this osm file to generate my databases for my databases with nominatim, osm2pgsql, and APIDB schemas.
Correct answer by valdeci on August 12, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP