Hi, I've got a server running nominatim with planet database. As I wanted to update my data I've imported a new planet file into a second database on the same server. How can I change the database which should be used? Do I have to modify this line in the directory build/settings/settings.php?: @define('CONST_Database_DSN', 'pgsql://@/nominatim'); // <driver>://<username>:<password>@<host>:<port>/<database> asked 17 Jun '19, 14:55 Maik28 |
A Nominatim import is usually done with the
setup.php
script which loads its configuration fromsettings.php
. If you have managed to import into a second database, then you will likely have made that modification already?I did the second import with osm2pgsql.
My plan was to test Nominatim with the new database and then switch over. (I hope it doesn't matter how the import was done especially because the database schema is different)
If you have not used the exact same commandline flags that Nominatim uses during your second import (especially
-o gazetteer
but also others) then your second import is not usable for Nominatim at all. If you have used these flags then it can be used, but you need to run a series of steps, notably the indexing steps, before you can use it. Have a look at the source code ofsetup.php
and all the steps it performs when you run it with--all
; essentially you need to run all these minus the bare import. -- The easiest & most foolproof way to re-import into a second database is to copy your whole Nominatim directory, change thesettings.php
connection string to point to a new database, and then run setup.php in that new directory.