Skip to content

Instantly share code, notes, and snippets.

@Kirill888
Created June 4, 2018 11:41
Show Gist options
  • Save Kirill888/d9ce50dfe0f6be07c4a66ce6cb115da9 to your computer and use it in GitHub Desktop.
Save Kirill888/d9ce50dfe0f6be07c4a66ce6cb115da9 to your computer and use it in GitHub Desktop.
with rasterio.Env(GDAL_DISABLE_READDIR_ON_OPEN=True,
CPL_VSIL_CURL_ALLOWED_EXTENSIONS='tif',
VSI_CACHE=True,
region_name='us-west-2'):
with rasterio.open('s3://bucket/file.tif', 'r') as f:
im = f.read()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment