geopython / pycsw

pycsw is an OGC CSW server implementation written in Python. pycsw fully implements the OpenGIS Catalogue Service Implementation Specification [Catalogue Service for the Web]. Initial development started in 2010 (more formally announced in 2011). The project is certified OGC Compliant, and is an OGC Reference Implementation. pycsw allows for the publishing and discovery of geospatial metadata via numerous APIs (CSW 2/CSW 3, OpenSearch, OAI-PMH, SRU). Existing repositories of geospatial metadata can also be exposed, providing a standards-based metadata and catalogue component of spatial data infrastructures. pycsw is Open Source, released under an MIT license, and runs on all major platforms (Windows, Linux, Mac OS X). Please read the docs at https://pycsw.org/docs for more information.
https://pycsw.org
MIT License
197 stars 153 forks source link

STAC API failing pystac_client validation when STAC Item is generated from ISO 19115 XML #980

Closed kalxas closed 2 weeks ago

kalxas commented 2 weeks ago

Description

When a metadata record is ingested from ISO 19115 the time information is stored in the model using time_begin and time_end columns.

When this record is pulled from the STAC API, a record is generated first: https://github.com/geopython/pycsw/blob/master/pycsw/ogc/api/records.py#L1289-L1296

Then it is modified into a STAC Item here: https://github.com/geopython/pycsw/blob/master/pycsw/stac/api.py#L332-L387 and here: https://github.com/geopython/pycsw/blob/master/pycsw/stac/api.py#L389-L412

What happens is that the final STAC Item is left with a time property and not datetime or start_datetime,end_datetime as required by STAC specification

e.g. https://resource-catalogue.develop.eoepca.org/stac/collections/metadata:main/items/ https://resource-catalogue.develop.eoepca.org/stac/collections/metadata:main/items/S2MSI2A

kalxas commented 2 weeks ago

Fixed