mediagis / nominatim-docker

100% working container for Nominatim
Creative Commons Zero v1.0 Universal
1.03k stars 434 forks source link

Existing Full Planet GeoServer OSM #560

Open LanceMcDermott opened 1 month ago

LanceMcDermott commented 1 month ago

I currently have an existing GeoServer, PostGIS setup on a CentOS VM that has the entire OSM Planet already processed. How could I set this up in that same environment and utilize the existing postgis data instead of PBF_URL or PBF_FILE. Maybe it would be something like PBF_DIR and point it to the location of the processed data?

Current setup was ImpOSM > PostGIS > GeoServer. Currently running 8080 for the GeoServer, but could kick that or this to 8081, 8082, etc.

mtmail commented 1 month ago

ImpOSM and Nominatim use different data structures. They're not compatible so they can't be reused.

instead of PBF_URL or PBF_FILE

It's PBF_PATH not PBF_FILE

jemacchi commented 1 month ago

hi @mtmail I'm interested on knowing more about the data structure used in Nominatim. Can you point me to the importation process files or some documentation about that ?

mtmail commented 1 month ago

https://nominatim.org/release-docs/latest/develop/Database-Layout/

Nominatim uses osm2pgql, specifially the 'flex' type (https://osm2pgsql.org/news/2020/07/28/release-1.3.0.html). You'd start with flex-base.lua (https://github.com/osm-search/Nominatim/tree/master/settings) and then depending on the configuration choosen, I think the Docker image uses import-full.lua by default.

Have a look at https://nominatim.org/tutorials/running-nomintim-and-rendering-together.html but it's really experimental, I'm not sure anybody is using it.

jemacchi commented 1 month ago

thanks ! really useful information. I have created a simple solution that integrates rendering and geocoding for the same imported pbf. https://github.com/geotekne-argentina/osm-nominatim-geoserver-postgis/ (but as in my original solution I used ImpOSM the database model differs)

I'm thinking now if I can build some abstraction "layer" on top on the nominatim model (like a set of sql views in the database) which allows to reuse current rendering model (so I can avoid to have same info in 2 different schemas).