[Geocoding] Does Nominatim need all OSM data to be efficient ?
Sarah Hoffmann
lonvia at denofr.de
Wed Apr 4 19:29:10 BST 2012
On Mon, Apr 02, 2012 at 02:28:20PM +0200, Charles DESNEUF wrote:
> Hi all !
> I tried to install my own Nominatim server and I have some issues with the
> responses it returns. I need to run a reverse geocoding service which is
> able to return information such as country code, state/region and
> locality(city, town,...) but nothing more specific.
> I have created a new osm file using osmosis, from last-week planet file,
> with a the tag-filter option to get only elements(nodes and ways) with tags
> boundary, border_type and place and imported it using Nominatim setup
> script.
> While I was running some tests, I noticed some errors in Nominatim
> response(Moscou with US country code, bad state in Rennes, France(Pays de
> la Loire instead of Bretagne, ...).
> Of course, the Nominatim instance running on Poldi returns valid
> information.
> Does Nominatim need all OSM data (streets, ...) to be efficient or did I
> miss something (a tag ?) ?
Nominatim runs fine on filtered data but there might be another way to get
the database you want if you know a little bit about C programming:
you can hack osm2pgsql directly to ignore the elements that don't interest you.
Have a look into output-gazetteer.c. The function that filters the tags is
split_tags(). Whenever there is a pushItem(places,...), a new entry in
Nominatim will be created later. Remove the ones you don't need. Recompile
and run the Nominatim import on the normal planet file. This way you can
be sure that all the data you need is there and the database
you get can even be updated with normal diffs.
Sarah
More information about the Geocoding
mailing list