1

When I run the following code in Google Colab, the image gets imported from Earth Engine assets folder into Google Colab such that I can visualize it:

import ee
imageROI = ee.Image('users/username/fileName')

However, instead of referring an asset from the Earth Engine, I want to reference an image from google cloud storage. Is there any method to do so? An example that has not been working:

import ee
imageROI = ee.Image('gs://bucket/fileName')

I am looking for something on these lines so that I can reference an image directly from Google cloud storage.

1 Answer 1

3

You cannot access imagery from Cloud Storage directly, you have to upload them as assets first. This post show how you can do that from Colab:

!earthengine --no-use_cloud_api upload image --asset_id={outputAssetID} {outputImageFile} {outputJsonFile}
2
  • Thank you Daniel! Alternatively, would it be possible to access it from a Google drive location? I am asking this because I am involved in a collaborative project with 2-3 other stakeholders and I am not sure what would happen to my EE assets if my account gets deactivated. Commented May 8, 2020 at 8:43
  • Unfortunately not. Commented May 8, 2020 at 8:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.