Allow BBOX to be set in .env file (#1013)
* Allow setting `BBOX` to be set in `.env` file Currently, the `BBOX` setting in `.env` is ignored for all areas except `planet`. On the other hand, the `planet` area is an overkill for any `BBOX` setting other than the default - `-180.0,-85.0511,180.0,85.0511`. With this PR, `quickstart.sh` would not override a modified `BBOX` value in `.env`. Also, this provides a way to avoid the pessimistic `BBOX` computation for `osmfr` extracts, as described in https://github.com/openmaptiles/openmaptiles-tools/pull/297#issuecomment-700792702 #### Currently - If the user does not do anything, `quickstart.sh` and `make generate-tiles` create an `mbtiles` file for the full extent of the data source. This applies to `planet` and other data sources. - If a user sets the `BBOX` value in `.env` and a `planet` data source is used, `quickstart.sh` and `make generate-tiles` create an `mbtiles` file for the extent set in the `.env` file. - If a user sets the `BBOX` value in `.env` and a non-`planet` data source is used, it is ignored - `quickstart.sh` and `make generate-tiles` create an `mbtiles` file for the full extent of the data source. #### Problem statement While users of a `planet` data source have a simple way to override the default extend of the tile generation, users of other data sources have no simple way of doing that. In fact, for such users the `BBOX` setting in the `.env` file is ignored and therefore misleading. #### Proposal - If the user does not do anything, `quickstart.sh` and `make generate-tiles` create an `mbtiles` file for the full extent of the data source. This applies to `planet` and other data sources. - If a user sets the `BBOX` value in `.env`, `quickstart.sh` and `make generate-tiles` create an `mbtiles` file for the extent set in the `.env` file. This applies to `planet` and other data sources.
This commit is contained in:
@@ -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/<area>.dc-config.yml` file, and re-start `./quickstart.sh <area>`
|
||||
|
||||
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`
|
||||
|
||||
Reference in New Issue
Block a user