Fixes #1156 Fixes #810 Fixes #1228 This PR replaces `osmborder`, which is no longer maintained, with `imposm` mappings and SQL code to generate borders. Key features that were moved into the imposm/SQL layer: 1. Grouping by `osm_id` and aggregating by lowest `admin_level` value so that there's only one copy of ways that are members of multiple relations. 2. Filtering out of point features in boundary relations (typically `admin_centre` and `label` roles). 3. Move disputed boundary detection logic into SQL. This will increase the database size slightly because of the limits of what imposm can do, as some of the filtering is done in the SQL layer after importing, rather than being done in `osmborder`.
102 lines
2.7 KiB
YAML
102 lines
2.7 KiB
YAML
# This version must match the MAKE_DC_VERSION value below
|
|
version: "3"
|
|
|
|
volumes:
|
|
pgdata:
|
|
|
|
networks:
|
|
postgres:
|
|
driver: bridge
|
|
|
|
services:
|
|
|
|
postgres:
|
|
image: "${POSTGIS_IMAGE:-openmaptiles/postgis}:${TOOLS_VERSION}"
|
|
# Use "command: postgres -c jit=off" for PostgreSQL 11+ because of slow large MVT query processing
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
networks:
|
|
- postgres
|
|
ports:
|
|
- "5432"
|
|
env_file: .env-postgres
|
|
|
|
import-data:
|
|
image: "openmaptiles/import-data:${TOOLS_VERSION}"
|
|
env_file: .env
|
|
networks:
|
|
- postgres
|
|
|
|
openmaptiles-tools:
|
|
image: "openmaptiles/openmaptiles-tools:${TOOLS_VERSION}"
|
|
env_file: .env
|
|
environment:
|
|
# Must match the version of this file (first line)
|
|
# download-osm will use it when generating a composer file
|
|
MAKE_DC_VERSION: "3"
|
|
# Allow DIFF_MODE, MIN_ZOOM, and MAX_ZOOM to be overwritten from shell
|
|
DIFF_MODE: ${DIFF_MODE}
|
|
MIN_ZOOM: ${MIN_ZOOM}
|
|
MAX_ZOOM: ${MAX_ZOOM}
|
|
#Provide BBOX from *.bbox file if exists, else from .env
|
|
BBOX: ${BBOX}
|
|
# Imposm configuration file describes how to load updates when enabled
|
|
IMPOSM_CONFIG_FILE: ${IMPOSM_CONFIG_FILE}
|
|
# Control import-sql processes
|
|
MAX_PARALLEL_PSQL: ${MAX_PARALLEL_PSQL}
|
|
networks:
|
|
- postgres
|
|
volumes:
|
|
- .:/tileset
|
|
- ./data:/import
|
|
- ./data:/export
|
|
- ./build/sql:/sql
|
|
- ./build:/mapping
|
|
- ./cache:/cache
|
|
|
|
generate-changed-vectortiles:
|
|
image: "openmaptiles/generate-vectortiles:${TOOLS_VERSION}"
|
|
command: ./export-list.sh
|
|
volumes:
|
|
- ./data:/export
|
|
- ./build/openmaptiles.tm2source:/tm2source
|
|
networks:
|
|
- postgres
|
|
env_file: .env
|
|
environment:
|
|
FILTER_MAPNIK_OUTPUT: ${FILTER_MAPNIK_OUTPUT}
|
|
MBTILES_NAME: ${MBTILES_FILE}
|
|
# Control tilelive-copy threads
|
|
COPY_CONCURRENCY: ${COPY_CONCURRENCY}
|
|
|
|
generate-vectortiles:
|
|
image: "openmaptiles/generate-vectortiles:${TOOLS_VERSION}"
|
|
volumes:
|
|
- ./data:/export
|
|
- ./build/openmaptiles.tm2source:/tm2source
|
|
networks:
|
|
- postgres
|
|
env_file: .env
|
|
environment:
|
|
FILTER_MAPNIK_OUTPUT: ${FILTER_MAPNIK_OUTPUT}
|
|
MBTILES_NAME: ${MBTILES_FILE}
|
|
BBOX: ${BBOX}
|
|
MIN_ZOOM: ${MIN_ZOOM}
|
|
MAX_ZOOM: ${MAX_ZOOM}
|
|
# Control tilelive-copy threads
|
|
COPY_CONCURRENCY: ${COPY_CONCURRENCY}
|
|
#
|
|
|
|
postserve:
|
|
image: "openmaptiles/openmaptiles-tools:${TOOLS_VERSION}"
|
|
command: "postserve ${TILESET_FILE} --verbose --serve=${OMT_HOST:-http://localhost}:${PPORT:-8090}"
|
|
env_file: .env
|
|
environment:
|
|
TILESET_FILE: ${TILESET_FILE}
|
|
networks:
|
|
- postgres
|
|
ports:
|
|
- "${PPORT:-8090}:${PPORT:-8090}"
|
|
volumes:
|
|
- .:/tileset
|