forked from hans/Nominatim
documentation: fix a broken link, typos
This commit is contained in:
committed by
Sarah Hoffmann
parent
d6960c72e4
commit
09ae312f09
@@ -36,16 +36,15 @@ which has the following structure:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
update
|
update
|
||||||
├── europe
|
├── europe
|
||||||
│ ├── andorra
|
│ ├── andorra
|
||||||
│ │ └── sequence.state
|
│ │ └── sequence.state
|
||||||
│ └── monaco
|
│ └── monaco
|
||||||
│ └── sequence.state
|
│ └── sequence.state
|
||||||
└── tmp
|
└── tmp
|
||||||
└── europe
|
└── europe
|
||||||
├── andorra-latest.osm.pbf
|
├── andorra-latest.osm.pbf
|
||||||
└── monaco-latest.osm.pbf
|
└── monaco-latest.osm.pbf
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -99,7 +98,7 @@ Change into the project directory and run the following command:
|
|||||||
|
|
||||||
This will get diffs from the replication server, import diffs and index
|
This will get diffs from the replication server, import diffs and index
|
||||||
the database. The default replication server in the
|
the database. The default replication server in the
|
||||||
script([Geofabrik](https://download.geofabrik.de)) provides daily updates.
|
script ([Geofabrik](https://download.geofabrik.de)) provides daily updates.
|
||||||
|
|
||||||
## Using an external PostgreSQL database
|
## Using an external PostgreSQL database
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ PHP scripts.
|
|||||||
This section gives a quick overview on how to configure Apache and Nginx to
|
This section gives a quick overview on how to configure Apache and Nginx to
|
||||||
serve Nominatim. It is not meant as a full system administration guide on how
|
serve Nominatim. It is not meant as a full system administration guide on how
|
||||||
to run a web service. Please refer to the documentation of
|
to run a web service. Please refer to the documentation of
|
||||||
[Apache](http://httpd.apache.org/docs/current/) and
|
[Apache](https://httpd.apache.org/docs/current/) and
|
||||||
[Nginx](https://nginx.org/en/docs/)
|
[Nginx](https://nginx.org/en/docs/)
|
||||||
for background information on configuring the services.
|
for background information on configuring the services.
|
||||||
|
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ to configure it.
|
|||||||
### Installing the required packages
|
### Installing the required packages
|
||||||
|
|
||||||
The recommended way to deploy a Python ASGI application is to run
|
The recommended way to deploy a Python ASGI application is to run
|
||||||
the ASGI runner (uvicorn)[https://uvicorn.org/]
|
the ASGI runner [uvicorn](https://uvicorn.org/)
|
||||||
together with (gunicorn)[https://gunicorn.org/] HTTP server. We use
|
together with [gunicorn](https://gunicorn.org/) HTTP server. We use
|
||||||
Falcon here as the web framework.
|
Falcon here as the web framework.
|
||||||
|
|
||||||
Create a virtual environment for the Python packages and install the necessary
|
Create a virtual environment for the Python packages and install the necessary
|
||||||
@@ -34,7 +34,7 @@ dependencies:
|
|||||||
``` sh
|
``` sh
|
||||||
sudo apt install virtualenv
|
sudo apt install virtualenv
|
||||||
virtualenv /srv/nominatim-venv
|
virtualenv /srv/nominatim-venv
|
||||||
/srv/nominatim-venv/bin/pip install SQLAlchemy PyICU psycopg[binary]\
|
/srv/nominatim-venv/bin/pip install SQLAlchemy PyICU psycopg[binary] \
|
||||||
psycopg2-binary python-dotenv PyYAML falcon uvicorn gunicorn
|
psycopg2-binary python-dotenv PyYAML falcon uvicorn gunicorn
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ For running Nominatim:
|
|||||||
* [datrie](https://github.com/pytries/datrie)
|
* [datrie](https://github.com/pytries/datrie)
|
||||||
|
|
||||||
When running the PHP frontend:
|
When running the PHP frontend:
|
||||||
|
|
||||||
* [PHP](https://php.net) (7.3+)
|
* [PHP](https://php.net) (7.3+)
|
||||||
* PHP-pgsql
|
* PHP-pgsql
|
||||||
* PHP-intl (bundled with PHP)
|
* PHP-intl (bundled with PHP)
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ therefore either remove traffic from the machine before attempting a
|
|||||||
version update or create the index manually **before** starting the update
|
version update or create the index manually **before** starting the update
|
||||||
using the following SQL:
|
using the following SQL:
|
||||||
|
|
||||||
```
|
```sql
|
||||||
CREATE INDEX IF NOT EXISTS idx_placex_geometry_reverse_lookupPlaceNode
|
CREATE INDEX IF NOT EXISTS idx_placex_geometry_reverse_lookupPlaceNode
|
||||||
ON placex USING gist (ST_Buffer(geometry, reverse_place_diameter(rank_search)))
|
ON placex USING gist (ST_Buffer(geometry, reverse_place_diameter(rank_search)))
|
||||||
WHERE rank_address between 4 and 25 AND type != 'postcode'
|
WHERE rank_address between 4 and 25 AND type != 'postcode'
|
||||||
|
|||||||
@@ -19,15 +19,15 @@ in the database.
|
|||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
To use the Nominatim library, you need access to a local Nominatim database.
|
To use the Nominatim library, you need access to a local Nominatim database.
|
||||||
Follow the [installation and import instructions](../admin/) to set up your
|
Follow the [installation](../admin/Installation.md) and
|
||||||
database.
|
[import](../admin/Import.md) instructions to set up your database.
|
||||||
|
|
||||||
It is not yet possible to install it in the usual way via pip or inside a
|
It is not yet possible to install it in the usual way via pip or inside a
|
||||||
virtualenv. To get access to the library you need to set an appropriate
|
virtualenv. To get access to the library you need to set an appropriate
|
||||||
PYTHONPATH. With the default installation, the python library can be found
|
`PYTHONPATH`. With the default installation, the python library can be found
|
||||||
under `/usr/local/share/nominatim/lib-python`. If you have installed
|
under `/usr/local/share/nominatim/lib-python`. If you have installed
|
||||||
Nominatim under a different prefix, adapt the `/usr/local/` part accordingly.
|
Nominatim under a different prefix, adapt the `/usr/local/` part accordingly.
|
||||||
You can also point the PYTHONPATH to the Nominatim source code.
|
You can also point the `PYTHONPATH` to the Nominatim source code.
|
||||||
|
|
||||||
### A simple search example
|
### A simple search example
|
||||||
|
|
||||||
@@ -35,7 +35,7 @@ To query the Nominatim database you need to first set up a connection. This
|
|||||||
is done by creating an Nominatim API object. This object exposes all the
|
is done by creating an Nominatim API object. This object exposes all the
|
||||||
search functions of Nominatim that are also known from its web API.
|
search functions of Nominatim that are also known from its web API.
|
||||||
|
|
||||||
This code snippet implements a simple search for the town if 'Brugge':
|
This code snippet implements a simple search for the town of 'Brugge':
|
||||||
|
|
||||||
!!! example
|
!!! example
|
||||||
=== "NominatimAPIAsync"
|
=== "NominatimAPIAsync"
|
||||||
@@ -219,7 +219,7 @@ creates a helper class that returns the name preferably in French. If that is
|
|||||||
not possible, it tries English and eventually falls back to the default `name`
|
not possible, it tries English and eventually falls back to the default `name`
|
||||||
or `ref`.
|
or `ref`.
|
||||||
|
|
||||||
The Locale object can be applied to a name dictionary to return the best-matching
|
The `Locale` object can be applied to a name dictionary to return the best-matching
|
||||||
name out of it:
|
name out of it:
|
||||||
|
|
||||||
``` python
|
``` python
|
||||||
|
|||||||
@@ -78,8 +78,8 @@ fi #DOCS:
|
|||||||
# ---------------------
|
# ---------------------
|
||||||
#
|
#
|
||||||
# Tune the postgresql configuration, which is located in
|
# Tune the postgresql configuration, which is located in
|
||||||
# `/etc/postgresql/12/main/postgresql.conf`. See section *Postgres Tuning* in
|
# `/etc/postgresql/12/main/postgresql.conf`. See section *Tuning the PostgreSQL database*
|
||||||
# [the installation page](../admin/Installation.md#postgresql-tuning)
|
# in [the installation page](../admin/Installation.md#tuning-the-postgresql-database)
|
||||||
# for the parameters to change.
|
# for the parameters to change.
|
||||||
#
|
#
|
||||||
# Restart the postgresql service after updating this config file.
|
# Restart the postgresql service after updating this config file.
|
||||||
|
|||||||
@@ -73,8 +73,8 @@ fi #DOCS:
|
|||||||
# ---------------------
|
# ---------------------
|
||||||
#
|
#
|
||||||
# Tune the postgresql configuration, which is located in
|
# Tune the postgresql configuration, which is located in
|
||||||
# `/etc/postgresql/14/main/postgresql.conf`. See section *Postgres Tuning* in
|
# `/etc/postgresql/14/main/postgresql.conf`. See section *Tuning the PostgreSQL database*
|
||||||
# [the installation page](../admin/Installation.md#postgresql-tuning)
|
# in [the installation page](../admin/Installation.md#tuning-the-postgresql-database)
|
||||||
# for the parameters to change.
|
# for the parameters to change.
|
||||||
#
|
#
|
||||||
# Restart the postgresql service after updating this config file.
|
# Restart the postgresql service after updating this config file.
|
||||||
|
|||||||
Reference in New Issue
Block a user