2

I want to transfer some images from Earth Engine to a Google Cloud Storage bucket. I know that I can use the following code to accomplish this task:

Export.image.toCloudStorage({
            image: image,
            bucket: bucket_name,
            fileNamePrefix: file_name_prefix,
            fileFormat: 'GeoTIFF'
        })

This stores my image in the form of several chunks inside my bucket. However, I cannot see the image metadata in any of these chunks. Can someone advise me as to how to save the metadata along with the images?

1 Answer 1

1

you could for example export a CSV file. This gives a file with the properties of the image and their corresponding values?

Export.table.toCloudStorage({
            collection: ee.FeatureCollection([ee.Feature(image)]),
            bucket: bucket_name,
            fileNamePrefix: file_name_prefix,
            fileFormat: 'CSV'
        })

If you have multiple images in one collection, you can also export the collection in once.

1
  • A following question would be how to use the CSV file to reconstruct the image to exactly what it looks like before its export?
    – Fei Yao
    Commented Aug 14, 2022 at 11:08

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.