diff --git a/README.md b/README.md index 75ee037..8ada5c8 100644 --- a/README.md +++ b/README.md @@ -20,19 +20,6 @@ For entering into the container, use the "terminal" argument of the run.sh scrip docker-compose run --rm map terminal ``` -#### OAM data dependencies - -##### Contour lines - -Download the geopackage from http://opendata.champs-libres.be/beautiful-contour-belgium.zip, convert it to shp and place it into the pbf/shp folder under the name "contours.shp". It will be mounted as written in the `docker-compose.yml` file. - -The shp is imported using `shp2pgsql` in the import step, assuming EPSG:31370 as the input shp CRS. - -#### 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 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 572784a..465ac17 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,7 +7,7 @@ services: #- osm-data:/data/database/ - ./database:/data/database/ - ./tiles:/data/tiles/ - - ./oam/renderd.conf:/etc/renderd.conf + - ./osmbe/renderd.conf:/etc/renderd.conf - ./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 diff --git a/oam/renderd.conf b/osmbe/renderd.conf similarity index 98% rename from oam/renderd.conf rename to osmbe/renderd.conf index 336e337..dc33394 100644 --- a/oam/renderd.conf +++ b/osmbe/renderd.conf @@ -12,7 +12,7 @@ font_dir=/usr/share/fonts font_dir_recurse=true ; ADD YOUR LAYERS: -[oam] +[osmbe] URI=/tile/ TILEDIR=/var/cache/renderd/tiles XML=/data/style/mapnik.xml diff --git a/run.sh b/run.sh index 2473ad1..d853e1a 100755 --- a/run.sh +++ b/run.sh @@ -14,20 +14,10 @@ function setPostgresPassword() { function compileStyle() { cd /data/style/ - git clone --single-branch --branch osm-tile-server https://github.com/nobohan/OpenArdenneMap.git --depth 1 - # mv symbols folder - mkdir /data/img/ - mv /data/style/OpenArdenneMap/img/* /data/img/ - # copy fonts - cp /data/style/OpenArdenneMap/fonts/* /usr/share/fonts/ - # change dbname - sed -i 's/"dbname": "osmpg_db",/"dbname": "gis",/g' ./OpenArdenneMap/osm2pgsql/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_3857.shp,g' ./OpenArdenneMap/osm2pgsql/project.mml - # carto build - carto OpenArdenneMap/osm2pgsql/project.mml > mapnik.xml + git clone --single-branch --branch master https://github.com/osmbe/openstreetmap-carto-be/--depth 1 + # TODO check if changes are needed as in cyclosm and oam + # carto build TODO check paths + carto project.mml > mapnik.xml } @@ -71,7 +61,6 @@ if [ "$1" == "import" ]; then sudo -u postgres createdb -E UTF8 -O renderer gis sudo -u postgres psql -d gis -c "CREATE EXTENSION postgis;" sudo -u postgres psql -d gis -c "CREATE EXTENSION hstore;" - sudo -u postgres psql -d gis -c "CREATE EXTENSION postgis_sfcgal;" sudo -u postgres psql -d gis -c "ALTER TABLE geometry_columns OWNER TO renderer;" sudo -u postgres psql -d gis -c "ALTER TABLE spatial_ref_sys OWNER TO renderer;" setPostgresPassword @@ -111,8 +100,8 @@ if [ "$1" == "import" ]; then OSM2PGSQL_EXTRA_ARGS="${OSM2PGSQL_EXTRA_ARGS:-} --flat-nodes /data/database/flat_nodes.bin" fi - # Import data - sudo -u renderer osm2pgsql -d gis --create --slim -G -S /data/style/OpenArdenneMap/osm2pgsql/OpenArdenneMap.style --extra-attributes \ + # Import data TODO check the path and other options + sudo -u renderer osm2pgsql -d gis --create --slim -G -S /openstreetmap-carto.style --extra-attributes \ /data/region.osm.pbf \ ${OSM2PGSQL_EXTRA_ARGS:-} \ ; @@ -128,8 +117,6 @@ if [ "$1" == "import" ]; then sudo -u postgres psql -d gis -f /data/style/${NAME_SQL:-indexes.sql} fi - sudo -u postgres psql -d gis -f /data/style/OpenArdenneMap/create_views.sql - # Register that data has changed for mod_tile caching purposes sudo -u renderer touch /data/database/planet-import-complete @@ -215,7 +202,7 @@ if [ "$1" == "generate_tiles" ]; then sudo -u renderer renderd -c /etc/renderd.conf - cat /data/tiles/oam/tiles.list | render_list --map oam + cat /data/tiles/osmbe/tiles.list | render_list --map osmbe bash fi