[Geocoding] Polygon data in the Nominatim database

Sarah Hoffmann lonvia at denofr.de
Tue Apr 12 07:21:19 UTC 2016


Hi David,

On Mon, Apr 11, 2016 at 05:13:08PM +0200, David Künzel wrote:
> I am desperately searching for the table the (city) polygon data are
> stored inside the Nominatim database. So far I only found polygon
> data in the table location_area, however those geometries are only
> "bubbles". I am looking for the city boundaries as shown on the map
> in the frontend.
> 
> It would be great if someone could tell me the table name or point
> me in the correct direction (database schema, etc.)

The main table of interest is the placex table. It contains all
objects indexed by Nominatim with the geometry in the geometry column.
You can find your object of interest by osm id (osm_type and osm_id
columns), the id Nominatim returns (place_id) or try getting all
cities by querying for search_rank=16 (rank can be off for some city
because they are actually a different administrative entity than
city, e.g. there are sometimes issues for German Kreisstädte).

Sarah



More information about the Geocoding mailing list