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

minor STAC API updates #991

Merged
merged 5 commits into from
Aug 4, 2024
Merged

minor STAC API updates #991

merged 5 commits into from
Aug 4, 2024

Conversation

tomkralidis
Copy link
Member

@tomkralidis tomkralidis commented Aug 4, 2024

Overview

Adds some minor STAC API updates

  • applies RFC3339 functionality to dates
  • adds numberMatched and numberReturned to STAC API collection responses
  • ensures STAC item links have a rel property (rel=related is added if None)
  • adds tests

Related Issue / Discussion

None

Additional Information

Sample code for testing:

import json

from pystac_client import Client
from pystac_client import ConformanceClasses

endpoint = 'http://localhost:8000/stac'

catalog = Client.open(endpoint)

print(catalog.id)

print(catalog.title)

print(catalog.description)

print(dir(ConformanceClasses))

print(catalog.conforms_to('ITEM_SEARCH'))
print(catalog.conforms_to('CORE'))

mysearch = catalog.search(collections=['metadata:main'], max_items=10)

print(f'{mysearch.matched()} items found')

mysearch = catalog.search(collections=['metadata:main'], bbox=[14.9,47.7,16.4,48.7], max_items=10)
print(f'{mysearch.matched()} items found')

items = mysearch.items()

for item in items:
    print(item.id)

Contributions and Licensing

(as per https://github.com/geopython/pycsw/blob/master/CONTRIBUTING.rst#contributions-and-licensing)

  • I'd like to contribute [feature X|bugfix Y|docs|something else] to pycsw. I confirm that my contributions to pycsw will be compatible with the pycsw license guidelines at the time of contribution.
  • I have already previously agreed to the pycsw Contributions and Licensing Guidelines

@kalxas kalxas merged commit fc5bda8 into master Aug 4, 2024
6 checks passed
@kalxas kalxas deleted the stac-api-updates branch August 4, 2024 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants