docs: add ADR3 for serving water data via OGC API - EDR#777
Open
jirhiker wants to merge 5 commits into
Open
Conversation
Propose adopting OGC API - EDR as the read-only delivery interface for groundwater-level measurements (manual + transducer time series) and water-chemistry analyses, served by pygeoapi as a facade over the existing PostgreSQL/PostGIS database. Decision: two collections (waterlevels, water-chemistry); transducer deployments (Equipment) exposed as EDR instances; collection-level water-level queries return the merged manual + transducer series. FastAPI stays the system of record; GeoServer keeps Features/WMS. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Remove the Cloud SQL private-IP (10.10.0.3) risk bullet and its matching acceptance-criterion line. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
jirhiker
requested review from
TylerAdamMartinez,
chasetmartin,
ksmuczynski and
lizalino
July 12, 2026 04:06
Rewrite ADR3 against the real staging models (Thing/Location, Observation, TransducerObservation/TransducerObservationBlock/Deployment/Sensor, Sample/Parameter) instead of the divergent geoserver-iac branch schema. Key corrections: - EDR is added to the pygeoapi service already mounted at /ogcapi (core/pygeoapi.py), not a new standalone service. - Publication gating uses release_status = 'public' via ogc_* views, matching the existing OGC API - Features pattern. - Parameter names come from Parameter.parameter_name; units from default_unit. - Note that pygeoapi's bundled EDR providers are gridded, so an observational PostgreSQL-backed EDR provider is likely required. Add the executable spec: - tests/features/edr-water-data.feature (@edr @wip, 9 scenarios) - tests/features/steps/edr_water_data.py (reuses the in-process TestClient; Background skips while the EDR collections are unimplemented) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Implements ADR3: two EDR collections (waterlevels, water_chemistry) served by a custom PostgreSQL EDR provider on the existing pygeoapi /ogcapi mount. - alembic z9a0b1c2d3e4: ogc_waterlevels (manual Observation UNION transducer TransducerObservation via Deployment) and ogc_water_chemistry views, both publication-filtered to release_status = 'public'. - core/edr_provider.WaterEDRProvider: BaseEDRProvider serving CoverageJSON (PointSeries) from the flat ogc_* views; implements locations/area/position/ cube and exposes transducer Deployments as EDR instances. - core/pygeoapi.py: register the EDR collections alongside the feature collections in the generated pygeoapi config. - tests/features/environment.py: seed manual + transducer water levels, pH chemistry, and non-public (draft) records for the EDR scenarios. - tests/features/edr-water-data.feature + steps: 8 scenarios (catalog, metadata, depth-to-water CoverageJSON, merged manual+transducer, instances, chemistry area-by-analyte, publication gating, conformance). @wip removed. Verified end-to-end against a PostGIS container via TestClient (all EDR checks pass). Note: pygeoapi 0.23.4 routes generic EDR query patterns ahead of their instance-scoped counterparts (greedy collection_id path), so instance discovery is served but instance-scoped data queries are not; documented in ADR3. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
ADR3.md— an architecture decision record proposing OGC API - EDR (Environmental Data Retrieval) as the public delivery interface for the Bureau's observational datasets.Docs-only change. No code, config, or schema touched.
Why
Decision summary
waterlevelsandwater-chemistry.waterlevels←GroundwaterLevelObservationviaWellTimeserieswater-chemistry←WaterChemistryAnalysisviaWaterChemistryAnalysisSet(one parameter peranalyte)WellTimeseries.equipment_id→Equipment. Each transducer deployment is exposed as an EDR instance (temporal extent,recording_interval, instrument metadata).Reviewer notes
🤖 Generated with Claude Code