Status — Deferred
This issue is filed deferred from day one. It is the architecturally correct successor to #169 (which closed wontfix because the heuristic version proposed there had unrecoverable design problems). It is not intended to be picked up before:
- Upstream PR #136 lands (or is decisively rejected), AND
- Library scope is explicitly broadened to include SWE Common parsing, AND
- There is at least a second consumer beyond
ogc-csapi-explorer demonstrating need.
Filed now solely so the architecturally correct future path has a tracking number distinct from the heuristic approach rejected in #169.
Problem
CSAPI observation result payloads carry schema-described data, but our library currently passes result through as unknown (src/ogc-api/csapi/model.ts:595). Consumers wanting to extract structured values (most commonly geographic coordinates for map rendering) must build per-consumer extraction logic. The heuristic field-name-matching approach was rejected in #169 on five grounds — see that issue's status banner for the full reasoning. Headlines: unit ambiguity (km/m/ft/unspecified across publishers), false-positive risk, schema-blindness, maintenance trap, and discouraging publishers from putting position on SamplingFeature where it spec-belongs.
The architecturally correct path
OGC 23-002 Part 2 references SWE Common for result schemas. SWE Common defines:
A schema-aware extractor would:
- Read the datastream's
resultStructure (and optionally resultEncoding) to locate components by definition URI.
- Apply the per-component
uom to return values with explicit, typed units (e.g. { value: 408, unit: 'km' } rather than { alt: 408 }).
- Optionally project to a target CRS using the declared
referenceFrame.
This is the right answer. It is also a substantial body of work — SWE Common parsing is non-trivial, and the library does not currently parse SWE Common at all.
Out of scope until trigger conditions are met
Acceptance criteria (when this is eventually picked up)
References
Status — Deferred
This issue is filed deferred from day one. It is the architecturally correct successor to #169 (which closed
wontfixbecause the heuristic version proposed there had unrecoverable design problems). It is not intended to be picked up before:ogc-csapi-explorerdemonstrating need.Filed now solely so the architecturally correct future path has a tracking number distinct from the heuristic approach rejected in #169.
Problem
CSAPI observation
resultpayloads carry schema-described data, but our library currently passesresultthrough asunknown(src/ogc-api/csapi/model.ts:595). Consumers wanting to extract structured values (most commonly geographic coordinates for map rendering) must build per-consumer extraction logic. The heuristic field-name-matching approach was rejected in #169 on five grounds — see that issue's status banner for the full reasoning. Headlines: unit ambiguity (km/m/ft/unspecified across publishers), false-positive risk, schema-blindness, maintenance trap, and discouraging publishers from putting position onSamplingFeaturewhere it spec-belongs.The architecturally correct path
OGC 23-002 Part 2 references SWE Common for result schemas. SWE Common defines:
Vectortypes with an explicitreferenceFrame(CRS URI — e.g. EPSG:4326 for WGS 84)definitionURIs (e.g. SWE Common's standard latitude/longitude/altitude definitions)uom(units of measure) — eliminates the unit-ambiguity problem from Closed (wontfix): heuristic coordinate extraction not adopted; architecturally correct path tracked at #171 #169 entirelyA schema-aware extractor would:
resultStructure(and optionallyresultEncoding) to locate components bydefinitionURI.uomto return values with explicit, typed units (e.g.{ value: 408, unit: 'km' }rather than{ alt: 408 }).referenceFrame.This is the right answer. It is also a substantial body of work — SWE Common parsing is non-trivial, and the library does not currently parse SWE Common at all.
Out of scope until trigger conditions are met
SystemTypeUrisname collision between model.ts and constants.ts #136 or scopes the library narrowly.ogc-csapi-explorer'sMapViewPage.vue. That helper continues to be the right home for non-schema-aware extraction in the consumer's repo.Acceptance criteria (when this is eventually picked up)
resultStructure(not field names) to identify components.uomattached (no barenumberfor quantities with units).referenceFrame(CRS URI) for vector quantities so consumers can project.result?: unknownpass-through behavior — extraction is opt-in via a separate function.References
OS4CSAPI/ogc-client-CSAPI_2#169wontfixpredecessor; reasoning for rejecting the heuristic approachdocs/research/references.md— Research Findings Not Adopted, Finding 1OS4CSAPI/ogc-csapi-explorerMapViewPage.vueextractLatLonFromResult()— TODO filed to replace with this once shipped