Skip to content

Local OpenStreetMap Overpass API

Artur André A. M. Oliveira edited this page Jun 11, 2021 · 2 revisions

OpenStreetMap Overpass API

The default Geographic Information System data used by INACITY to collect (i.e. to sample) digital maps comes from the OpenStreetMap database through the Overpass API. Nevertheless getting data from a public mirror/provider can overload those servers consequently slowing down INACITY itself. To avoid that we can host ourselves the Overpass API operating over a local mirror of the OpenStreetMap. This is just a matter of running a docker image (or otherwise install the Overpass API using the tutorials here).

Running the docker script

The default script (as made available by Wiktorn at github)

Below is an example of its use considering the use of META data (inclusing timestamps and user ids from OpenStreetMap), clone mode (to speed up the installing process), minutely updates, the published (to the exterior network) post (8007 in this case) and the last version of Overpass is used (0.7.56).

docker run
-e OVERPASS_META=yes
-e OVERPASS_MODE=clone
-e OVERPASS_DIFF_URL=https://planet.openstreetmap.org/replication/minute/
-v /PATH_TO_LOCAL_CLONE_OF_WIKTORN_REPO/Overpass-API/0.7.56:/db
-p 8007:80
--name overpass_world
wiktorn/overpass-api

(Re)starting the docker container

If for some reason the container stops one after (re)starting possibly it will occur the following error:

  • INFO gave up: fetch_diff entered FATAL state, too many start retries too quickly *

A possible workaround is to connect into the container and start manually the dispatcher:

docker exec -it *CONTAINER_ID* bash
cd /app/bin
nohup dispatcher_start.sh &

After that CTRL-P Q should escape the container.

Clone this wiki locally