Skip to content

Commit c6d6e41

Browse files
committed
update hateoas provider for stac browser
change type to application/json and include the id in the collection content.
1 parent d420a96 commit c6d6e41

File tree

4 files changed

+442
-133
lines changed

4 files changed

+442
-133
lines changed

config-gdp.yml

Lines changed: 51 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ server:
1010
# First language is the default language
1111
- en-US
1212
- fr-CA
13-
# cors: true
13+
cors: true
1414
pretty_print: true
1515
limit: 10
1616
# templates:
@@ -73,38 +73,57 @@ metadata:
7373
role: pointOfContact
7474

7575
resources:
76-
PRISM:
77-
description:
78-
Parameter-elevation Regressions on Independent Slopes Model Monthly
79-
Climate Data for the Continental United States. January 2012 Shapshot
76+
nhgf-stac-collection:
77+
type: stac-collection
78+
title: NHGF STAC
79+
description: SpatioTemporal Asset Catalog for the USGS Water Mission Area
80+
links:
81+
- type: application/json
82+
rel: canonical
83+
title: NHGF STAC Catalog
84+
href: https://code.usgs.gov/wma/nhgf/stac/-/raw/main/catalog/catalog.json
85+
hreflang: en-US
8086
extents:
8187
spatial:
82-
bbox:
83-
- -125.02083587646484
84-
- 24.10416603088379
85-
- -66.52082824707031
86-
- 49.937503814697266
88+
bbox: [-180, -90, 180, 90]
8789
crs: http://www.opengis.net/def/crs/OGC/1.3/CRS84
88-
temporal:
89-
begin: 1895-01-01 00:00:00+00:00
90-
end: 2013-02-01 00:00:00+00:00
91-
keywords:
92-
- s3
93-
- usgs
94-
- PRISM
9590
providers:
96-
- data: s3://mdmf/gdp/PRISM.zarr
97-
format:
98-
mimetype: application/zip
99-
name: zarr
100-
name: xarray-edr
101-
options:
102-
s3:
103-
anon: true
104-
client_kwargs:
105-
endpoint_url: https://usgs.osn.mghpcc.org/
106-
type: edr
107-
x_field: lon
108-
y_field: lat
109-
title: PRISM
110-
type: collection
91+
- type: stac
92+
name: Hateoas
93+
data: https://code.usgs.gov/wma/nhgf/stac/-/raw/main/catalog
94+
file_types: catalog.json
95+
# PRISM:
96+
# description:
97+
# Parameter-elevation Regressions on Independent Slopes Model Monthly
98+
# Climate Data for the Continental United States. January 2012 Shapshot
99+
# extents:
100+
# spatial:
101+
# bbox:
102+
# - -125.02083587646484
103+
# - 24.10416603088379
104+
# - -66.52082824707031
105+
# - 49.937503814697266
106+
# crs: http://www.opengis.net/def/crs/OGC/1.3/CRS84
107+
# temporal:
108+
# begin: 1895-01-01 00:00:00+00:00
109+
# end: 2013-02-01 00:00:00+00:00
110+
# keywords:
111+
# - s3
112+
# - usgs
113+
# - PRISM
114+
# providers:
115+
# - data: s3://mdmf/gdp/PRISM.zarr
116+
# format:
117+
# mimetype: application/zip
118+
# name: zarr
119+
# name: xarray-edr
120+
# options:
121+
# s3:
122+
# anon: true
123+
# client_kwargs:
124+
# endpoint_url: https://usgs.osn.mghpcc.org/
125+
# type: edr
126+
# x_field: lon
127+
# y_field: lat
128+
# title: PRISM
129+
# type: collection

openai.yml

Lines changed: 13 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,6 @@ components:
129129
schema:
130130
$ref: '#/components/schemas/queryables'
131131
description: successful queryables operation
132-
Tiles:
133-
content:
134-
application/json:
135-
schema:
136-
$ref: '#/components/schemas/tiles'
137-
description: Retrieves the tiles description for this collection
138132
default:
139133
content:
140134
application/json:
@@ -178,29 +172,6 @@ components:
178172
required:
179173
- queryables
180174
type: object
181-
tilematrixsetlink:
182-
properties:
183-
tileMatrixSet:
184-
type: string
185-
tileMatrixSetURI:
186-
type: string
187-
required:
188-
- tileMatrixSet
189-
type: object
190-
tiles:
191-
properties:
192-
links:
193-
items:
194-
$ref: https://schemas.opengis.net/ogcapi/tiles/part1/1.0/openapi/ogcapi-tiles-1.yaml#/components/schemas/link
195-
type: array
196-
tileMatrixSetLinks:
197-
items:
198-
$ref: '#/components/schemas/tilematrixsetlink'
199-
type: array
200-
required:
201-
- tileMatrixSetLinks
202-
- links
203-
type: object
204175
info:
205176
contact:
206177
email: you@example.org
@@ -253,70 +224,6 @@ paths:
253224
summary: Collections
254225
tags:
255226
- server
256-
/collections/PRISM:
257-
get:
258-
description: Parameter-elevation Regressions on Independent Slopes Model Monthly
259-
Climate Data for the Continental United States. January 2012 Shapshot
260-
operationId: describePrismCollection
261-
parameters:
262-
- $ref: '#/components/parameters/f'
263-
- $ref: '#/components/parameters/lang'
264-
responses:
265-
'200':
266-
$ref: https://schemas.opengis.net\ogcapi/features/part1/1.0/openapi/ogcapi-features-1.yaml#/components/responses/Collection
267-
'400':
268-
$ref: https://schemas.opengis.net\ogcapi/features/part1/1.0/openapi/ogcapi-features-1.yaml#/components/responses/InvalidParameter
269-
'404':
270-
$ref: https://schemas.opengis.net\ogcapi/features/part1/1.0/openapi/ogcapi-features-1.yaml#/components/responses/NotFound
271-
'500':
272-
$ref: https://schemas.opengis.net\ogcapi/features/part1/1.0/openapi/ogcapi-features-1.yaml#/components/responses/ServerError
273-
summary: Get PRISM metadata
274-
tags:
275-
- PRISM
276-
/collections/PRISM/cube:
277-
get:
278-
description: Parameter-elevation Regressions on Independent Slopes Model Monthly
279-
Climate Data for the Continental United States. January 2012 Shapshot
280-
operationId: queryCubePrism
281-
parameters:
282-
- $ref: https://schemas.opengis.net/ogcapi/edr/1.0/openapi/parameters/bbox.yaml
283-
- $ref: https://schemas.opengis.net\ogcapi/features/part1/1.0/openapi/ogcapi-features-1.yaml#/components/parameters/datetime
284-
- $ref: https://schemas.opengis.net/ogcapi/edr/1.0/openapi/parameters/parameter-name.yaml
285-
- $ref: https://schemas.opengis.net/ogcapi/edr/1.0/openapi/parameters/z.yaml
286-
- $ref: '#/components/parameters/f'
287-
responses:
288-
'200':
289-
content:
290-
application/prs.coverage+json:
291-
schema:
292-
$ref: https://schemas.opengis.net/ogcapi/edr/1.0/openapi/schemas/coverageJSON.yaml
293-
description: Response
294-
summary: query Parameter-elevation Regressions on Independent Slopes Model Monthly
295-
Climate Data for the Continental United States. January 2012 Shapshot by cube
296-
tags:
297-
- PRISM
298-
/collections/PRISM/position:
299-
get:
300-
description: Parameter-elevation Regressions on Independent Slopes Model Monthly
301-
Climate Data for the Continental United States. January 2012 Shapshot
302-
operationId: queryPositionPrism
303-
parameters:
304-
- $ref: https://schemas.opengis.net/ogcapi/edr/1.0/openapi/parameters/positionCoords.yaml
305-
- $ref: https://schemas.opengis.net\ogcapi/features/part1/1.0/openapi/ogcapi-features-1.yaml#/components/parameters/datetime
306-
- $ref: https://schemas.opengis.net/ogcapi/edr/1.0/openapi/parameters/parameter-name.yaml
307-
- $ref: https://schemas.opengis.net/ogcapi/edr/1.0/openapi/parameters/z.yaml
308-
- $ref: '#/components/parameters/f'
309-
responses:
310-
'200':
311-
content:
312-
application/prs.coverage+json:
313-
schema:
314-
$ref: https://schemas.opengis.net/ogcapi/edr/1.0/openapi/schemas/coverageJSON.yaml
315-
description: Response
316-
summary: query Parameter-elevation Regressions on Independent Slopes Model Monthly
317-
Climate Data for the Continental United States. January 2012 Shapshot by position
318-
tags:
319-
- PRISM
320227
/conformance:
321228
get:
322229
description: API conformance definition
@@ -432,6 +339,19 @@ paths:
432339
summary: This document
433340
tags:
434341
- server
342+
/stac:
343+
get:
344+
description: SpatioTemporal Asset Catalog
345+
operationId: getStacCatalog
346+
parameters: []
347+
responses:
348+
'200':
349+
$ref: '#/components/responses/200'
350+
default:
351+
$ref: '#/components/responses/default'
352+
summary: SpatioTemporal Asset Catalog
353+
tags:
354+
- stac
435355
servers:
436356
- description: pygeoapi provides an API to geospatial data
437357
url: http://localhost:5001
@@ -441,9 +361,6 @@ tags:
441361
description: information
442362
url: https://example.org
443363
name: server
444-
- description: Parameter-elevation Regressions on Independent Slopes Model Monthly
445-
Climate Data for the Continental United States. January 2012 Shapshot
446-
name: PRISM
447364
- name: coverages
448365
- name: edr
449366
- name: records

0 commit comments

Comments
 (0)