Default output filename as tiles.mbtiles (#1633)
Keep the default output filename as `tiles.mbtiles`. `tiles.mbtiles` is expected to start TileServer. Using the `area` as the name causes TileServer not to run. The name could be changed by the user by - change `MBTILES_FILE` in `.env` - use MBTILES_FILE as an environmental variable before running `quickstart.sh` or `generate-tiles-pg` Co-authored-by: Adam Laza <@lazaa32>
This commit is contained in:
@@ -163,12 +163,7 @@ else
|
||||
echo " "
|
||||
fi
|
||||
|
||||
# override the output filename based on the area if the default `tiles.mbtiles` is found
|
||||
if [[ "$(source .env ; echo "$MBTILES_FILE")" = "tiles.mbtiles" ]]; then
|
||||
MBTILES_FILENAME=${area}.mbtiles
|
||||
else
|
||||
MBTILES_FILENAME=$(source .env ; echo "$MBTILES_FILE")
|
||||
fi
|
||||
MBTILES_FILE=${MBTILES_FILE:-$(source .env ; echo "$MBTILES_FILE")}
|
||||
|
||||
echo " "
|
||||
echo "-------------------------------------------------------------------------------------"
|
||||
@@ -187,8 +182,8 @@ make init-dirs
|
||||
|
||||
echo " "
|
||||
echo "-------------------------------------------------------------------------------------"
|
||||
echo "====> : Removing old MBTILES if exists ( ./data/$MBTILES_FILENAME ) "
|
||||
rm -f "./data/$MBTILES_FILENAME"
|
||||
echo "====> : Removing old MBTILES if exists ( ./data/$MBTILES_FILE ) "
|
||||
rm -f "./data/$MBTILES_FILE"
|
||||
|
||||
echo " "
|
||||
echo "-------------------------------------------------------------------------------------"
|
||||
@@ -299,9 +294,9 @@ fi
|
||||
echo " "
|
||||
echo "-------------------------------------------------------------------------------------"
|
||||
echo "====> : Start generating MBTiles (containing gzipped MVT PBF) using PostGIS. "
|
||||
echo " : Output MBTiles: $MBTILES_FILENAME "
|
||||
echo " : Output MBTiles: $MBTILES_FILE "
|
||||
echo " : Source code: https://github.com/openmaptiles/openmaptiles-tools/blob/master/bin/generate-tiles "
|
||||
MBTILES_FILE=$MBTILES_FILENAME make generate-tiles-pg
|
||||
make generate-tiles-pg
|
||||
|
||||
echo " "
|
||||
echo "-------------------------------------------------------------------------------------"
|
||||
@@ -332,7 +327,7 @@ docker images | grep openmaptiles
|
||||
|
||||
echo " "
|
||||
echo "-------------------------------------------------------------------------------------"
|
||||
echo "====> : (disk space) We have created the new vectortiles ( ./data/$MBTILES_FILENAME ) "
|
||||
echo "====> : (disk space) We have created the new vectortiles ( ./data/$MBTILES_FILE ) "
|
||||
echo " : Please respect the licenses (OdBL for OSM data) of the sources when distributing the MBTiles file."
|
||||
echo " : Data directory content:"
|
||||
ls -la ./data
|
||||
|
||||
Reference in New Issue
Block a user