Skip to content

Commit

Permalink
Merge pull request #16 from cgs-earth/pygeoapi
Browse files Browse the repository at this point in the history
Add Templates for state gages
  • Loading branch information
ksonda authored Nov 20, 2023
2 parents 808255c + 50fc310 commit 9183719
Show file tree
Hide file tree
Showing 11 changed files with 1,076 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ This repository hosts code to download, process, and deploy provisional OGC-API

Datasets are organized in the `collections` directory.

The features are deployed as Geoconnex-compliant landing pages with JSON-LD embedded metadata at https://features.internetofwater.dev. The deployment configuration for these pages is in the `pygeoapi` directory
The features are deployed as Geoconnex-compliant landing pages with JSON-LD embedded metadata at https://features.internetofwater.dev. The deployment configuration for these pages is in the `pygeoapi` directory. The data is hosted in [Hydroshare](https://www.hydroshare.org/resource/495b65e56e994289baaa5feeb401358e/).



Expand Down
58 changes: 58 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# =================================================================
#
# Authors: Benjamin Webb <[email protected]>
#
# Copyright (c) 2022 Benjamin Webb
#
# 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.
#
# =================================================================

version: '3'

services:
pygeoapi:
container_name: pygeoapi
restart: always
build:
context: pygeoapi
environment:
- PYGEOAPI_URL=http://localhost:8888
- POSTGRES_HOST=database-1
- POSTGRES_PORT=5432
- POSTGRES_DB=hosted-features
- POSTGRES_USER=root
- POSTGRES_PASSWORD=password
ports:
- 8888:80
depends_on:
- database-1

database-1:
container_name: database-1
image: postgis/postgis:14-3.2-alpine
volumes:
- ./hosted-features.sql.gz:/docker-entrypoint-initdb.d/hosted-features.sql.gz
environment:
- POSTGRES_DB=hosted-features
- POSTGRES_USER=root
- POSTGRES_PASSWORD=password
Binary file added hosted-features.sql.gz
Binary file not shown.
3 changes: 3 additions & 0 deletions pygeoapi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,7 @@

FROM geopython/pygeoapi:latest

ADD ./provider/postgresql.py /pygeoapi/pygeoapi/provider/postgresql.py
ADD ./templates /pygeoapi/pygeoapi/templates/jsonld

ADD ./features.config.yml /pygeoapi/local.config.yml
76 changes: 76 additions & 0 deletions pygeoapi/features.config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,60 @@ resources:
data: https://geo.epa.ohio.gov/arcgis/rest/services/SurfaceWater/NPDES/MapServer/0
id_field: OHIO_EPA_NO

co/gages:
type: collection
title: Colorado Gages
description: Gages from Colorado Division of Water Resources
linked-data:
item_template: jsonld/co.j2
keywords:
- colorado
- gage
links:
- <<: *data-source
href: https://dwr.colorado.gov/
extents:
spatial:
bbox: [-109.06, 36.99,-102.04, 41.00]
crs: http://www.opengis.net/def/crs/OGC/1.3/CRS84
temporal:
begin: null
end: null
providers:
- <<: *provider
table: co_gages
id_field: id

mt/gages:
type: collection
title: Montana Gages
description: Gages from Montana Department of Natural Resources
linked-data:
item_template: jsonld/mt.j2
keywords:
- montana
- gage
links:
- <<: *data-source
href: https://gis.dnrc.mt.gov/apps/stage/
extents:
spatial:
bbox: [-116.05, 44.36, -104.04, 49.00]
crs: http://www.opengis.net/def/crs/OGC/1.3/CRS84
temporal:
begin: null
end: null
providers:
- <<: *provider
table: mt_gages
id_field: id

ne/gages:
type: collection
title: Nebraska Gages
description: Gages from Nebraska Department of Natural Resources
linked-data:
item_template: jsonld/ne.j2
keywords:
- nebraska
- gage
Expand All @@ -168,10 +218,36 @@ resources:
table: ne_gages
id_field: id

nv/gages:
type: collection
title: Nevada Gages
description: Gages from Nevada Division of Water Resources
linked-data:
item_template: jsonld/nv.j2
keywords:
- nevada
- gage
links:
- <<: *data-source
href: http://water.nv.gov/
extents:
spatial:
bbox: [-120.01, 35.00, -114.04, 42.00]
crs: http://www.opengis.net/def/crs/OGC/1.3/CRS84
temporal:
begin: null
end: null
providers:
- <<: *provider
table: nv_gages
id_field: id

wy/gages:
type: collection
title: Wyoming Gages
description: Gages from Wyoming State Engineers Office
linked-data:
item_template: jsonld/wy.j2
keywords:
- wyoming
- gage
Expand Down
Loading

0 comments on commit 9183719

Please sign in to comment.