Merge branch 'docs' into 'master'

docs: update with newly introduced event's params to /dev/api, fix typos in install/nominatim

See merge request les/gancio!29
This commit is contained in:
les
2023-06-12 18:21:19 +00:00
2 changed files with 16 additions and 16 deletions

View File

@@ -52,6 +52,9 @@ POST
| description | `string` | event's description (html accepted and sanitized) | | description | `string` | event's description (html accepted and sanitized) |
| place_name | `string` | the name of the place | | place_name | `string` | the name of the place |
| place_address | `string` | the address of the place | | place_address | `string` | the address of the place |
| place_latitude | `float` | the latitude of the place |
| place_longitude | `float` | the longitude of the place |
| online_locations | `array` | List of online locations |
| start_datetime | `integer` | start timestamp | | start_datetime | `integer` | start timestamp |
| multidate | `integer` | is a multidate event? | | multidate | `integer` | is a multidate event? |
| tags | `array` | List of tags | | tags | `array` | List of tags |

View File

@@ -15,7 +15,7 @@ nav_order: 7
--- ---
## Testing ## Testing
For testing purposes you could skip the nominatim installation and use one of this geocoding providers that run a server for free: For testing purposes you could skip the nominatim installation and use one of these geocoding providers that run a server for free:
- [https://photon.komoot.io/](https://photon.komoot.io/) [Terms of service](https://photon.komoot.io/) - [https://photon.komoot.io/](https://photon.komoot.io/) [Terms of service](https://photon.komoot.io/)
- [https://nominatim.openstreetmap.org/](https://nominatim.openstreetmap.org/) [Terms of service](https://operations.osmfoundation.org/policies/nominatim/) - [https://nominatim.openstreetmap.org/](https://nominatim.openstreetmap.org/) [Terms of service](https://operations.osmfoundation.org/policies/nominatim/)
@@ -28,25 +28,25 @@ From [https://nominatim.org/release-docs/latest/admin/Installation/](https://nom
"A minimum of 2GB of RAM is required or installation will fail. For a full planet import 128GB of RAM or more are strongly recommended. Do not report out of memory problems if you have less than 64GB RAM." "A minimum of 2GB of RAM is required or installation will fail. For a full planet import 128GB of RAM or more are strongly recommended. Do not report out of memory problems if you have less than 64GB RAM."
### Planet mirrors ### Planet mirrors
There is a list of planet mirror at [https://wiki.openstreetmap.org/wiki/Planet.osm#Planet.osm_mirrors](https://wiki.openstreetmap.org/wiki/Planet.osm#Planet.osm_mirrors) There is a list of planet mirrors at [https://wiki.openstreetmap.org/wiki/Planet.osm#Planet.osm_mirrors](https://wiki.openstreetmap.org/wiki/Planet.osm#Planet.osm_mirrors)
There you can also find `Country and area extracts`, divided by `Worldwide extract sources` and `Regional extract sources` There you can also find `Country and area extracts`, divided by `Worldwide extract sources` and `Regional extract sources`
### Download an extract ### Download an extract
For Nominatim to work, you will needs to import files in [PBF Format](https://wiki.openstreetmap.org/wiki/PBF_Format) in the PostGis database. Those files have extension `*.osm.pbf`. For Nominatim to work, you need to import files in [PBF Format](https://wiki.openstreetmap.org/wiki/PBF_Format) in the PostGis database. Those files have extension `*.osm.pbf`.
Some of these mirrors provide also incremental updates via [OsmChange](https://wiki.openstreetmap.org/wiki/OsmChange), for example: Some of these mirrors provide also incremental updates via [OsmChange](https://wiki.openstreetmap.org/wiki/OsmChange), for example:
- Provides updates but with a lower detail - These provide updates but with a lower detail
[https://download.geofabrik.de/europe/italy/nord-ovest-updates/nord-ovest-latest.osm.pbf](http://download.geofabrik.de/europe/italy/nord-ovest-latest.osm.pbf) [https://download.geofabrik.de/europe/italy/nord-ovest-updates/nord-ovest-latest.osm.pbf](http://download.geofabrik.de/europe/italy/nord-ovest-latest.osm.pbf)
[https://download.geofabrik.de/europe/italy/nord-ovest-updates/](https://download.geofabrik.de/europe/italy/nord-ovest-updates/) [https://download.geofabrik.de/europe/italy/nord-ovest-updates/](https://download.geofabrik.de/europe/italy/nord-ovest-updates/)
- Does not provide updates but as higher level of detail - This doesn't provide updates but has an higher level of detail
[https://osmit-estratti-test.wmcloud.org/dati/poly/province/pbf/015_Milano_poly.osm.pbf](https://osmit-estratti-test.wmcloud.org/dati/poly/province/pbf/015_Milano_poly.osm.pbf) [https://osmit-estratti-test.wmcloud.org/dati/poly/province/pbf/015_Milano_poly.osm.pbf](https://osmit-estratti-test.wmcloud.org/dati/poly/province/pbf/015_Milano_poly.osm.pbf)
Needs to host multiple areas? Checkout [Osmium](https://osmcode.org/osmium-tool/manual.html), to merge multiple PBF files into one. Do you need to host multiple areas? Checkout [Osmium](https://osmcode.org/osmium-tool/manual.html), to merge multiple PBF files into one.
--- ---
## Install on Debian ## Install on Debian
There is a [detailed documentaion](https://nominatim.org/release-docs/latest/appendix/Install-on-Ubuntu-22/) for installing nominatim on `Ubuntu 22` that should be valid also to install on `Debian`. There is a [detailed documentation](https://nominatim.org/release-docs/latest/appendix/Install-on-Ubuntu-22/) for installing nominatim on `Ubuntu 22` that should be valid also to install on `Debian`.
### Setup ### Setup
[https://nominatim.org/release-docs/latest/appendix/Install-on-Ubuntu-22/#installing-the-required-software](https://nominatim.org/release-docs/latest/appendix/Install-on-Ubuntu-22/#installing-the-required-software) [https://nominatim.org/release-docs/latest/appendix/Install-on-Ubuntu-22/#installing-the-required-software](https://nominatim.org/release-docs/latest/appendix/Install-on-Ubuntu-22/#installing-the-required-software)
@@ -54,14 +54,14 @@ There is a [detailed documentaion](https://nominatim.org/release-docs/latest/app
### Building and Configuration ### Building and Configuration
Get the source code from Github and change into the source directory Get the source code from Github and change into the source directory
``` ```bash
cd $USERHOME cd $USERHOME
wget https://nominatim.org/release/Nominatim-4.2.0.tar.bz2 wget https://nominatim.org/release/Nominatim-4.2.0.tar.bz2
tar xf Nominatim-4.2.0.tar.bz2 tar xf Nominatim-4.2.0.tar.bz2
``` ```
The code must be built in a separate directory. Create this directory, then configure and build Nominatim in there: The code must be built in a separate directory. Create this directory, then configure and build Nominatim in there:
``` ```bash
mkdir $USERHOME/build mkdir $USERHOME/build
cd $USERHOME/build cd $USERHOME/build
cmake $USERHOME/Nominatim-4.2.0 cmake $USERHOME/Nominatim-4.2.0
@@ -91,13 +91,12 @@ From [https://github.com/mediagis/nominatim-docker](https://github.com/mediagis/
- Clone the project from sources - Clone the project from sources
```bash ```bash
git clone git@github.com:mediagis/nominatim-docker.git git clone git@github.com:mediagis/nominatim-docker.git
# cd nominatim-docker/<version>
cd nominatim-docker/4.2/contrib # released Nov 29, 2022 cd nominatim-docker/4.2/contrib # released Nov 29, 2022
docker-compose pull docker-compose pull
``` ```
- Or, use the template at `docs/docker/nominatim` - Or, use the template at `docs/docker/nominatim`
``` ```bash
cd /opt/gancio/docs/docker/nominatim cd /opt/gancio/docs/docker/nominatim
docker-compose pull docker-compose pull
``` ```
@@ -111,15 +110,13 @@ wget https://download.geofabrik.de/europe/italy/nord-ovest-latest.osm.pbf \
``` ```
### Configure the environment file ### Configure the environment file
``` ```bash
cd docs/docker/nominatim/ cd docs/docker/nominatim/
cp .env.example .env cp .env.example .env
``` ```
Create a random password for nominatim a add it to .env file Create a random password for nominatim and add it to .env file
```bash ```bash
NOMINATIM_PASSWORD=random_password; NOMINATIM_PASSWORD=$(echo random_password | openssl passwd --stdin);
NOMINATIM_PASSWORD=$(echo $NOMINATIM_PASSWORD | openssl passwd --stdin);
echo $NOMINATIM_PASSWORD;
sed -i -e 's/\(NOMINATIM_PASSWORD=\)\(.*\)/\1'$NOMINATIM_PASSWORD'/g' .env sed -i -e 's/\(NOMINATIM_PASSWORD=\)\(.*\)/\1'$NOMINATIM_PASSWORD'/g' .env
``` ```