Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add method for generating data footprints #85

Closed
matthewhanson opened this issue Mar 31, 2021 · 0 comments · Fixed by #307
Closed

Add method for generating data footprints #85

matthewhanson opened this issue Mar 31, 2021 · 0 comments · Fixed by #307
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@matthewhanson
Copy link
Member

matthewhanson commented Mar 31, 2021

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.

sentinel1-boundaries-small

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.

sentinel1-boundaries-odd-small

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants