NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

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's gravatar image

accept rate: 0%

A Nominatim import is usually done with the setup.php script which loads its configuration from settings.php. If you have managed to import into a second database, then you will likely have made that modification already?

(17 Jun '19, 23:18) Frederik Ramm ♦

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)

(18 Jun '19, 09:19) Maik28

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 of setup.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 the settings.php connection string to point to a new database, and then run setup.php in that new directory.

(18 Jun '19, 09:33) Frederik Ramm ♦

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 17 Jun '19, 14:55

question was seen: 2,413 times

last updated: 18 Jun '19, 09:33

NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum