Skip to content

Commit

Permalink
update hateoas provider for stac browser
Browse files Browse the repository at this point in the history
change type to application/json and include the id in the collection content.
  • Loading branch information
sjordan29 committed Dec 24, 2024
1 parent d420a96 commit c6d6e41
Show file tree
Hide file tree
Showing 4 changed files with 442 additions and 133 deletions.
83 changes: 51 additions & 32 deletions config-gdp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ server:
# First language is the default language
- en-US
- fr-CA
# cors: true
cors: true
pretty_print: true
limit: 10
# templates:
Expand Down Expand Up @@ -73,38 +73,57 @@ metadata:
role: pointOfContact

resources:
PRISM:
description:
Parameter-elevation Regressions on Independent Slopes Model Monthly
Climate Data for the Continental United States. January 2012 Shapshot
nhgf-stac-collection:
type: stac-collection
title: NHGF STAC
description: SpatioTemporal Asset Catalog for the USGS Water Mission Area
links:
- type: application/json
rel: canonical
title: NHGF STAC Catalog
href: https://code.usgs.gov/wma/nhgf/stac/-/raw/main/catalog/catalog.json
hreflang: en-US
extents:
spatial:
bbox:
- -125.02083587646484
- 24.10416603088379
- -66.52082824707031
- 49.937503814697266
bbox: [-180, -90, 180, 90]
crs: http://www.opengis.net/def/crs/OGC/1.3/CRS84
temporal:
begin: 1895-01-01 00:00:00+00:00
end: 2013-02-01 00:00:00+00:00
keywords:
- s3
- usgs
- PRISM
providers:
- data: s3://mdmf/gdp/PRISM.zarr
format:
mimetype: application/zip
name: zarr
name: xarray-edr
options:
s3:
anon: true
client_kwargs:
endpoint_url: https://usgs.osn.mghpcc.org/
type: edr
x_field: lon
y_field: lat
title: PRISM
type: collection
- type: stac
name: Hateoas
data: https://code.usgs.gov/wma/nhgf/stac/-/raw/main/catalog
file_types: catalog.json
# PRISM:
# description:
# Parameter-elevation Regressions on Independent Slopes Model Monthly
# Climate Data for the Continental United States. January 2012 Shapshot
# extents:
# spatial:
# bbox:
# - -125.02083587646484
# - 24.10416603088379
# - -66.52082824707031
# - 49.937503814697266
# crs: http://www.opengis.net/def/crs/OGC/1.3/CRS84
# temporal:
# begin: 1895-01-01 00:00:00+00:00
# end: 2013-02-01 00:00:00+00:00
# keywords:
# - s3
# - usgs
# - PRISM
# providers:
# - data: s3://mdmf/gdp/PRISM.zarr
# format:
# mimetype: application/zip
# name: zarr
# name: xarray-edr
# options:
# s3:
# anon: true
# client_kwargs:
# endpoint_url: https://usgs.osn.mghpcc.org/
# type: edr
# x_field: lon
# y_field: lat
# title: PRISM
# type: collection
109 changes: 13 additions & 96 deletions openai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,6 @@ components:
schema:
$ref: '#/components/schemas/queryables'
description: successful queryables operation
Tiles:
content:
application/json:
schema:
$ref: '#/components/schemas/tiles'
description: Retrieves the tiles description for this collection
default:
content:
application/json:
Expand Down Expand Up @@ -178,29 +172,6 @@ components:
required:
- queryables
type: object
tilematrixsetlink:
properties:
tileMatrixSet:
type: string
tileMatrixSetURI:
type: string
required:
- tileMatrixSet
type: object
tiles:
properties:
links:
items:
$ref: https://schemas.opengis.net/ogcapi/tiles/part1/1.0/openapi/ogcapi-tiles-1.yaml#/components/schemas/link
type: array
tileMatrixSetLinks:
items:
$ref: '#/components/schemas/tilematrixsetlink'
type: array
required:
- tileMatrixSetLinks
- links
type: object
info:
contact:
email: you@example.org
Expand Down Expand Up @@ -253,70 +224,6 @@ paths:
summary: Collections
tags:
- server
/collections/PRISM:
get:
description: Parameter-elevation Regressions on Independent Slopes Model Monthly
Climate Data for the Continental United States. January 2012 Shapshot
operationId: describePrismCollection
parameters:
- $ref: '#/components/parameters/f'
- $ref: '#/components/parameters/lang'
responses:
'200':
$ref: https://schemas.opengis.net\ogcapi/features/part1/1.0/openapi/ogcapi-features-1.yaml#/components/responses/Collection
'400':
$ref: https://schemas.opengis.net\ogcapi/features/part1/1.0/openapi/ogcapi-features-1.yaml#/components/responses/InvalidParameter
'404':
$ref: https://schemas.opengis.net\ogcapi/features/part1/1.0/openapi/ogcapi-features-1.yaml#/components/responses/NotFound
'500':
$ref: https://schemas.opengis.net\ogcapi/features/part1/1.0/openapi/ogcapi-features-1.yaml#/components/responses/ServerError
summary: Get PRISM metadata
tags:
- PRISM
/collections/PRISM/cube:
get:
description: Parameter-elevation Regressions on Independent Slopes Model Monthly
Climate Data for the Continental United States. January 2012 Shapshot
operationId: queryCubePrism
parameters:
- $ref: https://schemas.opengis.net/ogcapi/edr/1.0/openapi/parameters/bbox.yaml
- $ref: https://schemas.opengis.net\ogcapi/features/part1/1.0/openapi/ogcapi-features-1.yaml#/components/parameters/datetime
- $ref: https://schemas.opengis.net/ogcapi/edr/1.0/openapi/parameters/parameter-name.yaml
- $ref: https://schemas.opengis.net/ogcapi/edr/1.0/openapi/parameters/z.yaml
- $ref: '#/components/parameters/f'
responses:
'200':
content:
application/prs.coverage+json:
schema:
$ref: https://schemas.opengis.net/ogcapi/edr/1.0/openapi/schemas/coverageJSON.yaml
description: Response
summary: query Parameter-elevation Regressions on Independent Slopes Model Monthly
Climate Data for the Continental United States. January 2012 Shapshot by cube
tags:
- PRISM
/collections/PRISM/position:
get:
description: Parameter-elevation Regressions on Independent Slopes Model Monthly
Climate Data for the Continental United States. January 2012 Shapshot
operationId: queryPositionPrism
parameters:
- $ref: https://schemas.opengis.net/ogcapi/edr/1.0/openapi/parameters/positionCoords.yaml
- $ref: https://schemas.opengis.net\ogcapi/features/part1/1.0/openapi/ogcapi-features-1.yaml#/components/parameters/datetime
- $ref: https://schemas.opengis.net/ogcapi/edr/1.0/openapi/parameters/parameter-name.yaml
- $ref: https://schemas.opengis.net/ogcapi/edr/1.0/openapi/parameters/z.yaml
- $ref: '#/components/parameters/f'
responses:
'200':
content:
application/prs.coverage+json:
schema:
$ref: https://schemas.opengis.net/ogcapi/edr/1.0/openapi/schemas/coverageJSON.yaml
description: Response
summary: query Parameter-elevation Regressions on Independent Slopes Model Monthly
Climate Data for the Continental United States. January 2012 Shapshot by position
tags:
- PRISM
/conformance:
get:
description: API conformance definition
Expand Down Expand Up @@ -432,6 +339,19 @@ paths:
summary: This document
tags:
- server
/stac:
get:
description: SpatioTemporal Asset Catalog
operationId: getStacCatalog
parameters: []
responses:
'200':
$ref: '#/components/responses/200'
default:
$ref: '#/components/responses/default'
summary: SpatioTemporal Asset Catalog
tags:
- stac
servers:
- description: pygeoapi provides an API to geospatial data
url: http://localhost:5001
Expand All @@ -441,9 +361,6 @@ tags:
description: information
url: https://example.org
name: server
- description: Parameter-elevation Regressions on Independent Slopes Model Monthly
Climate Data for the Continental United States. January 2012 Shapshot
name: PRISM
- name: coverages
- name: edr
- name: records
Expand Down
Loading

0 comments on commit c6d6e41

Please sign in to comment.