geotekne-argentina / osm-geoserver-postgis

Docker-compose that assembles the necessary components to implement a Geoserver instance that publishes the OpenStreetMap (OSM) layers locally on a single host.
Apache License 2.0
17 stars 6 forks source link
docker docker-compose geoserver openstreetmap osm postgis

osm-geoserver-postgis

Get your preferred OSM dataset (ie. country) running in a local Geoserver instance with only 2 commands.

sample

On previous image you can see the demo application in action (at http://localhost we serve a small app that allows to see the content of your deployment)

Project involves a docker-compose.yml file that assembles the necessary components to implement a Geoserver instance that publishes the OpenStreetMap (OSM) layers locally on a single host/machine (Postgis is required to store the OSM layers).

Instructions for this project are based on this repository OSM-Styles, but making a simpler execution plan.

The steps and scripts are intended to run in the context of Linux, Mac and Windows environments

Note that you can browse the OSM Internet version or the OSM Local instance for which only in the region of Suriname you will see details on the high-resolution (you can extent it to global coverage of desired, just you will need to ingest the full global dataset of OSM files). Explanations below.

Steps

With the scripts that are included in the folder we have simplified the steps to deploy a solution that includes a Geoserver instance publishing the OSM layers (stored in a Postgis), using WMS service.

This simplification will work fine when deployment is done on the same host (on which the docker compose that initializes the system will be executed). If you have to deploy on more than one host, you have to consider some technical aspects (basically, the same as moving from docker compose to swarm or kubernetes, so you will have to adapt it).

The idea is to keep the use case simple (below is the diagram of containers and volumes to create).

Preconditions:

Note: you can check preconditions executing script check-preconditions.sh

  1. Install git, docker and docker compose (V2) on the host machine.

  2. Download the repository of this project.

    git clone https://github.com/geotekne-argentina/osm-geoserver-postgis
  3. Optional: edit file config.sh and select which PBF file to download (from GeoFabrik, https://download.geofabrik.de/), otherwise default demo will download Suriname PBF file.

2 Steps

  1. Execute setup-datasets.sh script

    ./osm-geoserver-postgis/setup-datasets.sh
  2. Once the datasets setup is finished, then execute startup.sh script

    ./osm-geoserver-postgis/startup.sh

IMPORTANT:

Observations :

(*) The initial version of this file comes from this repository https://github.com/geosolutions-it/osm-styles (in the README you will find the link to download it from Dropbox), but it has errors/imperfections in certain areas - product of the treatment to lower the resolution - that have been corrected.

Technical Details

Diagram