diff --git a/Dockerfile b/Dockerfile index cb76a60..2bd7e12 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM internetofwater/pygeoapi:latest +FROM geopython/pygeoapi:latest #pygeoapi last updated 2023-07-31 #add requirements and mods @@ -7,5 +7,7 @@ COPY ./pygeoapi.config.yml /pygeoapi/local.config.yml # COPY ./schemas.opengis.net /opt/schemas.opengis.net COPY ./pygeoapi-skin-dashboard /skin-dashboard +RUN pip3 install https://github.com/cgs-earth/pygeoapi-plugins/archive/refs/heads/master.zip + COPY ./sitemap /sitemap RUN mv /sitemap/_sitemap.xml /sitemap/sitemap.xml diff --git a/pygeoapi.config.yml b/pygeoapi.config.yml index 5709fd9..c976ad9 100644 --- a/pygeoapi.config.yml +++ b/pygeoapi.config.yml @@ -337,7 +337,6 @@ resources: title: data source href: https://doi.org/10.5066/F7F76BSS hreflang: en-US - links: - type: application/html rel: canonical title: report documenting data @@ -405,14 +404,85 @@ resources: extents: *extents providers: - type: feature - name: PostgreSQL + name: pygeoapi_plugins.provider.sparql.SPARQLProvider data: *provider-data id_field: id title_field: name_at_outlet table: mainstems uri_field: uri geom_field: geom - dams: #updated 2024-04-23 + sparql_provider: PostgreSQL + sparql_query: + convert: false + endpoint: https://graph.geoconnex.us/repositories/iow + prefixes: + schema: + gsp: + wiki: + hyf: + xsd: + bind: + name: uri + variable: '?mainstem' + select: '?mainstem ?monitoringLocation ?siteName ?datasetDescription ?type ?url ?variableMeasured ?variableUnit ?measurementTechnique ?temporalCoverage ?wkt' + where: + - subject: '?monitoringLocation' + predicate: hyf:referencedPosition/hyf:HY_IndirectPosition/hyf:linearElement + object: '?mainstem' + - subject: '?monitoringLocation' + predicate: schema:name + object: '?siteName' + - subject: '?monitoringLocation' + predicate: schema:subjectOf + object: '?dataset' + - subject: '?dataset' + predicate: schema:url + object: '?url' + - subject: '?dataset' + predicate: schema:distribution + object: '?distribution' + - subject: '?distribution' + predicate: schema:name + object: '?distributionName' + - subject: '?distribution' + predicate: schema:contentUrl + object: '?distributionURL' + - subject: '?distribution' + predicate: schema:encodingFormat + object: '?distributionFormat' + - subject: '?dataset' + predicate: schema:description + object: '?datasetDescription' + - subject: '?monitoringLocation' + predicate: hyf:HydroLocationType + object: '?type' + - subject: '?dataset' + predicate: 'schema:variableMeasured' + object: '?variableMeasured_' + - subject: '?variableMeasured_' + predicate: 'schema:name' + object: '?variableMeasured' + - subject: '?variableMeasured_' + predicate: 'schema:unitText' + object: '?variableUnit' + - subject: '?variableMeasured_' + predicate: 'schema:measurementTechnique' + object: '?measurementTechnique' + - subject: '?variableMeasured_' + predicate: 'schema:name' + object: '?variableMeasured' + - subject: '?dataset' + predicate: 'schema:temporalCoverage' + object: '?temporalCoverage' + - subject: '?dataset' + predicate: 'schema:provider' + object: '?provider' + - subject: '?provider' + predicate: 'schema:name' + object: '?datasetProvider' + filter: + - 'FILTER(REGEX(?variableMeasured, "stream(flow)?|discharge|flow", "i"))' + dams: # updated 2024-04-23 type: collection title: Reference Dams description: United States Community Contributed Reference Dams