-
I have a code snippet here that calculates a median composite of images (image collection). I then sample the pixels near a point using reduceRegions (
However, in my case, when reduceRegions returns an NDVI value of None,
When I remove the line Thanks Dr. Wu! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Thank you for reporting. The line I noticed that when converting an Anyway, I have improved the function to add the missing column back to the dataframe. See #1776. Update the package using BTW, you should avoid using for loop with GEE. It is not computationally efficient. In your case, zonal statistics is a much better solution. Something like this image = colleciton.toBands()
geemap.zonal_stats(image, vector, out_csv) |
Beta Was this translation helpful? Give feedback.
Thank you for reporting. The line
data = ee_object.map(lambda f: ee.Feature(None, f.toDictionary(property_names)))
is used to avoid exporting geometry coordinates, which can be overwhelming.I noticed that when converting an
ee.Feature
toee.Dictionary
, GEE automatically removes the column withNone
values. See below. I am not sure if this is intentional behavior or a GEE bug.Anyway, I have improved the function to add the missing column back to the dataframe. See #1776. Update the package using
geemap.update_package()
and restart the kernel to take effect.BTW, you should avoid using for loop with GEE. It is not computationally efficient. In your case, zonal statistics is a much bette…