mirror of
https://github.com/osm-search/Nominatim.git
synced 2024-11-30 02:07:52 +03:00
1.3 KiB
1.3 KiB
OSM Data Import
OSM data is initially imported using osm2pgsql. Nominatim uses its own data output style 'gazetteer', which differs from the output style created for map rendering.
Database Layout
The gazetteer style produces a single table place
with the following rows:
osm_type
- kind of OSM object (N - node, W - way, R - relation)osm_id
- original OSM IDclass
- key of principal tag defining the object typetype
- value of principal tag defining the object typename
- collection of tags that contain a name or referenceadmin_level
- numerical value of the tagged administrative leveladdress
- collection of tags defining the address of an objectextratags
- collection of additional interesting tags that are not directly relevant for searchinggeometry
- geometry of the object (in WGS84)
A single OSM object may appear multiple times in this table when it is tagged
with multiple tags that may constitute a principal tag. Take for example a
motorway bridge. In OSM, this would be a way which is tagged with
highway=motorway
and bridge=yes
. This way would appear in the place
table
once with class
of highway
and once with a class
of bridge
. Thus the
unique key for place
is (osm_type
, osm_id
, class
).