Nominatim Structured Files

Nominatim is able to export pre-indexed data from the indexing database in a format suitable for importing into another minimal nominatim database, or for use with other applications which require a heirachy of places. Nominatim is also able to produce diff files as part of the indexing process to bring an existing minimal nominatim database up to date. Together these two data sets can be used in a similar way to the OSM planet file and OSM Minutely diffs to keep a nominatim database up to date with minimal cpu overhead.

Both the nominatim planet file and the nominatim diff files use the same format with the minor difference that the planet file only contains <add> operations

osmStructured

Overall information about this dump or diff

version="0.1"
generator="Nominatim"

Software used to generate this file

sourcedb="e4d909c290d0fb1ca068ffaddf22cbd0"

Unique ID used to identify the source database used to generate the planet/diff file. If diffs and the planet are from the same source db nominatim is able to use various short cuts to improve performance.

timestamp="2011-02-11 07:04:00"

timestamp of the newest data present in the file (based on the dates in the OSM minute updates)

diffid="1342334"

last diff id present in the file. Starting the diff import process from diffid+1 guarantees that no data will be missed.

add/delete/update

Type of operation to be used with this data

feature

place_id="36158088"
type="W"

OSM id of this data

id="33302331"

Equivalent to place_id (as used in the API) for this item. Will only be used if sourcedb IDs match.

key="landuse"
value="retail"

Type of feature

rank="22"

Calculated address rank of this feature. Values are in the range 0 to 30 where 0 is most important and 30 is house/building level features

importance="0.001"

Indicator of how important this feature is. Values in the range 0 to 1 where 1 is most important.

name/names

type="name"

OSM source for the name (i.e. name, name:en, official_name)

adminLevel

OSM admin_level (or calculated value). Range 0 to 15 - see wiki.

address

valid tags are: continent, state, city, town, village

rank="0"

Calculated address rank of this feature. Values are in the range 0 to 30 where 0 is most important and 30 is house/building level features

type="N"
id="378734054"

OSM id of this data

key="place"
value="locality"

Type of feature

distance="0.0127811048114559"

Distance to the feature in degrees

isaddress="f"

Is this item part of the address value "t" & "f". Items labelled "f" are considered as search terms but do not form part of the address. Most applications outside of search will probably want to discard all "f" terms.

osmGeometry

Nominatim Pre-Indexed Directories

/planet/*.npi.bz2
Generated planet files
/index/YYYY/MM/DD.idx
Files providing a list of diff files per day
/diff/XXX/XXX/XXX.npi.bz2
Diff files in sequential order XXX/XXX/XXX is number XXXXXXXXX split into sub-directories

./nominatim -I -F latest.npi.bz2 ../settings/partitionedtags.def
partitionedtags.def is a list of the tags that should be seperated into their own table
for faster searching (e.g. amenity=hotel) in general this is the same list as special keywords.