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:writeanduploads:readpermissions) - Some basic software packages that you may already have.
cURL: to make http requests. On Debian based distro's:apt install curlpython: required for the Amazon Web Services CLI. Probably present, if not:apt install pythonAWS CLI: to upload your geotiffs to MapBox's S3 bucket. Easiest to install using python-pip:apt install python-pipand thenpip install awscliJQ: to parse the json responses of the MapBox API in bash.apt install jq
- Place all your geotiffs in one folder
- Place the
mapboxuploader.shscript 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