Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(basemaps): add tiling script #373

Merged
merged 1 commit into from
Jul 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions scripts/basemap-tiles.sh
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