Repository navigation
Description
Task
Add the W3C SSN namespace (http://www.w3.org/ns/ssn/) to featureType recognition in geojson.ts so that resources using SSN-prefixed featureTypes (e.g., ssn:Deployment) are correctly classified.
Origin: Smoke Test #18 Finding F83 — OSH server returns featureType: "http://www.w3.org/ns/ssn/Deployment" for some deployments. Our parser only checks SOSA (sosa:) and SensorML (sml:) namespaces, causing the SSN-namespaced Deployment to go unrecognized.
Files to Create or Modify
| File | Action | Est. Lines | Purpose |
|---|---|---|---|
src/ogc-api/csapi/formats/geojson.ts |
Modify | ~5 | Add SSN_NS constant and extend toLocalName / namespace extraction logic |
src/ogc-api/csapi/formats/geojson.spec.ts |
Modify | ~10-15 | Add test cases for SSN-namespaced featureTypes |
Blueprint Reference
Follow the existing SOSA_NS / SENSORML_NS pattern in src/ogc-api/csapi/formats/geojson.ts (lines 28-39). The new constant follows the exact same structure.
Scope — What to Implement
SSN Namespace Constant
/** W3C SSN namespace URI. */
export const SSN_NS = 'http://www.w3.org/ns/ssn/';Extended featureType Recognition
The getCSAPIResourceType() function (or its helper toSosaLocalName) currently strips the SOSA and SensorML namespace prefixes. It must also strip the SSN namespace prefix. The SSN ontology defines:
ssn:Deployment→ maps to Deployment resource typessn:System→ maps to System resource type
Both of these are already in the existing DEPLOYMENT_LOCAL_NAMES and SYSTEM_LOCAL_NAMES sets, so the only change is recognizing the namespace prefix itself.
Spec Context
Per OGC 23-001 §11.1:
The Deployment resource implements the
ssn:Deploymentconcept.
The canonical URI is http://www.w3.org/ns/ssn/Deployment (SSN namespace), while the SOSA CURIE is sosa:Deployment. Both should be recognized. Similarly, ssn:System (from http://www.w3.org/ns/ssn/System) is the canonical URI referenced in §9.1.
Testing Requirements
- Add test:
ssn:DeploymentfeatureType → recognized as'Deployment' - Add test:
http://www.w3.org/ns/ssn/DeploymentfeatureType → recognized as'Deployment' - Add test:
http://www.w3.org/ns/ssn/SystemfeatureType → recognized as'System' - Verify existing SOSA and SensorML tests still pass
Scope — What NOT to Touch
- ❌ Do NOT modify
model.ts— no interface changes needed - ❌ Do NOT modify
classification.ts— hint-based fallback is unaffected - ❌ Do NOT modify
response.ts— response parsing is unaffected - ❌ Do NOT add any new resource type names to the local name sets
- ❌ Do NOT refactor existing namespace handling into a generic pattern (keep the focused change)
Acceptance Criteria
-
SSN_NSconstant exported fromgeojson.ts -
getCSAPIResourceType()correctly identifieshttp://www.w3.org/ns/ssn/Deploymentas'Deployment' -
getCSAPIResourceType()correctly identifieshttp://www.w3.org/ns/ssn/Systemas'System' - New tests in
geojson.spec.tscover SSN-namespaced featureTypes - All existing tests still pass (
npm test) - No lint errors
Dependencies
Blocked by: Nothing
Blocks: Nothing
Operational Constraints
⚠️ MANDATORY: Before starting work on this issue, reviewdocs/governance/AI_OPERATIONAL_CONSTRAINTS.md.Also review
docs/governance/phase-3-lessons-learned.md— Lessons 1-2 (audit upstream, Postel's Law) apply.
Key constraints:
- Precedence: OGC specifications → AI Collaboration Agreement → This issue description → Existing code
- No scope expansion: Only add SSN namespace support; do not restructure namespace handling
- Minimal diffs: ~5 lines production code, ~10-15 lines test code
References
| # | Document | Section | What It Provides |
|---|---|---|---|
| 1 | OGC 23-001 §11.1 | Deployment Overview | Canonical ssn:Deployment URI |
| 2 | OGC 23-001 §9.1 | System Overview | Canonical ssn:System URI |
| 3 | W3C SSN Ontology | Full spec | SSN namespace definition |
| 4 | src/ogc-api/csapi/formats/geojson.ts lines 28-39 |
Constants | Existing SOSA/SensorML pattern to match |
Activity
feat: add SSN namespace support to featureType recognition (#76)\n\nA…
docs: add Phase 3.17 code review — SSN namespace + validTime optional
docs: add Phase 4.1 smoke test report (ST#19)\n\nFirst Phase 4 smoke …
research(phase-9): reframe doc with #188 as input to existing research