Files
pygeoapi/docker/examples/sensorthings
Benjamin Webb e1af5e1ca5 Add json-ld templating for feature collection item (#868)
* Render template if specified in config and provide example config

Update linked_data.py

Merge branch 'geopython:master' into jsonld

Rended from json-ld output

Render jinja2 json-ld template from json-ld output instead of json output

Merge branch 'geopython:master' into jsonld

Add documentation

- Add documentation
- Add test to workflow

Update pygeoapi-test-config.yml

Update test_api.py

Update api.py

Update linked_data.py

Move template declaration in configuration

Update docs

Update configuration.rst

Update configuration.rst

* Updates per requested changes

* Fix spelling

* Fix json-ld template pathing

* Remove  root path for the templating

* Move json-ld template from api.py

- Move single item json-ld templating to inside geojson2jsonld
- Reformat json-ld configuration for context and item_template to children of json-ld block
- Update docs and example configurations

* Fix ref

* Use FileSystemLoader to control template search path

search for templates is in order of `template_paths` list

* s/json-ld/linked-data/ig

rename json-ld to more generic name
2023-02-15 21:12:19 -05:00
..
2021-07-06 17:04:45 -04:00

Pygeoapi with SensorThings (STA)

This folder contains a Docker Compose configuration necessary to setup an example pygeoapi server using a STA endpoint.

This config is only for local development and testing.

SensorThings Build options

There are three example STA endpoints. To switch between examples, the pygeoapi.config.yml file used in the docker compose needs to be changed.

  • The first, brgm.sta.pygeoapi.config.yml creates a pygeoapi server serving the BRGM water quality endpoint.

  • The second, iow.sta.pygeoapi.config.yml creates a pygeoapi server hosting example IoW endpoint with URIs.

  • The final config, sta.pygeoapi.config.yml creates a pygeoapi server inside of a muti-container Docker app, and linked to an empty FROST server. To use this configuration, uncomment Lines 40 - 70 of the docker-compose.yml file in addition to changing the pygeoapi config. The database can be populated following a workflow similar to that of the populator script for build testing, load_sta_data.py. Note: The pygeoapi server will fail to build until the STA server has been populated, thus the addition of always restart

SensorThings Usage

After editing the docker-compose.yml file appropriately:

docker compose up [-d]

Navigate to localhost:5000.