AI-generated Key Takeaways
-
The
ee.Image.loadGeoTIFF
function loads a GeoTIFF from a Cloud Storage URI as an Earth Engine Image. -
The
uri
argument, a string, specifies the Cloud Storage location of the GeoTIFF, requiring specific storage permissions and regional location. -
Example code is provided for both JavaScript (Code Editor) and Python (Colab) to demonstrate how to load and display a GeoTIFF.
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 the US-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);
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