Skip to content

Instantly share code, notes, and snippets.

@TimJMartin
Last active September 16, 2020 13:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TimJMartin/d679b161f49c6137873a0b02f79fc3c5 to your computer and use it in GitHub Desktop.
Save TimJMartin/d679b161f49c6137873a0b02f79fc3c5 to your computer and use it in GitHub Desktop.
PyGeoAPI Example Config
server:
bind:
host: 0.0.0.0
port: 5000
url: http://localhost:5000
mimetype: application/json; charset=UTF-8
encoding: utf-8
language: en-US
# cors: true
pretty_print: true
limit: 10
map:
url: https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png
attribution: '<a href="https://wikimediafoundation.org/wiki/Maps_Terms_of_Use">Wikimedia maps</a> | Map data &copy; <a href="https://openstreetmap.org/copyright">OpenStreetMap contributors</a>'
# ogc_schemas_location: /opt/schemas.opengis.net
logging:
level: ERROR
#logfile: /tmp/pygeoapi.log
metadata:
identification:
title: pygeoapi default instance
description: pygeoapi provides an API to geospatial data
keywords:
- geospatial
- data
- api
keywords_type: theme
terms_of_service: https://creativecommons.org/licenses/by/4.0/
url: http://example.org
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:
obs:
type: collection
title: Observations
description: My cool observations
keywords:
- observations
- monitoring
context:
- datetime: https://schema.org/DateTime
- vocab: https://example.com/vocab#
stn_id: "vocab:stn_id"
value: "vocab:value"
links:
- type: text/csv
rel: canonical
title: data
href: https://github.com/mapserver/mapserver/blob/branch-7-0/msautotest/wxs/data/obs.csv
hreflang: en-US
- type: text/csv
rel: alternate
title: data
href: https://raw.githubusercontent.com/mapserver/mapserver/branch-7-0/msautotest/wxs/data/obs.csv
hreflang: en-US
extents:
spatial:
bbox: [-180,-90,180,90]
crs: http://www.opengis.net/def/crs/OGC/1.3/CRS84
temporal:
begin: 2000-10-30T18:24:39Z
end: 2007-10-30T08:57:29Z
providers:
- type: feature
name: CSV
data: tests/data/obs.csv
id_field: id
geometry:
x_field: long
y_field: lat
File "C:\Projects\PyGeoAPI\pygeoapi\Lib\site-packages\flask\app.py", line 2464, in __call__
return self.wsgi_app(environ, start_response)
File "C:\Projects\PyGeoAPI\pygeoapi\Lib\site-packages\flask\app.py", line 2450, in wsgi_app
response = self.handle_exception(e)
File "C:\Projects\PyGeoAPI\pygeoapi\Lib\site-packages\flask\app.py", line 1867, in handle_exception
reraise(exc_type, exc_value, tb)
File "C:\Projects\PyGeoAPI\pygeoapi\Lib\site-packages\flask\_compat.py", line 39, in reraise
raise value
File "C:\Projects\PyGeoAPI\pygeoapi\Lib\site-packages\flask\app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "C:\Projects\PyGeoAPI\pygeoapi\Lib\site-packages\flask\app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "C:\Projects\PyGeoAPI\pygeoapi\Lib\site-packages\flask\app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "C:\Projects\PyGeoAPI\pygeoapi\Lib\site-packages\flask\_compat.py", line 39, in reraise
raise value
File "C:\Projects\PyGeoAPI\pygeoapi\Lib\site-packages\flask\app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "C:\Projects\PyGeoAPI\pygeoapi\Lib\site-packages\flask\app.py", line 1936, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "C:\Projects\PyGeoAPI\pygeoapi\Lib\site-packages\pygeoapi\flask_app.py", line 181, in get_collection_queryables
headers, status_code, content = api_.get_collection_queryables(
File "C:\Projects\PyGeoAPI\pygeoapi\Lib\site-packages\pygeoapi\api.py", line 88, in inner
return func(cls, headers_, format_, *args, **kwargs)
File "C:\Projects\PyGeoAPI\pygeoapi\Lib\site-packages\pygeoapi\linked_data.py", line 54, in inner
return func(*args, **kwargs)
File "C:\Projects\PyGeoAPI\pygeoapi\Lib\site-packages\pygeoapi\api.py", line 503, in get_collection_queryables
self.config['resources'][dataset]['provider'])
KeyError: 'provider'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment