mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
Fix some minor issues in docs.
This commit is contained in:
@@ -24,9 +24,9 @@ If the reported rank is 26 or higher, you can also safely add `--index-noanalyse
|
|||||||
|
|
||||||
### PHP "open_basedir restriction in effect" warnings
|
### PHP "open_basedir restriction in effect" warnings
|
||||||
|
|
||||||
`PHP Warning: file_get_contents(): open_basedir restriction in effect.`
|
PHP Warning: file_get_contents(): open_basedir restriction in effect.
|
||||||
|
|
||||||
You need to adjust the [open_basedir](http://www.php.net/manual/en/ini.core.php#ini.open-basedir) setting
|
You need to adjust the [open_basedir](https://www.php.net/manual/en/ini.core.php#ini.open-basedir) setting
|
||||||
in your PHP configuration (`php.ini file`). By default this setting may look like this:
|
in your PHP configuration (`php.ini file`). By default this setting may look like this:
|
||||||
|
|
||||||
open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/
|
open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/
|
||||||
@@ -46,7 +46,7 @@ your `php.ini` file. Find the entry about timezone and set it to
|
|||||||
something like this:
|
something like this:
|
||||||
|
|
||||||
; Defines the default timezone used by the date functions
|
; Defines the default timezone used by the date functions
|
||||||
; http://php.net/date.timezone
|
; https://php.net/date.timezone
|
||||||
date.timezone = 'America/Denver'
|
date.timezone = 'America/Denver'
|
||||||
|
|
||||||
Or
|
Or
|
||||||
@@ -84,7 +84,7 @@ vboxfs.
|
|||||||
### nominatim UPDATE failed: ERROR: buffer 179261 is not owned by resource owner Portal
|
### nominatim UPDATE failed: ERROR: buffer 179261 is not owned by resource owner Portal
|
||||||
|
|
||||||
Several users [reported this](https://github.com/openstreetmap/Nominatim/issues/1168) during the initial import of the database. It's
|
Several users [reported this](https://github.com/openstreetmap/Nominatim/issues/1168) during the initial import of the database. It's
|
||||||
something Postgresql internal Nominatim doesn't control. And Postgresql forums
|
something PostgreSQL internal Nominatim doesn't control. And PostgreSQL forums
|
||||||
suggest it's threading related but definitely some kind of crash of a process.
|
suggest it's threading related but definitely some kind of crash of a process.
|
||||||
Users reported either rebooting the server, different hardware or just trying
|
Users reported either rebooting the server, different hardware or just trying
|
||||||
the import again worked.
|
the import again worked.
|
||||||
@@ -140,7 +140,7 @@ Example error message
|
|||||||
CONTEXT: PL/pgSQL function make_standard_name(text) line 5 at assignment]
|
CONTEXT: PL/pgSQL function make_standard_name(text) line 5 at assignment]
|
||||||
```
|
```
|
||||||
|
|
||||||
The Postgresql database, i.e. user postgres, needs to have access to that file.
|
The PostgreSQL database, i.e. user `postgres`, needs to have access to that file.
|
||||||
|
|
||||||
The permission need to be read & executable by everybody, e.g.
|
The permission need to be read & executable by everybody, e.g.
|
||||||
|
|
||||||
@@ -155,7 +155,7 @@ When running SELinux, make sure that the
|
|||||||
|
|
||||||
### Setup.php fails with "DB Error: extension not found"
|
### Setup.php fails with "DB Error: extension not found"
|
||||||
|
|
||||||
Make sure you have the Postgres extensions hstore and postgis installed.
|
Make sure you have the PostgreSQL extensions "hstore" and "postgis" installed.
|
||||||
See the installation instruction for a full list of required packages.
|
See the installation instruction for a full list of required packages.
|
||||||
|
|
||||||
|
|
||||||
@@ -165,7 +165,7 @@ See the installation instruction for a full list of required packages.
|
|||||||
|
|
||||||
The message is a bit misleading as PHP needs to load the file `DB.php` and
|
The message is a bit misleading as PHP needs to load the file `DB.php` and
|
||||||
instead re-loads Nominatim's `db.php`. To solve this make sure you
|
instead re-loads Nominatim's `db.php`. To solve this make sure you
|
||||||
have the [Pear module 'DB'](http://pear.php.net/package/DB/) installed.
|
have the [Pear module 'DB'](https://pear.php.net/package/DB/) installed.
|
||||||
|
|
||||||
sudo pear install DB
|
sudo pear install DB
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ the directory exists. There should be at least 40GB of free space.
|
|||||||
### Wikipedia rankings
|
### Wikipedia rankings
|
||||||
|
|
||||||
Wikipedia can be used as an optional auxiliary data source to help indicate
|
Wikipedia can be used as an optional auxiliary data source to help indicate
|
||||||
the importance of osm features. Nominatim will work without this information
|
the importance of OSM features. Nominatim will work without this information
|
||||||
but it will improve the quality of the results if this is installed.
|
but it will improve the quality of the results if this is installed.
|
||||||
This data is available as a binary download:
|
This data is available as a binary download:
|
||||||
|
|
||||||
@@ -45,7 +45,7 @@ This data is available as a binary download:
|
|||||||
wget https://www.nominatim.org/data/wikipedia_redirect.sql.bin
|
wget https://www.nominatim.org/data/wikipedia_redirect.sql.bin
|
||||||
|
|
||||||
Combined the 2 files are around 1.5GB and add around 30GB to the install
|
Combined the 2 files are around 1.5GB and add around 30GB to the install
|
||||||
size of nominatim. They also increase the install time by an hour or so.
|
size of Nominatim. They also increase the install time by an hour or so.
|
||||||
|
|
||||||
*NOTE:* you'll need to download the Wikipedia rankings before performing
|
*NOTE:* you'll need to download the Wikipedia rankings before performing
|
||||||
the initial import of the data if you want the rankings applied to the
|
the initial import of the data if you want the rankings applied to the
|
||||||
@@ -77,7 +77,7 @@ below. There are also
|
|||||||
|
|
||||||
Please be aware that some extracts are not cut exactly along the country
|
Please be aware that some extracts are not cut exactly along the country
|
||||||
boundaries. As a result some parts of the boundary may be missing which means
|
boundaries. As a result some parts of the boundary may be missing which means
|
||||||
that cannot compute the areas for some administrative areas.
|
that Nominatim cannot compute the areas for some administrative areas.
|
||||||
|
|
||||||
### Dropping Data Required for Dynamic Updates
|
### Dropping Data Required for Dynamic Updates
|
||||||
|
|
||||||
@@ -99,7 +99,7 @@ database or reuse the space later.
|
|||||||
|
|
||||||
If you only want to use the Nominatim database for reverse lookups or
|
If you only want to use the Nominatim database for reverse lookups or
|
||||||
if you plan to use the installation only for exports to a
|
if you plan to use the installation only for exports to a
|
||||||
[photon](http://photon.komoot.de/) database, then you can set up a database
|
[photon](https://photon.komoot.de/) database, then you can set up a database
|
||||||
without search indexes. Add `--reverse-only` to your setup command above.
|
without search indexes. Add `--reverse-only` to your setup command above.
|
||||||
|
|
||||||
This saves about 5% of disk space.
|
This saves about 5% of disk space.
|
||||||
@@ -121,7 +121,7 @@ import styles available which only read selected data:
|
|||||||
|
|
||||||
The style can be changed with the configuration `CONST_Import_Style`.
|
The style can be changed with the configuration `CONST_Import_Style`.
|
||||||
|
|
||||||
To give you an idea of the impact of using the different style, the table
|
To give you an idea of the impact of using the different styles, the table
|
||||||
below gives rough estimates of the final database size after import of a
|
below gives rough estimates of the final database size after import of a
|
||||||
2018 planet and after using the `--drop` option. It also shows the time
|
2018 planet and after using the `--drop` option. It also shows the time
|
||||||
needed for the import on a machine with 32GB RAM, 4 CPUS and SSDs. Note that
|
needed for the import on a machine with 32GB RAM, 4 CPUS and SSDs. Note that
|
||||||
@@ -136,7 +136,7 @@ address | 59h | 500 GB | 260 GB
|
|||||||
full | 80h | 575 GB | 300 GB
|
full | 80h | 575 GB | 300 GB
|
||||||
|
|
||||||
You can also customize the styles further. For an description of the
|
You can also customize the styles further. For an description of the
|
||||||
style format see [the developement section](../develop/Import.md).
|
style format see [the development section](../develop/Import.md).
|
||||||
|
|
||||||
## Initial import of the data
|
## Initial import of the data
|
||||||
|
|
||||||
@@ -157,7 +157,7 @@ about the same size as the file you are importing but never more than
|
|||||||
2/3 of RAM available. If your machine starts swapping reduce the size.
|
2/3 of RAM available. If your machine starts swapping reduce the size.
|
||||||
|
|
||||||
Computing word frequency for search terms can improve the performance of
|
Computing word frequency for search terms can improve the performance of
|
||||||
forward geocoding in particular under high load as it helps Postgres' query
|
forward geocoding in particular under high load as it helps PostgreSQL's query
|
||||||
planner to make the right decisions. To recompute word counts run:
|
planner to make the right decisions. To recompute word counts run:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
@@ -189,19 +189,25 @@ entire US adds about 10GB to your database.
|
|||||||
1. Get preprocessed TIGER 2018 data and unpack it into the
|
1. Get preprocessed TIGER 2018 data and unpack it into the
|
||||||
data directory in your Nominatim sources:
|
data directory in your Nominatim sources:
|
||||||
|
|
||||||
cd Nominatim/data
|
```sh
|
||||||
wget https://nominatim.org/data/tiger2018-nominatim-preprocessed.tar.gz
|
cd Nominatim/data
|
||||||
tar xf tiger2018-nominatim-preprocessed.tar.gz
|
wget https://nominatim.org/data/tiger2018-nominatim-preprocessed.tar.gz
|
||||||
|
tar xf tiger2018-nominatim-preprocessed.tar.gz
|
||||||
|
```
|
||||||
|
|
||||||
`data-source/us-tiger/README.md` explains how the data got preprocessed.
|
`data-source/us-tiger/README.md` explains how the data got preprocessed.
|
||||||
|
|
||||||
2. Import the data into your Nominatim database:
|
2. Import the data into your Nominatim database:
|
||||||
|
|
||||||
./utils/setup.php --import-tiger-data
|
```sh
|
||||||
|
./utils/setup.php --import-tiger-data
|
||||||
|
```
|
||||||
|
|
||||||
3. Enable use of the Tiger data in your `settings/local.php` by adding:
|
3. Enable use of the Tiger data in your `settings/local.php` by adding:
|
||||||
|
|
||||||
|
```
|
||||||
@define('CONST_Use_US_Tiger_Data', true);
|
@define('CONST_Use_US_Tiger_Data', true);
|
||||||
|
```
|
||||||
|
|
||||||
4. Apply the new settings:
|
4. Apply the new settings:
|
||||||
|
|
||||||
@@ -212,7 +218,7 @@ entire US adds about 10GB to your database.
|
|||||||
|
|
||||||
## Updates
|
## Updates
|
||||||
|
|
||||||
There are many different possibilities to update your Nominatim database.
|
There are many different ways to update your Nominatim database.
|
||||||
The following section describes how to keep it up-to-date with Pyosmium.
|
The following section describes how to keep it up-to-date with Pyosmium.
|
||||||
For a list of other methods see the output of `./utils/update.php --help`.
|
For a list of other methods see the output of `./utils/update.php --help`.
|
||||||
|
|
||||||
@@ -241,7 +247,7 @@ to update using the global minutely diffs.
|
|||||||
|
|
||||||
If you want a different update source you will need to add some settings
|
If you want a different update source you will need to add some settings
|
||||||
to `settings/local.php`. For example, to use the daily country extracts
|
to `settings/local.php`. For example, to use the daily country extracts
|
||||||
diffs for Ireland from geofabrik add the following:
|
diffs for Ireland from Geofabrik add the following:
|
||||||
|
|
||||||
// base URL of the replication service
|
// base URL of the replication service
|
||||||
@define('CONST_Replication_Url', 'https://download.geofabrik.de/europe/ireland-and-northern-ireland-updates');
|
@define('CONST_Replication_Url', 'https://download.geofabrik.de/europe/ireland-and-northern-ireland-updates');
|
||||||
@@ -257,7 +263,7 @@ To set up the update process now run the following command:
|
|||||||
It outputs the date where updates will start. Recheck that this date is
|
It outputs the date where updates will start. Recheck that this date is
|
||||||
what you expect.
|
what you expect.
|
||||||
|
|
||||||
The --init-updates command needs to be rerun whenever the replication service
|
The `--init-updates` command needs to be rerun whenever the replication service
|
||||||
is changed.
|
is changed.
|
||||||
|
|
||||||
#### Updating Nominatim
|
#### Updating Nominatim
|
||||||
|
|||||||
@@ -34,28 +34,28 @@ osm2pgsql README for additional dependencies required for compiling osm2pgsql.
|
|||||||
For running tests:
|
For running tests:
|
||||||
|
|
||||||
* [behave](http://pythonhosted.org/behave/)
|
* [behave](http://pythonhosted.org/behave/)
|
||||||
* [Psycopg2](http://initd.org/psycopg)
|
* [Psycopg2](https://initd.org/psycopg)
|
||||||
* [nose](https://nose.readthedocs.io)
|
* [nose](https://nose.readthedocs.io)
|
||||||
* [phpunit](https://phpunit.de)
|
* [phpunit](https://phpunit.de)
|
||||||
|
|
||||||
For running Nominatim:
|
For running Nominatim:
|
||||||
|
|
||||||
* [PostgreSQL](http://www.postgresql.org) (9.3 or later)
|
* [PostgreSQL](https://www.postgresql.org) (9.3 or later)
|
||||||
* [PostGIS](http://postgis.refractions.net) (2.2 or later)
|
* [PostGIS](https://postgis.org) (2.2 or later)
|
||||||
* [PHP](http://php.net) (7.0 or later)
|
* [PHP](https://php.net) (7.0 or later)
|
||||||
* PHP-pgsql
|
* PHP-pgsql
|
||||||
* PHP-intl (bundled with PHP)
|
* PHP-intl (bundled with PHP)
|
||||||
* [PEAR::DB](http://pear.php.net/package/DB)
|
* [PEAR::DB](https://pear.php.net/package/DB)
|
||||||
* a webserver (apache or nginx are recommended)
|
* a webserver (apache or nginx are recommended)
|
||||||
|
|
||||||
For running continuous updates:
|
For running continuous updates:
|
||||||
|
|
||||||
* [pyosmium](http://osmcode.org/pyosmium/)
|
* [pyosmium](https://osmcode.org/pyosmium/)
|
||||||
|
|
||||||
### Hardware
|
### Hardware
|
||||||
|
|
||||||
A minimum of 2GB of RAM is required or installation will fail. For a full
|
A minimum of 2GB of RAM is required or installation will fail. For a full
|
||||||
planet import 32GB of RAM or more strongly are recommended.
|
planet import 32GB of RAM or more are strongly recommended.
|
||||||
|
|
||||||
For a full planet install you will need at least 700GB of hard disk space
|
For a full planet install you will need at least 700GB of hard disk space
|
||||||
(take into account that the OSM database is growing fast). SSD disks
|
(take into account that the OSM database is growing fast). SSD disks
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
This page describes database migrations necessary to update existing databases
|
This page describes database migrations necessary to update existing databases
|
||||||
to newer versions of Nominatim.
|
to newer versions of Nominatim.
|
||||||
|
|
||||||
SQL statements should be executed from the postgres commandline. Execute
|
SQL statements should be executed from the PostgreSQL commandline. Execute
|
||||||
`psql nominatim` to enter command line mode.
|
`psql nominatim` to enter command line mode.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ See [Place Output Formats](Output.md) for details on each format. (Default: html
|
|||||||
|
|
||||||
* `json_callback=<string>`
|
* `json_callback=<string>`
|
||||||
|
|
||||||
Wrap json output in a callback function (JSONP) i.e. `<string>(<json>)`.
|
Wrap JSON output in a callback function (JSONP) i.e. `<string>(<json>)`.
|
||||||
Only has an effect for JSON output formats.
|
Only has an effect for JSON output formats.
|
||||||
|
|
||||||
* `pretty=[0|1]`
|
* `pretty=[0|1]`
|
||||||
|
|||||||
@@ -7,11 +7,11 @@
|
|||||||
Nominatim computes the address from two sources in the OpenStreetMap data:
|
Nominatim computes the address from two sources in the OpenStreetMap data:
|
||||||
from administrative boundaries and from place nodes. Boundaries are the more
|
from administrative boundaries and from place nodes. Boundaries are the more
|
||||||
useful source. They precisely describe an area. So it is very clear for
|
useful source. They precisely describe an area. So it is very clear for
|
||||||
Nominatim if a point belongs to an area of not. Place nodes are more complicated.
|
Nominatim if a point belongs to an area or not. Place nodes are more complicated.
|
||||||
These are only points without any precise extend. So Nominatim has to take a
|
These are only points without any precise extent. So Nominatim has to take a
|
||||||
guess and assume that an address belongs to the closest place nose it can find.
|
guess and assume that an address belongs to the closest place node it can find.
|
||||||
In an ideal world, Nominatim would not need the place nodes but there are
|
In an ideal world, Nominatim would not need the place nodes but there are
|
||||||
many places on earth where there are not precise boundaries available for
|
many places on earth where there are no precise boundaries available for
|
||||||
all parts that make up an address. This is in particular true for the more
|
all parts that make up an address. This is in particular true for the more
|
||||||
local address parts, like villages and suburbs. Therefore it is not possible
|
local address parts, like villages and suburbs. Therefore it is not possible
|
||||||
to completely dismiss place nodes. And sometimes they sneak in where they
|
to completely dismiss place nodes. And sometimes they sneak in where they
|
||||||
@@ -21,7 +21,7 @@ As a OpenStreetMap mapper, you can improve the situation in two ways: if you
|
|||||||
see a place node for which already an administrative area exists, then you
|
see a place node for which already an administrative area exists, then you
|
||||||
should _link_ the two by adding the node with a 'label' role to the boundary
|
should _link_ the two by adding the node with a 'label' role to the boundary
|
||||||
relation. If there is no administrative area, you can add the approximate
|
relation. If there is no administrative area, you can add the approximate
|
||||||
extend of the place and tag it place=<something> as well.
|
extent of the place and tag it place=<something> as well.
|
||||||
|
|
||||||
#### 2. When doing reverse search, the address details have parts that don't contain the point I was looking up.
|
#### 2. When doing reverse search, the address details have parts that don't contain the point I was looking up.
|
||||||
|
|
||||||
@@ -30,7 +30,7 @@ Reverse does not give you the address of the point you asked for. Reverse
|
|||||||
returns the closest object to the point you asked for and then returns the
|
returns the closest object to the point you asked for and then returns the
|
||||||
address of that object. Now, if you are close to a border, then the closest
|
address of that object. Now, if you are close to a border, then the closest
|
||||||
object may be across that border. When Nominatim then returns the address,
|
object may be across that border. When Nominatim then returns the address,
|
||||||
contains the county/state/country across the border.
|
it contains the county/state/country across the border.
|
||||||
|
|
||||||
#### 3. I get different counties/states/countries when I change the zoom parameter in the reverse query. How is that possible?
|
#### 3. I get different counties/states/countries when I change the zoom parameter in the reverse query. How is that possible?
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@ see also [Administrative Boundary](https://wiki.openstreetmap.org/wiki/Tag:bound
|
|||||||
|
|
||||||
#### 5. Can you return the timezone?
|
#### 5. Can you return the timezone?
|
||||||
|
|
||||||
See this separate OpenStreetMap-based project [Timezone Boundary Builder](https://github.com/evansiroky/timezone-boundary-builder)
|
See this separate OpenStreetMap-based project [Timezone Boundary Builder](https://github.com/evansiroky/timezone-boundary-builder).
|
||||||
|
|
||||||
#### 6. I want to download a list of streets/restaurants of a city/region
|
#### 6. I want to download a list of streets/restaurants of a city/region
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ See [Place Output Formats](Output.md) for details on each format. (Default: xml)
|
|||||||
|
|
||||||
* `json_callback=<string>`
|
* `json_callback=<string>`
|
||||||
|
|
||||||
Wrap json output in a callback function (JSONP) i.e. `<string>(<json>)`.
|
Wrap JSON output in a callback function (JSONP) i.e. `<string>(<json>)`.
|
||||||
Only has an effect for JSON output formats.
|
Only has an effect for JSON output formats.
|
||||||
|
|
||||||
### Output details
|
### Output details
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Place Output
|
# Place Output
|
||||||
|
|
||||||
The [\reverse](Reverse.md), [\search](Search.md) and [\lookup](Lookup.md)
|
The [/reverse](Reverse.md), [/search](Search.md) and [/lookup](Lookup.md)
|
||||||
API calls produce very similar output which is explained in this section.
|
API calls produce very similar output which is explained in this section.
|
||||||
There is one section for each format which is selectable via the `format`
|
There is one section for each format which is selectable via the `format`
|
||||||
parameter.
|
parameter.
|
||||||
@@ -70,7 +70,7 @@ This is the same as the JSON format with two changes:
|
|||||||
|
|
||||||
### GeoJSON
|
### GeoJSON
|
||||||
|
|
||||||
This format follows the [RFC7946](http://geojson.org). Every feature includes
|
This format follows the [RFC7946](https://geojson.org). Every feature includes
|
||||||
a bounding box (`bbox`).
|
a bounding box (`bbox`).
|
||||||
|
|
||||||
The feature list has the following fields:
|
The feature list has the following fields:
|
||||||
@@ -83,7 +83,7 @@ The feature list has the following fields:
|
|||||||
* `importance` - computed importance rank
|
* `importance` - computed importance rank
|
||||||
* `icon` - link to class icon (if available)
|
* `icon` - link to class icon (if available)
|
||||||
* `address` - dictionary of address details (only with `addressdetails=1`)
|
* `address` - dictionary of address details (only with `addressdetails=1`)
|
||||||
* `extratags` - dictionary with additional useful tags like website or maxspeed
|
* `extratags` - dictionary with additional useful tags like `website` or `maxspeed`
|
||||||
(only with `extratags=1`)
|
(only with `extratags=1`)
|
||||||
* `namedetails` - dictionary with full list of available names including ref etc.
|
* `namedetails` - dictionary with full list of available names including ref etc.
|
||||||
|
|
||||||
@@ -120,7 +120,7 @@ formats depending on the API call.
|
|||||||
|
|
||||||
```
|
```
|
||||||
<reversegeocode timestamp="Sat, 11 Aug 18 11:53:21 +0000"
|
<reversegeocode timestamp="Sat, 11 Aug 18 11:53:21 +0000"
|
||||||
attribution="Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright"
|
attribution="Data © OpenStreetMap contributors, ODbL 1.0. https://www.openstreetmap.org/copyright"
|
||||||
querystring="lat=48.400381&lon=11.745876&zoom=5&format=xml">
|
querystring="lat=48.400381&lon=11.745876&zoom=5&format=xml">
|
||||||
<result place_id="179509537" osm_type="relation" osm_id="2145268" ref="BY"
|
<result place_id="179509537" osm_type="relation" osm_id="2145268" ref="BY"
|
||||||
lat="48.9467562" lon="11.4038717"
|
lat="48.9467562" lon="11.4038717"
|
||||||
@@ -154,7 +154,7 @@ The place information can be found in the `result` element. The attributes of th
|
|||||||
* `lat`, `lon` - latitude and longitude of the centroid of the object
|
* `lat`, `lon` - latitude and longitude of the centroid of the object
|
||||||
* `boundingbox` - comma-separated list of corner coordinates
|
* `boundingbox` - comma-separated list of corner coordinates
|
||||||
|
|
||||||
The full address address of the result can be found in the content of the
|
The full address of the result can be found in the content of the
|
||||||
`result` element as a comma-separated list.
|
`result` element as a comma-separated list.
|
||||||
|
|
||||||
Additional information requested with `addressdetails=1`, `extratags=1` and
|
Additional information requested with `addressdetails=1`, `extratags=1` and
|
||||||
@@ -164,7 +164,7 @@ Additional information requested with `addressdetails=1`, `extratags=1` and
|
|||||||
|
|
||||||
```
|
```
|
||||||
<searchresults timestamp="Sat, 11 Aug 18 11:55:35 +0000"
|
<searchresults timestamp="Sat, 11 Aug 18 11:55:35 +0000"
|
||||||
attribution="Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright"
|
attribution="Data © OpenStreetMap contributors, ODbL 1.0. https://www.openstreetmap.org/copyright"
|
||||||
querystring="london" polygon="false" exclude_place_ids="100149"
|
querystring="london" polygon="false" exclude_place_ids="100149"
|
||||||
more_url="https://nominatim.openstreetmap.org/search.php?q=london&addressdetails=1&extratags=1&exclude_place_ids=100149&format=xml&accept-language=en-US%2Cen%3Bq%3D0.7%2Cde%3Bq%3D0.3">
|
more_url="https://nominatim.openstreetmap.org/search.php?q=london&addressdetails=1&extratags=1&exclude_place_ids=100149&format=xml&accept-language=en-US%2Cen%3Bq%3D0.7%2Cde%3Bq%3D0.3">
|
||||||
<place place_id="100149" osm_type="node" osm_id="107775" place_rank="15"
|
<place place_id="100149" osm_type="node" osm_id="107775" place_rank="15"
|
||||||
@@ -232,7 +232,7 @@ permanent for later use.
|
|||||||
|
|
||||||
The combination `osm_type`+`osm_id` is slighly better but remember in
|
The combination `osm_type`+`osm_id` is slighly better but remember in
|
||||||
OpenStreetMap mappers can delete, split, recreate places (and those
|
OpenStreetMap mappers can delete, split, recreate places (and those
|
||||||
get a new `osm_id`), there is no link between those old and new id.
|
get a new `osm_id`), there is no link between those old and new ids.
|
||||||
Places can also change their meaning without changing their `osm_id`,
|
Places can also change their meaning without changing their `osm_id`,
|
||||||
e.g. when a restaurant is retagged as supermarket. For a more in-depth
|
e.g. when a restaurant is retagged as supermarket. For a more in-depth
|
||||||
discussion see [Permanent ID](https://wiki.openstreetmap.org/wiki/Permanent_ID).
|
discussion see [Permanent ID](https://wiki.openstreetmap.org/wiki/Permanent_ID).
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ There are two ways how the requested location can be specified:
|
|||||||
|
|
||||||
A specific OSM node(N), way(W) or relation(R) to return an address for.
|
A specific OSM node(N), way(W) or relation(R) to return an address for.
|
||||||
|
|
||||||
In both cases exactly one object is returned. The two input paramters cannot
|
In both cases exactly one object is returned. The two input parameters cannot
|
||||||
be used at the same time. Both accept the additional optional parameters listed
|
be used at the same time. Both accept the additional optional parameters listed
|
||||||
below.
|
below.
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@ See [Place Output Formats](Output.md) for details on each format. (Default: html
|
|||||||
|
|
||||||
* `json_callback=<string>`
|
* `json_callback=<string>`
|
||||||
|
|
||||||
Wrap json output in a callback function ([JSONP](https://en.wikipedia.org/wiki/JSONP)) i.e. `<string>(<json>)`.
|
Wrap JSON output in a callback function ([JSONP](https://en.wikipedia.org/wiki/JSONP)) i.e. `<string>(<json>)`.
|
||||||
Only has an effect for JSON output formats.
|
Only has an effect for JSON output formats.
|
||||||
|
|
||||||
### Output details
|
### Output details
|
||||||
@@ -146,7 +146,7 @@ This overrides the specified machine readable format. (Default: 0)
|
|||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"place_id":"134140761",
|
"place_id":"134140761",
|
||||||
"licence":"Data © OpenStreetMap contributors, ODbL 1.0. http:\/\/www.openstreetmap.org\/copyright",
|
"licence":"Data © OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright",
|
||||||
"osm_type":"way",
|
"osm_type":"way",
|
||||||
"osm_id":"280940520",
|
"osm_id":"280940520",
|
||||||
"lat":"-34.4391708",
|
"lat":"-34.4391708",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Search queries
|
# Search queries
|
||||||
|
|
||||||
The search API allows to look up a location from a textual description.
|
The search API allows you to look up a location from a textual description.
|
||||||
Nominatim supports structured as well as free-form search queries.
|
Nominatim supports structured as well as free-form search queries.
|
||||||
|
|
||||||
The search query may also contain
|
The search query may also contain
|
||||||
@@ -46,7 +46,7 @@ In this form, the query may be given through two different sets of parameters:
|
|||||||
Structured requests are faster but are less robust against alternative
|
Structured requests are faster but are less robust against alternative
|
||||||
OSM tagging schemas. **Do not combine with** `q=<query>` **parameter**.
|
OSM tagging schemas. **Do not combine with** `q=<query>` **parameter**.
|
||||||
|
|
||||||
All three query forms accept the additional paramters listed below.
|
All three query forms accept the additional parameters listed below.
|
||||||
|
|
||||||
### Output format
|
### Output format
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ See [Place Output Formats](Output.md) for details on each format. (Default: html
|
|||||||
|
|
||||||
* `json_callback=<string>`
|
* `json_callback=<string>`
|
||||||
|
|
||||||
Wrap json output in a callback function ([JSONP](https://en.wikipedia.org/wiki/JSONP)) i.e. `<string>(<json>)`.
|
Wrap JSON output in a callback function ([JSONP](https://en.wikipedia.org/wiki/JSONP)) i.e. `<string>(<json>)`.
|
||||||
Only has an effect for JSON output formats.
|
Only has an effect for JSON output formats.
|
||||||
|
|
||||||
### Output details
|
### Output details
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ 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
|
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
|
`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
|
once with `class` of `highway` and once with a `class` of `bridge`. Thus the
|
||||||
*uique key* for `place` is (`osm_type`, `osm_id`, `class`).
|
*unique key* for `place` is (`osm_type`, `osm_id`, `class`).
|
||||||
|
|
||||||
## Configuring the Import
|
## Configuring the Import
|
||||||
|
|
||||||
@@ -55,8 +55,8 @@ suffix match can be defined similarly with a string that starts with a `*`. Any
|
|||||||
other string constitutes an exact match.
|
other string constitutes an exact match.
|
||||||
|
|
||||||
The second part of the rules defines a list of values and the properties that
|
The second part of the rules defines a list of values and the properties that
|
||||||
apply to a successful match. Value strings may be either empty, which again
|
apply to a successful match. Value strings may be either empty, which
|
||||||
means that thy match against any value, or describe an exact match. Prefix
|
means that they match any value, or describe an exact match. Prefix
|
||||||
or suffix matching of values is not possible.
|
or suffix matching of values is not possible.
|
||||||
|
|
||||||
For a rule to match, it has to find a valid combination of keys and values. The
|
For a rule to match, it has to find a valid combination of keys and values. The
|
||||||
@@ -66,7 +66,7 @@ The rules in a configuration file are processed sequentially and the first
|
|||||||
match for each tag wins.
|
match for each tag wins.
|
||||||
|
|
||||||
A rule where key and value are the empty string is special. This defines the
|
A rule where key and value are the empty string is special. This defines the
|
||||||
fallback when none of the rules matches. The fallback is always used as a last
|
fallback when none of the rules match. The fallback is always used as a last
|
||||||
resort when nothing else matches, no matter where the rule appears in the file.
|
resort when nothing else matches, no matter where the rule appears in the file.
|
||||||
Defining multiple fallback rules is not allowed. What happens in this case,
|
Defining multiple fallback rules is not allowed. What happens in this case,
|
||||||
is undefined.
|
is undefined.
|
||||||
@@ -121,17 +121,17 @@ One or more of the following properties may be given for each tag:
|
|||||||
|
|
||||||
* `address`
|
* `address`
|
||||||
|
|
||||||
At tag to the list of address tags. If the tag starts with `addr:` or
|
Add tag to the list of address tags. If the tag starts with `addr:` or
|
||||||
`is_in:`, then this prefix is cut off before adding it to the list.
|
`is_in:`, then this prefix is cut off before adding it to the list.
|
||||||
|
|
||||||
* `postcode`
|
* `postcode`
|
||||||
|
|
||||||
At the value as a postcode to the address tags. If multiple tags are
|
Add the value as a postcode to the address tags. If multiple tags are
|
||||||
candidate for postcodes, one wins out and the others are dropped.
|
candidate for postcodes, one wins out and the others are dropped.
|
||||||
|
|
||||||
* `country`
|
* `country`
|
||||||
|
|
||||||
At the value as a country code to the address tags. The value must be a
|
Add the value as a country code to the address tags. The value must be a
|
||||||
two letter country code, otherwise it is ignored. If there are multiple
|
two letter country code, otherwise it is ignored. If there are multiple
|
||||||
tags that match, then one wins out and the others are dropped.
|
tags that match, then one wins out and the others are dropped.
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ Usually only administrative boundaries and place nodes and areas are
|
|||||||
eligible to be part of an address. All other objects have an address rank
|
eligible to be part of an address. All other objects have an address rank
|
||||||
of 0.
|
of 0.
|
||||||
|
|
||||||
Note that the search rank of a place place a role in the address computation
|
Note that the search rank of a place plays a role in the address computation
|
||||||
as well. When collecting the places that should make up the address parts
|
as well. When collecting the places that should make up the address parts
|
||||||
then only places are taken into account that have a lower address rank than
|
then only places are taken into account that have a lower address rank than
|
||||||
the search rank of the base object.
|
the search rank of the base object.
|
||||||
@@ -37,7 +37,7 @@ into the database. There are a few hard-coded rules for the assignment:
|
|||||||
* highway nodes
|
* highway nodes
|
||||||
* landuse that is not an area
|
* landuse that is not an area
|
||||||
|
|
||||||
Other than that, the ranks can be freely assigned via the json file
|
Other than that, the ranks can be freely assigned via the JSON file
|
||||||
defined with `CONST_Address_Level_Config` according to their type and
|
defined with `CONST_Address_Level_Config` according to their type and
|
||||||
the country they are in.
|
the country they are in.
|
||||||
|
|
||||||
@@ -78,12 +78,13 @@ definition is used as a fallback, when nothing more specific for a given
|
|||||||
country exists.
|
country exists.
|
||||||
|
|
||||||
`tags` contains the ranks for key/value pairs. The ranks can be either a
|
`tags` contains the ranks for key/value pairs. The ranks can be either a
|
||||||
single number, in which case they are to search and address rank, or a tuple
|
single number, in which case they are the search and address rank, or an array
|
||||||
of search and address rank (in that order). The value may be left empty.
|
of search and address rank (in that order). The value may be left empty.
|
||||||
Then the rank is used when no more specific value is found for the given
|
Then the rank is used when no more specific value is found for the given
|
||||||
key.
|
key.
|
||||||
|
|
||||||
Countries and key/value combination may appear in multiple defintions. Just
|
Countries and key/value combination may appear in multiple definitions. Just
|
||||||
make sure that each combination of counrty/key/value appears only once per
|
make sure that each combination of counrty/key/value appears only once per
|
||||||
file. Otherwise the import will fail with a UNIQUE INDEX constraint violation
|
file. Otherwise the import will fail with a UNIQUE INDEX constraint violation
|
||||||
on import.
|
on import.
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Basic Architecture
|
# Basic Architecture
|
||||||
|
|
||||||
Nominatim provides geocoding based on OpenStreetMap data. It uses a Postgresql
|
Nominatim provides geocoding based on OpenStreetMap data. It uses a PostgreSQL
|
||||||
database as a backend for storing the data.
|
database as a backend for storing the data.
|
||||||
|
|
||||||
There are three basic parts to Nominatim's architecture: the data import,
|
There are three basic parts to Nominatim's architecture: the data import,
|
||||||
@@ -15,10 +15,10 @@ the import can be found in the database table `place`.
|
|||||||
The __address computation__ or __indexing__ stage takes the data from `place`
|
The __address computation__ or __indexing__ stage takes the data from `place`
|
||||||
and adds additional information needed for geocoding. It ranks the places by
|
and adds additional information needed for geocoding. It ranks the places by
|
||||||
importance, links objects that belong together and computes addresses and
|
importance, links objects that belong together and computes addresses and
|
||||||
the search index. Most of this work is done in Pl/pqSQL via database triggers
|
the search index. Most of this work is done in PL/pgSQL via database triggers
|
||||||
and can be found in the file `sql/functions.sql`.
|
and can be found in the file `sql/functions.sql`.
|
||||||
|
|
||||||
The __search frontend__ implements the actual API. It takes queries for
|
The __search frontend__ implements the actual API. It takes search
|
||||||
search and reverse geocoding queries from the user, looks up the data and
|
and reverse geocoding queries from the user, looks up the data and
|
||||||
returns the results in the requested format. This part is written in PHP
|
returns the results in the requested format. This part is written in PHP
|
||||||
and can be found in the `lib/` and `website/` directories.
|
and can be found in the `lib/` and `website/` directories.
|
||||||
|
|||||||
Reference in New Issue
Block a user