[Geocoding] Technical questions about building Nominatim instance

Teemu Ikonen teemu.ikonen at iki.fi
Thu Sep 2 07:21:43 BST 2010


Hi all.

I'm building my own instance of Nominatim and have some questions.  My
primary use case is reverse geocoding. I'm sorry if these have been
answered already, but I couldn't find them by Google, I would really
appreciate any hints.

Q1. Would it be possible to index the database only up to rank 22? I'm
not interested of streets and highways. Only up to neighborhood level.

Q2. For some reason reverse geocoding results from my own instance
(I've tried with whole Planet import and country extracts) do no
always match the ones from main site (nominatim.openstreetmap.org).
Especially the high level data like country and county are sometimes
missing. What could be the reason for this?

Q3. As far as I know only source for the software is this:
http://svn.openstreetmap.org/applications/utils/export/osm2pgsql
Strangely it seems to be partly broken. For example
gazetteer-tables.sql is missing GRANT to country_name. Is that really
the latest commit or what version I should be using?

Q4. When I'm indexing the database (using util.update.php ..) I keep
getting these errors on Postgres log when accessing the /reverse.php
reverse geocoding from my app. Is this something I should be worried
about? These do not appear when indexing is not running.

.......
ERROR:  permission denied for relation place_boundingbox
CONTEXT:  SQL statement "DELETE FROM place_boundingbox where place_id =  $1 "
        PL/pgSQL function "placex_update" line 60 at SQL statement
        SQL statement "UPDATE placex set indexed = true where indexed
= false and place_id =  $1 "
        PL/pgSQL function "get_address_by_language" line 16 at SQL statement
STATEMENT:  select placex.*, get_address_by_language(place_id,
ARRAY['short_name:en-us','short_name:en','name:en-us','name:en','place_name:en-us','place_name:en','official_name:en-us','official_name:en','short_name','name','place_name','official_name','ref','type'])
as langaddress, get_name_by_language(name,
ARRAY['short_name:en-us','short_name:en','name:en-us','name:en','place_name:en-us','place_name:en','official_name:en-us','official_name:en','short_name','name','place_name','official_name','ref','type'])
as placename, get_name_by_language(name, ARRAY['ref']) as ref from
placex where place_id = 3292286
ERROR:  permission denied for relation place_boundingbox
CONTEXT:  SQL statement "DELETE FROM place_boundingbox where place_id =  $1 "
        PL/pgSQL function "placex_update" line 60 at SQL statement
        SQL statement "UPDATE placex set indexed = true where indexed
= false and place_id =  $1 "
        PL/pgSQL function "get_address_by_language" line 16 at SQL statement
STATEMENT:  select placex.*, get_address_by_language(place_id,
ARRAY['short_name:en-us','short_name:en','name:en-us','name:en','place_name:en-us','place_name:en','official_name:en-us','official_name:en','short_name','name','place_name','official_name','ref','type'])
as langaddress, get_name_by_language(name,
ARRAY['short_name:en-us','short_name:en','name:en-us','name:en','place_name:en-us','place_name:en','official_name:en-us','official_name:en','short_name','name','place_name','official_name','ref','type'])
as placename, get_name_by_language(name, ARRAY['ref']) as ref from
placex where place_id = 3292286
.....

Br Teemu



More information about the Geocoding mailing list