Open m-cappi opened 1 year ago
I think this is the same as https://github.com/microsoft/PlanetaryComputerExamples/issues/182? I got stuck at https://github.com/microsoft/PlanetaryComputerExamples/issues/182#issuecomment-1180626816 when I looked into this last.
If you're able to figure that out it'd be great! We might be blocked by an issue upstream in Radiant Earth's STAC API.
Hi Tom!
First off, regarding the ExtensionNotImplemented
from using LabelExtension
, the problem is two-fold:
first_item
in cell 6 lists ['https://stac-extensions.github.io/label/v1.0.0/schema.json']
for its stac_extensions
.LabelExtension
validates that the object in question implements this schema "https://stac-extensions.github.io/label/v1.0.1/schema.json"
, which simply differs in version from the one present in these new LandCoverNet collections.Provided that these collections and the pystac.extensions
packages are out of our reach, I've found that the easiest way to supress this ExtensionNotImplemented
error is to provide the *Extension.ext()
with a add_if_missing=True
flag.
All this has an undesirable effect that the possible land cover labels are being printed as integers now, and one has to reach to the LandCoverNet dataset documentation in order to find class definitions.
Classes for None
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
Regarding the https://github.com/microsoft/PlanetaryComputerExamples/issues/182#issuecomment-1180626816, the issue with your code snippet is that you are using a HEAD
action and receiving an 405 - Method Not Allowed
status code. If you were to use GET
instead, it's currently succeeding on my end.
Applying all these changes, I've been able to successfully run the notebook for the ref_landcovernet_af_v1_labels
collection (LandCoverNet Africa). If you'd like, I can submit a PR with these changes by tomorrow.
Regarding the South America and North America LandCoverNet collections, the notebook fails in cell 11 because we are not receiving the expected bands during cell 10. I'd have to further look into that as to know why.
Item ID: ref_landcovernet_sa_v1_source_sentinel_1_24MYT_29_20180106
Assets:
- Asset Key: VH
- Asset Key: VV
As for the Asia, Australia and Europe LandCoverNet collections, I'm getting a 404
when querying different images during cell 10.
Hi!
I wanted to share that while working with the Radiant MLHub Land Cover tutorial I've found an issue with the chosen dataset.
On cell 5 I get an
APIError: {"detail":"Collection ref_landcovernet_v1_labels do not exist."}
when querying for"ref_landcovernet_v1_labels"
. Upon inspecting the Radiant MLHub datasets I've found that there's no longer a general purpose LandCoverNet dataset available.There's an easy fix by replacing the
collection_id
withref_landcovernet_??_v1_labels
, filling in??
with eithersa
for South America,af
for Africa,as
for Asia,eu
for Europe orau
for Australia.But applying this workaround arises a new issue: on cell 6,
LabelExtension
validates internally the STAC schema received from the API. But the newly proposed collection_id's schema does not match the one on database.