Skip to content

Set schema_URI in 1.2? #668

@jlaura

Description

@jlaura

I am testing out 1.2 right now with the data cube extension. I am not seeing a way to use the v1.0.0 implementation of the data cube extension.

If I do something like this to create an item:

item = pystac.Item(id=obj.productid, 
                   geometry=geometry, 
                   bbox=obj.bbox,  
                   datetime=dt,
                   stac_extensions=extensions,
                   href=os.path.join(obj.href,f'{obj.productid}.json'),
                   collection=collection,
                   properties=properties)

and stac_extensions includes: 'https://stac-extensions.github.io/datacube/v1.0.0/schema.json', I get a validation error for the wrong schema version:

pystac.errors.ExtensionNotImplemented: Could not find extension schema URI https://stac-extensions.github.io/datacube/v2.0.0/schema.json in object.`

Note the v2.0.0, but I am explicitly specifying v1.0.0. in my extensions. If I use DataCubeExtension.ext(item, add_if_missing=True), v1.0.0 is retained and v2.0.0 is added to the list.

Is this user error? I am not seeing a way to set the schema URI here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    extensionImplement a STAC extension in PySTAC

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions