You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I posted this #84 (comment) for Sentinel-1 and #83 for Landsat, but seems like it would be a good addition to stactools to be able to generate footprints when there are none provided with the original metadata.
I spent some time looking into this for Sentinel-1 a while back and used rasterio to get the footprints. I also tried using overviews to generate the footprints so it would be faster and wouldn't require reading as much of the file, but it really worked quite a bit better using the full resolution file.
The resulting geometry tends to be very large and way too big, so you have to simplify it. It's a balancing act to simplify it enough to you still have the detail needed while keeping the geometry size small.
You can see in the gifs below the difference between the provided geometry (blue) and the one calculated with the above code (red)
This is a typical image and the provided boundary overestimates the area cross-track, and underestimates it along-track.
This is a more unusual collect that is along the water where some of the water was masked out in the data, and we see the situation is even worse. The generated footprint in red is far better.
There might be edge cases where this would fail, thus before going operational I think it should be used to generate a few hundred boundaries to be visually inspected.
If the image were already downloaded or locally available, it's not that bad to run this processing and certainly worth it for the better footprint.
I posted this #84 (comment) for Sentinel-1 and #83 for Landsat, but seems like it would be a good addition to stactools to be able to generate footprints when there are none provided with the original metadata.
I spent some time looking into this for Sentinel-1 a while back and used rasterio to get the footprints. I also tried using overviews to generate the footprints so it would be faster and wouldn't require reading as much of the file, but it really worked quite a bit better using the full resolution file.
The resulting geometry tends to be very large and way too big, so you have to simplify it. It's a balancing act to simplify it enough to you still have the detail needed while keeping the geometry size small.
You can see in the gifs below the difference between the provided geometry (blue) and the one calculated with the above code (red)
This is a typical image and the provided boundary overestimates the area cross-track, and underestimates it along-track.
This is a more unusual collect that is along the water where some of the water was masked out in the data, and we see the situation is even worse. The generated footprint in red is far better.
There might be edge cases where this would fail, thus before going operational I think it should be used to generate a few hundred boundaries to be visually inspected.
If the image were already downloaded or locally available, it's not that bad to run this processing and certainly worth it for the better footprint.
The code is here:
https://gist.github.com/matthewhanson/6be66c97c828acd1d39d8cbb97a0981e
The text was updated successfully, but these errors were encountered: