cyclosm: add downloaded shp

This commit is contained in:
nobohan 2023-06-25 22:29:33 +02:00
parent c2b79805a0
commit 0bbebc0f4a
4 changed files with 20 additions and 1 deletions

1
.gitignore vendored
View File

@ -1,5 +1,6 @@
pbf/*.pbf
pbf/*.poly
pbf/shp/*
tiles/*
!tiles/.gitkeep
database/*

View File

@ -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

View File

@ -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"

5
run.sh
View File

@ -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