If for whatever reason (like broken dependencies) the MapBox-CLI does not work for you, this bash script will upload all GeoTiffs in a folder via the MapBox API as tilesets using cURL. All it needs to do so is:
- Bash (although other shells may work it has not been tested)
- Your MapBox accountname and MapBox access token (make sure this token has
uploads:write
anduploads:read
permissions) - Some basic software packages that you may already have.
cURL
: to make http requests. On Debian based distro's:apt install curl
python
: required for the Amazon Web Services CLI. Probably present, if not:apt install python
AWS CLI
: to upload your geotiffs to MapBox's S3 bucket. Easiest to install using python-pip:apt install python-pip
and thenpip install awscli
JQ
: to parse the json responses of the MapBox API in bash.apt install jq
- Place all your geotiffs in one folder
- Place the
mapboxuploader.sh
script in the same folder - Enter your MapBox accountname and MapBox access token at the start of the script
- Make sure the script has execute permissions
More information about the MapBox uploads API in their documentation
More information about the Amazon Web Services CLI here
LICENSE: MIT