This repository was archived by the owner on Feb 12, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathhdmap.shacl.ttl
More file actions
358 lines (336 loc) · 15.3 KB
/
Copy pathhdmap.shacl.ttl
File metadata and controls
358 lines (336 loc) · 15.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
@prefix hdmap: <https://w3id.org/ascs-ev/envited-x/hdmap/v5/> .
@prefix envited-x: <https://w3id.org/ascs-ev/envited-x/envited-x/v3/> .
@prefix manifest: <https://w3id.org/ascs-ev/envited-x/manifest/v5/> .
@prefix georeference: <https://w3id.org/ascs-ev/envited-x/georeference/v5/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix openlabel: <https://openlabel.asam.net/V1-0-0/ontologies/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
# The Shapes Graph URI appends "/shapes" to the Ontology URI
<https://w3id.org/ascs-ev/envited-x/hdmap/v5/shapes>
a owl:Ontology ;
# The Shapes Graph must import the Domain Ontology
owl:imports <https://w3id.org/ascs-ev/envited-x/hdmap/v5> .
hdmap:HdMapShape a sh:NodeShape ;
sh:closed false ;
sh:targetClass hdmap:HdMap ;
# 1) hasResourceDescription
sh:property [
sh:path hdmap:hasResourceDescription ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:or (
[ sh:node envited-x:ResourceDescriptionShape ]
[ sh:and ( manifest:LinkShape envited-x:ExtendedLinkShape ) ]
) ;
sh:message "Each HD map must have exactly one associated ResourceDescription (either inline conforming to envited-x:ResourceDescriptionShape or a valid manifest:Link)."@en ;
] ;
# 2) hasDomainSpecification
sh:property [
sh:path hdmap:hasDomainSpecification ;
sh:node hdmap:DomainSpecificationShape ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:message "Each HD map must have one associated DomainSpecification object with format, content, quantity, quality, dataSource, and georeference."@en ;
] ;
# 3) hasManifest
sh:property [
sh:path hdmap:hasManifest ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:or (
# Case 1: Inline manifest node (Validates against standard Manifest rules)
[ sh:and ( manifest:ManifestShape envited-x:ManifestShape ) ]
# Case 2: Linked manifest reference (Validates the link itself)
[ sh:node envited-x:ManifestLinkReferenceShape ]
) ;
sh:message "Each HD map must have exactly one manifest. If linked, it must be a valid envited-x link specifically of category envited-x:isManifest and include a manifest:iri."@en ;
] .
hdmap:DomainSpecificationShape a sh:NodeShape ;
sh:closed false ;
sh:property
[
sh:maxCount 1 ;
sh:minCount 1 ;
sh:node hdmap:FormatShape ;
sh:name "format object"@en ;
sh:description "Contains properties to describe the format of the HD map asset."@en ;
sh:order 1 ;
sh:path hdmap:hasFormat
],
[
sh:minCount 1 ;
sh:node hdmap:ContentOrOddSceneryShape ; # Refactored to use the Union Shape
sh:message "Each item of hasContent must conform to either Scenario Content or OpenLABEL ODD Scenery."@en ;
sh:name "content object"@en ;
sh:description "Defines the content (road types, lane types, object types, traffic direction) of the HD map asset."@en ;
sh:order 2 ;
sh:path hdmap:hasContent
],
[
sh:maxCount 1 ;
sh:minCount 1 ;
sh:node hdmap:QuantityShape ;
sh:name "quantity object"@en ;
sh:description "Contains properties to describe the quantity of the HD map asset."@en ;
sh:order 3 ;
sh:path hdmap:hasQuantity
],
[
sh:maxCount 1 ;
sh:minCount 1 ;
sh:node hdmap:QualityShape ;
sh:name "quality object"@en ;
sh:description "Contains properties to describe the accuracy of the HD map asset."@en ;
sh:order 4 ;
sh:path hdmap:hasQuality
],
[
sh:maxCount 1 ;
sh:minCount 1 ;
sh:node hdmap:DataSourceShape ;
sh:name "dataSource object"@en ;
sh:description "Defines which data resources or measurement systems were used to create the HD map asset."@en ;
sh:order 5 ;
sh:path hdmap:hasDataSource
],
[
sh:maxCount 1 ;
sh:minCount 1 ;
sh:node georeference:GeoreferenceShape ;
sh:name "has georeference"@en ;
sh:message "Each HD map must link to a georeference dataset defining the location/projection of the HD map asset."@en ;
sh:order 6 ;
sh:path hdmap:hasGeoreference ;
] ;
sh:targetClass hdmap:DomainSpecification .
hdmap:ContentOrOddSceneryShape a sh:NodeShape ;
sh:description "HDMap Content or OpenLABEL ODD Scenery Union Shape"@en ;
sh:or (
[ sh:node hdmap:ContentShape ]
[ sh:node openlabel:OddShape ] # Validates against the external OpenLABEL shape
[ sh:node xsd:boolean ]
) ;
sh:message "Each item of hasContent must conform to either Scenario Content or OpenLABEL Tag."@en .
hdmap:ContentShape a sh:NodeShape ;
sh:closed false ;
sh:targetClass hdmap:Content ;
sh:property [ skos:example "[motorway, rural]" ;
sh:description "Lists the road types used in the HD map asset."@en ;
sh:in ("bicycle" "lowSpeed" "motorway" "pedestrian" "rural" "townArterial" "townCollector" "townExpressway" "townLocal" "townPlayStreet" "townPrivate" "town" "unknown") ;
sh:message "Validation of roadTypes failed!"@en ;
sh:name "road types"@en ;
sh:order 0 ;
sh:path hdmap:roadTypes ],
[ skos:example "shoulder, curb, ..." ;
sh:description "Lists the lanes types used in the HD map asset."@en ;
sh:in ("biking" "border" "connectingRamp" "curb" "driving" "entry" "exit" "median" "none" "offRamp" "onRamp" "parking" "restricted" "shoulder" "slipLane" "stop" "walking") ;
sh:message "Validation of laneTypes failed!"@en ;
sh:name "lane types"@en ;
sh:order 1 ;
sh:path hdmap:laneTypes ],
[ skos:example "trees, street lamps, road patches, ..." ;
sh:description "Lists the object types used in the HD map asset."@en ;
sh:in ("barrier" "bike" "building" "bus" "car" "crosswalk" "gantry" "motorbike") ;
sh:message "Validation of levelOfDetail failed!"@en ;
sh:name "level of detail"@en ;
sh:order 2 ;
sh:path hdmap:levelOfDetail ],
[ skos:example "right-hand traffic" ;
sh:description "Indicates whether the HD map is designed for left or right-hand traffic."@en ;
sh:in ("left-hand" "right-hand") ;
sh:maxCount 1 ;
sh:message "Validation of trafficDirection failed!"@en ;
sh:name "traffic direction"@en ;
sh:order 3 ;
sh:path hdmap:trafficDirection ] .
hdmap:DataSourceShape a sh:NodeShape ;
sh:closed false ;
sh:targetClass hdmap:DataSource ;
sh:property [ skos:example "3DMS system, Trimble xyz, Riegl xyz" ;
sh:datatype xsd:string ;
sh:description "Specifies the name of the primary acquisition device."@en ;
sh:maxCount 1 ;
sh:message "Validation of measurementSystem failed!"@en ;
sh:name "measurement system"@en ;
sh:order 1 ;
sh:path hdmap:measurementSystem ],
[ skos:example "scanner, camera, osm network, aerial images, ..." ;
sh:datatype xsd:string ;
sh:description "Indicates the source data used to create the HD map."@en ;
sh:message "Validation of usedDataSources failed!"@en ;
sh:name "used data sources"@en ;
sh:order 0 ;
sh:path hdmap:usedDataSources ] .
hdmap:FormatShape a sh:NodeShape ;
sh:closed false ;
sh:targetClass hdmap:Format ;
sh:property [ skos:example "1.8.1" ;
sh:datatype xsd:string ;
sh:description "Defines the version of the data format used for the HD map asset."@en ;
sh:maxCount 1 ;
sh:message "Validation of version failed!"@en ;
sh:name "version"@en ;
sh:order 1 ;
sh:path hdmap:version ],
[ skos:example "ASAM OpenDRIVE" ;
sh:datatype xsd:string ;
sh:description "Defines the type of data format used for the HD map asset."@en ;
sh:in ("ASAM OpenDRIVE" "Lanelet" "Road5" "Shape" "road2sim" "roadXML") ;
sh:maxCount 1 ;
sh:message "Validation of type failed!"@en ;
sh:name "type"@en ;
sh:order 0 ;
sh:path hdmap:formatType ] .
hdmap:QualityShape a sh:NodeShape ;
sh:closed false ;
sh:targetClass hdmap:Quality ;
sh:property [ skos:example "0.1" ;
sh:datatype xsd:float ;
sh:description "Specifies the accuracy of traffic-relevant signals, signs and objects in metres."@en ;
sh:maxCount 1 ;
sh:message "Validation of accuracySignals failed!"@en ;
sh:minCount 0 ;
sh:name "accuracy signals"@en ;
sh:order 3 ;
sh:path hdmap:accuracySignals ],
[ skos:example "0.1" ;
sh:datatype xsd:float ;
sh:description "Specifies the accuracy, in metres, of objects within the traffic area that do not directly affect traffic."@en ;
sh:maxCount 1 ;
sh:message "Validation of accuracyObjects failed!"@en ;
sh:minCount 0 ;
sh:name "accuracy objects"@en ;
sh:order 4 ;
sh:path hdmap:accuracyObjects ],
[ skos:example "0.1" ;
sh:datatype xsd:float ;
sh:description "Specifies the accuracy of the lane model's height in metres."@en ;
sh:maxCount 1 ;
sh:message "Validation of accuracyLaneModelHeight failed!"@en ;
sh:minCount 0 ;
sh:name "accuracy lane model height"@en ;
sh:order 2 ;
sh:path hdmap:accuracyLaneModelHeight ],
[ skos:example "0.01" ;
sh:datatype xsd:float ;
sh:description "Specifies the relative precision of the measured road network in metres."@en ;
sh:maxCount 1 ;
sh:message "Validation of precision failed!"@en ;
sh:minCount 0 ;
sh:name "precision"@en ;
sh:order 0 ;
sh:path hdmap:precision ],
[ skos:example "0.1" ;
sh:datatype xsd:float ;
sh:description "Specifies the accuracy of the lane model in the 2D plane in metres."@en ;
sh:maxCount 1 ;
sh:message "Validation of accuracyLaneModel2d failed!"@en ;
sh:minCount 0 ;
sh:name "accuracy lane model 2d"@en ;
sh:order 1 ;
sh:path hdmap:accuracyLaneModel2d ] .
hdmap:QuantityShape a sh:NodeShape ;
sh:closed false ;
sh:targetClass hdmap:Quantity ;
sh:property [ skos:example "5" ;
sh:datatype xsd:integer ;
sh:minInclusive 0 ;
sh:description "Specifies the total number of intersections defined in the HD map."@en ;
sh:maxCount 1 ;
sh:message "Validation of numberIntersections failed!"@en ;
sh:name "number intersections"@en ;
sh:order 2 ;
sh:path hdmap:numberIntersections ],
[ skos:example "0" ;
sh:datatype xsd:integer ;
sh:minInclusive 0 ;
sh:description "Specifies the number of all traffic lights defined in the HD map."@en ;
sh:maxCount 1 ;
sh:message "Validation of numberTrafficLights failed!"@en ;
sh:name "number traffic lights"@en ;
sh:order 3 ;
sh:path hdmap:numberTrafficLights ],
[ skos:example "20.3" ;
sh:datatype xsd:float ;
sh:description "Indicates the distance (in metres) to which the area beyond the traffic area has been modeled."@en ;
sh:maxCount 1 ;
sh:message "Validation of rangeOfModeling failed!"@en ;
sh:minCount 0 ;
sh:name "range of modeling"@en ;
sh:order 8 ;
sh:path hdmap:rangeOfModeling ],
[ skos:example "100" ;
sh:datatype xsd:integer ;
sh:minInclusive 0 ;
sh:description "Specifies the number of all outline objects defined in the HD map."@en ;
sh:maxCount 1 ;
sh:message "Validation of numberOutlines failed!"@en ;
sh:name "number outlines"@en ;
sh:order 6 ;
sh:path hdmap:numberOutlines ],
[ skos:example "[10,50] km/h" ;
sh:description "Specifies the range of speed limits defined in the HD map."@en ;
sh:maxCount 1 ;
sh:message "Validation of speedLimit failed!"@en ;
sh:name "speed limit"@en ;
sh:node hdmap:Range2DShape ;
sh:order 7 ;
sh:path hdmap:speedLimit ],
[ skos:example "40.0" ;
sh:datatype xsd:float ;
sh:description "Defines the total length (sum of road lengths) of the road network in kilometres."@en ;
sh:maxCount 1 ;
sh:message "Validation of length failed!"@en ;
sh:name "length"@en ;
sh:order 0 ;
sh:path hdmap:length ],
[ skos:example "2.22" ;
sh:datatype xsd:float ;
sh:description "Specifies the difference between the maximum and minimum height of the road elevation profiles in metres."@en ;
sh:maxCount 1 ;
sh:message "Validation of elevationRange failed!"@en ;
sh:name "elevation range"@en ;
sh:order 1 ;
sh:path hdmap:elevationRange ],
[ skos:example "200" ;
sh:datatype xsd:integer ;
sh:minInclusive 0 ;
sh:description "Specifies the number of all objects in the HD map."@en ;
sh:maxCount 1 ;
sh:message "Validation of numberObjects failed!"@en ;
sh:name "number objects"@en ;
sh:order 5 ;
sh:path hdmap:numberObjects ],
[ skos:example "155" ;
sh:datatype xsd:integer ;
sh:minInclusive 0 ;
sh:description "Specifies the number of all traffic signs (signals) in the HD map."@en ;
sh:maxCount 1 ;
sh:message "Validation of numberTrafficSigns failed!"@en ;
sh:name "number traffic signs"@en ;
sh:order 4 ;
sh:path hdmap:numberTrafficSigns ] .
hdmap:Range2DShape a sh:NodeShape ;
sh:closed false ;
sh:targetClass hdmap:Range2D ;
sh:property [
sh:datatype xsd:float ;
sh:description "The maximum value of the range."@en ;
sh:message "Validation of max failed! Max should be greater than min."@en ;
sh:name "max"@en ;
sh:order 1 ;
sh:path hdmap:max
],
[
sh:datatype xsd:float ;
# [IMPROVEMENT] Added actual logic to enforce that Min <= Max
sh:lessThanOrEquals hdmap:max ;
sh:description "The minimum value of the range."@en ;
sh:message "Validation of min failed! Min should be less than or equal to max."@en ;
sh:name "min"@en ;
sh:order 0 ;
sh:path hdmap:min
] .