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

GRD: Consider using footprint from productInfo.json instead of safe:footPrint from SAFE manifest #56

Open
philvarner opened this issue May 31, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@philvarner
Copy link
Collaborator

Is your feature request related to a problem? Please describe.

Currently, GRD uses the footprint element in the SAFE manifest (effectively a bbox) to produce a polygon.

e.g.,

             <safe:footPrint srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
                <gml:coordinates>66.097771,-174.028839 66.944458,176.813492 71.130539,178.793777 70.166634,-170.280487</gml:coordinates>
              </safe:footPrint>

This is not a very accurate footprint for the scene, and has at least one bug with it (#55),

Instead, consider using the productInfo.json "footprint" attribute. This has a MultiPolygon for antimeridian-spanning scenes and more accurate geometries of all scenes.

@philvarner philvarner added the enhancement New feature or request label May 31, 2023
@philvarner
Copy link
Collaborator Author

@lossyrob do you have any insight as to why the bbox-like footprint from the manifest was using instead of the geojson footprint from productInfo.json?

@matthewhanson
Copy link
Member

When I did https://github.com/sat-utils/sat-stac-sentinel/blob/master/stac_sentinel/sentinel.py it used the productInfo.json file and the footprint still had an issue of being not very accurate.

Then, sat-stac-sentinel spawned stac-sentinel where a lot of the stactools-sentinel1 logic was derived from. But that: https://github.com/stac-utils/stac-sentinel/blob/main/stac_sentinel/sentinel.py#L93 looks like it is only for the Sentinel-1 RTC dataset on AWS which is tiled.

So I'm definitely +1 to use productInfo, but also interested in more info about the differences between them. Do you find that the productInfo footprint is accurate @philvarner ?

@lossyrob
Copy link
Member

@philvarner I don't have insights, but have seen instances of GRD footprints being off. If productInfo has a better footprint then I'd agree we should change to use them.

@philvarner
Copy link
Collaborator Author

philvarner commented Jun 1, 2023

Here's a comparison of a single item:

Current output of stactools-sentinel1, from manifest.safe coordinates:

image image

footprint property in productInfo.json:

image image

Current Earth Search item, calculated from the raster:

image image

Current Planetary Computer:

image image

@philvarner philvarner changed the title GRD: Consider using footprint from productInfo.json instead of safe:footPrint from SAFE mantifest GRD: Consider using footprint from productInfo.json instead of safe:footPrint from SAFE manifest Jun 1, 2023
@philvarner
Copy link
Collaborator Author

The existing package footprint is clearly the worse. Planetary Computer's footprint is the same as productInfo.json but with fewer decimal places, and Earth Search's recomputation from the raster is tighter, but not by much.

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

No branches or pull requests

3 participants