Open favyen2 opened 2 weeks ago
This fixes issue where some images aren't being returned correctly by the data sources when the query geometry is large, but it is currently broken due to Sentinel-2 scenes that span across the prime meridian.
I added some commits I was working on last week but I don't remember where I left off, I remember it was still broken though...
This removes a dependency but the main goal is to fix problem where sometimes an MGRS cell is not being returned properly during the lookup process. This is because previously we iterate over longitude/latitude in 0.5 increment and lookup the cell ID at each position. This works for normal-sized cells (which are about 100 km x 100 km) but there are some smaller cells at the boundary of UTM zones that can be skipped.
So now we instead create grid index over KML containing Sentinel-2 tiles and look it up that way. The KML is converted to JSON, and JSON data is cached in a cache directory that data source must provide.