Cyclosm: add hillshade

This commit is contained in:
nobohan 2023-06-26 15:54:16 +02:00
parent 830155628f
commit f5c2022e7f
4 changed files with 15 additions and 0 deletions

1
.gitignore vendored
View File

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

View File

@ -32,6 +32,14 @@ Download the 2 following zip files, unzip them, and place them in the `pbf/shp`
Also, rename them as in the zip file, so simplified-land-polygons-complete-3857.shp and land-polygons-split-3857.shp. Also, rename them as in the zip file, so simplified-land-polygons-complete-3857.shp and land-polygons-split-3857.shp.
##### Contour lines
http://opendata.champs-libres.be/beautiful-contour-belgium.zip
#### Hillshade
Download the hillshade at http://opendata.champs-libres.be/hillshade_belgium_EPSG3857.zip and place the tif file in the pdf folder, as mounted in the `docker-compose.yml` file.
#### Do an import #### Do an import

View File

@ -12,6 +12,7 @@ services:
- ./pbf/luxembourg-latest.osm.pbf:/data/region.osm.pbf # change here your pbf - ./pbf/luxembourg-latest.osm.pbf:/data/region.osm.pbf # change here your pbf
- ./pbf/luxembourg.poly:/data/region.poly # and your poly - ./pbf/luxembourg.poly:/data/region.poly # and your poly
- ./pbf/shp/:/data/shp/ - ./pbf/shp/:/data/shp/
- ./pbf/hillshade.tif:/data/hillshade.tif
ports: ports:
- "8080:80" - "8080:80"
command: "run" command: "run"

5
run.sh
View File

@ -28,6 +28,11 @@ function compileStyle() {
sed -i 's/"Noto Sans Tibetan Regular",//g' ./cyclosm-cartocss-style/fonts.mss sed -i 's/"Noto Sans Tibetan Regular",//g' ./cyclosm-cartocss-style/fonts.mss
sed -i 's/"Noto Sans Tibetan Bold",//g' ./cyclosm-cartocss-style/fonts.mss sed -i 's/"Noto Sans Tibetan Bold",//g' ./cyclosm-cartocss-style/fonts.mss
sed -i 's/Noto Sans Syriac Eastern Regular/Noto Sans Syriac Regular/g' ./cyclosm-cartocss-style/fonts.mss sed -i 's/Noto Sans Syriac Eastern Regular/Noto Sans Syriac Regular/g' ./cyclosm-cartocss-style/fonts.mss
# change hillshade
sed -i 's/*extents84/*extents/g' ./cyclosm-cartocss-style/project.mml
sed -i 's,dem/shade.vrt,/data/hillshade.tif,g' ./cyclosm-cartocss-style/project.mml
sed -z 's/status: off\n- id: contours100/status: on\n- id: contours100/' -i ./cyclosm-cartocss-style/project.mml
# carto build # carto build
carto cyclosm-cartocss-style/project.mml > mapnik.xml carto cyclosm-cartocss-style/project.mml > mapnik.xml
} }