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

Request: Add sensor viewing angles to Sentinel-2 scene properties from STAC #50

Closed
lukasValentin opened this issue Jun 20, 2022 · 4 comments · Fixed by #86
Closed

Request: Add sensor viewing angles to Sentinel-2 scene properties from STAC #50

lukasValentin opened this issue Jun 20, 2022 · 4 comments · Fixed by #86
Assignees
Labels
enhancement New feature or request

Comments

@lukasValentin
Copy link

We are currently using pystac-client to retrieve Sentinel-2 metadata (L2A) from Planetary computer, which used this repo to provide Sentinel STAC items.

While we found the mean solar azimuth angle (s2:mean_solar_azimuth) and mean solar zenith angle (s2:mean_solar_zenith) in the scene properties, the data about mean sensor azimuth and mean sensor zenith angle seems to be missing.

In our project, however, we'd require scene-wide angular information to run radiative transfer model simulations. In addition, we think that providing the entire angular data might be very helpful also for other users.

So, the proposal is to add the sensor azimuth and sensor zenith angle data as further entries to the scene properties. We are aware that the STAC specifications are undergoing, therefore, we'd are looking forward to your feedback and those from other Sentinel-2 users.

Thanks in advance.

@TomAugspurger
Copy link

Do you know which metadata file would have this information (granule, inspire, datastrip, ...)? And if so, do you know what key it would be under?

@lukasValentin
Copy link
Author

lukasValentin commented Jun 20, 2022

It can be found in the GRANULE metadata file:

The xml tags are <Mean_Sun_Angle> and <Mean_Viewing_Incidence_Angle_List>, respectively. The sensor-angles are bit more complex since the the sun angles are provided per spectral band, so maybe they could be provided per band in STAC as well

@TomAugspurger
Copy link

Thanks. Presumably, that could be handled similar to

@property
def mean_solar_azimuth(self) -> Optional[float]:
return map_opt(
float, self._tile_angles_node.find_text("Mean_Sun_Angle/AZIMUTH_ANGLE")
)
. I'm not 100% sure where the information would go, but possible the view extension: https://github.com/stac-extensions/view.

Just an FYI, the Planetary Computer STAC items do contain links back to the granule metadata. As a temporary workaround, you can load and parse those files to discover these values yourself. But that will be slower and you wouldn't be able to filter on these values through the STAC API.

@lukasValentin
Copy link
Author

Thanks @TomAugspurger for the reply; indeed we are now using the workaround you proposed to obtain the angular information.

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.

3 participants