Skip to content
This repository was archived by the owner on Nov 10, 2026. It is now read-only.
This repository was archived by the owner on Nov 10, 2026. It is now read-only.

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

Open

Description

@m-mohr

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...

Activity

  1. TomAugspurger commented on Dec 15, 2022

    @TomAugspurger

    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"
        }
    ]
    
  2. m-mohr commented on Dec 15, 2022

    @m-mohr
    Author

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions