diff --git a/.env b/.env index a685bd8e..297913e4 100644 --- a/.env +++ b/.env @@ -13,8 +13,8 @@ PGPASSWORD=openmaptiles PGHOST=postgres PGPORT=5432 -# BBOX may get overwritten by the computed bbox of the specific area: -# make generate-dc-config +# By default, tile generation is done for the full extent of the given area. +# Modify BBOX below to overwrite it. BBOX=-180.0,-85.0511,180.0,85.0511 # Which zooms to generate in make generate-tiles diff --git a/QUICKSTART.md b/QUICKSTART.md index b656faae..53851518 100644 --- a/QUICKSTART.md +++ b/QUICKSTART.md @@ -397,6 +397,17 @@ Hints: * Small increments! Never starts with the `MAX_ZOOM = 14` * The suggested `MAX_ZOOM = 14` - use only with small extracts +### Set the bounding box to generate + +By default, tile generation is done for the full extent of the area. +If you want to generate a tiles for a smaller extent, modify the settings in the `.env` file, the default: +* `BBOX=-180.0,-85.0511,180.0,85.0511` + +Delete the `./data/.dc-config.yml` file, and re-start `./quickstart.sh ` + +Hint: +* The [boundingbox.klokantech.com](https://boundingbox.klokantech.com/) site can be used to find a bounding box (CSV format) using a map. + ### Check other commands `make help` diff --git a/quickstart.sh b/quickstart.sh index 26970c79..9e931a8e 100755 --- a/quickstart.sh +++ b/quickstart.sh @@ -263,11 +263,15 @@ make test-perf-null echo " " echo "-------------------------------------------------------------------------------------" -if [[ "$area" != "planet" ]]; then - echo "====> : Compute bounding box for tile generation" - make generate-dc-config ${MIN_ZOOM:+MIN_ZOOM="${MIN_ZOOM}"} ${MAX_ZOOM:+MAX_ZOOM="${MAX_ZOOM}"} +if [[ "$(source .env ; echo "$BBOX")" = "-180.0,-85.0511,180.0,85.0511" ]]; then + if [[ "$area" != "planet" ]]; then + echo "====> : Compute bounding box for tile generation" + make generate-dc-config ${MIN_ZOOM:+MIN_ZOOM="${MIN_ZOOM}"} ${MAX_ZOOM:+MAX_ZOOM="${MAX_ZOOM}"} + else + echo "====> : Skipping bbox calculation when generating the entire planet" + fi else - echo "====> : Skipping bbox calculation when generating the entire planet" + echo "====> : Bounding box is set in .env file" fi echo " "