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

raster:bands invalid for 3dep-lidar-hag items #383

Open
m-mohr opened this issue Dec 15, 2022 · 2 comments
Open

raster:bands invalid for 3dep-lidar-hag items #383

m-mohr opened this issue Dec 15, 2022 · 2 comments

Comments

@m-mohr
Copy link

m-mohr commented Dec 15, 2022

In the items for 3dep-lidar-hag, e.g. https://planetarycomputer.microsoft.com/api/stac/v1/collections/3dep-lidar-hag/items/UT_StatewideSouth_2_2020-hag-2m-0-7 , have invalid raster:bands. They must be an array of Band Objects instead of directly a Band Object. Also, it is part of the properties instead of the asset, which is why it is not cought by validators...

@TomAugspurger
Copy link

Hmm, this does look off. raster:bands being an object instead of an array of objects is clearly wrong. But according to stac-validator it's OK:

❯ stac-validator https://planetarycomputer.microsoft.com/api/stac/v1/collections/3dep-lidar-hag/items/UT_StatewideSouth_2_2020-hag-2m-0-7

Thanks for using STAC version 1.0.0!

[
    {
        "version": "1.0.0",
        "path": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/3dep-lidar-hag/items/UT_StatewideSouth_2_2020-hag-2m-0-7",
        "schema": [
            "https://stac-extensions.github.io/projection/v1.0.0/schema.json",
            "https://stac-extensions.github.io/raster/v1.1.0/schema.json",
            "https://stac-extensions.github.io/classification/v1.0.0/schema.json",
            "https://schemas.stacspec.org/v1.0.0/item-spec/json-schema/item.json"
        ],
        "valid_stac": true,
        "asset_type": "ITEM",
        "validation_method": "default"
    }
]

@m-mohr
Copy link
Author

m-mohr commented Dec 15, 2022

That's because raster:bands is not defined (allowed) in item properties (only allowed in assets) and as such there's no validation in place. So, it handles it as just a proprietary extension and allows it as provided. If we want to have strict schemas we should probably check that it doesn't exist in items, but it's not part of the schema yet. You could open an issue for it in the raster extension.

See also stac-extensions/raster#36

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

No branches or pull requests

2 participants