Skip to content

Keep extractLatLonFromResult() local in MapViewPage.vue; replace with library-level SWE Common extractor when available #48

@Sam-Bolling

Description

@Sam-Bolling

Summary

The 30-line extractLatLonFromResult() helper currently in demo/src/pages/MapViewPage.vue L1263–1295 (this repo) should remain in place as-is. No action is needed today. This issue exists as a tracking marker so that when a library-level SWE Common–aware result-vector extractor ships in OS4CSAPI/ogc-client-CSAPI_2 (tracked there at #171, deferred), this consumer-side helper gets replaced with the library version rather than continuing to grow.

Context

The library considered absorbing this helper as extractGeoLocation() in ogc-client-CSAPI_2#169, then closed that issue wontfix after Phase 8 triage. Reasons for the rejection (full text in that issue's status banner):

  • Unit ambiguity across the convention set (km/m/ft/unspecified) is unrecoverable from field names alone.
  • Heuristic field-name matching is architecturally wrong — SWE Common is the correct path.
  • The six conventions encode the OSHConnect-Python publisher fleet specifically; codifying them in the library is N=1-consumer opinion masquerading as general utility.

The right place for the heuristic (until SWE Common arrives) is here, in this repo, where the convention list can evolve in lockstep with the publisher fleet.

Action items (none today; reminders for the future)

  • When OS4CSAPI/ogc-client-CSAPI_2#171 ships, replace extractLatLonFromResult() with the library-level extractor.
  • At that point, the replacement should return values with explicit units (the library version will preserve uom from SWE Common) — update consumers of the helper to stop assuming the result is in any specific unit and instead use the returned uom.
  • If new publishers are added to the OSHConnect-Python fleet that use a 7th naming convention, add the convention to the local helper here, not to the library. The library is staying out of heuristic field-name matching by design.

Out of scope

  • ❌ Do not modify the upstream library — see ogc-client-CSAPI_2#169 for the closure rationale.
  • ❌ Do not start migrating to SWE Common manually in this repo — wait for the library to provide it.
  • ❌ Do not delete or refactor the existing extractLatLonFromResult() today. It works against the current publisher fleet; replacement is for later.

References

# Source Role
1 OS4CSAPI/ogc-client-CSAPI_2#169 Closed wontfix; rationale for keeping this helper local
2 OS4CSAPI/ogc-client-CSAPI_2#171 Deferred follow-up: SWE Common–aware library extractor; this issue's eventual replacement trigger
3 OS4CSAPI/ogc-client-CSAPI_2 references.md — Research Findings Not Adopted, Finding 1 Six-convention table + defensive guidance

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions