ITADN

collection.validate() attempts to validate against STAC item render extension schema

#1664Closedunderchemist 创建于 2026-03-27
U
underchemistcommented
Perhaps user error on my part but I'm running into something odd and I'm not sure if it's an issue with schema https://github.com/stac-extensions/render/blob/main/json-schema/schema.json or pystac # Environment `pystac==1.14.3` # Reproducible example ``` from pystac import Collection, Extent import pystac.extensions.render extent = pystac.Extent(spatial=pystac.SpatialExtent(bboxes=[[-180, -90, 180, 90]]), temporal=pystac.TemporalExtent(intervals=[None, None])) collection = Collection(id="test" , description="test", extent=extent) render_ext = pystac.extensions.render.RenderExtension.ext(collection, add_if_missing=True) render_ext.renders = {"test-render": pystac.extensions.render.Render({"asset": "cog"})} collection.validate() ``` # Output ``` STACValidationError: Validation failed for Collection with ID test against schema at https://stac-extensions.github.io/render/v2.0.0/schema.json 'Feature' was expected Failed validating 'const' in schema[0]['allOf'][1]['properties']['type']: {'const': 'Feature'} On instance['type']: 'Collection' ```
关闭于 2026-03-30 2 条评论