-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(basemaps): add tiling script (#373)
- Loading branch information
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Usage: ./basemap-tiles.sh <input-file> <output-folder> | ||
# with Docker: docker run -v `pwd`:/data -w /data --name gdal2 -it --rm geographica/gdal2 ./basemap-tiles | ||
|
||
# Images and worldfiles can be found here: https://drive.google.com/drive/folders/15UR1BBZRVPvLlvPF3s5yYNqpdmd6PMcF | ||
# Upload tiles with: gsutil -m cp -r ./<output-folder>/ gs://esa-cfs-tiles/<version>/basemaps/<name> | ||
|
||
input=$1 | ||
output=$2 | ||
|
||
gdal2tiles.py \ | ||
--profile geodetic \ | ||
--zoom=$ZOOM_LEVELS \ | ||
--tmscompatible \ | ||
--no-kml \ | ||
--webviewer=none \ | ||
--resampling average \ | ||
--s_srs EPSG:4326 \ | ||
$input \ | ||
$output | ||
|
||
find $output -name '*.kml' -delete | ||
find $output -name '*.aux.xml' -delete | ||
find $output -name '*.json' -delete |