-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
- Loading branch information
viet nguyen
committed
Feb 24, 2024
1 parent
6f8c716
commit 7fc7f8f
Showing
4 changed files
with
29 additions
and
20 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,25 @@ | ||
#!/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 | ||
. ${SCRIPT_DIR}/../.env.local | ||
set +a | ||
|
||
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 $? |