9debd89cd8
* SensorThingsAPI Provider refactor - Make code more readable - Prevent empty SensorThings entity from erroring out pygeoapi * Fix SensorThings Provider * Only count on hits * Fix ref * Fix ref - Speed up get_fields - Simplify intralink process * Cleanup STA examples * Add docstrings to functions * Small fixes - Split out inner functions - Add default @iot.id - Add more debug statements * Refactor STA paging - Refactor STA paging - Reorganize _geometry function - Update logging
218 lines
6.1 KiB
YAML
218 lines
6.1 KiB
YAML
# =================================================================
|
|
#
|
|
# Authors: Tom Kralidis <tomkralidis@gmail.com>
|
|
#
|
|
# Copyright (c) 2020 Tom Kralidis
|
|
#
|
|
# Permission is hereby granted, free of charge, to any person
|
|
# obtaining a copy of this software and associated documentation
|
|
# files (the "Software"), to deal in the Software without
|
|
# restriction, including without limitation the rights to use,
|
|
# copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
# copies of the Software, and to permit persons to whom the
|
|
# Software is furnished to do so, subject to the following
|
|
# conditions:
|
|
#
|
|
# The above copyright notice and this permission notice shall be
|
|
# included in all copies or substantial portions of the Software.
|
|
#
|
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
# OTHER DEALINGS IN THE SOFTWARE.
|
|
#
|
|
# =================================================================
|
|
|
|
server:
|
|
bind:
|
|
host: 0.0.0.0 #change to your hostname if running your own instance
|
|
port: 5000
|
|
url: http://localhost:5000 #change to host URL if running your own instance
|
|
mimetype: application/json; charset=UTF-8
|
|
encoding: utf-8
|
|
gzip: false
|
|
languages:
|
|
# First language is the default language
|
|
- en-US
|
|
- fr-CA
|
|
# cors: true
|
|
pretty_print: true
|
|
limit: 10
|
|
map:
|
|
url: https://tile.openstreetmap.org/{z}/{x}/{y}.png
|
|
attribution: '<a href="https://www.openstreetmap.org/copyright">© OpenStreetMap contributors</a>'
|
|
# templates:
|
|
# path: /path/to/Jinja2/templates
|
|
# static: /path/to/static/folder # css/js/img
|
|
# ogc_schemas_location: /opt/schemas.opengis.net
|
|
|
|
logging:
|
|
level: ERROR
|
|
logfile: /tmp/pygeoapi.log
|
|
|
|
metadata:
|
|
identification:
|
|
title:
|
|
en: SensorThings API USGS example endpoint.
|
|
fr: SensorThings API USGS exemple enpoint.
|
|
description: Provides STA reference features.
|
|
keywords:
|
|
en:
|
|
- geospatial
|
|
- SensorThingsapi
|
|
- api
|
|
fr:
|
|
- géospatiale
|
|
- SensorThingsapi
|
|
- api
|
|
keywords_type: theme
|
|
terms_of_service: https://creativecommons.org/licenses/by/4.0/
|
|
url: https://github.com/internetofwater/geoconnex.us
|
|
license:
|
|
name: CC-BY 4.0 license
|
|
url: https://creativecommons.org/licenses/by/4.0/
|
|
provider:
|
|
name: Organization Name
|
|
url: https://pygeoapi.io
|
|
contact:
|
|
name: Lastname, Firstname
|
|
position: Position Title
|
|
address: Mailing Address
|
|
city: City
|
|
stateorprovince: Administrative Area
|
|
postalcode: Zip or Postal Code
|
|
country: Country
|
|
phone: +xx-xxx-xxx-xxxx
|
|
fax: +xx-xxx-xxx-xxxx
|
|
email: you@example.org
|
|
url: Contact URL
|
|
hours: Mo-Fr 08:00-17:00
|
|
instructions: During hours of service. Off on weekends.
|
|
role: pointOfContact
|
|
|
|
resources:
|
|
Things:
|
|
type: collection
|
|
title: USGS Things
|
|
description: USGS SensorThings API Things
|
|
keywords:
|
|
- Things
|
|
- SensorThings
|
|
- USGS
|
|
linked-data:
|
|
context:
|
|
- sosa: "http://www.w3.org/ns/sosa/"
|
|
ssn: "http://www.w3.org/ns/ssn/"
|
|
Datastreams: sosa:ObservationCollection
|
|
name: schema:name
|
|
links:
|
|
- type: application/html
|
|
rel: canonical
|
|
title: data source
|
|
href: https://labs.waterdata.usgs.gov
|
|
hreflang: en-US
|
|
extents:
|
|
spatial:
|
|
bbox: [-180, -90, 180, 90]
|
|
crs: http://www.opengis.net/def/crs/OGC/1.3/CRS84
|
|
temporal:
|
|
begin: null
|
|
end: null
|
|
providers:
|
|
- type: feature
|
|
name: SensorThings
|
|
data: https://labs.waterdata.usgs.gov/sta/v1.1/
|
|
entity: Things
|
|
id_field: "@iot.id"
|
|
intralink: true
|
|
properties:
|
|
- name
|
|
- Datastreams
|
|
- "@iot.selfLink"
|
|
Datastreams:
|
|
type: collection
|
|
title: USGS Datastreams
|
|
description: USGS SensorThings API Datastreams
|
|
keywords:
|
|
- Datastreams
|
|
- SensorThings
|
|
- USGS
|
|
linked-data:
|
|
context:
|
|
- sosa: http://www.w3.org/ns/sosa/
|
|
ssn: http://www.w3.org/ns/ssn/
|
|
Observations: sosa:hasMember
|
|
Thing: sosa:hasFeatureOfInterest
|
|
name: schema:name
|
|
links:
|
|
- type: application/html
|
|
rel: canonical
|
|
title: data source
|
|
href: https://labs.waterdata.usgs.gov/
|
|
hreflang: en-US
|
|
extents:
|
|
spatial:
|
|
bbox: [-180, -90, 180, 90]
|
|
crs: http://www.opengis.net/def/crs/OGC/1.3/CRS84
|
|
temporal:
|
|
begin: null
|
|
end: null
|
|
providers:
|
|
- type: feature
|
|
name: SensorThings
|
|
data: https://labs.waterdata.usgs.gov/sta/v1.1/
|
|
entity: Datastreams
|
|
time_field: phenomenonTime
|
|
intralink: true
|
|
properties:
|
|
- name
|
|
- Thing
|
|
- Observations
|
|
- Sensor
|
|
- ObservedProperty
|
|
- "@iot.selfLink"
|
|
Observations:
|
|
type: collection
|
|
title: USGS Observations
|
|
description: USGS SensorThings API Observations
|
|
keywords:
|
|
- Observations
|
|
- SensorThings
|
|
- USGS
|
|
linked-data:
|
|
context:
|
|
- sosa: http://www.w3.org/ns/sosa/
|
|
ssn: http://www.w3.org/ns/ssn/
|
|
Datastream: sosa:isMemberOf
|
|
name: schema:name
|
|
links:
|
|
- type: application/html
|
|
rel: canonical
|
|
title: data source
|
|
href: https://labs.waterdata.usgs.gov/
|
|
hreflang: en-US
|
|
extents:
|
|
spatial:
|
|
bbox: [-180, -90, 180, 90]
|
|
crs: http://www.opengis.net/def/crs/OGC/1.3/CRS84
|
|
temporal:
|
|
begin: null
|
|
end: null
|
|
providers:
|
|
- type: feature
|
|
name: SensorThings
|
|
data: https://labs.waterdata.usgs.gov/sta/v1.1/
|
|
entity: Observations
|
|
time_field: phenomenonTime
|
|
intralink: true
|
|
properties:
|
|
- phenomenonTime
|
|
- result
|
|
- Datastream
|
|
- FeatureOfInterest
|
|
- "@iot.selfLink"
|