2

Few days ago I saw on a Linkedin post that download_ee_image_tiles option was added to geemap. I was trying to use it with image I had and a fishnet that I have created before. However, I am not sure where the data is uploaded to, and if it can be uploaded to GCS (google cloud storage). This is how I tried to use the download_ee_image_tiles:



#I know that image collection has more than 1 image
img=img_coll.median()

#fct is geopandas fishnet (polygon per cell) converted into featureCollection

geemap.download_ee_image_tiles_parallel(img, fct, out_dir='path/on/google/cloud/storage, scale=10, crs="EPSG:4326")

This runs and returns nothing. Also, nothing was downloaded to my GCS. I was trying to upload it to google cloud storage path, but then I realized that I don't know if it works with GCS, as there is also specific function to upload to GCS (ee.batch.Export.image.toCloudStorage).

My end goal is to be able to upload images to GCS, using the geemap.download_ee_images_tiles_parallel, and if it's impossible , to understand to which destiantions the data can be downloaded.

1 Answer 1

1
+50

I believe you should be able to set out_dir to gs://bucket-name/path/on/gcs or possibly /vsigs/bucket-name/path/on/gcs that way GDAL will understand the destination is not a local file. Otherwise I believe it is writing the files to that path on the local filesystem.

Explanation:

  • You are calling geemap.download_ee_image_tiles_parallel.
  • Which is calling geemap.download_ee_image (here).
  • Which is calling geedim.download.BaseImage.download (here).
  • Which is calling rasrerio.open (here).
  • Which in turn is using GDAL.

After tracing through all that, we know we need the out_dir to be a value that rasterio / GDAL will understand. Which leads to this rasterio issue which discusses gs:// and the GDAL Docs explaining /vsigs/ usage. You may need to check those docs for specific connection settings.

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.