[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Maposmatic-dev] Questions on Nominatim and administrative boundarie

From: Lennard
Subject: Re: [Maposmatic-dev] Questions on Nominatim and administrative boundaries + osm2pgsql
Date: Sun, 20 Dec 2009 12:18:36 +0100
User-agent: Thunderbird (Windows/20090812)

David MENTRE wrote:

Is this the right way to do it? Can we assume that, when nominatim
returns an entry with class="boundary" type="administrative" and
osm_type="relation", then we can safely query the planet_osm_line
table with the _opposite_ of osm_id?

A _way_ will be in the tables with a positive osm_id, where a _relation_ will always have a negative osm_id. This is due to non-unique numbering between OSM object classes.

Nominatim tells you* whether you got back a relation or a way, and you can then search for the negative or positive osm_id in planet_osm_polygon, for relations or closed ways, respectively.

* At least, it does so in but I don't know what the bare API result looks like.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]