CDSETool icon indicating copy to clipboard operation
CDSETool copied to clipboard

Option to ignore partial tiles when searching with geometry

Open EmanuelCastanho opened this issue 2 months ago • 0 comments

Summary

When searching the catalogue, retrieve only Sentinel products that cover the user defined geometry completely. This is optional. Is this currently available? Do you thing this is an interesting feature? If yes, I can spend some time on this.

Basic example

Retrieves this product: Screenshot 2024-05-07 at 17 10 18 Ignores this product: Screenshot 2024-05-07 at 17 09 48

Motivation

Sometimes the user do not want to work with tiles that cover the region of interest partially.

My suggestion of solution

Compare the user defined geometry with the geometry from the Sentinel metadata. https://stackoverflow.com/questions/55840924/how-to-judge-if-a-polygon-is-inside-another-polygon-in-python

from shapely.geometry import Polygon

polya = Polygon([(0, 0), (0, 1), (1, 1), (1, 0)]) 
polyb = Polygon([(0.5, 0.5), (0.5, 0.8), (0.8, 0.8), (0.8, 0.5)]) 

polya.contains(polyb)
# True

EmanuelCastanho avatar May 07 '24 17:05 EmanuelCastanho