This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Nominatim. Best Practice / Fastest Method to update / merge new osm file into database?

1

Hi.

I'd set up Nominatim for the Uk using http://download.geofabrik.de/europe/great-britain-latest.osm.pbf without any issues. However I then wished to update the database with an additional set of data (in this case: http://download.geofabrik.de/europe/ireland-and-northern-ireland-latest.osm.pbf).

My first effort was to use ./utils/update.php --import-file using the Irish file. However this crashed my machine whilst attempting to reindex the updated tables - the machine ran out of disk space. Having read that there were some issues doing updates like this, I truncated the database tables and tried running the update.php script again having first merged the two osm files using osmosis.

This loaded the basic data in ok but unfortunately the php isn't expecting some of the support tables to be empty as I was left with the placex data missing certain key fields, e.g. postcodes, parent_place_ids, centroids.

Is there any script I could have run before the osm import to ensure these fields would have been populated?
(from looking about the setup.php and update.php files, I found a script to populate location_postcodes, and then ran a cursory update on placex thinking the trigger plsql would update the fields but it didn't work)

As it stands I've just dropped the database entirely and am re-running the full setup --all procedure but don't think this can be the best means of doing this...

asked 03 Dec '18, 12:29

Mr%20Davros's gravatar image

Mr Davros
61228
accept rate: 0%

Source code available on GitHub .