Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions orchestration/pygeoapi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ RUN /venv/bin/python3 /tmp/patch_pygeoapi.py
COPY pygeoapi/die_providers.py /die/die_providers.py
ENV PYTHONPATH=/die

# Template overrides; others fall back to pygeoapi's stock templates.
# landing_page.html: renders the description as HTML (| safe).
# Copied from the pinned image; re-diff when bumping pygeoapi.
COPY pygeoapi/templates/ /die/templates/

# Copy generation inputs
# Build context is orchestration/ (see cloudbuild.yaml)
COPY pygeoapi/config.yml.j2 /tmp/config.yml.j2
Expand Down
34 changes: 31 additions & 3 deletions orchestration/pygeoapi/config.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ server:
cors: true
pretty_print: false
gzip: true # Cloud Run doesn't compress
templates:
path: /die/templates # overrides stock templates by name (see Dockerfile)
limits:
default_items: 500
max_items: 10000 # NewWeaver requests limit=10000
Expand All @@ -22,11 +24,37 @@ logging:
metadata:
identification:
title: New Mexico Unified Water Data
description: >-
This tool integrates groundwater-level and water-quality data for New Mexico
description: |
<p>This tool integrates groundwater-level and water-quality data for New Mexico
from state and federal sources, including NMBGMR, USGS, and the Water Quality Portal.
Its collections provide per-well summaries, trends, time series, and derived
water-quality indicators through the OGC API - Features standard.
water-quality indicators through the OGC API - Features standard.</p>

<p>The following parameters are reported by the following sources:</p>
<div class="table-responsive">
<table class="table table-sm table-bordered text-center">
<thead>
<tr><th></th><th>waterlevels</th><th>arsenic</th><th>bicarbonate</th><th>conductivity**</th><th>calcium</th><th>carbonate</th><th>chloride</th><th>fluoride</th><th>magnesium</th><th>nitrate</th><th>ph</th><th>potassium</th><th>silica</th><th>sodium</th><th>specific conductance**</th><th>sulfate</th><th>tds</th><th>uranium</th></tr>
</thead>
<tbody>
<tr><th class="text-start">bernco</th><td>X</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td></tr>
<tr><th class="text-start">bor</th><td>-</td><td>X</td><td>-</td><td>X</td><td>X</td><td>-</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>-</td><td>X</td><td>X</td><td>X</td></tr>
<tr><th class="text-start">cabq</th><td>X</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td></tr>
<tr><th class="text-start">ebid</th><td>X</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td></tr>
<tr><th class="text-start">nmbgmr-amp</th><td>X</td><td>X</td><td>X</td><td>-</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td></tr>
<tr><th class="text-start">nmed-dwb</th><td>-</td><td>X</td><td>X</td><td>-</td><td>X</td><td>-</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td></tr>
<tr><th class="text-start">nmose-isc-seven-rivers</th><td>X</td><td>-</td><td>X</td><td>X</td><td>X</td><td>-</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>-</td></tr>
<tr><th class="text-start">nmose-pod</th><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td></tr>
<tr><th class="text-start">nmose-roswell</th><td>X</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td></tr>
<tr><th class="text-start">nwis</th><td>X</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td></tr>
<tr><th class="text-start">pvacd</th><td>X</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td></tr>
<tr><th class="text-start">wqp</th><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X*</td><td>X</td></tr>
</tbody>
</table>
</div>
<p><small>* TDS data from WQP may contain duplicates. Duplicates (same ActivityIdentifier) are reduced to one record, preferring USGS pCodes 70300, 70301, then 70303.</small></p>
<p><small>** Conductivity and specific conductance are often used interchangeably, but here they are distinguished by method. A record is specific conductance if it was determined at the standard 25&deg;C (e.g. <a href="https://www.epa.gov/sites/default/files/2015-08/documents/method_120-1_1982.pdf">EPA method 120.1</a>); otherwise it is conductivity.</small></p>

