From 0bbebc0f4aae1ee77bc2f85bae835fbaa07b50d5 Mon Sep 17 00:00:00 2001 From: nobohan Date: Sun, 25 Jun 2023 22:29:33 +0200 Subject: [PATCH] cyclosm: add downloaded shp --- .gitignore | 1 + README.md | 13 +++++++++++++ docker-compose.yml | 2 ++ run.sh | 5 ++++- 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index d4fdc04..cbcc048 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ pbf/*.pbf pbf/*.poly +pbf/shp/* tiles/* !tiles/.gitkeep database/* diff --git a/README.md b/README.md index 670efd8..a8f455a 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,19 @@ For entering into the container, use the "terminal" argument of the run.sh scrip docker-compose run --rm map terminal ``` +#### Cyclosm data dependencies + +##### Shp + +Download the 2 following zip files, unzip them, and place them in the `pbf/shp` folder. They are mounted as volume in the docker-compose.yml. + +- http://osmdata.openstreetmap.de/download/simplified-land-polygons-complete-3857.zip +- http://osmdata.openstreetmap.de/download/land-polygons-split-3857.zip + +Also, rename them as in the zip file, so simplified-land-polygons-complete-3857.shp and land-polygons-split-3857.shp. + + + #### Do an import Download a pbf and a poly file of your choice on https://download.geofabrik.de and put it in the `pbf` folder. Change the lines of the pbf and poly paths in the volumes in the `docker-compose.yml` file diff --git a/docker-compose.yml b/docker-compose.yml index e7b9850..c6e7411 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,6 +11,8 @@ services: - ./run.sh:/run.sh # for dev - ./pbf/luxembourg-latest.osm.pbf:/data/region.osm.pbf # change here your pbf - ./pbf/luxembourg.poly:/data/region.poly # and your poly + - ./pbf/shp/:/data/shp/ + #- ./pbf/simplified-land-polygons-complete-3857.zip:/data/simplified-land-polygons-complete-3857.zip ports: - "8080:80" command: "run" diff --git a/run.sh b/run.sh index f318b49..711e761 100755 --- a/run.sh +++ b/run.sh @@ -131,7 +131,10 @@ if [ "$1" == "run" ]; then cd /data/style/ git clone --single-branch --branch v0.6 https://github.com/cyclosm/cyclosm-cartocss-style.git --depth 1 - # carto build + # change shp paths + sed -i "s,file: http://osmdata.openstreetmap.de/download,file: /data/shp,g" ./cyclosm-cartocss-style/project.mml + sed -i "s/.zip/.shp/g" ./cyclosm-cartocss-style/project.mml + # carto build carto cyclosm-cartocss-style/project.mml > mapnik.xml