Skip to content

Commit febec94

Browse files
committed
Fix 27 TS errors in resources.spec.ts - Add missing Feature properties
Added missing optional properties to CSAPI Feature type definitions: **ProcedureFeatureProperties:** - inputs, outputs, parameters, method (SensorML I/O definitions) - components, connections (SensorML structure) **PropertyFeatureProperties:** - baseProperty (for derived properties) - statistic (e.g., 'mean', 'sum', 'max') **DatastreamSchema:** - type (SWE component type) - elementType, fields (SWE structure) - elementCount (for DataArray) **DatastreamFeatureProperties:** - encoding (observation encoding) **DeploymentFeatureProperties:** - id, uniqueId (identifiers from SensorML) - keywords, identifiers, classifiers (discovery metadata) - contacts, documents (references) - securityConstraints, legalConstraints (constraints) These properties are populated at runtime from SensorML/SWE parsing. Remaining 27 errors in resources.spec.ts involve accessing nested unknown structures and Geometry coordinates - tracked separately. Partial resolution of Sam-Bolling/CSAPI-Live-Testing#75
1 parent 13d62d8 commit febec94

4 files changed

Lines changed: 110 additions & 0 deletions

File tree

src/ogc-api/csapi/geojson/features/datastream-feature.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,26 @@ export interface DatastreamSchema {
4646
* Inline encoding specification
4747
*/
4848
resultEncodingObject?: unknown;
49+
50+
/**
51+
* SWE Common component type (e.g., 'DataRecord', 'DataArray', 'DataStream')
52+
*/
53+
type?: string;
54+
55+
/**
56+
* Element type for arrays/streams (SWE Common component)
57+
*/
58+
elementType?: unknown;
59+
60+
/**
61+
* Field definitions for DataRecord (array of SWE Common components)
62+
*/
63+
fields?: unknown[];
64+
65+
/**
66+
* Element count for DataArray
67+
*/
68+
elementCount?: number;
4969
}
5070

5171
/**
@@ -108,6 +128,11 @@ export interface DatastreamFeatureProperties extends CSAPIFeatureProperties {
108128
* Number of observations in this datastream
109129
*/
110130
observationCount?: number;
131+
132+
/**
133+
* Encoding specification for observations
134+
*/
135+
encoding?: unknown;
111136
}
112137

113138
/**

src/ogc-api/csapi/geojson/features/deployment-feature.ts

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,51 @@ export interface DeploymentFeatureProperties extends CSAPIFeatureProperties {
7171
* IDs of control streams active during this deployment
7272
*/
7373
controlStreams?: UniqueID[];
74+
75+
/**
76+
* Deployment ID (from SensorML)
77+
*/
78+
id?: string;
79+
80+
/**
81+
* Unique identifier (from SensorML uniqueId)
82+
*/
83+
uniqueId?: string;
84+
85+
/**
86+
* Keywords for discovery (from SensorML)
87+
*/
88+
keywords?: string[];
89+
90+
/**
91+
* Alternative identifiers (from SensorML)
92+
*/
93+
identifiers?: unknown[];
94+
95+
/**
96+
* Classifiers (from SensorML)
97+
*/
98+
classifiers?: unknown[];
99+
100+
/**
101+
* Contact information (from SensorML)
102+
*/
103+
contacts?: unknown[];
104+
105+
/**
106+
* Documentation references (from SensorML)
107+
*/
108+
documents?: unknown[];
109+
110+
/**
111+
* Security constraints (from SensorML)
112+
*/
113+
securityConstraints?: unknown[];
114+
115+
/**
116+
* Legal constraints (from SensorML)
117+
*/
118+
legalConstraints?: unknown[];
74119
}
75120

76121
/**

src/ogc-api/csapi/geojson/features/procedure-feature.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,36 @@ export interface ProcedureFeatureProperties extends CSAPIFeatureProperties {
5959
* IDs of control streams that use this procedure
6060
*/
6161
controlStreams?: UniqueID[];
62+
63+
/**
64+
* Input definitions (from SensorML)
65+
*/
66+
inputs?: unknown;
67+
68+
/**
69+
* Output definitions (from SensorML)
70+
*/
71+
outputs?: unknown;
72+
73+
/**
74+
* Parameter definitions (from SensorML)
75+
*/
76+
parameters?: unknown;
77+
78+
/**
79+
* Method description (from SensorML)
80+
*/
81+
method?: unknown;
82+
83+
/**
84+
* Component list (from SensorML)
85+
*/
86+
components?: unknown[];
87+
88+
/**
89+
* Connection definitions (from SensorML)
90+
*/
91+
connections?: unknown[];
6292
}
6393

6494
/**

src/ogc-api/csapi/geojson/features/property-feature.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,16 @@ export interface PropertyFeatureProperties extends CSAPIFeatureProperties {
4646
* IDs of control streams controlling this property
4747
*/
4848
controlledBy?: UniqueID[];
49+
50+
/**
51+
* Base property URI (for derived properties)
52+
*/
53+
baseProperty?: string;
54+
55+
/**
56+
* Statistic type (e.g., 'mean', 'sum', 'max', 'min') for derived properties
57+
*/
58+
statistic?: string;
4959
}
5060

5161
/**

0 commit comments

Comments
 (0)