I need to export pixels from a processed image of Sentinel-2 using GEE Javascript with a 10 pixel size. The export is for pixels within 120,000 land parcel polygons.

I am way above the limit for pixel export (I even increased the MaxPixels). I am trying to divide the original shapefile with the polygons into parts to import to GEE one piece at a time. But, it is very tedious work to do that one by one and run the code and export accordingly.

Is it possible to work with the original asset with all polygons and iterate over subsets of it in order to export data as csv automatically for each subset? I can then merge the subsets once all are exported.

  • 1
    Does the argument fileDimensions in the function Export.image.toDrive help you achieve automatic tiling? – kkrao Dec 21 '20 at 18:03
  • @kkrao thank you for your input. I was inspired by your post to try Export.image.toDrive. It allows more export than Export.table.toDrive! So, in GEE I used the shapefile with the polygons to create a mask and thus create a new image from the Sentinel-2 data where only the pixels with the polygons are available. I was able to export the image without the need for fileDimensions (I used maxPixels:1e10). Now I have what I need in Tiff and need to export the values of each pixel (12 bands) to CSV....I am stuck there. I am trying SNAP, but it doesn't open the resulting Tiff file for some reason. – ie-con Dec 28 '20 at 13:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.