keywords:
- water
- groundwater
Expand Down
184 changes: 184 additions & 0 deletions orchestration/pygeoapi/templates/landing_page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
{% extends "_base.html" %}
{% block title %}{{ super() }} {% trans %}Home{% endtrans %} {% endblock %}
{% block body %}

<br/>
<section id="collections">
<div class="row">
<div class="col-md-8 col-sm-12">

<section id="identification">
<h1>{{ config['metadata']['identification']['title'] }}</h1>
<div>{{ config['metadata']['identification']['description'] | safe }}</div>

<p>
{% for kw in config['metadata']['identification']['keywords'] %}
<span class="badge bg-primary text-bg-primary">{{ kw }}</span>
{% endfor %}
</p>

<div class="card bg-light mb-3">
<div class="card-body">
{% if config['metadata']['identification']['terms_of_service'] %}
<div class="row">
<div class="col-sm-4">
{% trans %}Terms of service{% endtrans %}
</div>
<div class="col-sm-8">
{{ config['metadata']['identification']['terms_of_service'] | urlize() }}
</div>
</div>
{% endif %}
{% if config['metadata']['license']['url'] %}
<div class="row">
<div class="col-sm-4">
{% trans %}License{% endtrans %}
</div>
<div class="col-sm-8">
<a href="{{ config['metadata']['license']['url'] }}">
{{ config['metadata']['license']['name'] or config['metadata']['license']['url'] }}</a>
</div>
</div>
{% endif %}
<div class="row">
<div class="col-sm-4">
{% trans %}URL{% endtrans %}
</div>
<div class="col-sm-8">
<a href="{{ config['metadata']['identification']['url'] }}">
{{ config['metadata']['identification']['url'] | truncate( 70 ) }}</a>
</div>
</div>
</div>
</div>
</section>
{% if data['collection'] %}
<section id="collections">
<h2>{% trans %}Collections{% endtrans %}</h2>
<p>
<a href="{{ config['server']['url'] }}/collections?f=html">{% trans %}View the collections in this service{% endtrans %}</a>
</p>
</section>
{% endif %}
{% if data['stac-collection'] %}
<section id="collections">
<h2>{% trans %}SpatioTemporal Assets{% endtrans %}</h2>
<p>
<a href="{{ config['server']['url'] }}/stac?f=html">{% trans %}View the SpatioTemporal Assets in this service{% endtrans %}</a>
</p>
</section>
{% endif %}
{% if data['process'] %}
<section id="processes">
<h2>{% trans %}Processes{% endtrans %}</h2>
<p>
<a href="{{ config['server']['url'] }}/processes?f=html">{% trans %}View the processes in this service{% endtrans %}</a>
</p>
</section>
{% if data['jobs'] %}
<section id="jobs">
<h2>{% trans %}Jobs{% endtrans %}</h2>
<p>
<a title="Browse jobs" href="{{config.server.url}}/jobs">{% trans %}Browse jobs{% endtrans %}</a>
</p>
</section>
{% endif %}
{% endif %}
{% if data['tile'] %}
<section id="tilematrixsets">
<h2>{% trans %}Tile Matrix Sets{% endtrans %}</h2>
<p>
<a href="{{ config['server']['url'] }}/TileMatrixSets?f=html">{% trans %}View the Tile Matrix Sets available on this service{% endtrans %}</a>
</p>
{% endif %}
{% if data['pubsub'] %}
<section id="pubsub">
<h2>{% trans %}Pub/Sub Notifications{% endtrans %} ({{ data['pubsub']['name'] }})</h2>
<p>
<a href="{{ data['pubsub']['url'] }}">{% trans %}Subscribe to notifications from this service{% endtrans %}</a>{% if data['pubsub']['channel'] %} (Topic/channel: <code>{{ data['pubsub']['channel'] }}</code>) {% endif %}
</p>
</section>
{% endif %}
<section id="openapi">
<h2>{% trans %}API Definition{% endtrans %}</h2>
<p>
{% trans %}Documentation{% endtrans %}: <a href="{{ config['server']['url'] }}/openapi?f=html">{% trans %}Swagger UI{% endtrans %}</a> <a href="{{ config['server']['url'] }}/openapi?f=html&ui=redoc">{% trans %}ReDoc{% endtrans %}</a>
</p>
<p>
<a href="{{ config['server']['url'] }}/openapi?f=json">{% trans %}OpenAPI Document{% endtrans %}</a>
</p>
</section>
{% if data['pubsub'] and data['pubsub']['asyncapi'] %}
<section id="asyncapi">
<h2>{% trans %}AsyncAPI Definition{% endtrans %}</h2>
<p>
{% trans %}Documentation{% endtrans %}: <a href="{{ config['server']['url'] }}/asyncapi?f=html">{% trans %}UI{% endtrans %}</a>
</p>
<p>
<a href="{{ config['server']['url'] }}/asyncapi?f=json">{% trans %}AsyncAPI Document{% endtrans %}</a>
</p>
</section>
{% endif %}
<section id="conformance">
<h2>{% trans %}Conformance{% endtrans %}</h2>
<p>
<a href="{{ config['server']['url'] }}/conformance?f=html">{% trans %}View the conformance classes of this service{% endtrans %}</a>
</p>
</section>
</div>
<div class="col-md-4 col-sm-12">
<div class="card mb-3">
<div class="card-header">
<b>{% trans %}Provider{% endtrans %}</b>
</div>
<div class="card-body">
<b>{{ config['metadata']['provider']['name'] }}</b><br/>
<a href="{{ config['metadata']['provider']['url'] }}">{{ config['metadata']['provider']['url'] }}</a><br/>
</div>
</div>
<div class="card">
<div class="card-header">
<b>{% trans %}Contact point{% endtrans %}</b>
</div>
<div class="card-body">
<b>{% trans %}Address{% endtrans %}</b><br/>
<div class="section">
<span>{{ config['metadata']['contact']['name'] }}</span><br/>
{% for key in ['address', 'city', 'stateorprovince', 'postalcode', 'country'] %}
{% if key in config['metadata']['contact'] %}
<span>{{ config['metadata']['contact'][key] }}</span><br/>
{% endif %}
{% endfor %}
</div>
<div>
<b>{% trans %}Email{% endtrans %}</b><br/>
<span><a href="mailto:{{ config['metadata']['contact']['email'] }}">{{ config['metadata']['contact']['email'] }}</a></span><br/>
{% if config['metadata']['contact']['phone'] %}
<b>{% trans %}Telephone{% endtrans %}</b><br/>
<span><a href="tel:{{ config['metadata']['contact']['phone'] }}">{{ config['metadata']['contact']['phone'] }}</a></span><br/>
{% endif %}
{% if config['metadata']['contact']['fax'] %}
<b>{% trans %}Fax{% endtrans %}</b><br/>
<span><a href="tel:{{ config['metadata']['contact']['fax'] }}">{{ config['metadata']['contact']['fax'] }}</a></span><br/>
{% endif %}
{% if config['metadata']['contact']['url'] %}
<b>{% trans %}Contact URL{% endtrans %}</b><br/>
<span><a href="{{ config['metadata']['contact']['url'] }}">{{ config['metadata']['contact']['url'] }}</a></span><br/>
{% endif %}
{% if config['metadata']['contact']['hours'] %}
<b>{% trans %}Hours{% endtrans %}</b><br/>
<span>{{ config['metadata']['contact']['hours'] }}</span><br/>
{% endif %}
{% if config['metadata']['contact']['instructions'] %}
<b>{% trans %}Contact instructions{% endtrans %}</b><br/>
<span>{{ config['metadata']['contact']['instructions'] }}</span>
{% endif %}
</div>
</div>
</div>
</div>
</div>

</section>

{% endblock %}
Loading