From ff1d5b3e084d60d925a4b0dc1ffff61628836e97 Mon Sep 17 00:00:00 2001 From: Brad Richardson Date: Thu, 30 May 2024 16:07:26 -0400 Subject: [PATCH] Segment restructure (#203) * Flatten road wip * Flatten road wip * Fixes and update examples * Fix and add descriptions * Update docs, add deprecation comments * Fix bad merge, separate segment and conditional road properties --------- Co-authored-by: Brad Richardson --- .../road/bad-road-flags-duplicate-flag.json | 5 + .../road/bad-road-flags-invalid-flag.json | 5 + ...ad-road-flags-invalid-is_private-flag.json | 5 + .../bad-road-flags-invalid-string-value.json | 4 +- .../bad-road-invalid-min-occupancy-value.json | 18 +- .../road/bad-road-invalid-min-occupancy.json | 21 + .../bad-road-invalid-temporal-scoping.json | 13 +- .../road/bad-road-level-invalid-value.yaml | 4 +- ...bad-road-level-unsupported-properties.yaml | 5 +- .../bad-road-surface-invalid-rule-value.json | 5 + .../restrictions/access/bad-access-mode.yaml | 10 +- .../bad-access-restrictions-vehicle.yaml | 7 +- .../bad-access-unsupported-properties.yaml | 10 +- .../bad-sequence-duplicate-entry.yaml | 9 +- .../bad-sequence-empty.yaml | 5 +- .../missing-final-heading.yaml | 6 +- .../unsupported-properties.yaml | 12 +- .../bad-speed-limits-empty-rule.json | 3 + .../bad-speed-limits-invalid-type.json | 1 + .../speed_limits/bad-speed-limits-mode.yaml | 8 +- .../docs/schema/attributes/scoping-rules.mdx | 15 +- .../attributes/transportation/roads.mdx | 53 +-- .../transportation/travel-modes.mdx | 2 +- .../access-restriction-01-blanket.yaml | 4 +- ...estriction-02-private-with-deliveries.yaml | 10 +- ...on-03-motor-vehicles-destination-only.yaml | 7 +- .../access-restriction-04-axle-limit.yaml | 15 +- .../docusaurus/access-restriction.yaml | 5 +- .../docusaurus/geometric-scoping.yaml | 11 +- .../docusaurus/lanes-absolute-form.yaml | 6 +- .../transportation/docusaurus/lanes-hov.yaml | 27 +- .../lanes-resolution-segment-01.yaml | 12 +- .../lanes-resolution-segment-02.yaml | 6 +- .../docusaurus/lanes-rule-form.yaml | 12 +- .../docusaurus/simple-road.yaml | 8 +- .../docusaurus/speed-limits-01-simple.yaml | 6 +- .../speed-limits-02-directional.yaml | 8 +- .../speed-limits-03-variable-max.yaml | 7 +- .../subjective-heading-scoping.yaml | 9 +- .../docusaurus/subjective-status-scoping.yaml | 6 +- .../subjective-usage-purpose-scoping.yaml | 6 +- ...subjective-vehicle-attributes-scoping.yaml | 17 +- .../docusaurus/temporal-scoping.yaml | 7 +- .../turn-restriction-01-source.yaml | 8 +- .../turn-restriction-02-source.yaml | 14 +- .../turn-restriction-02-target.yaml | 4 +- .../docusaurus/turn-restriction-02-via.yaml | 4 +- .../road/lanes/lanes-flow-alternating.yaml | 9 +- .../road/lanes/lanes-flow-reversible.yaml | 19 +- .../road/lanes/lanes-on-straight-road-lr.yaml | 33 +- .../segment/road/lanes/lanes-temporal.yaml | 8 +- .../lanes-access-for-travel-modes.yaml | 35 +- .../restrictions/lanes-access-with-lr.yaml | 22 +- .../lanes-hov-occupancy-scoped.yaml | 28 +- .../road/lanes/restrictions/lanes-hov.yaml | 27 +- .../restrictions/lanes-speed-limits.yaml | 47 ++- .../road-restrictions-access.yaml | 85 +++- ...d-restrictions-prohibited-transitions.yaml | 109 +++++- .../road-restrictions-speed-limits.yaml | 89 ++++- .../segment/road/road-abandoned.yaml | 6 +- .../segment/road/road-acesss-restriction.yaml | 25 +- .../segment/road/road-alley.yaml | 6 +- .../segment/road/road-covered.yaml | 6 +- .../segment/road/road-level.yaml | 7 +- .../segment/road/road-oneway-no-lanes.yaml | 7 +- .../segment/road/road-oneway-with-lanes.yaml | 8 +- .../segment/road/road-with-lr-width.yaml | 7 +- .../transportation/segment/road/road.yaml | 46 ++- .../transportation/segment/road/sidewalk.yaml | 4 +- schema/transportation/segment.yaml | 368 ++++++++++-------- 70 files changed, 1152 insertions(+), 294 deletions(-) diff --git a/counterexamples/transportation/segment/road/bad-road-flags-duplicate-flag.json b/counterexamples/transportation/segment/road/bad-road-flags-duplicate-flag.json index fbbab7fd..2b011d76 100644 --- a/counterexamples/transportation/segment/road/bad-road-flags-duplicate-flag.json +++ b/counterexamples/transportation/segment/road/bad-road-flags-duplicate-flag.json @@ -15,6 +15,11 @@ "update_time": "2024-03-14T08:05:36-08:00", "subtype": "road", "class": "primary", + "road_flags": [ + { + "values": ["is_tunnel", "is_tunnel"] + } + ], "road": { "flags": [ { diff --git a/counterexamples/transportation/segment/road/bad-road-flags-invalid-flag.json b/counterexamples/transportation/segment/road/bad-road-flags-invalid-flag.json index de727cf9..620c4287 100644 --- a/counterexamples/transportation/segment/road/bad-road-flags-invalid-flag.json +++ b/counterexamples/transportation/segment/road/bad-road-flags-invalid-flag.json @@ -15,6 +15,11 @@ "update_time": "2024-03-14T08:08:07-08:00", "subtype": "road", "class": "primary", + "road_flags": [ + { + "values": ["foo"] + } + ], "road": { "flags": [ { diff --git a/counterexamples/transportation/segment/road/bad-road-flags-invalid-is_private-flag.json b/counterexamples/transportation/segment/road/bad-road-flags-invalid-is_private-flag.json index b4dd5071..4e2d7c75 100644 --- a/counterexamples/transportation/segment/road/bad-road-flags-invalid-is_private-flag.json +++ b/counterexamples/transportation/segment/road/bad-road-flags-invalid-is_private-flag.json @@ -12,6 +12,11 @@ "update_time": "2024-03-14T08:08:17-08:00", "subtype": "road", "class": "primary", + "road_flags": [ + { + "values": ["is_private"] + } + ], "road": { "flags": [ { diff --git a/counterexamples/transportation/segment/road/bad-road-flags-invalid-string-value.json b/counterexamples/transportation/segment/road/bad-road-flags-invalid-string-value.json index c32e64cf..9263b26c 100644 --- a/counterexamples/transportation/segment/road/bad-road-flags-invalid-string-value.json +++ b/counterexamples/transportation/segment/road/bad-road-flags-invalid-string-value.json @@ -7,7 +7,8 @@ }, "properties": { "ext_expected_errors": [ - "[I#/properties/road/flags/0] [S#/$defs/propertyDefinitions/road/properties/flags/items/type] expected object, but got string" + "[I#/properties/road/flags/0] [S#/$defs/propertyDefinitions/road/properties/flags/items/type] expected object, but got string", + "[I#/properties/road_flags/0] [S#/$defs/propertyDefinitions/road/road_flags/items/type] expected object, but got string" ], "theme": "transportation", "type": "segment", @@ -15,6 +16,7 @@ "update_time": "2024-03-14T08:08:27-08:00", "subtype": "road", "class": "primary", + "road_flags": ["is_tunnel"], "road": { "flags": ["is_tunnel"] } diff --git a/counterexamples/transportation/segment/road/bad-road-invalid-min-occupancy-value.json b/counterexamples/transportation/segment/road/bad-road-invalid-min-occupancy-value.json index fbbe001d..84b04499 100644 --- a/counterexamples/transportation/segment/road/bad-road-invalid-min-occupancy-value.json +++ b/counterexamples/transportation/segment/road/bad-road-invalid-min-occupancy-value.json @@ -12,6 +12,23 @@ "update_time": "2024-03-14T08:08:38-08:00", "subtype": "road", "class": "primary", + "road_flags": [ + { + "values": ["is_tunnel"] + } + ], + "lanes": [ + { + "value": [ + { + "direction": "backward", + "restrictions": { + "min_occupancy": 0 + } + } + ] + } + ], "road": { "flags": [ { @@ -30,7 +47,6 @@ ] } ] - }, "ext_expected_errors": [ "[I#/properties/road/lanes/0/value/0/restrictions/min_occupancy] [S#/$defs/propertyDefinitions/lane/properties/restrictions/properties/min_occupancy/minimum] must be >= 1 but found 0" diff --git a/counterexamples/transportation/segment/road/bad-road-invalid-min-occupancy.json b/counterexamples/transportation/segment/road/bad-road-invalid-min-occupancy.json index 9aab9aaa..014b4ed9 100644 --- a/counterexamples/transportation/segment/road/bad-road-invalid-min-occupancy.json +++ b/counterexamples/transportation/segment/road/bad-road-invalid-min-occupancy.json @@ -12,6 +12,27 @@ "update_time": "2024-03-14T08:08:37-08:00", "subtype": "road", "class": "primary", + "road_flags": [ + { + "values": ["is_tunnel"] + } + ], + "lanes": [ + { + "value": [ + { + "direction": "forward", + "restrictions": { + "min_occupancy": [ + { + "is_at_least": 3 + } + ] + } + } + ] + } + ], "road": { "flags": [ { diff --git a/counterexamples/transportation/segment/road/bad-road-invalid-temporal-scoping.json b/counterexamples/transportation/segment/road/bad-road-invalid-temporal-scoping.json index a68e0d6b..6efdb7f9 100644 --- a/counterexamples/transportation/segment/road/bad-road-invalid-temporal-scoping.json +++ b/counterexamples/transportation/segment/road/bad-road-invalid-temporal-scoping.json @@ -12,6 +12,14 @@ "update_time": "2024-03-14T08:08:39-08:00", "subtype": "road", "class": "primary", + "road_flags": [ + { + "values": ["is_bridge"] + } + ], + "when": { + "during": "Mo-Sa 09:00-12:00, We 15:00-18:00" + }, "road": { "flags": [ { @@ -23,7 +31,8 @@ } }, "ext_expected_errors": [ - "[I#/properties/road/when] [S#/$defs/propertyDefinitions/road/unevaluatedProperties] not allowed" + "[I#/properties/road/when] [S#/$defs/propertyDefinitions/road/unevaluatedProperties] not allowed", + "[I#/properties/when] [S#/$defs/propertyDefinitions/unevaluatedProperties] not allowed" ] } -} +} diff --git a/counterexamples/transportation/segment/road/bad-road-level-invalid-value.yaml b/counterexamples/transportation/segment/road/bad-road-level-invalid-value.yaml index ef4daa9e..d0e1d648 100644 --- a/counterexamples/transportation/segment/road/bad-road-level-invalid-value.yaml +++ b/counterexamples/transportation/segment/road/bad-road-level-invalid-value.yaml @@ -12,7 +12,9 @@ properties: subtype: road class: secondary connector_ids: [fooConnector, barConnector] - road: + level_rules: + - value: 1.5 + road: # The `road` property is deprecated and will be removed in the 2024-07 release level: - value: 1.5 ext_expected_errors: diff --git a/counterexamples/transportation/segment/road/bad-road-level-unsupported-properties.yaml b/counterexamples/transportation/segment/road/bad-road-level-unsupported-properties.yaml index 09cf08ef..17552ebc 100644 --- a/counterexamples/transportation/segment/road/bad-road-level-unsupported-properties.yaml +++ b/counterexamples/transportation/segment/road/bad-road-level-unsupported-properties.yaml @@ -12,7 +12,10 @@ properties: subtype: road class: secondary connector_ids: [fooConnector, barConnector] - road: + level_rules: + - value: 1 + foo: bar + road: # The `road` property is deprecated and will be removed in the 2024-07 release level: - value: 1 foo: bar diff --git a/counterexamples/transportation/segment/road/bad-road-surface-invalid-rule-value.json b/counterexamples/transportation/segment/road/bad-road-surface-invalid-rule-value.json index 6c2758fa..e175c22c 100644 --- a/counterexamples/transportation/segment/road/bad-road-surface-invalid-rule-value.json +++ b/counterexamples/transportation/segment/road/bad-road-surface-invalid-rule-value.json @@ -12,6 +12,11 @@ "update_time": "2024-03-14T08:08:49-08:00", "subtype": "road", "class": "primary", + "road_surface": [ + { + "value": "hot mess" + } + ], "road": { "surface": [ { diff --git a/counterexamples/transportation/segment/road/restrictions/access/bad-access-mode.yaml b/counterexamples/transportation/segment/road/restrictions/access/bad-access-mode.yaml index 9bf247a5..b63aca59 100644 --- a/counterexamples/transportation/segment/road/restrictions/access/bad-access-mode.yaml +++ b/counterexamples/transportation/segment/road/restrictions/access/bad-access-mode.yaml @@ -17,9 +17,15 @@ properties: subtype: road class: secondary connector_ids: [fooConnector, barConnector] - road: + road_surface: gravel + road_flags: + - [is_link, is_tunnel] + access_restrictions: + - access_type: allowed + when: {mode: [foo]} + road: # The `road` property is deprecated and will be removed in the 2024-07 release surface: gravel - flags: + flags: - [is_link, is_tunnel] restrictions: access: diff --git a/counterexamples/transportation/segment/road/restrictions/access/bad-access-restrictions-vehicle.yaml b/counterexamples/transportation/segment/road/restrictions/access/bad-access-restrictions-vehicle.yaml index 9b21002d..e703bffa 100644 --- a/counterexamples/transportation/segment/road/restrictions/access/bad-access-restrictions-vehicle.yaml +++ b/counterexamples/transportation/segment/road/restrictions/access/bad-access-restrictions-vehicle.yaml @@ -15,7 +15,10 @@ properties: subtype: road class: secondary connector_ids: [fooConnector, barConnector] - road: + access_restrictions: + - access_type: allowed + when: {vehicle: {axle_count: {is_foo: 5}}} + road: # The `road` property is deprecated and will be removed in the 2024-07 release restrictions: access: - access_type: allowed @@ -23,3 +26,5 @@ properties: ext_expected_errors: - "[I#/properties/road/restrictions/access/0/when/vehicle/axle_count] [S#/$defs/propertyDefinitions/integerRelation/oneOf] oneOf failed" - "[I#/properties/road/restrictions/access/0/when/vehicle/axle_count/is_foo] [S#/$defs/propertyDefinitions/integerRelation/unevaluatedProperties] not allowed" + - "[I#/properties/road/access_restrictions/0/when/vehicle/axle_count] [S#/$defs/propertyDefinitions/integerRelation/oneOf] oneOf failed" + - "[I#/properties/road/access_restrictions/0/when/vehicle/axle_count/is_foo] [S#/$defs/propertyDefinitions/integerRelation/unevaluatedProperties] not allowed" diff --git a/counterexamples/transportation/segment/road/restrictions/access/bad-access-unsupported-properties.yaml b/counterexamples/transportation/segment/road/restrictions/access/bad-access-unsupported-properties.yaml index 7bc7ceb4..b04d6667 100644 --- a/counterexamples/transportation/segment/road/restrictions/access/bad-access-unsupported-properties.yaml +++ b/counterexamples/transportation/segment/road/restrictions/access/bad-access-unsupported-properties.yaml @@ -10,7 +10,12 @@ properties: class: tertiary version: 1 update_time: "2024-03-14T08:10:55-08:00" - road: + access_restrictions: + - foo: bar + - access_type: denied + when: + baz: qux + road: # The `road` property is deprecated and will be removed in the 2024-07 release restrictions: access: - foo: bar @@ -21,3 +26,6 @@ properties: - "[I#/properties/road/restrictions/access/0] [S#/$defs/propertyContainers/accessContainer/items/required] missing properties: 'access_type'" - "[I#/properties/road/restrictions/access/0/foo] [S#/$defs/propertyContainers/accessContainer/items/unevaluatedProperties] not allowed" - "[I#/properties/road/restrictions/access/1/when/baz] [S#/$defs/propertyContainers/accessContainer/items/properties/when/unevaluatedProperties] not allowed" + - "[I#/properties/access/0] [S#/$defs/propertyContainers/accessContainer/items/required] missing properties: 'access_type'" + - "[I#/properties/access/0/foo] [S#/$defs/propertyContainers/accessContainer/items/unevaluatedProperties] not allowed" + - "[I#/properties/access/1/when/baz] [S#/$defs/propertyContainers/accessContainer/items/properties/when/unevaluatedProperties] not allowed" diff --git a/counterexamples/transportation/segment/road/restrictions/prohibited_transitions/bad-sequence-duplicate-entry.yaml b/counterexamples/transportation/segment/road/restrictions/prohibited_transitions/bad-sequence-duplicate-entry.yaml index 6c38d4ec..44704a86 100644 --- a/counterexamples/transportation/segment/road/restrictions/prohibited_transitions/bad-sequence-duplicate-entry.yaml +++ b/counterexamples/transportation/segment/road/restrictions/prohibited_transitions/bad-sequence-duplicate-entry.yaml @@ -13,7 +13,14 @@ properties: class: primary connector_ids: - overture:transportation:example:connector:1 - road: + prohibited_transitions: + - sequence: + - segment_id: foo + connector_id: bar + - segment_id: foo + connector_id: bar + final_heading: forward + road: # The `road` property is deprecated and will be removed in the 2024-07 release restrictions: prohibited_transitions: - sequence: diff --git a/counterexamples/transportation/segment/road/restrictions/prohibited_transitions/bad-sequence-empty.yaml b/counterexamples/transportation/segment/road/restrictions/prohibited_transitions/bad-sequence-empty.yaml index 34ad0d0c..60a823bd 100644 --- a/counterexamples/transportation/segment/road/restrictions/prohibited_transitions/bad-sequence-empty.yaml +++ b/counterexamples/transportation/segment/road/restrictions/prohibited_transitions/bad-sequence-empty.yaml @@ -13,7 +13,10 @@ properties: class: primary connector_ids: - overture:transportation:example:connector:1 - road: + prohibited_transitions: + - sequence: [] + final_heading: forward + road: # The `road` property is deprecated and will be removed in the 2024-07 release restrictions: prohibited_transitions: - sequence: [] diff --git a/counterexamples/transportation/segment/road/restrictions/prohibited_transitions/missing-final-heading.yaml b/counterexamples/transportation/segment/road/restrictions/prohibited_transitions/missing-final-heading.yaml index de6f5120..6f92bcbe 100644 --- a/counterexamples/transportation/segment/road/restrictions/prohibited_transitions/missing-final-heading.yaml +++ b/counterexamples/transportation/segment/road/restrictions/prohibited_transitions/missing-final-heading.yaml @@ -13,7 +13,11 @@ properties: class: primary connector_ids: - overture:transportation:example:connector:1 - road: + prohibited_transitions: + - sequence: + - segment_id: foo + connector_id: bar + road: # The `road` property is deprecated and will be removed in the 2024-07 release restrictions: prohibited_transitions: - sequence: diff --git a/counterexamples/transportation/segment/road/restrictions/prohibited_transitions/unsupported-properties.yaml b/counterexamples/transportation/segment/road/restrictions/prohibited_transitions/unsupported-properties.yaml index cbb04b97..13caecea 100644 --- a/counterexamples/transportation/segment/road/restrictions/prohibited_transitions/unsupported-properties.yaml +++ b/counterexamples/transportation/segment/road/restrictions/prohibited_transitions/unsupported-properties.yaml @@ -10,7 +10,15 @@ properties: class: residential version: 1 update_time: "2024-03-14T08:12:00-08:00" - road: + prohibited_transitions: + - sequence: + - connector_id: connector1 + segment_id: segment1 + final_heading: backward + foo: bar + when: + baz: qux + road: # The `road` property is deprecated and will be removed in the 2024-07 release restrictions: prohibited_transitions: - sequence: @@ -23,3 +31,5 @@ properties: ext_expected_errors: - "[I#/properties/road/restrictions/prohibited_transitions/0/foo] [S#/$defs/propertyDefinitions/road/properties/restrictions/properties/prohibited_transitions/items/unevaluatedProperties] not allowed" - "[I#/properties/road/restrictions/prohibited_transitions/0/when/baz] [S#/$defs/propertyDefinitions/road/properties/restrictions/properties/prohibited_transitions/items/properties/when/unevaluatedProperties] not allowed" + - "[I#/properties/prohibited_transitions/0/foo] [S#/$defs/propertyDefinitions/restrictions/properties/prohibited_transitions/items/unevaluatedProperties] not allowed" + - "[I#/properties/prohibited_transitions/0/when/baz] [S#/$defs/propertyDefinitions/restrictions/properties/prohibited_transitions/items/properties/when/unevaluatedProperties] not allowed" diff --git a/counterexamples/transportation/segment/road/restrictions/speed_limits/bad-speed-limits-empty-rule.json b/counterexamples/transportation/segment/road/restrictions/speed_limits/bad-speed-limits-empty-rule.json index f01dbd6b..daca2f71 100644 --- a/counterexamples/transportation/segment/road/restrictions/speed_limits/bad-speed-limits-empty-rule.json +++ b/counterexamples/transportation/segment/road/restrictions/speed_limits/bad-speed-limits-empty-rule.json @@ -12,6 +12,9 @@ "update_time": "2024-03-14T08:25:53-08:00", "subtype": "road", "class": "primary", + "speed_limits": [ + {} + ], "road": { "restrictions": { "speed_limits": [ diff --git a/counterexamples/transportation/segment/road/restrictions/speed_limits/bad-speed-limits-invalid-type.json b/counterexamples/transportation/segment/road/restrictions/speed_limits/bad-speed-limits-invalid-type.json index 107f4552..b6070bb6 100644 --- a/counterexamples/transportation/segment/road/restrictions/speed_limits/bad-speed-limits-invalid-type.json +++ b/counterexamples/transportation/segment/road/restrictions/speed_limits/bad-speed-limits-invalid-type.json @@ -12,6 +12,7 @@ "update_time": "2024-03-14T08:14:05-08:00", "subtype": "road", "class": "primary", + "speed_limits": {}, "road": { "restrictions": { "speed_limits": {} diff --git a/counterexamples/transportation/segment/road/restrictions/speed_limits/bad-speed-limits-mode.yaml b/counterexamples/transportation/segment/road/restrictions/speed_limits/bad-speed-limits-mode.yaml index 6c6cfda2..f19e765c 100644 --- a/counterexamples/transportation/segment/road/restrictions/speed_limits/bad-speed-limits-mode.yaml +++ b/counterexamples/transportation/segment/road/restrictions/speed_limits/bad-speed-limits-mode.yaml @@ -9,6 +9,7 @@ properties: ext_baz: I am a custom user property... ext_expected_errors: - "[I#/properties/road/restrictions/speed_limits/0/when/mode/0] [S#/$defs/propertyDefinitions/travelMode/enum] value must be one of" + - "[I#/properties/speed_limits/0/when/mode/0] [S#/$defs/propertyDefinitions/travelMode/enum] value must be one of" # Overture properties theme: transportation type: segment @@ -17,7 +18,12 @@ properties: subtype: road class: secondary connector_ids: [fooConnector, barConnector] - road: + speed_limits: + - max_speed: + value: 110 + unit: mph + when: {mode: [foo]} + road: # The `road` property is deprecated and will be removed in the 2024-07 release restrictions: speed_limits: - max_speed: diff --git a/docusaurus/docs/schema/attributes/scoping-rules.mdx b/docusaurus/docs/schema/attributes/scoping-rules.mdx index 73e951ae..a42ebcd6 100644 --- a/docusaurus/docs/schema/attributes/scoping-rules.mdx +++ b/docusaurus/docs/schema/attributes/scoping-rules.mdx @@ -261,21 +261,13 @@ to privately-authorized individuals, such as condo unit owners: #### Vehicle attributes scoping - - Vehicle attribute scoping limits the scope of a parent value to apply only when the vehicle in use meets certain criteria. -The property construct `when: { vehicle: { ... } }` applies vehicle +The property construct `when: { vehicle: [{ dimension: ..., comparison: ..., value: ... }] }` applies vehicle attributes scoping to a parent value. Note that vehicle attribute scoping can overlap to some degree with @@ -284,7 +276,6 @@ rules may be scoped to the travel mode "heavy goods vehicle", while another equivalent access rule could be scoped to the vehicle attribute "gross vehicle weight". - - - -🐞 *There is an open issue with the schema that results in this example -not being fully functional in the current release. We are working to -correct it in an upcoming release.* 🐞 - { ExampleSpeedLimitsDirectional } @@ -369,12 +356,12 @@ correct it in an upcoming release.* 🐞 ## Lanes -A road may optionally carry a `road.lanes` property which, if present, contains +A road may optionally carry a `lanes` property which, if present, contains a list of rules that can be used to resolve the applicable traffic lane block for the road. A lane block is a list of lane objects. Each lane object in the block describes the physical structure and properties applicable to one the road's traffic lanes at a granularity sufficient to support the navigation use -case. Note that the `road.lanes` property applies to traffic lanes, not to +case. Note that the `lanes` property applies to traffic lanes, not to parking lanes. ### Use cases for lanes @@ -387,8 +374,8 @@ granular turn-by-turn or maneuver-by-maneuver navigation applications. ### Default lane structure -If the `road.lanes` property is omitted from a road segment, reasonable -default values should be assumed based on `road.class` and the +If the `lanes` property is omitted from a road segment, reasonable +default values should be assumed based on `class` and the road-level [access restrictions](#access-restrictions). For example, for a stock two-way road segment of class `primary` with no heading-scoped access restrictions, a reasonable assumption is two lanes, one @@ -556,7 +543,7 @@ to release soon. The traffic lane structure of a road segment can be different at different points along the segment, or at different times of the day, or both. Consequently, instead of having a static lane block, road segments carry a list of lane block [rules](/schema/attributes/scoping-rules#rules-and-rule-based-properties) -in the optional `road.lanes` property. +in the optional `lanes` property. - A rule may be scoped [geometrically](/schema/attributes/scoping-rules#geometric-scoping-linear-referencing), which allows linear referencing to be used to specify the portion of the diff --git a/docusaurus/docs/schema/attributes/transportation/travel-modes.mdx b/docusaurus/docs/schema/attributes/transportation/travel-modes.mdx index ac5f8345..7480b816 100644 --- a/docusaurus/docs/schema/attributes/transportation/travel-modes.mdx +++ b/docusaurus/docs/schema/attributes/transportation/travel-modes.mdx @@ -75,7 +75,7 @@ Our criteria for recognizing a proposed new travel mode are: *intersects* with, other similar travel modes which are already recognized in the Overture schema. - the proposed new travel mode should preferably not be trivially - expressible using another existing [scoping property](/schema/attributes/scoping-rules#scoped-values-and-scoping-properties).(*An example of such a trivially-expressible concept might be a three-axle vehicle which is more appropriately phrased as `vehicle: { axle_count: { is_equal_to: 3 } }`.*) + expressible using another existing [scoping property](/schema/attributes/scoping-rules#scoped-values-and-scoping-properties).(*An example of such a trivially-expressible concept might be a three-axle vehicle which is more appropriately phrased as `vehicle: [{dimension: axle_count, comparison: equal_to, value: 3}]`.*) - the proposed new travel mode must be supported by existing data in at least one of Overture's upstream data sources. diff --git a/examples/transportation/docusaurus/access-restriction-01-blanket.yaml b/examples/transportation/docusaurus/access-restriction-01-blanket.yaml index 84c3f275..81a04b99 100644 --- a/examples/transportation/docusaurus/access-restriction-01-blanket.yaml +++ b/examples/transportation/docusaurus/access-restriction-01-blanket.yaml @@ -13,7 +13,9 @@ properties: update_time: "2024-03-13T16:34:44-08:00" subtype: road class: residential - road: + access_restrictions: + - access_type: denied + road: # The `road` property is deprecated and will be removed in the 2024-07 release restrictions: access: - access_type: denied diff --git a/examples/transportation/docusaurus/access-restriction-02-private-with-deliveries.yaml b/examples/transportation/docusaurus/access-restriction-02-private-with-deliveries.yaml index fa8338e0..84ac25f5 100644 --- a/examples/transportation/docusaurus/access-restriction-02-private-with-deliveries.yaml +++ b/examples/transportation/docusaurus/access-restriction-02-private-with-deliveries.yaml @@ -13,7 +13,15 @@ properties: update_time: "2024-03-14T16:32:53-08:00" subtype: road class: residential - road: + access_restrictions: + - access_type: denied + - access_type: allowed + when: { recognized: [as_private] } + - access_type: allowed + when: + using: [to_deliver] + during: Mo-Fr 08:30-16:30 + road: # The `road` property is deprecated and will be removed in the 2024-07 release restrictions: access: - access_type: denied diff --git a/examples/transportation/docusaurus/access-restriction-03-motor-vehicles-destination-only.yaml b/examples/transportation/docusaurus/access-restriction-03-motor-vehicles-destination-only.yaml index e3ae030f..c432bc2b 100644 --- a/examples/transportation/docusaurus/access-restriction-03-motor-vehicles-destination-only.yaml +++ b/examples/transportation/docusaurus/access-restriction-03-motor-vehicles-destination-only.yaml @@ -13,7 +13,12 @@ properties: update_time: "2024-03-13T16:34:51-08:00" subtype: road class: residential - road: + access_restrictions: + - access_type: denied + when: { mode: [motor_vehicle] } + - access_type: allowed + when: { using: [at_destination] } + road: # The `road` property is deprecated and will be removed in the 2024-07 release restrictions: access: - access_type: denied diff --git a/examples/transportation/docusaurus/access-restriction-04-axle-limit.yaml b/examples/transportation/docusaurus/access-restriction-04-axle-limit.yaml index 54e9ca00..4a679246 100644 --- a/examples/transportation/docusaurus/access-restriction-04-axle-limit.yaml +++ b/examples/transportation/docusaurus/access-restriction-04-axle-limit.yaml @@ -13,10 +13,21 @@ properties: update_time: "2024-03-13T16:35:17-08:00" subtype: road class: motorway - road: + access_restrictions: + - access_type: denied + when: + mode: [hgv] + vehicle: + - dimension: axle_count + comparison: greater_than_equal + value: 5 + road: # The `road` property is deprecated and will be removed in the 2024-07 release restrictions: access: - access_type: denied when: mode: [hgv] - vehicle: { axle_count: { is_at_least: 5 } } + vehicle: + - dimension: axle_count + comparison: greater_than_equal + value: 5 diff --git a/examples/transportation/docusaurus/access-restriction.yaml b/examples/transportation/docusaurus/access-restriction.yaml index 4941b60a..e9e1a455 100644 --- a/examples/transportation/docusaurus/access-restriction.yaml +++ b/examples/transportation/docusaurus/access-restriction.yaml @@ -22,7 +22,10 @@ properties: - overture:transportation:example:simple-road-connector-2 names: primary: SR 520 - road: + access_restrictions: + - access_type: denied + when: {mode: [foot]} + road: # The `road` property is deprecated and will be removed in the 2024-07 release surface: - value: paved restrictions: diff --git a/examples/transportation/docusaurus/geometric-scoping.yaml b/examples/transportation/docusaurus/geometric-scoping.yaml index 7cb2173f..f0582a25 100644 --- a/examples/transportation/docusaurus/geometric-scoping.yaml +++ b/examples/transportation/docusaurus/geometric-scoping.yaml @@ -11,7 +11,16 @@ properties: update_time: "2024-03-13T16:35:37-08:00" subtype: road class: primary - road: + speed_limits: + - between: [0, 0.15] + max_speed: + value: 100 + unit: km/h + - between: [0.15, 1] + max_speed: + value: 60 + unit: km/h + road: # The `road` property is deprecated and will be removed in the 2024-07 release restrictions: speed_limits: - between: [0, 0.15] diff --git a/examples/transportation/docusaurus/lanes-absolute-form.yaml b/examples/transportation/docusaurus/lanes-absolute-form.yaml index b9547d2e..38211906 100644 --- a/examples/transportation/docusaurus/lanes-absolute-form.yaml +++ b/examples/transportation/docusaurus/lanes-absolute-form.yaml @@ -13,7 +13,11 @@ properties: update_time: "2024-03-13T16:35:47-08:00" subtype: road class: secondary - road: + lanes: + - value: + - direction: backward + - direction: forward + road: # The `road` property is deprecated and will be removed in the 2024-07 release lanes: - value: - direction: backward diff --git a/examples/transportation/docusaurus/lanes-hov.yaml b/examples/transportation/docusaurus/lanes-hov.yaml index 337dace4..00ae4df1 100644 --- a/examples/transportation/docusaurus/lanes-hov.yaml +++ b/examples/transportation/docusaurus/lanes-hov.yaml @@ -15,7 +15,32 @@ properties: update_time: "2024-03-13T16:35:53-08:00" version: 2 class: secondary - road: + lanes: + # one-way road with access and speed limit restrictions + # digitization: S->N + # | | | | + # | | | | => max speeds: 100 km/h for whole segment + # | h | | | but on lane 2 is limited to 80 km/h for hgv vehicles + # | o | | | + # | v | | | + # | | | | + # | 0 | 1 | 2 | + - value: + - direction: forward # lane 0 -> hov only + restrictions: + access: + - access_type: allowed + when: + mode: + - hov + min_occupancy: 3 + - direction: forward # lane 1 + - direction: forward # lane 2 + speed_limits: + - max_speed: + value: 100 + unit: km/h + road: # The `road` property is deprecated and will be removed in the 2024-07 release restrictions: speed_limits: - max_speed: diff --git a/examples/transportation/docusaurus/lanes-resolution-segment-01.yaml b/examples/transportation/docusaurus/lanes-resolution-segment-01.yaml index dd5cc8cd..da0b72e0 100644 --- a/examples/transportation/docusaurus/lanes-resolution-segment-01.yaml +++ b/examples/transportation/docusaurus/lanes-resolution-segment-01.yaml @@ -14,7 +14,17 @@ properties: connector_ids: [lanes-resolution-example-connector] subtype: road class: motorway - road: + lanes: # A list of two geometrically-scoped rules for resolving the lane block. + - between: [0, 0.67] + value: + - direction: backward + - direction: forward + - direction: forward + - between: [0.67, 1] + value: + - direction: backward + - direction: forward + road: # The `road` property is deprecated and will be removed in the 2024-07 release lanes: # A list of two geometrically-scoped rules for resolving the lane block. - between: [0, 0.67] value: diff --git a/examples/transportation/docusaurus/lanes-resolution-segment-02.yaml b/examples/transportation/docusaurus/lanes-resolution-segment-02.yaml index fbfca776..997f3714 100644 --- a/examples/transportation/docusaurus/lanes-resolution-segment-02.yaml +++ b/examples/transportation/docusaurus/lanes-resolution-segment-02.yaml @@ -14,7 +14,11 @@ properties: connector_ids: [lanes-resolution-example-connector] subtype: road class: motorway - road: + lanes: + - value: # A lane block rule containing one globally-applicable lane block. + - direction: forward + - direction: backward + road: # The `road` property is deprecated and will be removed in the 2024-07 release lanes: - value: # A lane block rule containing one globally-applicable lane block. - direction: forward diff --git a/examples/transportation/docusaurus/lanes-rule-form.yaml b/examples/transportation/docusaurus/lanes-rule-form.yaml index 8c3c2150..b65a6ef4 100644 --- a/examples/transportation/docusaurus/lanes-rule-form.yaml +++ b/examples/transportation/docusaurus/lanes-rule-form.yaml @@ -15,7 +15,17 @@ properties: update_time: "2024-03-15T09:35:16-08:00" subtype: road class: primary - road: + lanes: + - value: + - direction: forward + - direction: forward + - when: {during: Mo-Fr 15:00-18:00} + value: + - direction: forward + - direction: forward + - direction: forward + - direction: forward + road: # The `road` property is deprecated and will be removed in the 2024-07 release lanes: - value: - direction: forward diff --git a/examples/transportation/docusaurus/simple-road.yaml b/examples/transportation/docusaurus/simple-road.yaml index 8915659e..cd18bf4f 100644 --- a/examples/transportation/docusaurus/simple-road.yaml +++ b/examples/transportation/docusaurus/simple-road.yaml @@ -19,7 +19,13 @@ properties: - overture:transportation:example:simple-road-connector-2 names: primary: Nicola Street - road: + lanes: + - value: + - direction: backward + - direction: forward + road_surface: + - value: paved + road: # The `road` property is deprecated and will be removed in the 2024-07 release surface: - value: paved lanes: diff --git a/examples/transportation/docusaurus/speed-limits-01-simple.yaml b/examples/transportation/docusaurus/speed-limits-01-simple.yaml index 0bd3751d..bd45c689 100644 --- a/examples/transportation/docusaurus/speed-limits-01-simple.yaml +++ b/examples/transportation/docusaurus/speed-limits-01-simple.yaml @@ -13,7 +13,11 @@ properties: update_time: "2024-03-13T16:36:53-08:00" subtype: road class: residential - road: + speed_limits: + - max_speed: + value: 30 + unit: km/h + road: # The `road` property is deprecated and will be removed in the 2024-07 release restrictions: speed_limits: - max_speed: diff --git a/examples/transportation/docusaurus/speed-limits-02-directional.yaml b/examples/transportation/docusaurus/speed-limits-02-directional.yaml index cceeefd8..d1c9b3e8 100644 --- a/examples/transportation/docusaurus/speed-limits-02-directional.yaml +++ b/examples/transportation/docusaurus/speed-limits-02-directional.yaml @@ -13,7 +13,13 @@ properties: update_time: "2024-03-13T16:36:56-08:00" subtype: road class: secondary - road: + speed_limits: + - max_speed: {value: 70, unit: "mph"} + - when: + mode: [hgv] + heading: forward + max_speed: {value: 65, unit: "mph"} + road: # The `road` property is deprecated and will be removed in the 2024-07 release restrictions: speed_limits: - max_speed: {value: 70, unit: "mph"} diff --git a/examples/transportation/docusaurus/speed-limits-03-variable-max.yaml b/examples/transportation/docusaurus/speed-limits-03-variable-max.yaml index 23c37c5a..86323d81 100644 --- a/examples/transportation/docusaurus/speed-limits-03-variable-max.yaml +++ b/examples/transportation/docusaurus/speed-limits-03-variable-max.yaml @@ -15,7 +15,12 @@ properties: update_time: "2024-03-13T16:36:57-08:00" subtype: road class: motorway - road: + speed_limits: + - max_speed: + value: 100 + unit: km/h + is_max_speed_variable: true + road: # The `road` property is deprecated and will be removed in the 2024-07 release restrictions: speed_limits: - max_speed: diff --git a/examples/transportation/docusaurus/subjective-heading-scoping.yaml b/examples/transportation/docusaurus/subjective-heading-scoping.yaml index b55a2afb..d5eac165 100644 --- a/examples/transportation/docusaurus/subjective-heading-scoping.yaml +++ b/examples/transportation/docusaurus/subjective-heading-scoping.yaml @@ -17,7 +17,14 @@ properties: update_time: "2024-03-13T16:37:21-08:00" subtype: road class: primary - road: + access_restrictions: + - access_type: denied + when: { heading: backward } + - access_type: allowed + when: + heading: backward + mode: [bus] + road: # The `road` property is deprecated and will be removed in the 2024-07 release restrictions: access: - access_type: denied diff --git a/examples/transportation/docusaurus/subjective-status-scoping.yaml b/examples/transportation/docusaurus/subjective-status-scoping.yaml index 7fadae3e..f181729b 100644 --- a/examples/transportation/docusaurus/subjective-status-scoping.yaml +++ b/examples/transportation/docusaurus/subjective-status-scoping.yaml @@ -14,7 +14,11 @@ properties: update_time: "2024-03-13T16:33:10-08:00" subtype: road class: tertiary - road: + access_restrictions: + - access_type: denied + - access_type: allowed + when: { recognized: [as_private] } + road: # The `road` property is deprecated and will be removed in the 2024-07 release restrictions: access: - access_type: denied diff --git a/examples/transportation/docusaurus/subjective-usage-purpose-scoping.yaml b/examples/transportation/docusaurus/subjective-usage-purpose-scoping.yaml index 7c4ca7e2..56d84cbf 100644 --- a/examples/transportation/docusaurus/subjective-usage-purpose-scoping.yaml +++ b/examples/transportation/docusaurus/subjective-usage-purpose-scoping.yaml @@ -13,7 +13,11 @@ properties: update_time: "2024-03-13T16:33:12-08:00" subtype: road class: tertiary - road: + access_restrictions: + - access_type: denied + - access_type: allowed + when: { using: [as_customer, at_destination] } + road: # The `road` property is deprecated and will be removed in the 2024-07 release restrictions: access: - access_type: denied diff --git a/examples/transportation/docusaurus/subjective-vehicle-attributes-scoping.yaml b/examples/transportation/docusaurus/subjective-vehicle-attributes-scoping.yaml index 4e3f8493..5f9b7941 100644 --- a/examples/transportation/docusaurus/subjective-vehicle-attributes-scoping.yaml +++ b/examples/transportation/docusaurus/subjective-vehicle-attributes-scoping.yaml @@ -14,8 +14,21 @@ properties: update_time: "2024-03-13T16:33:14-08:00" subtype: road class: residential - road: + access_restrictions: + - access_type: denied + when: + vehicle: + - dimension: weight + comparison: greater_than + value: 23 + unit: 't' + road: # The `road` property is deprecated and will be removed in the 2024-07 release restrictions: access: - access_type: denied - when: { vehicle: { weight: { is_more_than: { value: 23, unit: 't' } } } } + when: + vehicle: + - dimension: weight + comparison: greater_than + value: 23 + unit: 't' diff --git a/examples/transportation/docusaurus/temporal-scoping.yaml b/examples/transportation/docusaurus/temporal-scoping.yaml index 8b517f0a..6d5bff4f 100644 --- a/examples/transportation/docusaurus/temporal-scoping.yaml +++ b/examples/transportation/docusaurus/temporal-scoping.yaml @@ -14,7 +14,12 @@ properties: update_time: "2024-03-14T16:33:07-08:00" subtype: road class: unknown - road: + access_restrictions: + - access_type: denied + when: + mode: [bus] + during: "Mo-Fr 15:00-18:00" + road: # The `road` property is deprecated and will be removed in the 2024-07 release restrictions: access: - access_type: denied diff --git a/examples/transportation/docusaurus/turn-restriction-01-source.yaml b/examples/transportation/docusaurus/turn-restriction-01-source.yaml index dcc35524..670ea14b 100644 --- a/examples/transportation/docusaurus/turn-restriction-01-source.yaml +++ b/examples/transportation/docusaurus/turn-restriction-01-source.yaml @@ -17,7 +17,13 @@ properties: connector_ids: - overture:transportation:example:simple-turn-restriction-connector1 - overture:transportation:example:simple-turn-restriction-connector2 - road: + prohibited_transitions: + - sequence: + - segment_id: overture:transportation:example:simple-turn-restriction-target + connector_id: overture:transportation:example:simple-turn-restriction-connector2 + final_heading: forward + when: {heading: forward} + road: # The `road` property is deprecated and will be removed in the 2024-07 release restrictions: prohibited_transitions: - sequence: diff --git a/examples/transportation/docusaurus/turn-restriction-02-source.yaml b/examples/transportation/docusaurus/turn-restriction-02-source.yaml index c80c6fbf..e9b61e89 100644 --- a/examples/transportation/docusaurus/turn-restriction-02-source.yaml +++ b/examples/transportation/docusaurus/turn-restriction-02-source.yaml @@ -24,7 +24,19 @@ properties: - overture:transportation:example:via-turn-restriction-connector1 names: primary: Arborway - road: + prohibited_transitions: + - sequence: + - segment_id: overture:transportation:example:via-turn-restriction-target + connector_id: overture:transportation:example:via-turn-restriction-connector2 + - segment_id: overture:transportation:example:via-turn-restriction-via + connector_id: overture:transportation:example:via-turn-restriction-connector1 + final_heading: forward + when: + heading: forward + during: Mo-Fr 06:00-09:00, 15:00-19:00 + road_surface: + - value: paved + road: # The `road` property is deprecated and will be removed in the 2024-07 release surface: - value: paved restrictions: diff --git a/examples/transportation/docusaurus/turn-restriction-02-target.yaml b/examples/transportation/docusaurus/turn-restriction-02-target.yaml index fa77e413..b1354461 100644 --- a/examples/transportation/docusaurus/turn-restriction-02-target.yaml +++ b/examples/transportation/docusaurus/turn-restriction-02-target.yaml @@ -22,6 +22,8 @@ properties: - overture:transportation:example:via-turn-restriction-connector2 names: primary: Arborway - road: + road_surface: + - value: paved + road: # The `road` property is deprecated and will be removed in the 2024-07 release surface: - value: paved diff --git a/examples/transportation/docusaurus/turn-restriction-02-via.yaml b/examples/transportation/docusaurus/turn-restriction-02-via.yaml index 77871c0e..65981311 100644 --- a/examples/transportation/docusaurus/turn-restriction-02-via.yaml +++ b/examples/transportation/docusaurus/turn-restriction-02-via.yaml @@ -20,6 +20,8 @@ properties: - overture:transportation:example:via-turn-restriction-connector2 names: primary: Washington Street - road: + road_surface: + - value: paved + road: # The `road` property is deprecated and will be removed in the 2024-07 release surface: - value: paved diff --git a/examples/transportation/segment/road/lanes/lanes-flow-alternating.yaml b/examples/transportation/segment/road/lanes/lanes-flow-alternating.yaml index c7a1a22d..2d9dc07a 100644 --- a/examples/transportation/segment/road/lanes/lanes-flow-alternating.yaml +++ b/examples/transportation/segment/road/lanes/lanes-flow-alternating.yaml @@ -12,7 +12,14 @@ properties: subtype: road class: primary connector_ids: [fooConnector, barConnector] - road: + road_surface: + - value: paved + lanes: + - value: + # This models a single-lane road whose direction alternates + # on a regular rhythm (by default instructed by signals). + - direction: alternating + road: # The `road` property is deprecated and will be removed in the 2024-07 release surface: - value: paved lanes: diff --git a/examples/transportation/segment/road/lanes/lanes-flow-reversible.yaml b/examples/transportation/segment/road/lanes/lanes-flow-reversible.yaml index d61c2420..e67bf013 100644 --- a/examples/transportation/segment/road/lanes/lanes-flow-reversible.yaml +++ b/examples/transportation/segment/road/lanes/lanes-flow-reversible.yaml @@ -12,7 +12,24 @@ properties: subtype: road class: primary connector_ids: [fooConnector, barConnector] - road: + road_surface: + - value: paved + lanes: + - value: + # This models a single-lane road whose direction is + # completely reversible at arbitrary times. + - direction: reversible + restrictions: + access: + - access_type: allowed + when: + heading: forward + during: Mo-Su 00:00-12:00 + - access_type: allowed + when: + heading: backward + during: Mo-Su 12:00-24:00 + road: # The `road` property is deprecated and will be removed in the 2024-07 release surface: - value: paved lanes: diff --git a/examples/transportation/segment/road/lanes/lanes-on-straight-road-lr.yaml b/examples/transportation/segment/road/lanes/lanes-on-straight-road-lr.yaml index 1562c973..8b7282ca 100644 --- a/examples/transportation/segment/road/lanes/lanes-on-straight-road-lr.yaml +++ b/examples/transportation/segment/road/lanes/lanes-on-straight-road-lr.yaml @@ -12,7 +12,38 @@ properties: class: primary update_time: "2024-03-13T16:19:03-08:00" version: 1 - road: + lanes: + # Example shows modelling of new lane being introduced on a straight road which is a single segment + # whole lanes attribute is represented in LR way to keep LR referencing in root level of modeled attribute. + # + # |0|1| + # | | \ + # | | | | + # |0|1|2| + # | | | | + # | | / + # |0|1| + # digitization: S -> N + - between: # two lanes between <0% and 10%) of segment + - 0 + - 0.1 + value: + - direction: forward # lane 0 + - direction: forward # lane 1 + - between: # three lanes between <10% and 70%) of segment + - 0.1 + - 0.7 + value: + - direction: forward + - direction: forward + - direction: forward + - between: # two lanes again between <70% and 100%> of segment + - 0.7 + - 1 + value: + - direction: forward + - direction: forward + road: # The `road` property is deprecated and will be removed in the 2024-07 release lanes: # Example shows modelling of new lane being introduced on a straight road which is a single segment # whole lanes attribute is represented in LR way to keep LR referencing in root level of modeled attribute. diff --git a/examples/transportation/segment/road/lanes/lanes-temporal.yaml b/examples/transportation/segment/road/lanes/lanes-temporal.yaml index fa81e231..eed8e46a 100644 --- a/examples/transportation/segment/road/lanes/lanes-temporal.yaml +++ b/examples/transportation/segment/road/lanes/lanes-temporal.yaml @@ -11,7 +11,13 @@ properties: class: living_street version: 1 update_time: "2024-03-14T16:34:01-08:00" - road: + lanes: + - value: + - direction: forward + - direction: backward + when: + during: "Mo-Fr 08:00-18:00" + road: # The `road` property is deprecated and will be removed in the 2024-07 release lanes: - value: - direction: forward diff --git a/examples/transportation/segment/road/lanes/restrictions/lanes-access-for-travel-modes.yaml b/examples/transportation/segment/road/lanes/restrictions/lanes-access-for-travel-modes.yaml index 034d2943..a2ff17ad 100644 --- a/examples/transportation/segment/road/lanes/restrictions/lanes-access-for-travel-modes.yaml +++ b/examples/transportation/segment/road/lanes/restrictions/lanes-access-for-travel-modes.yaml @@ -11,7 +11,40 @@ properties: class: secondary update_time: "2024-03-13T16:21:30-08:00" version: 2 - road: + lanes: + - value: + # two-way road with access restrictions for specific travel modes + # digitization: S->N + # | || | | | + # | || | | | + # | || | | | + # | || | | | + # | || | | | + # | 0 || 1 | 2 | 3 | + - direction: backward # lane 0 not allowed for trucks (heavy good vehicles) + restrictions: + access: + - access_type: denied + when: + mode: + - hgv + - direction: forward # lane 1 + - direction: forward # lane 2 not allowed for buses and trucks + restrictions: + access: + - access_type: denied + when: + mode: + - hgv + - bus + - direction: forward # lane 3 - allowed only for bicycles + restrictions: + access: + - access_type: allowed + when: + mode: + - bicycle + road: # The `road` property is deprecated and will be removed in the 2024-07 release lanes: - value: # two-way road with access restrictions for specific travel modes diff --git a/examples/transportation/segment/road/lanes/restrictions/lanes-access-with-lr.yaml b/examples/transportation/segment/road/lanes/restrictions/lanes-access-with-lr.yaml index ef2f2b81..d897a917 100644 --- a/examples/transportation/segment/road/lanes/restrictions/lanes-access-with-lr.yaml +++ b/examples/transportation/segment/road/lanes/restrictions/lanes-access-with-lr.yaml @@ -11,7 +11,27 @@ properties: class: secondary update_time: "2024-03-13T16:21:45-08:00" version: 2 - road: + lanes: + - value: + # two-way road with access restrictions for specific travel modes + # digitization: S->N + # | || | | + # | || | | + # | || | | <- from that moment lane 2 starts to be a bus only lane + # | || | | + # | || | | + # | 0 || 1 | 2 | + - direction: backward # lane 0 + - direction: forward # lane 1 + - direction: forward # lane 2 from its 60% of length (till the end) it is allowed only for buses (before 60% mark it is available for all vehicles) + restrictions: + access: + - access_type: allowed + when: + mode: + - bus + between: [0.6, 1] + road: # The `road` property is deprecated and will be removed in the 2024-07 release lanes: - value: # two-way road with access restrictions for specific travel modes diff --git a/examples/transportation/segment/road/lanes/restrictions/lanes-hov-occupancy-scoped.yaml b/examples/transportation/segment/road/lanes/restrictions/lanes-hov-occupancy-scoped.yaml index 762640c5..e613f54a 100644 --- a/examples/transportation/segment/road/lanes/restrictions/lanes-hov-occupancy-scoped.yaml +++ b/examples/transportation/segment/road/lanes/restrictions/lanes-hov-occupancy-scoped.yaml @@ -11,7 +11,33 @@ properties: class: secondary update_time: "2024-03-13T16:21:56-08:00" version: 2 - road: + speed_limits: + - max_speed: + value: 100 + unit: km/h + lanes: + - value: + # one-way road with access and speed limit restrictions + # digitization: S->N + # | | | | + # | | | | => max speeds: 100 km/h for whole segment + # | h | | | but on lane 2 is limited to 80 km/h for hgv vehicles + # | o | | | + # | v | | | + # | | | | + # | 0 | 1 | 2 | + - direction: forward # lane 0 -> hov only that allows also bicycles + restrictions: + access: + - access_type: allowed + when: + mode: + - hov + - bicycle + min_occupancy: 3 + - direction: forward # lane 1 + - direction: forward # lane 2 + road: # The `road` property is deprecated and will be removed in the 2024-07 release restrictions: speed_limits: - max_speed: diff --git a/examples/transportation/segment/road/lanes/restrictions/lanes-hov.yaml b/examples/transportation/segment/road/lanes/restrictions/lanes-hov.yaml index bc90622a..798e375c 100644 --- a/examples/transportation/segment/road/lanes/restrictions/lanes-hov.yaml +++ b/examples/transportation/segment/road/lanes/restrictions/lanes-hov.yaml @@ -11,7 +11,32 @@ properties: class: secondary update_time: "2024-03-13T16:21:50-08:00" version: 2 - road: + speed_limits: + - max_speed: + value: 100 + unit: km/h + lanes: + - value: + # one-way road with access and speed limit restrictions + # digitization: S->N + # | | | | + # | | | | => max speeds: 100 km/h for whole segment + # | h | | | but on lane 2 is limited to 80 km/h for hgv vehicles + # | o | | | + # | v | | | + # | | | | + # | 0 | 1 | 2 | + - direction: forward # lane 0 -> hov only + restrictions: + access: + - access_type: allowed + when: + mode: + - hov + min_occupancy: 3 + - direction: forward # lane 1 + - direction: forward # lane 2 + road: # The `road` property is deprecated and will be removed in the 2024-07 release restrictions: speed_limits: - max_speed: diff --git a/examples/transportation/segment/road/lanes/restrictions/lanes-speed-limits.yaml b/examples/transportation/segment/road/lanes/restrictions/lanes-speed-limits.yaml index 0fac3052..29cbc4b9 100644 --- a/examples/transportation/segment/road/lanes/restrictions/lanes-speed-limits.yaml +++ b/examples/transportation/segment/road/lanes/restrictions/lanes-speed-limits.yaml @@ -11,7 +11,46 @@ properties: class: secondary update_time: "2024-03-13T16:21:59-08:00" version: 2 - road: + speed_limits: + - max_speed: + value: 100 + unit: km/h + lanes: + - value: + # two-way road with access and speed limit restrictions + # digitization: S->N + # | || | | + # | || | | => max speeds: 100 km/h for whole segment + # | || | | but on lane 2 is limited to 80 km/h for hgv vehicles + # | || | | + # | || | | + # | 0 || 1 | 2 | + - direction: backward # no restriction -> lane available for all vehicles and all can drive with maximum speed 100 km/h + - direction: forward # lane 1 -> hgv vehicles cannot use that lane + restrictions: + access: + - access_type: denied + when: + mode: [hgv] + - direction: forward # lane 2 - available for all vehicles except hgv vehicles if their weight is more than 3 tons, and they must limit their speed to 80 km/h + # for all other vehicles segment speed limit (100 km/h) applies + restrictions: + access: + - access_type: denied + when: + mode: [hgv] + vehicle: + - dimension: weight + comparison: greater_than + value: 3 + unit: 't' + speed_limits: + - max_speed: + value: 80 + unit: km/h + when: + mode: [hgv] + road: # The `road` property is deprecated and will be removed in the 2024-07 release restrictions: speed_limits: - max_speed: @@ -42,8 +81,10 @@ properties: when: mode: [hgv] vehicle: - weight: - is_more_than: { value: 3, unit: 't'} + - dimension: weight + comparison: greater_than + value: 3 + unit: 't' speed_limits: - max_speed: value: 80 diff --git a/examples/transportation/segment/road/restrictions/road-restrictions-access.yaml b/examples/transportation/segment/road/restrictions/road-restrictions-access.yaml index c895feb1..e677b83d 100644 --- a/examples/transportation/segment/road/restrictions/road-restrictions-access.yaml +++ b/examples/transportation/segment/road/restrictions/road-restrictions-access.yaml @@ -11,7 +11,62 @@ properties: class: primary version: 2 update_time: "2024-03-16T16:23:20-08:00" - road: + access_restrictions: + - access_type: denied + between: [ 0, 0.5 ] + - access_type: denied + when: + during: PH + - access_type: denied + when: {heading: forward} + - access_type: allowed + when: + heading: forward + mode: [vehicle] + - access_type: allowed + when: + heading: forward + using: [at_destination] + - access_type: allowed + when: + heading: forward + recognized: [as_employee] + - access_type: allowed + when: + heading: forward + vehicle: + - dimension: axle_count + comparison: less_than + value: 3 + - dimension: weight + comparison: less_than_equal + value: 600 + unit: 'kg' + - dimension: height + comparison: less_than + value: 12 + unit: 'ft' + - access_type: denied + between: [0.25, 0.5] + when: + heading: forward + during: PH + mode: [car, hgv] + using: [at_destination] + recognized: [as_employee] + vehicle: + - dimension: axle_count + comparison: less_than + value: 3 + - dimension: weight + comparison: less_than_equal + value: 600 + unit: 'kg' + - dimension: height + comparison: less_than + value: 12 + unit: 'ft' + road: # The `road` property is deprecated and will be removed in the 2024-07 release restrictions: access: - access_type: denied @@ -37,9 +92,17 @@ properties: when: heading: forward vehicle: - axle_count: {is_less_than: 3} - weight: {is_at_most: {value: 600, unit: 'kg'}} - height: {is_less_than: {value: 12, unit: 'ft'}} + - dimension: axle_count + comparison: less_than + value: 3 + - dimension: weight + comparison: less_than_equal + value: 600 + unit: 'kg' + - dimension: height + comparison: less_than + value: 12 + unit: 'ft' - access_type: denied between: [0.25, 0.5] when: @@ -49,6 +112,14 @@ properties: using: [at_destination] recognized: [as_employee] vehicle: - axle_count: { is_less_than: 3 } - weight: { is_at_most: { value: 600, unit: 'kg' } } - height: { is_less_than: { value: 12, unit: 'ft' } } + - dimension: axle_count + comparison: less_than + value: 3 + - dimension: weight + comparison: less_than_equal + value: 600 + unit: 'kg' + - dimension: height + comparison: less_than + value: 12 + unit: 'ft' diff --git a/examples/transportation/segment/road/restrictions/road-restrictions-prohibited-transitions.yaml b/examples/transportation/segment/road/restrictions/road-restrictions-prohibited-transitions.yaml index f5e928d7..d67bbec2 100644 --- a/examples/transportation/segment/road/restrictions/road-restrictions-prohibited-transitions.yaml +++ b/examples/transportation/segment/road/restrictions/road-restrictions-prohibited-transitions.yaml @@ -11,7 +11,86 @@ properties: class: secondary version: 2 update_time: "2024-03-16T16:23:28-08:00" - road: + prohibited_transitions: + - sequence: + - connector_id: connector1 + segment_id: segment1 + final_heading: forward + between: [ 0, 0.5 ] + - sequence: + - connector_id: connector1 + segment_id: segment1 + final_heading: forward + when: + during: PH + - sequence: + - connector_id: connector1 + segment_id: segment1 + final_heading: forward + when: {heading: forward} + - sequence: + - connector_id: connector1 + segment_id: segment1 + final_heading: forward + when: + heading: forward + mode: [car, hgv] + - sequence: + - connector_id: connector1 + segment_id: segment1 + final_heading: forward + when: + heading: forward + using: [at_destination] + - sequence: + - connector_id: connector1 + segment_id: segment1 + final_heading: forward + when: + heading: forward + recognized: [as_employee] + - sequence: + - connector_id: connector1 + segment_id: segment1 + final_heading: forward + when: + heading: forward + vehicle: + - dimension: axle_count + comparison: less_than + value: 3 + - dimension: weight + comparison: less_than_equal + value: 600 + unit: 'kg' + - dimension: height + comparison: less_than + value: 12 + unit: 'ft' + - sequence: + - connector_id: connector1 + segment_id: segment1 + final_heading: forward + between: [0.25, 0.5] + when: + heading: forward + during: PH + mode: [car, hgv] + using: [at_destination] + recognized: [as_employee] + vehicle: + - dimension: axle_count + comparison: less_than + value: 3 + - dimension: weight + comparison: less_than_equal + value: 600 + unit: 'kg' + - dimension: height + comparison: less_than + value: 12 + unit: 'ft' + road: # The `road` property is deprecated and will be removed in the 2024-07 release restrictions: prohibited_transitions: - sequence: @@ -58,9 +137,17 @@ properties: when: heading: forward vehicle: - axle_count: {is_less_than: 3} - weight: {is_at_most: {value: 600, unit: 'kg'}} - height: {is_less_than: {value: 12, unit: 'ft'}} + - dimension: axle_count + comparison: less_than + value: 3 + - dimension: weight + comparison: less_than_equal + value: 600 + unit: 'kg' + - dimension: height + comparison: less_than + value: 12 + unit: 'ft' - sequence: - connector_id: connector1 segment_id: segment1 @@ -73,6 +160,14 @@ properties: using: [at_destination] recognized: [as_employee] vehicle: - axle_count: { is_less_than: 3 } - weight: { is_at_most: { value: 600, unit: 'kg' } } - height: { is_less_than: { value: 12, unit: 'ft' } } + - dimension: axle_count + comparison: less_than + value: 3 + - dimension: weight + comparison: less_than_equal + value: 600 + unit: 'kg' + - dimension: height + comparison: less_than + value: 12 + unit: 'ft' diff --git a/examples/transportation/segment/road/restrictions/road-restrictions-speed-limits.yaml b/examples/transportation/segment/road/restrictions/road-restrictions-speed-limits.yaml index da11c344..094ad970 100644 --- a/examples/transportation/segment/road/restrictions/road-restrictions-speed-limits.yaml +++ b/examples/transportation/segment/road/restrictions/road-restrictions-speed-limits.yaml @@ -11,7 +11,66 @@ properties: class: tertiary version: 3 update_time: "2024-03-16T16:23:31-08:00" - road: + speed_limits: + - max_speed: {value: 20, unit: 'km/h'} + between: [ 0, 0.5 ] + - min_speed: {value: 25, unit: 'mph'} + when: + during: PH + - max_speed: {value: 100, unit: 'km/h'} + min_speed: {value: 75, unit: 'km/h'} + when: {heading: forward} + - min_speed: {value: 25, unit: 'mph'} + when: + heading: forward + mode: [car, hgv] + - max_speed: {value: 60, unit: 'mph'} + is_max_speed_variable: true + when: + heading: forward + using: [at_destination] + - min_speed: {value: 25, unit: 'mph'} + when: + heading: forward + recognized: [as_employee] + - min_speed: {value: 40, unit: 'mph'} + when: + heading: forward + vehicle: + - dimension: axle_count + comparison: less_than + value: 3 + - dimension: weight + comparison: less_than_equal + value: 600 + unit: 'kg' + - dimension: height + comparison: less_than + value: 12 + unit: 'ft' + - max_speed: {value: 30, unit: 'km/h'} + min_speed: {value: 20, unit: 'mph'} + is_max_speed_variable: true + between: [0.25, 0.5] + when: + heading: forward + during: PH + mode: [car, hgv] + using: [at_destination] + recognized: [as_employee] + vehicle: + - dimension: axle_count + comparison: less_than + value: 3 + - dimension: weight + comparison: less_than_equal + value: 600 + unit: 'kg' + - dimension: height + comparison: less_than + value: 12 + unit: 'ft' + road: # The `road` property is deprecated and will be removed in the 2024-07 release restrictions: speed_limits: - max_speed: {value: 20, unit: 'km/h'} @@ -39,9 +98,17 @@ properties: when: heading: forward vehicle: - axle_count: {is_less_than: 3} - weight: {is_at_most: {value: 600, unit: 'kg'}} - height: {is_less_than: {value: 12, unit: 'ft'}} + - dimension: axle_count + comparison: less_than + value: 3 + - dimension: weight + comparison: less_than_equal + value: 600 + unit: 'kg' + - dimension: height + comparison: less_than + value: 12 + unit: 'ft' - max_speed: {value: 30, unit: 'km/h'} min_speed: {value: 20, unit: 'mph'} is_max_speed_variable: true @@ -53,6 +120,14 @@ properties: using: [at_destination] recognized: [as_employee] vehicle: - axle_count: { is_less_than: 3 } - weight: { is_at_most: { value: 600, unit: 'kg' } } - height: { is_less_than: { value: 12, unit: 'ft' } } + - dimension: axle_count + comparison: less_than + value: 3 + - dimension: weight + comparison: less_than_equal + value: 600 + unit: 'kg' + - dimension: height + comparison: less_than + value: 12 + unit: 'ft' diff --git a/examples/transportation/segment/road/road-abandoned.yaml b/examples/transportation/segment/road/road-abandoned.yaml index 7ce74c38..f5d5fa55 100644 --- a/examples/transportation/segment/road/road-abandoned.yaml +++ b/examples/transportation/segment/road/road-abandoned.yaml @@ -12,7 +12,11 @@ properties: version: 3 subtype: road class: tertiary - road: + road_surface: + - value: gravel + road_flags: + - values: [is_abandoned] + road: # The `road` property is deprecated and will be removed in the 2024-07 release surface: - value: gravel flags: diff --git a/examples/transportation/segment/road/road-acesss-restriction.yaml b/examples/transportation/segment/road/road-acesss-restriction.yaml index 4ee368d9..916ee3f3 100644 --- a/examples/transportation/segment/road/road-acesss-restriction.yaml +++ b/examples/transportation/segment/road/road-acesss-restriction.yaml @@ -18,7 +18,24 @@ properties: version: 5 subtype: road class: primary - road: + access_restrictions: + - access_type: denied + - access_type: designated + when: {mode: [truck]} + between: [0.1, 0.25] + - access_type: allowed + when: + using: [as_customer, to_farm] + recognized: [as_permitted, as_employee] + between: [0.25, 0.50] + - access_type: allowed + when: + vehicle: + - dimension: axle_count + comparison: greater_than + value: 5 + between: [0.50, 0.70] + road: # The `road` property is deprecated and will be removed in the 2024-07 release restrictions: access: - access_type: denied @@ -31,5 +48,9 @@ properties: recognized: [as_permitted, as_employee] between: [0.25, 0.50] - access_type: allowed - when: {vehicle: {axle_count: {is_more_than: 5}}} + when: + vehicle: + - dimension: axle_count + comparison: greater_than + value: 5 between: [0.50, 0.70] diff --git a/examples/transportation/segment/road/road-alley.yaml b/examples/transportation/segment/road/road-alley.yaml index 462b0c24..5451d997 100644 --- a/examples/transportation/segment/road/road-alley.yaml +++ b/examples/transportation/segment/road/road-alley.yaml @@ -11,7 +11,11 @@ properties: version: 5 subtype: road class: alley - road: + access_restrictions: + - access_type: allowed + when: + using: [at_destination] + road: # The `road` property is deprecated and will be removed in the 2024-07 release restrictions: access: - access_type: allowed diff --git a/examples/transportation/segment/road/road-covered.yaml b/examples/transportation/segment/road/road-covered.yaml index 955f61c3..c214d3fd 100644 --- a/examples/transportation/segment/road/road-covered.yaml +++ b/examples/transportation/segment/road/road-covered.yaml @@ -12,7 +12,11 @@ properties: version: 3 subtype: road class: tertiary - road: + road_surface: + - value: paved + road_flags: + - values: [is_covered] + road: # The `road` property is deprecated and will be removed in the 2024-07 release surface: - value: paved flags: diff --git a/examples/transportation/segment/road/road-level.yaml b/examples/transportation/segment/road/road-level.yaml index 7667caec..c731ea5d 100644 --- a/examples/transportation/segment/road/road-level.yaml +++ b/examples/transportation/segment/road/road-level.yaml @@ -11,7 +11,12 @@ properties: version: 2 update_time: "2024-03-15T09:24:29-08:00" class: residential - road: + level_rules: + - value: -1 + between: [0, 0.5] + - value: 1 + between: [0.75, 1] + road: # The `road` property is deprecated and will be removed in the 2024-07 release level: - value: -1 between: [0, 0.5] diff --git a/examples/transportation/segment/road/road-oneway-no-lanes.yaml b/examples/transportation/segment/road/road-oneway-no-lanes.yaml index 1a5a66eb..5fdbd62a 100644 --- a/examples/transportation/segment/road/road-oneway-no-lanes.yaml +++ b/examples/transportation/segment/road/road-oneway-no-lanes.yaml @@ -12,8 +12,11 @@ properties: subtype: road class: secondary connector_ids: [fooConnector, barConnector] - road: - # one way road in backward direction (forward access is denied) + # one way road in backward direction (forward access is denied) + access_restrictions: + - access_type: denied + when: {heading: forward} + road: # The `road` property is deprecated and will be removed in the 2024-07 release restrictions: access: - access_type: denied diff --git a/examples/transportation/segment/road/road-oneway-with-lanes.yaml b/examples/transportation/segment/road/road-oneway-with-lanes.yaml index 79923e81..75226a7e 100644 --- a/examples/transportation/segment/road/road-oneway-with-lanes.yaml +++ b/examples/transportation/segment/road/road-oneway-with-lanes.yaml @@ -12,9 +12,13 @@ properties: subtype: road class: secondary connector_ids: [fooConnector, barConnector] - road: + # one way road in forward direction (lanes only in forward direction) + lanes: + - value: + - direction: forward + - direction: forward + road: # The `road` property is deprecated and will be removed in the 2024-07 release lanes: - # one way road in forward direction (lanes only in forward direction) - value: - direction: forward - direction: forward diff --git a/examples/transportation/segment/road/road-with-lr-width.yaml b/examples/transportation/segment/road/road-with-lr-width.yaml index 3fff86c4..0f799172 100644 --- a/examples/transportation/segment/road/road-with-lr-width.yaml +++ b/examples/transportation/segment/road/road-with-lr-width.yaml @@ -15,7 +15,12 @@ properties: subtype: road class: secondary connector_ids: [fooConnector, barConnector] - road: + width_rules: + - between: [0, 0.5] + value: 1.5 + - between: [0.5, 1] + value: 2.0 + road: # The `road` property is deprecated and will be removed in the 2024-07 release width: - between: [0, 0.5] value: 1.5 diff --git a/examples/transportation/segment/road/road.yaml b/examples/transportation/segment/road/road.yaml index e5b49b06..4e26c172 100644 --- a/examples/transportation/segment/road/road.yaml +++ b/examples/transportation/segment/road/road.yaml @@ -17,11 +17,51 @@ properties: connector_ids: [fooConnector, barConnector] # Topology: To discuss further. names: primary: Common Road Name - road: - # no access nor lanes information -> means by default road is accessible in both directions with at least one lane in each direction + # no access nor lanes information -> means by default road is accessible in both directions with at least one lane in each direction + road_surface: + - value: gravel + road_flags: + - values: [is_link, is_tunnel] + level: -1 + level_rules: + - value: -1 + width_rules: + - value: 10 + speed_limits: + - min_speed: + value: 90 + unit: km/h + max_speed: + value: 110 + unit: mph + is_max_speed_variable: true + - max_speed: + value: 55 + unit: mph + when: {mode: [ "truck" ]} + - max_speed: + value: 30 + unit: km/h + between: [0.25, 0.50] + when: + during: Mo-Sa 09:00-12:00, We 15:00-18:00 + prohibited_transitions: + - sequence: + - segment_id: overture:transportation:segment:234 + connector_id: overture:transportation:connector:123 + final_heading: forward + when: {heading: forward} + - sequence: + - segment_id: overture:transportation:segment:456 + connector_id: overture:transportation:connector:345 + - segment_id: overture:transportation:segment:567 + connector_id: overture:transportation:connector:456 + final_heading: backward + when: {heading: backward} + road: # The `road` property is deprecated and will be removed in the 2024-07 release surface: - value: gravel - flags: + flags: - values: [is_link, is_tunnel] level: - value: -1 diff --git a/examples/transportation/segment/road/sidewalk.yaml b/examples/transportation/segment/road/sidewalk.yaml index e8a08f1e..9dcaa6a6 100644 --- a/examples/transportation/segment/road/sidewalk.yaml +++ b/examples/transportation/segment/road/sidewalk.yaml @@ -12,6 +12,8 @@ properties: subtype: road class: sidewalk connector_ids: [fooConnector, barConnector] - road: + road_surface: + - value: paved + road: # The `road` property is deprecated and will be removed in the 2024-07 release surface: - value: paved diff --git a/schema/transportation/segment.yaml b/schema/transportation/segment.yaml index dd4b59ab..306bc188 100644 --- a/schema/transportation/segment.yaml +++ b/schema/transportation/segment.yaml @@ -19,12 +19,24 @@ properties: unevaluatedProperties: false required: [subtype] allOf: + - title: "Segment Properties" + required: [class] + properties: + class: { "$ref": "#/$defs/propertyDefinitions/roadClass" } + access_restrictions: { "$ref": "#/$defs/propertyContainers/accessContainer" } + level: { "$ref": "../defs.yaml#/$defs/propertyDefinitions/level" } + level_rules: { "$ref": "#/$defs/propertyContainers/levelRulesContainer" } - title: "Conditional Properties" if: { properties: { subtype: { enum: [road] } } } then: - required: [class] properties: - class: { "$ref": "#/$defs/propertyDefinitions/roadClass" } + lanes: { "$ref": "#/$defs/propertyContainers/lanesContainer" } + prohibited_transitions: { "$ref": "#/$defs/propertyContainers/prohibitedTransitionsContainer" } + road_surface: { "$ref": "#/$defs/propertyContainers/surfaceContainer"} + road_flags: { "$ref": "#/$defs/propertyContainers/flagsContainer" } + speed_limits: { "$ref": "#/$defs/propertyContainers/speedLimitsContainer" } + width_rules: { "$ref": "#/$defs/propertyContainers/widthRulesContainer" } + # The `road` property is deprecated and will be removed in the 2024-07 release road: { "$ref": "#/$defs/propertyDefinitions/road" } - "$ref": ../defs.yaml#/$defs/propertyContainers/overtureFeaturePropertiesContainer - "$ref": ../defs.yaml#/$defs/propertyContainers/namesContainer @@ -129,6 +141,8 @@ properties: motor_vehicle includes car, truck and motorcycle road: description: >- + ** Note: this field is deprecated in favor of promoting its sub-properties into top-level properties and will be removed in the 2024-07 release ** + Properties for segments whose segment subtype is road. The road subtype includes any variety of road, street, or path, including dedicated paths for walking and cycling. @@ -136,115 +150,11 @@ properties: unevaluatedProperties: false default: {} properties: - surface: - description: Physical surface of the road. May either be - specified as a single global value for the segment, or as - an array of surface rules. - type: array - items: - type: object - allOf: - - { "$ref": "../defs.yaml#/$defs/propertyContainers/geometricRangeScopeContainer" } - unevaluatedProperties: false - properties: - value: { "$ref": "#/$defs/propertyDefinitions/roadSurface" } - minItems: 1 - uniqueItems: true - "$comment": - We should likely restrict the available surface types to - the subset of the common OSM surface=* tag values that are - useful both for routing and for map tile rendering. - flags: - description: - Set of boolean attributes applicable to roads. May be - specified either as a single flag array of flag values, or - as an array of flag rules. - type: array - items: - type: object - allOf: - - { "$ref": "../defs.yaml#/$defs/propertyContainers/geometricRangeScopeContainer" } - unevaluatedProperties: false - properties: - values: - type: array - items: { "$ref": "#/$defs/propertyDefinitions/roadFlag" } - uniqueItems: true - minLength: 1 - uniqueItems: true - minLength: 1 - level: - description: - Defines the Z-order, i.e. stacking order, of the road - segment. - type: array - items: - description: - A single level rule defining the Z-order, i.e. stacking - order, applicable within a given scope on the road - segment. - type: object - allOf: - - { "$ref": "../defs.yaml#/$defs/propertyContainers/geometricRangeScopeContainer" } - unevaluatedProperties: false - required: [value] - properties: - value: { "$ref": "../defs.yaml#/$defs/propertyDefinitions/level" } - width: - description: >- - Edge-to-edge width of the road modeled by this segment, in - meters. - - Examples: (1) If this segment models a carriageway without - sidewalk, this value represents the edge-to-edge width of the - carriageway, inclusive of any shoulder. (2) If this segment - models a sidewalk by itself, this value represents the - edge-to-edge width of the sidewalk. (3) If this segment models a - combined sidewalk and carriageway, this value represents the - edge-to-edge width inclusive of sidewalk. - type: array - items: - type: object - allOf: - - { "$ref": "../defs.yaml#/$defs/propertyContainers/geometricRangeScopeContainer" } - required: [value] - properties: - value: - type: number - exclusiveMinimum: 0 - unevaluatedProperties: false - minItems: 1 - uniqueItems: true - lanes: - description: >- - List of lane block rules describing the layout of lanes on - the road plus lane-related information. The standard rule - evaluation algorithm is used to determine which lane block - applies at a given place and time along the segment. - - Each lane block contains the list of lanes that make up the - block. Lanes in the block are listed from left to right as - they would be seen by a person standing on the road segment - facing in the direction of the segment's orientation (toward - the end). - type: array - items: - type: object - unevaluatedProperties: false - allOf: - - "$ref": "../defs.yaml#/$defs/propertyContainers/geometricRangeScopeContainer" - properties: - value: - type: array - items: { "$ref": "#/$defs/propertyDefinitions/lane" } - minItems: 1 - when: - allOf: - - "$ref": "#/$defs/propertyContainers/temporalScopeContainer" - minProperties: 1 - unevaluatedProperties: false - minItems: 1 - uniqueItems: true + surface: { "$ref": "#/$defs/propertyContainers/surfaceContainer" } + flags: { "$ref": "#/$defs/propertyContainers/flagsContainer" } + level: { "$ref": "#/$defs/propertyContainers/levelRulesContainer" } + width: { "$ref": "#/$defs/propertyContainers/widthRulesContainer" } + lanes: { "$ref": "#/$defs/propertyContainers/lanesContainer" } restrictions: description: Restrictions on how the road may be used type: object @@ -252,43 +162,7 @@ properties: properties: speed_limits: { "$ref": "#/$defs/propertyContainers/speedLimitsContainer" } access: { "$ref": "#/$defs/propertyContainers/accessContainer" } - prohibited_transitions: - description: >- - Rules preventing transitions from this segment to - another segment. - type: array - items: - type: object - unevaluatedProperties: false - allOf: - - "$ref": "../defs.yaml#/$defs/propertyContainers/geometricRangeScopeContainer" - required: [sequence, final_heading] - properties: - sequence: - description: >- - Ordered sequence of connector/segment pairs that it is - prohibited to follow from this segment. - type: array - items: - description: Pair of segment and connector IDs along the sequence - "$ref": "#/$defs/propertyDefinitions/sequenceEntry" - minItems: 1 - uniqueItems: true - final_heading: - description: >- - Direction of travel that is prohibited on the destination - segment of the sequence. - "$ref": "#/$defs/propertyDefinitions/heading" - when: - allOf: - - "$ref": "#/$defs/propertyContainers/headingScopeContainer" - - "$ref": "#/$defs/propertyContainers/temporalScopeContainer" - - "$ref": "#/$defs/propertyContainers/purposeOfUseScopeContainer" - - "$ref": "#/$defs/propertyContainers/recognizedStatusScopeContainer" - - "$ref": "#/$defs/propertyContainers/travelModeScopeContainer" - - "$ref": "#/$defs/propertyContainers/vehicleScopeContainer" - minProperties: 1 - unevaluatedProperties: false + prohibited_transitions: { "$ref": "#/$defs/propertyContainers/prohibitedTransitionsContainer"} roadFlag: description: Simple flags that can be on or off for a road segment type: string @@ -402,6 +276,29 @@ properties: properties: { is_at_most: { type: integer } } - required: [is_less_than] properties: { is_less_than: { type: integer } } + vehicleScopeDimension: + description: Enumerates possible vehicle dimensions for use in restrictions + type: string + enum: + - axle_count + - height + - length + - weight + - width + vehicleScopeComparison: + description: Enumerates possible comparison operators for use in scoping + type: string + enum: + - greater_than + - greater_than_equal + - equal + - less_than + - less_than_equal + vehicleScopeUnit: + description: Parent enum of both length and width for use in vehicle scoping + anyOf: + - {"$ref": "#/$defs/propertyDefinitions/lengthUnit"} + - {"$ref": "#/$defs/propertyDefinitions/weightUnit"} lengthUnit: description: Enumerates length units supported by the Overture schema. "$comment": Keep in sync with `combobulib/measure.py`. @@ -488,6 +385,9 @@ properties: properties: { is_at_most: { allOf: [ { "$ref": "#/$defs/propertyDefinitions/weightValueWithUnit" } ] } } - required: [is_less_than] properties: { is_less_than: { allOf: [ { "$ref": "#/$defs/propertyDefinitions/weightValueWithUnit" } ] } } + width: + type: number + exclusiveMinimum: 0 sequenceEntry: description: >- A segment/connector pair in a prohibited transition sequence. @@ -556,16 +456,22 @@ properties: properties: vehicle: description: Vehicle attributes for which the rule applies - type: object - unevaluatedProperties: false - minProperties: 1 - properties: - axle_count: { "$ref": "#/$defs/propertyDefinitions/integerRelation" } - height: { "$ref": "#/$defs/propertyDefinitions/lengthRelation" } - length: { "$ref": "#/$defs/propertyDefinitions/lengthRelation" } - weight: { "$ref": "#/$defs/propertyDefinitions/weightRelation" } - width: { "$ref": "#/$defs/propertyDefinitions/lengthRelation" } - speedLimitsContainer: # FIXME: Not a 'container', move up. + type: array + uniqueItems: true + minLength: 1 + items: + description: An individual vehicle scope rule + type: object + unevaluatedProperties: false + required: [dimension, comparison, value] + properties: + dimension: { "$ref": "#/$defs/propertyDefinitions/vehicleScopeDimension" } + comparison: { "$ref": "#/$defs/propertyDefinitions/vehicleScopeComparison" } + value: + type: number + minimum: 0 + unit: { "$ref": "#/$defs/propertyDefinitions/vehicleScopeUnit" } + speedLimitsContainer: description: Rules governing speed on this road segment or lane type: array items: @@ -601,7 +507,7 @@ properties: unevaluatedProperties: false minLength: 1 uniqueItems: true - accessContainer: # FIXME: Not a 'container', move up. + accessContainer: description: Rules governing access to this road segment or lane type: array items: @@ -626,3 +532,147 @@ properties: unevaluatedProperties: false minLength: 1 uniqueItems: true + lanesContainer: + description: >- + List of lane block rules describing the layout of lanes on + the road plus lane-related information. The standard rule + evaluation algorithm is used to determine which lane block + applies at a given place and time along the segment. + + Each lane block contains the list of lanes that make up the + block. Lanes in the block are listed from left to right as + they would be seen by a person standing on the road segment + facing in the direction of the segment's orientation (toward + the end). + type: array + items: + type: object + unevaluatedProperties: false + allOf: + - "$ref": "../defs.yaml#/$defs/propertyContainers/geometricRangeScopeContainer" + properties: + value: + type: array + items: { "$ref": "#/$defs/propertyDefinitions/lane" } + minItems: 1 + when: + allOf: + - "$ref": "#/$defs/propertyContainers/temporalScopeContainer" + minProperties: 1 + unevaluatedProperties: false + minItems: 1 + uniqueItems: true + prohibitedTransitionsContainer: + description: >- + Rules preventing transitions from this segment to + another segment. + type: array + items: + type: object + unevaluatedProperties: false + allOf: + - "$ref": "../defs.yaml#/$defs/propertyContainers/geometricRangeScopeContainer" + required: [sequence, final_heading] + properties: + sequence: + description: >- + Ordered sequence of connector/segment pairs that it is + prohibited to follow from this segment. + type: array + items: + description: Pair of segment and connector IDs along the sequence + "$ref": "#/$defs/propertyDefinitions/sequenceEntry" + minItems: 1 + uniqueItems: true + final_heading: + description: >- + Direction of travel that is prohibited on the destination + segment of the sequence. + "$ref": "#/$defs/propertyDefinitions/heading" + when: + allOf: + - "$ref": "#/$defs/propertyContainers/headingScopeContainer" + - "$ref": "#/$defs/propertyContainers/temporalScopeContainer" + - "$ref": "#/$defs/propertyContainers/purposeOfUseScopeContainer" + - "$ref": "#/$defs/propertyContainers/recognizedStatusScopeContainer" + - "$ref": "#/$defs/propertyContainers/travelModeScopeContainer" + - "$ref": "#/$defs/propertyContainers/vehicleScopeContainer" + minProperties: 1 + unevaluatedProperties: false + flagsContainer: + description: + Set of boolean attributes applicable to roads. May be + specified either as a single flag array of flag values, or + as an array of flag rules. + type: array + items: + type: object + allOf: + - { "$ref": "../defs.yaml#/$defs/propertyContainers/geometricRangeScopeContainer" } + unevaluatedProperties: false + properties: + values: + type: array + items: { "$ref": "#/$defs/propertyDefinitions/roadFlag" } + uniqueItems: true + minLength: 1 + uniqueItems: true + minLength: 1 + levelRulesContainer: + description: + Defines the Z-order, i.e. stacking order, of the road + segment. + type: array + items: + description: + A single level rule defining the Z-order, i.e. stacking + order, applicable within a given scope on the road + segment. + type: object + allOf: + - { "$ref": "../defs.yaml#/$defs/propertyContainers/geometricRangeScopeContainer" } + unevaluatedProperties: false + required: [value] + properties: + value: { "$ref": "../defs.yaml#/$defs/propertyDefinitions/level" } + surfaceContainer: + description: Physical surface of the road. May either be + specified as a single global value for the segment, or as + an array of surface rules. + type: array + items: + type: object + allOf: + - { "$ref": "../defs.yaml#/$defs/propertyContainers/geometricRangeScopeContainer" } + unevaluatedProperties: false + properties: + value: { "$ref": "#/$defs/propertyDefinitions/roadSurface" } + minItems: 1 + uniqueItems: true + "$comment": + We should likely restrict the available surface types to + the subset of the common OSM surface=* tag values that are + useful both for routing and for map tile rendering. + widthRulesContainer: + description: >- + Edge-to-edge width of the road modeled by this segment, in + meters. + + Examples: (1) If this segment models a carriageway without + sidewalk, this value represents the edge-to-edge width of the + carriageway, inclusive of any shoulder. (2) If this segment + models a sidewalk by itself, this value represents the + edge-to-edge width of the sidewalk. (3) If this segment models a + combined sidewalk and carriageway, this value represents the + edge-to-edge width inclusive of sidewalk. + type: array + items: + type: object + allOf: + - { "$ref": "../defs.yaml#/$defs/propertyContainers/geometricRangeScopeContainer" } + required: [value] + properties: + value: { "$ref": "#/$defs/propertyDefinitions/width" } + unevaluatedProperties: false + minItems: 1 + uniqueItems: true