[Geocoding] Technical questions about building Nominatim instance

Brian Quinion openstreetmap at brian.quinion.co.uk
Thu Sep 2 11:14:23 BST 2010


> 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.

Probably the best choice would be to add a block in placex_insert such as:

  IF NEW.rank_search > 22 THEN
    RETURN NULL;
  END IF;

just before:

  IF array_upper(NEW.name, 1) is not null THEN
    result := add_location(NEW.place_id,NEW.country_code,NEW.name,NEW.rank_search,NEW.rank_address,NEW.geometry);
  END IF;

> 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?

Without knowing what the difference is it is impossible to say.  Minor
differences are certainly possible - for performance reasons the diff
updates do not completely re-index all data.

> 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?

Yes that is the latest version.  I'll check the permissions problem you mention.

> 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

If sounds like you have a general permissions problem with the user
accessing the database - reverse.php does make changes to the db to
cache address details.

--
 Brian



More information about the Geocoding mailing list