I have a set of images I have processed. Unfortunately, the geometry of the image processed do not always fit the image data.
Problem: Let's assume I have an
imageCollection. Then, when I would like to filter by bounds according the green area (using
filterBounds). The 'blue' image will be selected whereas I don't want (no data in the green area).
- blue is the image data
- dark the image geometry
- green is the region of interest
Question: Knowing the geometry where there is data (I know it from image before pre-processing), how can I refit the image geometry ?
to update the property
image = image.set('system:footprint', mygeometry)
But, then, when I call
image.geometry(), the geometry hasn't been updated.
clipfunction: the documentation clearly explains this is applying a mask, do not update the geometry.
Reproducibility: Link code