allenai / rslearn

A tool for developing remote sensing datasets and models.
Apache License 2.0
5 stars 0 forks source link

[WIP] Use KML file for Sentinel-2 tile lookup instead of mgrs library. #71

Open favyen2 opened 2 weeks ago

favyen2 commented 2 weeks ago

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.

favyen2 commented 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.

favyen2 commented 1 week ago

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...