Git Product home page Git Product logo

nominatim-docker's Introduction

Nominatim Docker container

Fully-featured container for geocoding, reverse geocoding and address lookup based on Nominatim and Open Street Map data.

Table of content

Build

The build process is fairly straightforward, but requires lots of computer resources and can take days to complete.

To build, install Docker and run following command:

docker build github.com/merlinnot/nominatim-docker \
  -t nominatim \
  --build-arg BUILD_THREADS=16 \
  --build-arg BUILD_MEMORY=32GB \
  --build-arg OSM2PGSQL_CACHE=28000 \
  --build-arg RUNTIME_THREADS=2 \
  --build-arg RUNTIME_MEMORY=8GB

Full list of build arguments:

Name Default Description
BUILD_THREADS 16 Number of threads used during build process.
BUILD_MEMORY 32GB Memory dedicated to postgresql during build process.
PGSQL_VERSION 9.6 PostgreSQL version.
POSTGIS_VERSION 2.4 PostGIS version.
OSM2PGSQL_CACHE 24000 osm2pgsql cache size in MB, should be set to about 75% of memory available during build process, to a maximum of about 30000. Additional RAM will not be used.
PBF_URL planet URL to OpenStreetMap data in PBF format. See geofabrik.de for extracts.
REPLICATION_URL planet URL to directory with periodic updates. I recommend using geofabrik.de (see raw directory index and lookup updates).
IMPORT_ADMINISTRATIVE false Data provided in PBF_FILE might be used to import only administrative boundaries. Importing only administrative boundaries is much faster and is useful for tasks like country code reverse geocoding.
RUNTIME_THREADS 2 Estimated number of threads available to the running container.
RUNTIME_MEMORY 8GB Estimated memory size available to the running container.

Run

To run container built in the previous step use

docker run --restart=always -d -p 80:80 merlinnot/nominatim-docker

API will be available at port 80 under /nominatim/ directory.

Develop

This project uses Devver, but feel free to use any of your favorite editors.

For development purposes I strongly encourage to start a build process using URLs for Monacco, it makes the process much faster:

docker build github.com/merlinnot/nominatim-docker \
  -t nominatim \
  --build-arg BUILD_THREADS=2 \
  --build-arg BUILD_MEMORY=8GB \
  --build-arg OSM2PGSQL_CACHE=2000 \
  --build-arg RUNTIME_THREADS=2 \
  --build-arg RUNTIME_MEMORY=8GB \
  --build-arg PBF_URL=http://download.geofabrik.de/europe/monaco-latest.osm.pbf \
  --build-arg REPLICATION_URL=http://download.geofabrik.de/monaco-updates

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.