Skip to content

Instantly share code, notes, and snippets.

@robinkraft
Last active December 7, 2017 20:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robinkraft/872b85b56f7ed8551cb08908b33a224f to your computer and use it in GitHub Desktop.
Save robinkraft/872b85b56f7ed8551cb08908b33a224f to your computer and use it in GitHub Desktop.
Upload a raster to mapbox.com using the Mapbox Upload API
from mapbox import Uploader
u = Uploader() # handles authentication
tileset = 'username.tileset_name' # name your tileset
url = u.stage(open('mosaic_final.tif')) # upload happens here
u.create(url, tileset, name=fname) # starts the tiling job
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment