Import Nominatim for reverse geocoding only

Hi Everybody!

I want to create a reverse geocoding only server for the whole world. Last time I imported and indexed OSM for Nominatim in PostreSQL it took 1 month and half :rage:. Our project needs only the reverse geocoding part (lat/long → address) and, if possible, only three kind of places for direct search (only kind query: ‘airports near lat,long’, with only three kind of places: airports, docks and stations).

It’s possible to do this: (import for reverse, indexing only for some keyword)?

If so, may you point me to a tutorial? Many thanks :smiley:

One and a half month for importing is definitively too long.

Maybe you can ask http://wiki.openstreetmap.org/wiki/User:Lonvia … she is very involved in Nominatim maintaining.

But to find your importing bottleneck we need a detailed description how you did your importing so far:

What source data? Filesizes?

What importing tools? Version?

What hardware? RAM? HDD or SSD available?

detailed command line content or batchfiles?

what is the schema of your database?

Photon includes reverse geocoding and we’ll soon publish weekly data updates for it, which will make setting up a (reverse) geocoder very easy (2 steps), also thanks to Lonvia here :). See here: https://github.com/komoot/photon/issues/178

What source data? Planet.osm.pbf december 2014

What importing tools? Standard Ubuntu 14.04 repository tools (Nominatim compiled from source, stable 2.4, Postgres 9.3, PostGIS 2.1 and I don’t remember what version was of osm2pqsql, sorry)

What hardware? VM inside XenServer 6.2 SP1, assigned 20GB of RAM, 4 Cores of a Intel I7-4790, HDD Mechanical 7200 RPM 1.5T assigned from XenServer local storage

Command line was copied from Nominatim/Installation page wiki, just the osm2psql cache was toned down to 1500 instead of proposed 1800.
PostreSQL manually configured from some slides I found on internet.

I have to say that we discovered this HDD mechanically failed some days ago, with a little backup magic we recovered everything from our project, except the VM for Nominatim/Mapnik (this was a expendable machine since the beginning). Maybe it was faulty since the importation time, I have to go deep on this (after we will have a new Nominatim imported server, I will do a data destructive test to the HDD of the old Nominatim server)

Now I have started a full import again, but this times the players are different:

Latest planet.osm.pbf, same importing tools as before, VM within Xenserver 6.5 SP1 (common information in internet is that XS 6.5 have a better throughput on harddisks), 27 GB RAM, 8 Cores of Intel I7-4790, data will be saved on a tablespace on a 7200 RPM harddisk, index will be saved in a tablespace on a SSD of 256 GB. They are seen by VM as a repository (I cannot have direct access of disk without going trough XenServer hypervisor). PostreSQL was tuned by configPostgresql.sh from https://github.com/cyclestreets/nominatim-install with ‘dw’ option

Let’s hope this time will be faster

Thanks you also karussel, I will check this Photon

Thank you all :slight_smile: I will let you know :smiley: