-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: switch to pmtiles and self-hosting (#394)
* refactor: switch to pmtiles and self-hosting * refactor: clean up unused pkgs and files
- Loading branch information
Showing
6 changed files
with
35 additions
and
1,660 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
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
This file was deleted.
Oops, something went wrong.
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,28 @@ | ||
#!/bin/bash | ||
# 1. Generate pmtiles tiles from geojson exports | ||
# 2. Upload to S3-compatible storage | ||
# See also https://github.com/felt/tippecanoe | ||
|
||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
|
||
set -a | ||
. ${SCRIPT_DIR}/../.env 2> /dev/null | ||
. ${SCRIPT_DIR}/../.env.local 2> /dev/null | ||
set +a | ||
|
||
# Define Cloudflare-R2 backend for rclone | ||
S3_DEST=':s3,provider=Cloudflare,no_check_bucket=true,env_auth=true,acl=private:maptiles' | ||
|
||
echo "------ Generating crags tiles file ------" | ||
tippecanoe --force -o ${MAPTILES_WORKING_DIR}/crags.pmtiles -l crags -n "Crags" -zg ${MAPTILES_WORKING_DIR}/crags.*.geojson | ||
|
||
echo "**Uploading to remote storage" | ||
rclone copy ${MAPTILES_WORKING_DIR}/crags.pmtiles ${S3_DEST} | ||
|
||
echo "------ Generating crag group tiles file ------" | ||
tippecanoe --force -o ${MAPTILES_WORKING_DIR}/crag-groups.pmtiles -l crag-groups -n "Crag groups" -zg ${MAPTILES_WORKING_DIR}/crag-groups.geojson | ||
|
||
echo "**Uploading to remote storage" | ||
rclone copy ${MAPTILES_WORKING_DIR}/crag-groups.pmtiles ${S3_DEST} | ||
|
||
exit $? |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.