ee.Image.loadGeoTIFF
Loads a GeoTIFF as an Image.
Usage | Returns | ee.Image.loadGeoTIFF(uri) | Image |
Argument | Type | Details | uri | String | The Cloud Storage URI of the GeoTIFF to load. The bucket metadata must be accessible (requires the `storage.buckets.get` permission which is provided by the role "Storage Legacy Bucket Reader" among others, see https://cloud.google.com/storage/docs/access-control/iam-roles) and the bucket must be located in the US multi-region, a dual-region including US-CENTRAL1, or theUS-CENTRAL1 region. |
Examples
Code Editor (JavaScript)
var uri = 'gs://gcp-public-data-landsat/LC08/01/001/002/' +
'LC08_L1GT_001002_20160817_20170322_01_T2/' +
'LC08_L1GT_001002_20160817_20170322_01_T2_B5.TIF';
var cloudImage = ee.Image.loadGeoTIFF(uri);
print(cloudImage);
Map.addLayer(cloudImage, {min: 0, max: 20000});
Map.centerObject(cloudImage, 6);
Python setup
See the
Python Environment page for information on the Python API and using
geemap
for interactive development.
import ee
import geemap.core as geemap
Colab (Python)
uri = (
'gs://gcp-public-data-landsat/'
+ 'LC08/01/001/002/'
+ 'LC08_L1GT_001002_20160817_20170322_01_T2/'
+ 'LC08_L1GT_001002_20160817_20170322_01_T2_B5.TIF'
)
cloud_image = ee.Image.loadGeoTIFF(uri)
display(cloud_image)
m = geemap.Map()
m.add_layer(cloud_image, {'min': 0, 'max': 20000})
m.center_object(cloud_image, 6)
m
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-12-23 UTC.
[null,null,["Last updated 2024-12-23 UTC."],[[["`ee.Image.loadGeoTIFF` loads a Cloud Storage-hosted GeoTIFF file as an `ee.Image`."],["The function takes a single argument, `uri`, which specifies the Cloud Storage location of the GeoTIFF."],["Examples demonstrate loading and displaying a Landsat 8 GeoTIFF from the public data catalog in both JavaScript and Python."]]],[]]