-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
STACIT: STAC 1.1 support #10773
STACIT: STAC 1.1 support #10773
Conversation
@@ -139,8 +139,7 @@ int STACITDataset::Identify(GDALOpenInfo *poOpenInfo) | |||
return pszHeader[0] == '{'; | |||
} | |||
|
|||
if (strstr(pszHeader, "\"stac_version\"") != nullptr && | |||
strstr(pszHeader, "\"proj:transform\"") != nullptr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is proj:transform checked for? It could appear both in properties or assets so it seems like this check may lead to false results.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The driver requires the projection extension to be there, hence checking for it. And as Identify() needs to be quick (it only has a subset of the JSON and can't use a JSON parser), it doesn't get into the details to figure out where the element is present
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, now I remember what strstr does. I'll revert, thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It needs two out of the three proj: properties and transform is one them. So just checking proj:transform seems to exclude cases where proj:bbox and proj:shape are set. Should we update this to check whether one of proj:transform or proj:bbox is present? That should capture all three cases.
fields | currently | new |
---|---|---|
transform + shape | accepted | accepted |
transform + bbox | accepted | accepted |
bbox + shape | rejected | accepted |
Maybe worth a separate small PR though, it's unrelated to the STAC 1.1 updates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe worth a separate small PR though, it's unrelated to the STAC 1.1 updates.
yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
taken into account per 8dd8c81
frmts/stacit/stacitdataset.cpp
Outdated
else if (osCommonName == "alpha") | ||
poVRTBand->SetColorInterpretation(GCI_AlphaBand); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no common name called 'alpha" in STAC, thus removing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really ? but please don't remove that there, otherwise this is going to conflict with PR #10721 that touches that code too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, no alpha. The full list of allowed values is here: https://github.com/stac-extensions/eo?tab=readme-ov-file#common-band-names
So that code should never get executed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The list was also extended a bit recently and the property in STAC 1.1 is a named eo:common_name and can be placed in asset or bands. So I guess we need to do more updates in Gdal, including #10721
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The list was also extended a bit recently
yes, #10721 takes inspiration from it, but feedback of the GDAL community was that some of the details like "rededge071", "rededge075", etc. were much too specific, so we didn't go to that detail for the GCI_ColorInterpretation enumeration.
I'm wondering if #10721 shouldn't be merge first (should be soon. I'm just letting a couple extra days for potential new comments on it), so that you can work on a stable base
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, go ahead. I can wait for that. This PR will still take me a little longer anyway.
Co-authored-by: Even Rouault <even.rouault@spatialys.com>
#10721 has been merged. Please rebase on top of latest master |
The GDAL project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 28 days and is being automatically marked as "stale". If you think this pull request should be merged, please check
|
Won't have time to work on this before December, but happy to reopen a new PR if this gets closed... |
The GDAL project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 28 days and is being automatically marked as "stale". If you think this pull request should be merged, please check
|
Still not December ;) |
The GDAL project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 28 days and is being automatically marked as "stale". If you think this pull request should be merged, please check
|
Closing for now, was a bit too optimistic about my time. If no one else works on it I may pick it up again at some point, others feel free to continue with the given code or start from scratch. |
continued in #11760 |
What does this PR do?
Implement support for STAC 1.1 in STACIT driver.
Is waiting for #10721
Disclaimer: Last time I wrote C/C++ was 10 years ago, this may take me a while...
What are related issues/pull requests?
None
Tasklist
Add support for STAC 1.1 in STACTA