@welldot/core 0.3.0 → 0.4.0-next.20261014.26249fd
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +275 -72
- package/dist/index.cjs +2292 -43
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14050 -4215
- package/dist/index.d.ts +14050 -4215
- package/dist/index.js +2171 -42
- package/dist/index.js.map +1 -1
- package/docs/schema/v2/well.schema.json +1043 -17
- package/docs/spec/v2/format-reference.md +507 -41
- package/docs/spec/v2/interoperability.md +44 -27
- package/docs/spec/v2/object-schemas.md +983 -113
- package/docs/spec/v2/overview.md +122 -6
- package/docs/spec/v2/water-quality.md +483 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# `.well` File Format Specification — Version 2.
|
|
1
|
+
# `.well` File Format Specification — Version 2.3: Interoperability
|
|
2
2
|
|
|
3
|
-
**See also:** [overview.md](./overview.md) · [format-reference.md](./format-reference.md) · [object-schemas.md](./object-schemas.md)
|
|
3
|
+
**See also:** [overview.md](./overview.md) · [format-reference.md](./format-reference.md) · [object-schemas.md](./object-schemas.md) · [water-quality.md](./water-quality.md)
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -21,7 +21,7 @@ A `.well` file MAY include `"@context": "https://welldot.org/context/v2.jsonld"`
|
|
|
21
21
|
|
|
22
22
|
### Context publication plan
|
|
23
23
|
|
|
24
|
-
The canonical context is staged across
|
|
24
|
+
The canonical context is staged across six phases (0–5). Each phase publishes a real, fetchable document at the canonical URL — at no phase is the URL a placeholder.
|
|
25
25
|
|
|
26
26
|
**Phase 0 — Reservation (v2.0 ratification)**
|
|
27
27
|
|
|
@@ -59,6 +59,12 @@ Adds mappings for `lithology`, `fractures`, `caves`, `texture`, `texture.code`,
|
|
|
59
59
|
|
|
60
60
|
Adds mappings for `well_purpose`, `centralizers`, `hydrodynamic_events`, `aquifer_analysis`, `history_logs`, and supporting types (`PumpingStep`, `LevelReading`, `RecoveryPhase`, `Attachment`). Maps event readings to O&M's `OM_Observation` pattern and time-series to TimeseriesML where alignment is verified. This phase ships alongside the v2.1 spec revision.
|
|
61
61
|
|
|
62
|
+
**Phase 5 — Operational blocks (v2.3)**
|
|
63
|
+
|
|
64
|
+
Adds mappings for `attachments`, `Attachment.document_type`, `pump_installations`, `PumpInstallation` and `PumpElectrical` fields (including `installed_by` and `removed_by`), `permits` (`Permit`, `VolumeLimit`, `MonthlyGrant`, `PermitCondition`, `ConditionFulfillment`, `PermitHistoryEntry`, and the administrative `status`), `meters` (`Meter`, including `manufacturer`, `model`, `installed_by`, `removed_by` and `attachments`), `production` (`MeterReading`, `EstimatedVolume`, with `production[].corrects`), `operating_regime` (`OperatingRegime`), the `maintenance` and `status_change` log fields, and `hydrodynamic_events[].corrects`. Permit dates map to `xsd:date` and condition durations to `xsd:duration`; `supersedes` is a succession relation between two instruments, distinct from `corrects`. `corrects` maps to a retraction relation between two observation or ledger records; installation, reading and regime instants map to `xsd:dateTime`; `installed_by` and `removed_by` map to the agent of the installation or removal activity (`prov:wasAssociatedWith`), kept as a plain literal; attachments alias to `schema:MediaObject` (`uri` → `schema:contentUrl`, `media_type` → `schema:encodingFormat`, `sha256` → `schema:sha256`). Units bind to QUDT (`unit:KiloW`, `unit:V`, `unit:MilliM2`, `unit:M3` for meter readings and volumes, `unit:M3-PER-HR` for regime flow rates, `unit:HR` for daily operating time, `unit:MilliM` for meter nominal diameter). This phase ships alongside the v2.3 spec revision.
|
|
65
|
+
|
|
66
|
+
The v2.3 water quality terms ship in the same phase: `water_samples` (`WaterSample`, `SamplingPoint`, `Purge`, `PurgeReading`, `Laboratory`, `Result`, `Parameter`, `Filtration`, `Validation`) and `history_logs[].sample_ids`. Collection, receipt, analysis and validation instants map to `xsd:dateTime`; a `_resolution: "day"` sibling maps the value to `xsd:date` semantics. Each `welldot` parameter code gets a term URI under `https://welldot.org/vocab/water-quality/` (versioned with the published vocabulary), aligned where verified to the corresponding observable property in QUDT, ChEBI or the SOSA/SSN observable-property pattern. A `cas` parameter maps to the CAS Common Chemistry URI of its registry number, for example `{ "code": "71-43-2", "vocabulary": "cas" }` → `https://commonchemistry.cas.org/detail?cas_rn=71-43-2`; a `welldot` code with a published CAS equivalence carries an `owl:sameAs`-style link to the same URI. `x-` vocabularies are left unmapped. Units bind to QUDT (`unit:MilliGM-PER-L`, `unit:MicroS-PER-CentiM`, `unit:DEG_C`, `unit:MilliV`, `unit:BQ-PER-L`, `unit:MicroM`); turbidity, color and microbiological count units without a QUDT term keep their UCUM code as a literal.
|
|
67
|
+
|
|
62
68
|
### Versioning and stability
|
|
63
69
|
|
|
64
70
|
- The Phase-0 document is replaced in-place as phases ship, but term URIs under `welldot:vocab/v2#` are append-only and never re-purposed within v2.
|
|
@@ -99,7 +105,7 @@ GWML2 defines its model in three stages — a conceptual UML schema, a logical U
|
|
|
99
105
|
| GWML2 Module | Namespace | `.well` coverage |
|
|
100
106
|
| ---------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
|
|
101
107
|
| GWML2-Main | `http://www.opengis.net/gwml-main/2.2` | Out of scope (aquifers, fluid bodies, hydrogeological units as standalone features) |
|
|
102
|
-
| GWML2-Constituent | `http://www.opengis.net/gwml-constituent/2.2` |
|
|
108
|
+
| GWML2-Constituent | `http://www.opengis.net/gwml-constituent/2.2` | Partially covered (`water_samples`, v2.3): measured constituents and properties of sampled water |
|
|
103
109
|
| GWML2-Flow | `http://www.opengis.net/gwml-flow/2.2` | Out of scope (recharge, discharge, inter-flow) |
|
|
104
110
|
| GWML2-Well | `http://www.opengis.net/gwml-well/2.2` | Covered: top-level well identity, `location`, `well_id`, well-as-sampling-feature semantics |
|
|
105
111
|
| GWML2-WellConstruction | `http://www.opengis.net/gwml-wellconstruction/2.2` | Covered: `bore_hole`, `well_case`, `well_screen`, `reduction`, `surface_case`, `hole_fill`, `cement_pad` |
|
|
@@ -115,27 +121,37 @@ A `.well` `Lithology` array corresponds to a GWML2 **`GW_GeologyLogCoverage`**,
|
|
|
115
121
|
|
|
116
122
|
The mapping below is **informative, not normative**. Class names in italics are verified against published GWML2 documentation (the OGC 16-032r2 specification, the _Hydrogeology Journal_ and _Open Geospatial Data, Software and Standards_ papers, and the OGC Hydrology DWG wiki). Class names marked with `?` are **approximate** — they describe the GWML2 module a `.well` construct belongs to but the exact class name was not verified at the time of writing this draft. Implementers building converters should verify these against the authoritative XSDs at `http://schemas.opengis.net/gwml/2.2/` before relying on them.
|
|
117
123
|
|
|
118
|
-
| `.well` construct
|
|
119
|
-
|
|
|
120
|
-
| Well (top-level)
|
|
121
|
-
| `well_id[]`
|
|
122
|
-
| `location`
|
|
123
|
-
| `bore_hole[]`
|
|
124
|
-
| `well_case[]`
|
|
125
|
-
| `surface_case[]`
|
|
126
|
-
| `well_screen[]`
|
|
127
|
-
| `reduction[]`
|
|
128
|
-
| `hole_fill[]`
|
|
129
|
-
| `cement_pad`
|
|
130
|
-
| `centralizers[]`
|
|
131
|
-
| `well_purpose[]`
|
|
132
|
-
| `lithology[]`
|
|
133
|
-
| `lithology[].geologic_unit`
|
|
134
|
-
| `fractures[]`
|
|
135
|
-
| `caves[]`
|
|
136
|
-
| `hydrodynamic_events[]`
|
|
137
|
-
| `aquifer_analysis[]`
|
|
138
|
-
| `history_logs[]`
|
|
124
|
+
| `.well` construct | GWML2 module | Class / property |
|
|
125
|
+
| -------------------------------- | ---------------------- | --------------------------------------------------------------------- |
|
|
126
|
+
| Well (top-level) | GWML2-Well | _`GW_Well`_ (specializes `O&M:SF_SamplingCurve`) |
|
|
127
|
+
| `well_id[]` | GWML2-Well | `GW_Well` identifier property (?) |
|
|
128
|
+
| `location` | GWML2-Well | `GW_Well` shape / position property (?) |
|
|
129
|
+
| `bore_hole[]` | GWML2-WellConstruction | `Borehole` (?) |
|
|
130
|
+
| `well_case[]` | GWML2-WellConstruction | `Casing` (?) |
|
|
131
|
+
| `surface_case[]` | GWML2-WellConstruction | `Casing` with surface depth range (?) |
|
|
132
|
+
| `well_screen[]` | GWML2-WellConstruction | `Screen` (?) |
|
|
133
|
+
| `reduction[]` | GWML2-WellConstruction | No direct equivalent — casing transition |
|
|
134
|
+
| `hole_fill[]` | GWML2-WellConstruction | Annular fill / gravel pack / seal (?) |
|
|
135
|
+
| `cement_pad` | GWML2-WellConstruction | No direct equivalent — wellhead furniture |
|
|
136
|
+
| `centralizers[]` | GWML2-WellConstruction | No verified equivalent — casing accessory (?) |
|
|
137
|
+
| `well_purpose[]` | GWML2-Well | `GW_Well` purpose / use property (?) |
|
|
138
|
+
| `lithology[]` | GWML2-Well | _`GW_GeologyLogCoverage`_ (realizes `CV_DiscreteCoverage`) |
|
|
139
|
+
| `lithology[].geologic_unit` | GWML2-Main | _`GW_HydrogeologicalUnit`_ (specializes GeoSciML `GeologicUnit`) |
|
|
140
|
+
| `fractures[]` | GWML2-Well | Fracture log interval (?) |
|
|
141
|
+
| `caves[]` | GWML2-Well | Void / cavity log interval (?) |
|
|
142
|
+
| `hydrodynamic_events[]` | GWML2-AquiferTest | `GW_AquiferTest` (?) plus `OM_Observation` series via TimeseriesML |
|
|
143
|
+
| `aquifer_analysis[]` | GWML2-AquiferTest | Aquifer test result properties (?) |
|
|
144
|
+
| `history_logs[]` | n/a | No direct equivalent — operational record outside GWML2 scope |
|
|
145
|
+
| `pump_installations[]` | GWML2-WellConstruction | Pump / wellhead equipment (?) — pending check against the XSD |
|
|
146
|
+
| `permits[]` | n/a | No direct equivalent — operational record outside GWML2 scope |
|
|
147
|
+
| `meters[]` | n/a | No direct equivalent — operational record outside GWML2 scope |
|
|
148
|
+
| `production[]` | n/a | No direct equivalent — operational record outside GWML2 scope |
|
|
149
|
+
| `operating_regime[]` | n/a | No direct equivalent — operational record outside GWML2 scope |
|
|
150
|
+
| `attachments[]` (root) | n/a | No direct equivalent — documents referenced by URL |
|
|
151
|
+
| `hydrodynamic_events[].corrects` | n/a | No direct equivalent — ledger correction outside GWML2 scope |
|
|
152
|
+
| `water_samples[]` | GWML2-Constituent | `SF_Specimen` (?) — the sample taken from the `GW_Well` |
|
|
153
|
+
| `water_samples[].results[]` | GWML2-Constituent | `OM_Measurement` (?) on the specimen, observed property = `parameter` |
|
|
154
|
+
| `water_samples[].corrects` | n/a | No direct equivalent — ledger correction outside GWML2 scope |
|
|
139
155
|
|
|
140
156
|
A complete, normative mapping will be published as a separate document once the GWML2 XSDs have been read directly and each verified class name and property path has been confirmed. Until then, this table is a structural guide and not a conversion specification.
|
|
141
157
|
|
|
@@ -144,7 +160,8 @@ A complete, normative mapping will be published as a separate document once the
|
|
|
144
160
|
- **Wells vs. boreholes in GWML2.** GWML2 distinguishes a `GW_Well` (the construction with hydrogeological purpose) from a `Borehole` (the physical hole). A single `.well` document conflates both since it describes one composite installation. A `.well → GWML2` converter must emit both features and link them; a `GWML2 → .well` converter must merge them.
|
|
145
161
|
- **Aquifer tests in GWML2.** GWML2-AquiferTest uses TimeseriesML (OGC 15-042r2) for time-series readings and O&M's `OM_Observation` pattern for individual measurements. The `.well` event types (`spot_measurement`, `constant_rate`, `step_drawdown`, `airlift`, `recovery_only`) are pragmatic field-record categories with no direct GWML2 counterpart; a converter must decompose each into one or more `GW_AquiferTest` features with appropriate `OM_Observation` results.
|
|
146
162
|
- **Hydrogeological units.** `.well` stores `lithology[].geologic_unit` and `aquifer_unit` as free-text strings. In GWML2 these resolve to references to `GW_HydrogeologicalUnit` features, which in real GWML2 deployments are typically catalogued in national registries (e.g. French BDLISA, Canadian GIN). A `.well → GWML2` converter SHOULD resolve these strings to authoritative unit URIs when a national vocabulary is available; absent that, it emits inline `GW_HydrogeologicalUnit` features with `gml:name` set to the string value.
|
|
147
|
-
- **
|
|
163
|
+
- **Water samples as specimens.** A `water_samples` entry corresponds to an O&M `SF_Specimen` taken from the well (the sampled feature), with `datetime` as the sampling time and `sampling_point` as the sampling location along the well. Each result is an `OM_Measurement` whose observed property is the parameter (a CAS or `welldot` term URI), whose result is the value in the code's canonical unit, and whose procedure is `method`. GWML2-Constituent describes the constituents of a fluid body rather than individual analyses, so a converter maps `.well` results to O&M observations on the specimen and derives constituent statements only when needed. Censoring (`qualifier`), detection and quantification limits, `lab_flags` and `validation` have no direct GWML2 counterpart and travel as result quality metadata or `x-` extensions. Field QA/QC links (`parent_sample_id`), purge data and chain of custody are outside GWML2 scope. Limits and exceedances are never part of the file and have no mapping.
|
|
164
|
+
- **History logs are outside GWML2 scope.** GWML2 models the well as a static feature and its observations as a time-series. Maintenance interventions, incidents, status changes (`status_change`), permit condition fulfillment, and operational events are not represented. The same holds for the v2.3 operational blocks (`permits`, `meters`, `production`, `operating_regime`): metered production is an abstraction record, not an aquifer observation. A converter SHOULD preserve `.well` `history_logs` in a GeoSciML observation event sequence or as an `x-` extension on the GWML2 side, but full lossless round-trip is not guaranteed.
|
|
148
165
|
|
|
149
166
|
### Profiles for regulatory adoption
|
|
150
167
|
|
|
@@ -176,4 +193,4 @@ The schema is generated from the Zod validators in `@welldot/core` to prevent dr
|
|
|
176
193
|
|
|
177
194
|
---
|
|
178
195
|
|
|
179
|
-
|
|
196
|
+
_`.well` Format Specification v2.3_
|