OAM: adapt dbname, contour and hillshade paths
This commit is contained in:
parent
17edd862a7
commit
f3ec2c0df0
@ -9,7 +9,7 @@ services:
|
||||
- ./tiles:/data/tiles/
|
||||
- ./oam/renderd.conf:/etc/renderd.conf
|
||||
- ./run.sh:/run.sh # for dev
|
||||
#- ./pbf/belgium-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/shp/:/data/shp/
|
||||
- ./pbf/hillshade.tif:/data/hillshade.tif
|
||||
|
20
run.sh
20
run.sh
@ -19,22 +19,16 @@ function compileStyle() {
|
||||
# mkdir /data/style/symbols/
|
||||
# mv /data/style/cyclosm-cartocss-style/symbols/* /data/style/symbols/
|
||||
# change dbname
|
||||
# sed -i 's/dbname: "osm"/dbname: "gis"/g' ./cyclosm-cartocss-style/project.mml
|
||||
sed -i 's/"dbname": "osmpg_db",/"dbname": "gis",/g' ./OpenArdenneMap/osm2pgsql/project.mml
|
||||
# # remove some deprecated fonts
|
||||
# sed -i 's/, "unifont Medium", "Unifont Upper Medium"//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 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
|
||||
# # change contours
|
||||
# sed -z 's/status: off\n- id: contours50/status: on\n- id: contours50/' -i ./cyclosm-cartocss-style/project.mml
|
||||
# sed -z 's/status: off\n- id: contours20/status: on\n- id: contours20/' -i ./cyclosm-cartocss-style/project.mml
|
||||
# sed -z 's/status: off\n- id: contours10/status: on\n- id: contours10/' -i ./cyclosm-cartocss-style/project.mml
|
||||
# sed -z 's/status: off\n- id: waterway_low/status: on\n- id: waterway_low/' -i ./cyclosm-cartocss-style/project.mml
|
||||
# sed -i 's/dbname: "contours"/dbname: "gis"/g' ./cyclosm-cartocss-style/project.mml
|
||||
# change hillshade
|
||||
sed -i 's,/mnt/tera/ChampsLibres/Projets/OSM/CyclOSM/hillshade/data/dem_be_10x10_hillshade_semi_transparent_3857.tif,/data/hillshade.tif,g' ./OpenArdenneMap/osm2pgsql/project.mml
|
||||
# change contours
|
||||
sed -i 's,/../contour/beautiful_contour_belgium.shp,/data/shp/contours.shp,g' ./OpenArdenneMap/osm2pgsql/project.mml
|
||||
# carto build
|
||||
carto OpenArdenneMap/osm2pgsql/project.mml > mapnik.xml
|
||||
}
|
||||
@ -138,10 +132,6 @@ if [ "$1" == "import" ]; then
|
||||
sudo -u postgres psql -d gis -f /data/style/${NAME_SQL:-indexes.sql}
|
||||
fi
|
||||
|
||||
# Import contour files
|
||||
shp2pgsql -s 31370:3857 -c -g geometry -I /data/shp/contours.shp public.contours | sudo -u renderer psql -d gis
|
||||
sudo -u renderer psql -d gis -c "ALTER TABLE public.contours RENAME COLUMN elev TO height;"
|
||||
|
||||
# Register that data has changed for mod_tile caching purposes
|
||||
sudo -u renderer touch /data/database/planet-import-complete
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user