From d73366b057c7288d8ba2c616d5975b5050551f42 Mon Sep 17 00:00:00 2001 From: Brad Richardson Date: Wed, 2 Oct 2024 10:15:42 -0400 Subject: [PATCH 1/2] Remove lanes --- .../bad-road-invalid-min-occupancy-value.json | 35 --- .../road/bad-road-invalid-min-occupancy.json | 39 --- .../by-theme/transportation/roads.mdx | 277 +----------------- .../transportation/shape-connectivity.mdx | 2 +- docs/schema/concepts/scoping-rules.mdx | 90 +----- .../reference/transportation/segment.mdx | 5 - .../docusaurus/lanes-absolute-form.yaml | 18 -- .../transportation/docusaurus/lanes-hov.yaml | 41 --- .../lanes-resolution-connector.yaml | 10 - .../lanes-resolution-segment-01.yaml | 31 -- .../lanes-resolution-segment-02.yaml | 25 -- .../docusaurus/lanes-rule-form.yaml | 26 -- .../docusaurus/simple-road.yaml | 4 - .../road/lanes/lanes-flow-alternating.yaml | 26 -- .../road/lanes/lanes-flow-reversible.yaml | 36 --- .../road/lanes/lanes-on-straight-road-lr.yaml | 44 --- .../segment/road/lanes/lanes-temporal.yaml | 18 -- .../lanes-access-for-travel-modes.yaml | 45 --- .../restrictions/lanes-access-with-lr.yaml | 32 -- .../lanes-hov-occupancy-scoped.yaml | 38 --- .../road/lanes/restrictions/lanes-hov.yaml | 37 --- .../restrictions/lanes-speed-limits.yaml | 51 ---- .../segment/road/road-oneway-with-lanes.yaml | 24 -- .../transportation/segment/road/road.yaml | 2 +- schema/transportation/segment.yaml | 70 +---- 25 files changed, 8 insertions(+), 1018 deletions(-) delete mode 100644 counterexamples/transportation/segment/road/bad-road-invalid-min-occupancy-value.json delete mode 100644 counterexamples/transportation/segment/road/bad-road-invalid-min-occupancy.json delete mode 100644 examples/transportation/docusaurus/lanes-absolute-form.yaml delete mode 100644 examples/transportation/docusaurus/lanes-hov.yaml delete mode 100644 examples/transportation/docusaurus/lanes-resolution-connector.yaml delete mode 100644 examples/transportation/docusaurus/lanes-resolution-segment-01.yaml delete mode 100644 examples/transportation/docusaurus/lanes-resolution-segment-02.yaml delete mode 100644 examples/transportation/docusaurus/lanes-rule-form.yaml delete mode 100644 examples/transportation/segment/road/lanes/lanes-flow-alternating.yaml delete mode 100644 examples/transportation/segment/road/lanes/lanes-flow-reversible.yaml delete mode 100644 examples/transportation/segment/road/lanes/lanes-on-straight-road-lr.yaml delete mode 100644 examples/transportation/segment/road/lanes/lanes-temporal.yaml delete mode 100644 examples/transportation/segment/road/lanes/restrictions/lanes-access-for-travel-modes.yaml delete mode 100644 examples/transportation/segment/road/lanes/restrictions/lanes-access-with-lr.yaml delete mode 100644 examples/transportation/segment/road/lanes/restrictions/lanes-hov-occupancy-scoped.yaml delete mode 100644 examples/transportation/segment/road/lanes/restrictions/lanes-hov.yaml delete mode 100644 examples/transportation/segment/road/lanes/restrictions/lanes-speed-limits.yaml delete mode 100644 examples/transportation/segment/road/road-oneway-with-lanes.yaml 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 deleted file mode 100644 index 8bb2f0094..000000000 --- a/counterexamples/transportation/segment/road/bad-road-invalid-min-occupancy-value.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "id": "invalidMinOccupancyValue", - "type": "Feature", - "geometry": { - "type": "LineString", - "coordinates": [[2, 2], [3, 3]] - }, - "properties": { - "theme": "transportation", - "type": "segment", - "version": 20, - "subtype": "road", - "class": "primary", - "road_flags": [ - { - "values": ["is_tunnel"] - } - ], - "lanes": [ - { - "value": [ - { - "direction": "backward", - "restrictions": { - "min_occupancy": 0 - } - } - ] - } - ], - "ext_expected_errors": [ - "[I#/properties/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 deleted file mode 100644 index 50577fddd..000000000 --- a/counterexamples/transportation/segment/road/bad-road-invalid-min-occupancy.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "id": "invalidMinOccupancyType", - "type": "Feature", - "geometry": { - "type": "LineString", - "coordinates": [[2, 2], [3, 3]] - }, - "properties": { - "theme": "transportation", - "type": "segment", - "version": 20, - "subtype": "road", - "class": "primary", - "road_flags": [ - { - "values": ["is_tunnel"] - } - ], - "lanes": [ - { - "value": [ - { - "direction": "forward", - "restrictions": { - "min_occupancy": [ - { - "is_at_least": 3 - } - ] - } - } - ] - } - ], - "ext_expected_errors": [ - "[I#/properties/lanes/0/value/0/restrictions/min_occupancy] [S#/$defs/propertyDefinitions/lane/properties/restrictions/properties/min_occupancy/type] expected integer, but got array" - ] - } - } diff --git a/docs/schema/concepts/by-theme/transportation/roads.mdx b/docs/schema/concepts/by-theme/transportation/roads.mdx index 2a3c36173..5ea09211a 100644 --- a/docs/schema/concepts/by-theme/transportation/roads.mdx +++ b/docs/schema/concepts/by-theme/transportation/roads.mdx @@ -14,9 +14,6 @@ import ExampleAccessRestrictionAxleLimit from '!!raw-loader!@site/docs/_examples import ExampleSpeedLimitsSimple from '!!raw-loader!@site/docs/_examples/transportation/docusaurus/speed-limits-01-simple.yaml'; import ExampleSpeedLimitsDirectional from '!!raw-loader!@site/docs/_examples/transportation/docusaurus/speed-limits-02-directional.yaml'; import ExampleSpeedLimitsVariableMax from '!!raw-loader!@site/docs/_examples/transportation/docusaurus/speed-limits-03-variable-max.yaml'; -import ExampleLanesResolutionConnector from '!!raw-loader!@site/docs/_examples/transportation/docusaurus/lanes-resolution-connector.yaml'; -import ExampleLanesResolutionSegment01 from '!!raw-loader!@site/docs/_examples/transportation/docusaurus/lanes-resolution-segment-01.yaml'; -import ExampleLanesResolutionSegment02 from '!!raw-loader!@site/docs/_examples/transportation/docusaurus/lanes-resolution-segment-02.yaml'; import ExampleTurnRestriction1Source from '!!raw-loader!@site/docs/_examples/transportation/docusaurus/turn-restriction-01-source.yaml'; import ExampleTurnRestriction1Target from '!!raw-loader!@site/docs/_examples/transportation/docusaurus/turn-restriction-01-target.yaml'; import ExampleTurnRestriction1Exit from '!!raw-loader!@site/docs/_examples/transportation/docusaurus/turn-restriction-01-exit.yaml'; @@ -39,10 +36,9 @@ in many cases, approximates the physical centerline of the section of road being modeled. Road segments support modeling the road network at a range of granularities. For example, a single road segment can represent: -- bidirectional street including all of its lanes and sidewalks +- bidirectional street including all of its sidewalks - sidewalk by itself - one-way street or one direction of a dual carriageway -- single lane or single section of a multi-lane highway - dedicated cycleway - hiking path @@ -108,8 +104,7 @@ resolve.) The implied access restrictions may be modified for the road segment as a whole by providing an explicit value for the property -`access_restrictions`. (Access restrictions may also be specified -at the level of individual [lanes](#lanes), as explained elsewhere.) +`access_restrictions`. It is technically possible to specify a blanket access grant or refusal of access applying to everyone and everything; but where, as is typical, @@ -328,9 +323,7 @@ limits. The implied speed limits may be configured for the whole road segment by providing an explicit value for the property -`speed_limits`. Note: granular speed limits can also be -specified at the level of individual [lanes](#lanes), as explained -elsewhere. +`speed_limits`. As with access restrictions and turn restrictions, speed limits can be specified using [rules](/schema/concepts/scoping-rules#rules-and-rule-based-properties). @@ -353,267 +346,3 @@ As with access restrictions and turn restrictions, speed limits can be specified - -## Lanes - -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 `lanes` property applies to traffic lanes, not to -parking lanes. - -### Use cases for lanes - -Many transportation use cases can be solved either entirely or in large part without examining the lane -structure of the road network. For example, optimal route calculation -can be entirely solved without lane-level information, as can most 2D -map rendering problems. Lane information is most interesting for -granular turn-by-turn or maneuver-by-maneuver navigation applications. - -### Default lane structure - -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 -`forward` and one `backward`. - -### Lane numbering - -The number of lanes at a given place and time on a road segment is equal to -the length of the lanes list within the resolved lane block. - -Each entry in the resolved lanes list represents one lane on the road. -Order is important. The list captures the lanes in left-to-right order -as they would be observed by a person standing on the physical road being modeled, facing in the [direction](/schema/concepts/by-theme/transportation/shape-connectivity#directionality) -of the segment geometry. The leftmost lane has index `0`; the rightmost -lane, assuming there are N total lanes, has index N-1. The example -below illustrates how lane numbering works with example two-lane -segments oriented in the north, west, east, and south directions, -respectively. - -
- -
- -
- - - -
- -
- -
- - - -
- -
- -
- - - -
- -
- -
- - - -
- -
- -
- - -
- -
- -*How lanes are numbered for examples segments with geometry directions due west, north, east, and south.* - -
- -
- -
- -### Lane directionality - -Each lane within a segment has a directionality, documenting which -travel directions are allowed within the lane, with reference to the [orientation of the segment](/schema/concepts/by-theme/transportation/shape-connectivity#start-end-and-orientation). Lane directionality is specified by the lane object's `directionality` -property. The allowed values are: - -
- -
- -| Directionality | Meaning | -|-|-| -| `forward` | Travel is only allowed along the `forward` heading. | -| `backward` | Travel is only allowed along the `backward` heading. | -| `both_ways` | Travel is allowed both `forward` and `backward` at the same time. | -| `alternating` | Travel is one-way and changes between `forward` and `backward` constantly. | -| `reversible` | Travel is one-way and changes between `forward` and `backward` infrequently. | - -
- -
- -
- -*Allowed values for lane `directionality`.* - -
- -
-
- -The `directionality` property is a mandatory property for lanes, and is -the only mandatory property. - -When the allowed travel heading changes based on a regular schedule, -the appropriate "definite" directionalities (`forward`, `backward`, and -`both_ways`) should be used along with [temporal scoping](/schema/concepts/scoping-rules#temporal-scoping-opening-hours) at the lane block level. - -When the allowed travel heading changes based on unpredictable local -factors, such that allowed heading at any given time can only be known -by an observer actually present at the real-world location, the -appropriate indefinite directionality (`alternating` or `reversible`) -should be used. - -### Lane restrictions - -Like the segment a whole, each lane within a lane block can have its own -restrictions, for example [access restrictions](#access-restrictions), -[turn restrictions](#turn-restrictions) and -[speed limits](#speed-limits). - -Lane-level restrictions reuse the same concepts as segment-level -restrictions and are typically phrased in the same way, except that the -restriction is stipulated on an individual lane object rather than for -the segment's `road` property as a whole. - -### Lane connectivity - -Lane connectivity refers to the maneuvers available to navigate from the -lane the traveller is currently occupying to a connected lane within the -next lane block in the traveller's current travel direction. Lane -connectivity is a necessary element for granular turn-by-turn -navigation instructions. - -The Overture transportation schema does not currently support lane -connectivity, but it is something we are actively working on and hoping -to release soon. - -### Resolving the applicable lane block - -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/concepts/scoping-rules#rules-and-rule-based-properties) -in the optional `lanes` property. - -- A rule may be scoped [geometrically](/schema/concepts/scoping-rules#geometric-scoping-linear-referencing), -which allows linear referencing to be used to specify the portion of the -segment geometry where the lane block exists. -- A rule may also be scoped [temporally](/schema/concepts/scoping-rules#temporal-scoping-opening-hours), which allows the time of day that the lane block exists to be specified. Temporal scoping is useful for modeling cases like lanes which are used -for parking at off hours and traffic during peak hours. In such a case, -the lane block rule would be scoped to peak hours. - -As with all rule-based properties in the Overture schema, the [rule evaluation algorithm](/schema/concepts/scoping-rules#rule-evaluation-algorithm) must be applied to determine which lane block rule, if any, is -applicable at a given place and time along the road segment. Once the -determining rule for a certain scope is known, its rule block defines -the lane structure within that scope. - -The example below illustrates lane block resolution for two connected -segments. - -- The blue shaded, or southwesterly, segment is [oriented](/schema/concepts/by-theme/transportation/shape-connectivity#directionality) toward the north-east. It has two geometrically-scoped lane block rules: - - The first rule, applying to the first two thirds of the - segment's length, establishes three lanes: one going - `backward` (SW), and two `forward` (NE). - - The second rule, applying to the last third of the segment, - establishes two lanes, one in either direction. -- The green shaded, or northeasterly, segment is oriented due west. It - has a single static lane block that applies to the whole segment - geometry at all times. - - - - -
- -
- - - -
- -*A segment with two [geometrically-scoped](/schema/concepts/scoping-rules#geometric-scoping-linear-referencing) lane blocks connected to a segment oriented in the opposite direction.* - -
- -
- -
- -
- - - -{ ExampleLanesResolutionSegment01 } - - - - - -{ ExampleLanesResolutionConnector } - - - - - - -{ ExampleLanesResolutionSegment02 } - - - -
diff --git a/docs/schema/concepts/by-theme/transportation/shape-connectivity.mdx b/docs/schema/concepts/by-theme/transportation/shape-connectivity.mdx index 3f744c53e..a6a1c82ac 100644 --- a/docs/schema/concepts/by-theme/transportation/shape-connectivity.mdx +++ b/docs/schema/concepts/by-theme/transportation/shape-connectivity.mdx @@ -204,7 +204,7 @@ back toward the start of the segment. --> -🚧 We are developing a segment-level directionality concept similar to [lane directionality](/schema/concepts/by-theme/transportation/roads#lane-directionality) to indicate what travel headings are allowed or prohibited along the segment. This effort is +🚧 We are developing a segment-level directionality concept to indicate what travel headings are allowed or prohibited along the segment. This effort is ongoing, so please check back soon. ### Sub-types diff --git a/docs/schema/concepts/scoping-rules.mdx b/docs/schema/concepts/scoping-rules.mdx index 480a27cc3..f874e26bf 100644 --- a/docs/schema/concepts/scoping-rules.mdx +++ b/docs/schema/concepts/scoping-rules.mdx @@ -14,7 +14,6 @@ import ExampleSubjectiveHeadingScoping from '!!raw-loader!@site/docs/_examples/t import ExampleSubjectiveUsagePurposeScoping from '!!raw-loader!@site/docs/_examples/transportation/docusaurus/subjective-usage-purpose-scoping.yaml'; import ExampleSubjectiveStatusScoping from '!!raw-loader!@site/docs/_examples/transportation/docusaurus/subjective-status-scoping.yaml'; import ExampleSubjectiveVehicleAttributesScoping from '!!raw-loader!@site/docs/_examples/transportation/docusaurus/subjective-vehicle-attributes-scoping.yaml'; -import ExampleLanesAbsoluteForm from '!!raw-loader!@site/docs/_examples/transportation/docusaurus/lanes-absolute-form.yaml'; ## Scoped and rule-based properties @@ -53,7 +52,7 @@ value of the `between` property is a pair of numbers `[a, b]` where `0` ≤ geometry. The numbers `a` and `b` are interpreted as percentage displacements along the parent segment's geometry starting from the start of the segment. (*The terms "start" and "end" are explained in -[Shape and connectivity](https://docs.overturemaps.org/guides/transportation/shape-connectivity).*) +[Shape and connectivity](https://docs.overturemaps.org/guides/transportation/shape-connectivity).*) So, for example, the scoping property `"at": 0.15` scopes its parent value to the position on the segment that is displaced 15% of the segment length from @@ -312,93 +311,6 @@ being modeled has a single unchanging state which is the same in all fact situations. In these cases, most rule-based properties support a simpler absolute form without a list of rules. -Consider the following two examples of road segments. On the left is a section -from a simple two-lane bidirectional city street in which there is always one -lane of traffic flowing in each direction. On the right is a section from a -one-way city street in which two of the lanes are only available for driving at -certain times of the day, being reserved for parking at other times. In the -example on the left, the lane list is specified absolutely; while in the example -on the right, it is given as a list of [temporally-scoped](#temporal-scoping-opening-hours) -lane rules. - -
- -
- -{ ExampleLanesAbsoluteForm } - -
- -
- -*An absolute list of lanes.* - -
- -
- -
- -
- -
- -
- - - -```yaml ---- -id: overture:transportation:example:lanes-rule -type: Feature -geometry: - type: LineString - coordinates: - - - -123.12244656918179 - - 49.280940587393815 - - - -123.12562968007902 - - 49.27884862879665 -properties: - theme: transportation - type: segment - version: 0 - update_time: "2023-06-16T15:57:00-06:00" - subtype: road - road: # The `road` property is deprecated and will be removed in the 2024-07 release - lanes: - - value: - - direction: forward - - direction: forward - - during: Mo-Fr 15:00-18:00 - value: - - direction: forward - - direction: forward - - direction: forward - - direction: forward -``` - -
- -
- -*A list of lane rules.* - -
- -
- -
- -
diff --git a/docs/schema/reference/transportation/segment.mdx b/docs/schema/reference/transportation/segment.mdx index 04788f236..828fa5520 100644 --- a/docs/schema/reference/transportation/segment.mdx +++ b/docs/schema/reference/transportation/segment.mdx @@ -9,7 +9,6 @@ import generateResolverOptions from "@site/src/components/shared-libs/generateRe import yamlLoad from "@site/src/components/yamlLoad" import SegmentSchema from '!!raw-loader!@site/docs/_schema/transportation/segment.yaml'; import ExampleSimpleRoad from '!!raw-loader!@site/docs/_examples/transportation/docusaurus/simple-road.yaml'; -import ExampleLanes from '!!raw-loader!@site/docs/_examples/transportation/docusaurus/lanes-hov.yaml'; import ExampleAccessRestriction from '!!raw-loader!@site/docs/_examples/transportation/docusaurus/access-restriction.yaml'; import ExampleTurnRestrictionSource from '!!raw-loader!@site/docs/_examples/transportation/docusaurus/turn-restriction-02-source.yaml'; import ExampleTurnRestrictionTarget from '!!raw-loader!@site/docs/_examples/transportation/docusaurus/turn-restriction-02-target.yaml'; @@ -126,10 +125,6 @@ The schema for `water` segments is under development. { JSON.stringify(yamlLoad(ExampleSimpleRoad), null, 2) } - - { JSON.stringify(yamlLoad(ExampleLanes), null, 2) } - - { JSON.stringify(yamlLoad(ExampleAccessRestriction), null, 2) } diff --git a/examples/transportation/docusaurus/lanes-absolute-form.yaml b/examples/transportation/docusaurus/lanes-absolute-form.yaml deleted file mode 100644 index 666d7e0ba..000000000 --- a/examples/transportation/docusaurus/lanes-absolute-form.yaml +++ /dev/null @@ -1,18 +0,0 @@ ---- -id: overture:transportation:example:lanes-absolute -type: Feature -geometry: - type: LineString - coordinates: - - [-123.13174398677468, 49.28492173297815] - - [-123.13015725772073, 49.283923094445726] -properties: - theme: transportation - type: segment - version: 2 - subtype: road - class: secondary - lanes: - - value: - - direction: backward - - direction: forward diff --git a/examples/transportation/docusaurus/lanes-hov.yaml b/examples/transportation/docusaurus/lanes-hov.yaml deleted file mode 100644 index 41a22b6e5..000000000 --- a/examples/transportation/docusaurus/lanes-hov.yaml +++ /dev/null @@ -1,41 +0,0 @@ ---- -id: overture:transportation:example:simple-road2 -type: Feature -geometry: - type: LineString - coordinates: - - [-122.2421117, 47.6382849] - - [-122.2429835, 47.6384385] - - [-122.2442307, 47.6386337] - - [-122.2445016, 47.6386753] -properties: - theme: transportation - type: segment - subtype: road - version: 2 - class: secondary - 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 diff --git a/examples/transportation/docusaurus/lanes-resolution-connector.yaml b/examples/transportation/docusaurus/lanes-resolution-connector.yaml deleted file mode 100644 index 1f38c21dc..000000000 --- a/examples/transportation/docusaurus/lanes-resolution-connector.yaml +++ /dev/null @@ -1,10 +0,0 @@ ---- -id: lanes-resolution-example-connector -type: Feature -geometry: - type: Point - coordinates: [-21.852776852103545, 22.079931368] -properties: - theme: transportation - type: connector - version: 0 diff --git a/examples/transportation/docusaurus/lanes-resolution-segment-01.yaml b/examples/transportation/docusaurus/lanes-resolution-segment-01.yaml deleted file mode 100644 index 7c17f54fb..000000000 --- a/examples/transportation/docusaurus/lanes-resolution-segment-01.yaml +++ /dev/null @@ -1,31 +0,0 @@ ---- -id: lanes-resolution-example-segment-1 -type: Feature -geometry: - type: LineString - coordinates: # Oriented toward segment 2, roughly NE. - - [-26.383587179327378, 19.309035206] - - [ -23.693418548, 22.079931368] -properties: - theme: transportation - type: segment - version: 1 - # `connector_ids` is deprecated in favor of `connectors`, planned to be removed for the October release - connector_ids: [fooConnector, barConnector] - connectors: - - connector_id: fooConnector - at: 0 - - connector_id: barConnector - at: 1 - subtype: road - class: motorway - 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 diff --git a/examples/transportation/docusaurus/lanes-resolution-segment-02.yaml b/examples/transportation/docusaurus/lanes-resolution-segment-02.yaml deleted file mode 100644 index 8c87fe21a..000000000 --- a/examples/transportation/docusaurus/lanes-resolution-segment-02.yaml +++ /dev/null @@ -1,25 +0,0 @@ ---- -id: lanes-resolution-example-segment-2 -type: Feature -geometry: - type: LineString - coordinates: # Oriented toward segment 1, due west. - - [-21.852776852103545, 22.079931368] - - [ -23.693418548, 22.079931368] -properties: - theme: transportation - type: segment - version: 2 - # `connector_ids` is deprecated in favor of `connectors`, planned to be removed for the October release - connector_ids: [fooConnector, barConnector] - connectors: - - connector_id: fooConnector - at: 0 - - connector_id: barConnector - at: 1 - subtype: road - class: motorway - lanes: - - value: # A lane block rule containing one globally-applicable lane block. - - direction: forward - - direction: backward diff --git a/examples/transportation/docusaurus/lanes-rule-form.yaml b/examples/transportation/docusaurus/lanes-rule-form.yaml deleted file mode 100644 index 8f5b57d4b..000000000 --- a/examples/transportation/docusaurus/lanes-rule-form.yaml +++ /dev/null @@ -1,26 +0,0 @@ ---- -id: overture:transportation:example:lanes-rule -type: Feature -geometry: - type: LineString - coordinates: - - - -123.12244656918179 - - 49.280940587393815 - - - -123.12562968007902 - - 49.27884862879665 -properties: - theme: transportation - type: segment - version: 2 - subtype: road - class: primary - lanes: - - value: - - direction: forward - - direction: forward - - when: {during: Mo-Fr 15:00-18:00} - value: - - direction: forward - - direction: forward - - direction: forward - - direction: forward diff --git a/examples/transportation/docusaurus/simple-road.yaml b/examples/transportation/docusaurus/simple-road.yaml index f5b34b789..edb063ea0 100644 --- a/examples/transportation/docusaurus/simple-road.yaml +++ b/examples/transportation/docusaurus/simple-road.yaml @@ -24,9 +24,5 @@ properties: at: 1 names: primary: Nicola Street - lanes: - - value: - - direction: backward - - direction: forward road_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 deleted file mode 100644 index 723b8b649..000000000 --- a/examples/transportation/segment/road/lanes/lanes-flow-alternating.yaml +++ /dev/null @@ -1,26 +0,0 @@ ---- -id: overture:transportation:segment:789 -type: Feature -geometry: - type: LineString - coordinates: [[0, 0], [1, 1]] -properties: - theme: transportation - type: segment - version: 4 - subtype: road - class: primary - # `connector_ids` is deprecated in favor of `connectors`, planned to be removed for the October release - connector_ids: [fooConnector, barConnector] - connectors: - - connector_id: fooConnector - at: 0 - - connector_id: barConnector - at: 1 - 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 diff --git a/examples/transportation/segment/road/lanes/lanes-flow-reversible.yaml b/examples/transportation/segment/road/lanes/lanes-flow-reversible.yaml deleted file mode 100644 index ea91cf014..000000000 --- a/examples/transportation/segment/road/lanes/lanes-flow-reversible.yaml +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: overture:transportation:segment:1011 -type: Feature -geometry: - type: LineString - coordinates: [[0, 0], [1, 1]] -properties: - theme: transportation - type: segment - version: 5 - subtype: road - class: primary - # `connector_ids` is deprecated in favor of `connectors`, planned to be removed for the October release - connector_ids: [fooConnector, barConnector] - connectors: - - connector_id: fooConnector - at: 0 - - connector_id: barConnector - at: 1 - 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 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 deleted file mode 100644 index 6b2b98e88..000000000 --- a/examples/transportation/segment/road/lanes/lanes-on-straight-road-lr.yaml +++ /dev/null @@ -1,44 +0,0 @@ ---- -id: "234" -type: Feature -geometry: - type: LineString - coordinates: [[0, 0], [1, 1]] -properties: - # Overture properties - theme: transportation - type: segment - subtype: road - class: primary - version: 1 - 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 diff --git a/examples/transportation/segment/road/lanes/lanes-temporal.yaml b/examples/transportation/segment/road/lanes/lanes-temporal.yaml deleted file mode 100644 index b868f7bf5..000000000 --- a/examples/transportation/segment/road/lanes/lanes-temporal.yaml +++ /dev/null @@ -1,18 +0,0 @@ ---- -id: overture:transportation:segment:example:lanes:temporal -type: Feature -geometry: - type: LineString - coordinates: [[0, 0], [1, 0]] -properties: - theme: transportation - type: segment - subtype: road - class: living_street - version: 1 - lanes: - - value: - - direction: forward - - direction: backward - when: - during: "Mo-Fr 08:00-18:00" 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 deleted file mode 100644 index 555cf64f8..000000000 --- a/examples/transportation/segment/road/lanes/restrictions/lanes-access-for-travel-modes.yaml +++ /dev/null @@ -1,45 +0,0 @@ ---- -id: "234" -type: Feature -geometry: - type: LineString - coordinates: [[0, 0], [1, 1]] -properties: - theme: transportation - type: segment - subtype: road - class: secondary - version: 2 - 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 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 deleted file mode 100644 index a47c98624..000000000 --- a/examples/transportation/segment/road/lanes/restrictions/lanes-access-with-lr.yaml +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: "234" -type: Feature -geometry: - type: LineString - coordinates: [[0, 0], [1, 1]] -properties: - theme: transportation - type: segment - subtype: road - class: secondary - version: 2 - 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] 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 deleted file mode 100644 index 9b93a9637..000000000 --- a/examples/transportation/segment/road/lanes/restrictions/lanes-hov-occupancy-scoped.yaml +++ /dev/null @@ -1,38 +0,0 @@ ---- -id: "234" -type: Feature -geometry: - type: LineString - coordinates: [[0, 0], [1, 1]] -properties: - theme: transportation - type: segment - subtype: road - class: secondary - version: 2 - 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 diff --git a/examples/transportation/segment/road/lanes/restrictions/lanes-hov.yaml b/examples/transportation/segment/road/lanes/restrictions/lanes-hov.yaml deleted file mode 100644 index ee6466cc3..000000000 --- a/examples/transportation/segment/road/lanes/restrictions/lanes-hov.yaml +++ /dev/null @@ -1,37 +0,0 @@ ---- -id: "234" -type: Feature -geometry: - type: LineString - coordinates: [[0, 0], [1, 1]] -properties: - theme: transportation - type: segment - subtype: road - class: secondary - version: 2 - 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 diff --git a/examples/transportation/segment/road/lanes/restrictions/lanes-speed-limits.yaml b/examples/transportation/segment/road/lanes/restrictions/lanes-speed-limits.yaml deleted file mode 100644 index 7872d63e5..000000000 --- a/examples/transportation/segment/road/lanes/restrictions/lanes-speed-limits.yaml +++ /dev/null @@ -1,51 +0,0 @@ ---- -id: "234" -type: Feature -geometry: - type: LineString - coordinates: [[0, 0], [1, 1]] -properties: - theme: transportation - type: segment - subtype: road - class: secondary - version: 2 - 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] diff --git a/examples/transportation/segment/road/road-oneway-with-lanes.yaml b/examples/transportation/segment/road/road-oneway-with-lanes.yaml deleted file mode 100644 index 4d766a5e1..000000000 --- a/examples/transportation/segment/road/road-oneway-with-lanes.yaml +++ /dev/null @@ -1,24 +0,0 @@ ---- -id: overture:transportation:segment:1213 -type: Feature -geometry: - type: LineString - coordinates: [[0, 0], [1, 1]] -properties: - theme: transportation - type: segment - version: 6 - subtype: road - class: secondary - # `connector_ids` is deprecated in favor of `connectors`, planned to be removed for the October release - connector_ids: [fooConnector, barConnector] - connectors: - - connector_id: fooConnector - at: 0 - - connector_id: barConnector - at: 1 - # one way road in forward direction (lanes only in forward direction) - lanes: - - value: - - direction: forward - - direction: forward diff --git a/examples/transportation/segment/road/road.yaml b/examples/transportation/segment/road/road.yaml index ac126c2ca..267848e94 100644 --- a/examples/transportation/segment/road/road.yaml +++ b/examples/transportation/segment/road/road.yaml @@ -25,7 +25,7 @@ properties: at: 1 names: primary: Common Road Name - # no access nor lanes information -> means by default road is accessible in both directions with at least one lane in each direction + # no access information -> means by default road is accessible in both directions road_surface: - value: gravel road_flags: diff --git a/schema/transportation/segment.yaml b/schema/transportation/segment.yaml index ed681ed7f..dd12edb79 100644 --- a/schema/transportation/segment.yaml +++ b/schema/transportation/segment.yaml @@ -33,7 +33,6 @@ properties: required: [class] properties: destinations: { "$ref": "#/$defs/propertyDefinitions/destinations" } - lanes: { "$ref": "#/$defs/propertyContainers/lanesContainer" } prohibited_transitions: { "$ref": "#/$defs/propertyContainers/prohibitedTransitionsContainer" } road_surface: { "$ref": "#/$defs/propertyContainers/surfaceContainer"} road_flags: { "$ref": "#/$defs/propertyContainers/flagsContainer" } @@ -186,41 +185,6 @@ properties: - cycleway - bridleway # Similar to track but has implied access only for horses - unknown - lane: - description: Properties for a single lane of traffic. - type: object - unevaluatedProperties: false - required: [direction] - properties: - direction: { "$ref": "#/$defs/propertyDefinitions/laneDirection" } - restrictions: - description: Restrictions on how the lane may be used - "$comment": >- - Lane restrictions may be defined in the same way as for whole roads with the exception - of turns; there are no turn restrictions for lanes. - type: object - unevaluatedProperties: false - properties: - speed_limits: - "$ref": "#/$defs/propertyContainers/speedLimitsContainer" - access: - "$ref": "#/$defs/propertyContainers/accessContainer" - min_occupancy: - description: >- - Minimal occupancy restrictions relate to HOV (high occupancy vehicles) travel modes. - If a lane is restricted for use only by HOVs, then the default minimum vehicle - occupancy qualifying as HOV is 2+ passengers (including the driver). This - restriction can be provided to override the default definition of HOV. - type: integer - minimum: 1 - laneDirection: - type: string - enum: - - forward # Traffic flows in the segment direction. - - backward # Traffic flows against the segment direction. - - both_ways # Traffic flows simultaneously in both directions as, e.g., on a sidewalk. - - alternating # Traffic flows alternately forward and backward following a predictable rhythm. - - reversible # Traffic flows forward, but may be arbitrarily reversed by traffic authorities at any time. heading: description: >- Enumerates possible travel headings along segment geometry. @@ -581,7 +545,7 @@ properties: minimum: 0 unit: { "$ref": "#/$defs/propertyDefinitions/vehicleScopeUnit" } speedLimitsContainer: - description: Rules governing speed on this road segment or lane + description: Rules governing speed on this road segment type: array items: description: An individual speed limit rule @@ -617,7 +581,7 @@ properties: minLength: 1 uniqueItems: true accessContainer: - description: Rules governing access to this road segment or lane + description: Rules governing access to this road segment type: array items: type: object @@ -641,36 +605,6 @@ 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 From 4e019cb0cc57a2d70d394b59a508655ffca5f5bd Mon Sep 17 00:00:00 2001 From: Brad Richardson Date: Wed, 2 Oct 2024 10:16:06 -0400 Subject: [PATCH 2/2] Revert "Remove lanes" This reverts commit d73366b057c7288d8ba2c616d5975b5050551f42. --- .../bad-road-invalid-min-occupancy-value.json | 35 +++ .../road/bad-road-invalid-min-occupancy.json | 39 +++ .../by-theme/transportation/roads.mdx | 277 +++++++++++++++++- .../transportation/shape-connectivity.mdx | 2 +- docs/schema/concepts/scoping-rules.mdx | 90 +++++- .../reference/transportation/segment.mdx | 5 + .../docusaurus/lanes-absolute-form.yaml | 18 ++ .../transportation/docusaurus/lanes-hov.yaml | 41 +++ .../lanes-resolution-connector.yaml | 10 + .../lanes-resolution-segment-01.yaml | 31 ++ .../lanes-resolution-segment-02.yaml | 25 ++ .../docusaurus/lanes-rule-form.yaml | 26 ++ .../docusaurus/simple-road.yaml | 4 + .../road/lanes/lanes-flow-alternating.yaml | 26 ++ .../road/lanes/lanes-flow-reversible.yaml | 36 +++ .../road/lanes/lanes-on-straight-road-lr.yaml | 44 +++ .../segment/road/lanes/lanes-temporal.yaml | 18 ++ .../lanes-access-for-travel-modes.yaml | 45 +++ .../restrictions/lanes-access-with-lr.yaml | 32 ++ .../lanes-hov-occupancy-scoped.yaml | 38 +++ .../road/lanes/restrictions/lanes-hov.yaml | 37 +++ .../restrictions/lanes-speed-limits.yaml | 51 ++++ .../segment/road/road-oneway-with-lanes.yaml | 24 ++ .../transportation/segment/road/road.yaml | 2 +- schema/transportation/segment.yaml | 70 ++++- 25 files changed, 1018 insertions(+), 8 deletions(-) create mode 100644 counterexamples/transportation/segment/road/bad-road-invalid-min-occupancy-value.json create mode 100644 counterexamples/transportation/segment/road/bad-road-invalid-min-occupancy.json create mode 100644 examples/transportation/docusaurus/lanes-absolute-form.yaml create mode 100644 examples/transportation/docusaurus/lanes-hov.yaml create mode 100644 examples/transportation/docusaurus/lanes-resolution-connector.yaml create mode 100644 examples/transportation/docusaurus/lanes-resolution-segment-01.yaml create mode 100644 examples/transportation/docusaurus/lanes-resolution-segment-02.yaml create mode 100644 examples/transportation/docusaurus/lanes-rule-form.yaml create mode 100644 examples/transportation/segment/road/lanes/lanes-flow-alternating.yaml create mode 100644 examples/transportation/segment/road/lanes/lanes-flow-reversible.yaml create mode 100644 examples/transportation/segment/road/lanes/lanes-on-straight-road-lr.yaml create mode 100644 examples/transportation/segment/road/lanes/lanes-temporal.yaml create mode 100644 examples/transportation/segment/road/lanes/restrictions/lanes-access-for-travel-modes.yaml create mode 100644 examples/transportation/segment/road/lanes/restrictions/lanes-access-with-lr.yaml create mode 100644 examples/transportation/segment/road/lanes/restrictions/lanes-hov-occupancy-scoped.yaml create mode 100644 examples/transportation/segment/road/lanes/restrictions/lanes-hov.yaml create mode 100644 examples/transportation/segment/road/lanes/restrictions/lanes-speed-limits.yaml create mode 100644 examples/transportation/segment/road/road-oneway-with-lanes.yaml 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 new file mode 100644 index 000000000..8bb2f0094 --- /dev/null +++ b/counterexamples/transportation/segment/road/bad-road-invalid-min-occupancy-value.json @@ -0,0 +1,35 @@ +{ + "id": "invalidMinOccupancyValue", + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [[2, 2], [3, 3]] + }, + "properties": { + "theme": "transportation", + "type": "segment", + "version": 20, + "subtype": "road", + "class": "primary", + "road_flags": [ + { + "values": ["is_tunnel"] + } + ], + "lanes": [ + { + "value": [ + { + "direction": "backward", + "restrictions": { + "min_occupancy": 0 + } + } + ] + } + ], + "ext_expected_errors": [ + "[I#/properties/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 new file mode 100644 index 000000000..50577fddd --- /dev/null +++ b/counterexamples/transportation/segment/road/bad-road-invalid-min-occupancy.json @@ -0,0 +1,39 @@ +{ + "id": "invalidMinOccupancyType", + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [[2, 2], [3, 3]] + }, + "properties": { + "theme": "transportation", + "type": "segment", + "version": 20, + "subtype": "road", + "class": "primary", + "road_flags": [ + { + "values": ["is_tunnel"] + } + ], + "lanes": [ + { + "value": [ + { + "direction": "forward", + "restrictions": { + "min_occupancy": [ + { + "is_at_least": 3 + } + ] + } + } + ] + } + ], + "ext_expected_errors": [ + "[I#/properties/lanes/0/value/0/restrictions/min_occupancy] [S#/$defs/propertyDefinitions/lane/properties/restrictions/properties/min_occupancy/type] expected integer, but got array" + ] + } + } diff --git a/docs/schema/concepts/by-theme/transportation/roads.mdx b/docs/schema/concepts/by-theme/transportation/roads.mdx index 5ea09211a..2a3c36173 100644 --- a/docs/schema/concepts/by-theme/transportation/roads.mdx +++ b/docs/schema/concepts/by-theme/transportation/roads.mdx @@ -14,6 +14,9 @@ import ExampleAccessRestrictionAxleLimit from '!!raw-loader!@site/docs/_examples import ExampleSpeedLimitsSimple from '!!raw-loader!@site/docs/_examples/transportation/docusaurus/speed-limits-01-simple.yaml'; import ExampleSpeedLimitsDirectional from '!!raw-loader!@site/docs/_examples/transportation/docusaurus/speed-limits-02-directional.yaml'; import ExampleSpeedLimitsVariableMax from '!!raw-loader!@site/docs/_examples/transportation/docusaurus/speed-limits-03-variable-max.yaml'; +import ExampleLanesResolutionConnector from '!!raw-loader!@site/docs/_examples/transportation/docusaurus/lanes-resolution-connector.yaml'; +import ExampleLanesResolutionSegment01 from '!!raw-loader!@site/docs/_examples/transportation/docusaurus/lanes-resolution-segment-01.yaml'; +import ExampleLanesResolutionSegment02 from '!!raw-loader!@site/docs/_examples/transportation/docusaurus/lanes-resolution-segment-02.yaml'; import ExampleTurnRestriction1Source from '!!raw-loader!@site/docs/_examples/transportation/docusaurus/turn-restriction-01-source.yaml'; import ExampleTurnRestriction1Target from '!!raw-loader!@site/docs/_examples/transportation/docusaurus/turn-restriction-01-target.yaml'; import ExampleTurnRestriction1Exit from '!!raw-loader!@site/docs/_examples/transportation/docusaurus/turn-restriction-01-exit.yaml'; @@ -36,9 +39,10 @@ in many cases, approximates the physical centerline of the section of road being modeled. Road segments support modeling the road network at a range of granularities. For example, a single road segment can represent: -- bidirectional street including all of its sidewalks +- bidirectional street including all of its lanes and sidewalks - sidewalk by itself - one-way street or one direction of a dual carriageway +- single lane or single section of a multi-lane highway - dedicated cycleway - hiking path @@ -104,7 +108,8 @@ resolve.) The implied access restrictions may be modified for the road segment as a whole by providing an explicit value for the property -`access_restrictions`. +`access_restrictions`. (Access restrictions may also be specified +at the level of individual [lanes](#lanes), as explained elsewhere.) It is technically possible to specify a blanket access grant or refusal of access applying to everyone and everything; but where, as is typical, @@ -323,7 +328,9 @@ limits. The implied speed limits may be configured for the whole road segment by providing an explicit value for the property -`speed_limits`. +`speed_limits`. Note: granular speed limits can also be +specified at the level of individual [lanes](#lanes), as explained +elsewhere. As with access restrictions and turn restrictions, speed limits can be specified using [rules](/schema/concepts/scoping-rules#rules-and-rule-based-properties). @@ -346,3 +353,267 @@ As with access restrictions and turn restrictions, speed limits can be specified + +## Lanes + +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 `lanes` property applies to traffic lanes, not to +parking lanes. + +### Use cases for lanes + +Many transportation use cases can be solved either entirely or in large part without examining the lane +structure of the road network. For example, optimal route calculation +can be entirely solved without lane-level information, as can most 2D +map rendering problems. Lane information is most interesting for +granular turn-by-turn or maneuver-by-maneuver navigation applications. + +### Default lane structure + +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 +`forward` and one `backward`. + +### Lane numbering + +The number of lanes at a given place and time on a road segment is equal to +the length of the lanes list within the resolved lane block. + +Each entry in the resolved lanes list represents one lane on the road. +Order is important. The list captures the lanes in left-to-right order +as they would be observed by a person standing on the physical road being modeled, facing in the [direction](/schema/concepts/by-theme/transportation/shape-connectivity#directionality) +of the segment geometry. The leftmost lane has index `0`; the rightmost +lane, assuming there are N total lanes, has index N-1. The example +below illustrates how lane numbering works with example two-lane +segments oriented in the north, west, east, and south directions, +respectively. + +
+ +
+ +
+ + + +
+ +
+ +
+ + + +
+ +
+ +
+ + + +
+ +
+ +
+ + + +
+ +
+ +
+ + +
+ +
+ +*How lanes are numbered for examples segments with geometry directions due west, north, east, and south.* + +
+ +
+ +
+ +### Lane directionality + +Each lane within a segment has a directionality, documenting which +travel directions are allowed within the lane, with reference to the [orientation of the segment](/schema/concepts/by-theme/transportation/shape-connectivity#start-end-and-orientation). Lane directionality is specified by the lane object's `directionality` +property. The allowed values are: + +
+ +
+ +| Directionality | Meaning | +|-|-| +| `forward` | Travel is only allowed along the `forward` heading. | +| `backward` | Travel is only allowed along the `backward` heading. | +| `both_ways` | Travel is allowed both `forward` and `backward` at the same time. | +| `alternating` | Travel is one-way and changes between `forward` and `backward` constantly. | +| `reversible` | Travel is one-way and changes between `forward` and `backward` infrequently. | + +
+ +
+ +
+ +*Allowed values for lane `directionality`.* + +
+ +
+
+ +The `directionality` property is a mandatory property for lanes, and is +the only mandatory property. + +When the allowed travel heading changes based on a regular schedule, +the appropriate "definite" directionalities (`forward`, `backward`, and +`both_ways`) should be used along with [temporal scoping](/schema/concepts/scoping-rules#temporal-scoping-opening-hours) at the lane block level. + +When the allowed travel heading changes based on unpredictable local +factors, such that allowed heading at any given time can only be known +by an observer actually present at the real-world location, the +appropriate indefinite directionality (`alternating` or `reversible`) +should be used. + +### Lane restrictions + +Like the segment a whole, each lane within a lane block can have its own +restrictions, for example [access restrictions](#access-restrictions), +[turn restrictions](#turn-restrictions) and +[speed limits](#speed-limits). + +Lane-level restrictions reuse the same concepts as segment-level +restrictions and are typically phrased in the same way, except that the +restriction is stipulated on an individual lane object rather than for +the segment's `road` property as a whole. + +### Lane connectivity + +Lane connectivity refers to the maneuvers available to navigate from the +lane the traveller is currently occupying to a connected lane within the +next lane block in the traveller's current travel direction. Lane +connectivity is a necessary element for granular turn-by-turn +navigation instructions. + +The Overture transportation schema does not currently support lane +connectivity, but it is something we are actively working on and hoping +to release soon. + +### Resolving the applicable lane block + +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/concepts/scoping-rules#rules-and-rule-based-properties) +in the optional `lanes` property. + +- A rule may be scoped [geometrically](/schema/concepts/scoping-rules#geometric-scoping-linear-referencing), +which allows linear referencing to be used to specify the portion of the +segment geometry where the lane block exists. +- A rule may also be scoped [temporally](/schema/concepts/scoping-rules#temporal-scoping-opening-hours), which allows the time of day that the lane block exists to be specified. Temporal scoping is useful for modeling cases like lanes which are used +for parking at off hours and traffic during peak hours. In such a case, +the lane block rule would be scoped to peak hours. + +As with all rule-based properties in the Overture schema, the [rule evaluation algorithm](/schema/concepts/scoping-rules#rule-evaluation-algorithm) must be applied to determine which lane block rule, if any, is +applicable at a given place and time along the road segment. Once the +determining rule for a certain scope is known, its rule block defines +the lane structure within that scope. + +The example below illustrates lane block resolution for two connected +segments. + +- The blue shaded, or southwesterly, segment is [oriented](/schema/concepts/by-theme/transportation/shape-connectivity#directionality) toward the north-east. It has two geometrically-scoped lane block rules: + - The first rule, applying to the first two thirds of the + segment's length, establishes three lanes: one going + `backward` (SW), and two `forward` (NE). + - The second rule, applying to the last third of the segment, + establishes two lanes, one in either direction. +- The green shaded, or northeasterly, segment is oriented due west. It + has a single static lane block that applies to the whole segment + geometry at all times. + + + + +
+ +
+ + + +
+ +*A segment with two [geometrically-scoped](/schema/concepts/scoping-rules#geometric-scoping-linear-referencing) lane blocks connected to a segment oriented in the opposite direction.* + +
+ +
+ +
+ +
+ + + +{ ExampleLanesResolutionSegment01 } + + + + + +{ ExampleLanesResolutionConnector } + + + + + + +{ ExampleLanesResolutionSegment02 } + + + +
diff --git a/docs/schema/concepts/by-theme/transportation/shape-connectivity.mdx b/docs/schema/concepts/by-theme/transportation/shape-connectivity.mdx index a6a1c82ac..3f744c53e 100644 --- a/docs/schema/concepts/by-theme/transportation/shape-connectivity.mdx +++ b/docs/schema/concepts/by-theme/transportation/shape-connectivity.mdx @@ -204,7 +204,7 @@ back toward the start of the segment. --> -🚧 We are developing a segment-level directionality concept to indicate what travel headings are allowed or prohibited along the segment. This effort is +🚧 We are developing a segment-level directionality concept similar to [lane directionality](/schema/concepts/by-theme/transportation/roads#lane-directionality) to indicate what travel headings are allowed or prohibited along the segment. This effort is ongoing, so please check back soon. ### Sub-types diff --git a/docs/schema/concepts/scoping-rules.mdx b/docs/schema/concepts/scoping-rules.mdx index f874e26bf..480a27cc3 100644 --- a/docs/schema/concepts/scoping-rules.mdx +++ b/docs/schema/concepts/scoping-rules.mdx @@ -14,6 +14,7 @@ import ExampleSubjectiveHeadingScoping from '!!raw-loader!@site/docs/_examples/t import ExampleSubjectiveUsagePurposeScoping from '!!raw-loader!@site/docs/_examples/transportation/docusaurus/subjective-usage-purpose-scoping.yaml'; import ExampleSubjectiveStatusScoping from '!!raw-loader!@site/docs/_examples/transportation/docusaurus/subjective-status-scoping.yaml'; import ExampleSubjectiveVehicleAttributesScoping from '!!raw-loader!@site/docs/_examples/transportation/docusaurus/subjective-vehicle-attributes-scoping.yaml'; +import ExampleLanesAbsoluteForm from '!!raw-loader!@site/docs/_examples/transportation/docusaurus/lanes-absolute-form.yaml'; ## Scoped and rule-based properties @@ -52,7 +53,7 @@ value of the `between` property is a pair of numbers `[a, b]` where `0` ≤ geometry. The numbers `a` and `b` are interpreted as percentage displacements along the parent segment's geometry starting from the start of the segment. (*The terms "start" and "end" are explained in -[Shape and connectivity](https://docs.overturemaps.org/guides/transportation/shape-connectivity).*) +[Shape and connectivity](https://docs.overturemaps.org/guides/transportation/shape-connectivity).*) So, for example, the scoping property `"at": 0.15` scopes its parent value to the position on the segment that is displaced 15% of the segment length from @@ -311,6 +312,93 @@ being modeled has a single unchanging state which is the same in all fact situations. In these cases, most rule-based properties support a simpler absolute form without a list of rules. +Consider the following two examples of road segments. On the left is a section +from a simple two-lane bidirectional city street in which there is always one +lane of traffic flowing in each direction. On the right is a section from a +one-way city street in which two of the lanes are only available for driving at +certain times of the day, being reserved for parking at other times. In the +example on the left, the lane list is specified absolutely; while in the example +on the right, it is given as a list of [temporally-scoped](#temporal-scoping-opening-hours) +lane rules. + +
+ +
+ +{ ExampleLanesAbsoluteForm } + +
+ +
+ +*An absolute list of lanes.* + +
+ +
+ +
+ +
+ +
+ +
+ + + +```yaml +--- +id: overture:transportation:example:lanes-rule +type: Feature +geometry: + type: LineString + coordinates: + - - -123.12244656918179 + - 49.280940587393815 + - - -123.12562968007902 + - 49.27884862879665 +properties: + theme: transportation + type: segment + version: 0 + update_time: "2023-06-16T15:57:00-06:00" + subtype: road + road: # The `road` property is deprecated and will be removed in the 2024-07 release + lanes: + - value: + - direction: forward + - direction: forward + - during: Mo-Fr 15:00-18:00 + value: + - direction: forward + - direction: forward + - direction: forward + - direction: forward +``` + +
+ +
+ +*A list of lane rules.* + +
+ +
+ +
+ +
diff --git a/docs/schema/reference/transportation/segment.mdx b/docs/schema/reference/transportation/segment.mdx index 828fa5520..04788f236 100644 --- a/docs/schema/reference/transportation/segment.mdx +++ b/docs/schema/reference/transportation/segment.mdx @@ -9,6 +9,7 @@ import generateResolverOptions from "@site/src/components/shared-libs/generateRe import yamlLoad from "@site/src/components/yamlLoad" import SegmentSchema from '!!raw-loader!@site/docs/_schema/transportation/segment.yaml'; import ExampleSimpleRoad from '!!raw-loader!@site/docs/_examples/transportation/docusaurus/simple-road.yaml'; +import ExampleLanes from '!!raw-loader!@site/docs/_examples/transportation/docusaurus/lanes-hov.yaml'; import ExampleAccessRestriction from '!!raw-loader!@site/docs/_examples/transportation/docusaurus/access-restriction.yaml'; import ExampleTurnRestrictionSource from '!!raw-loader!@site/docs/_examples/transportation/docusaurus/turn-restriction-02-source.yaml'; import ExampleTurnRestrictionTarget from '!!raw-loader!@site/docs/_examples/transportation/docusaurus/turn-restriction-02-target.yaml'; @@ -125,6 +126,10 @@ The schema for `water` segments is under development. { JSON.stringify(yamlLoad(ExampleSimpleRoad), null, 2) } + + { JSON.stringify(yamlLoad(ExampleLanes), null, 2) } + + { JSON.stringify(yamlLoad(ExampleAccessRestriction), null, 2) } diff --git a/examples/transportation/docusaurus/lanes-absolute-form.yaml b/examples/transportation/docusaurus/lanes-absolute-form.yaml new file mode 100644 index 000000000..666d7e0ba --- /dev/null +++ b/examples/transportation/docusaurus/lanes-absolute-form.yaml @@ -0,0 +1,18 @@ +--- +id: overture:transportation:example:lanes-absolute +type: Feature +geometry: + type: LineString + coordinates: + - [-123.13174398677468, 49.28492173297815] + - [-123.13015725772073, 49.283923094445726] +properties: + theme: transportation + type: segment + version: 2 + subtype: road + class: secondary + lanes: + - value: + - direction: backward + - direction: forward diff --git a/examples/transportation/docusaurus/lanes-hov.yaml b/examples/transportation/docusaurus/lanes-hov.yaml new file mode 100644 index 000000000..41a22b6e5 --- /dev/null +++ b/examples/transportation/docusaurus/lanes-hov.yaml @@ -0,0 +1,41 @@ +--- +id: overture:transportation:example:simple-road2 +type: Feature +geometry: + type: LineString + coordinates: + - [-122.2421117, 47.6382849] + - [-122.2429835, 47.6384385] + - [-122.2442307, 47.6386337] + - [-122.2445016, 47.6386753] +properties: + theme: transportation + type: segment + subtype: road + version: 2 + class: secondary + 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 diff --git a/examples/transportation/docusaurus/lanes-resolution-connector.yaml b/examples/transportation/docusaurus/lanes-resolution-connector.yaml new file mode 100644 index 000000000..1f38c21dc --- /dev/null +++ b/examples/transportation/docusaurus/lanes-resolution-connector.yaml @@ -0,0 +1,10 @@ +--- +id: lanes-resolution-example-connector +type: Feature +geometry: + type: Point + coordinates: [-21.852776852103545, 22.079931368] +properties: + theme: transportation + type: connector + version: 0 diff --git a/examples/transportation/docusaurus/lanes-resolution-segment-01.yaml b/examples/transportation/docusaurus/lanes-resolution-segment-01.yaml new file mode 100644 index 000000000..7c17f54fb --- /dev/null +++ b/examples/transportation/docusaurus/lanes-resolution-segment-01.yaml @@ -0,0 +1,31 @@ +--- +id: lanes-resolution-example-segment-1 +type: Feature +geometry: + type: LineString + coordinates: # Oriented toward segment 2, roughly NE. + - [-26.383587179327378, 19.309035206] + - [ -23.693418548, 22.079931368] +properties: + theme: transportation + type: segment + version: 1 + # `connector_ids` is deprecated in favor of `connectors`, planned to be removed for the October release + connector_ids: [fooConnector, barConnector] + connectors: + - connector_id: fooConnector + at: 0 + - connector_id: barConnector + at: 1 + subtype: road + class: motorway + 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 diff --git a/examples/transportation/docusaurus/lanes-resolution-segment-02.yaml b/examples/transportation/docusaurus/lanes-resolution-segment-02.yaml new file mode 100644 index 000000000..8c87fe21a --- /dev/null +++ b/examples/transportation/docusaurus/lanes-resolution-segment-02.yaml @@ -0,0 +1,25 @@ +--- +id: lanes-resolution-example-segment-2 +type: Feature +geometry: + type: LineString + coordinates: # Oriented toward segment 1, due west. + - [-21.852776852103545, 22.079931368] + - [ -23.693418548, 22.079931368] +properties: + theme: transportation + type: segment + version: 2 + # `connector_ids` is deprecated in favor of `connectors`, planned to be removed for the October release + connector_ids: [fooConnector, barConnector] + connectors: + - connector_id: fooConnector + at: 0 + - connector_id: barConnector + at: 1 + subtype: road + class: motorway + lanes: + - value: # A lane block rule containing one globally-applicable lane block. + - direction: forward + - direction: backward diff --git a/examples/transportation/docusaurus/lanes-rule-form.yaml b/examples/transportation/docusaurus/lanes-rule-form.yaml new file mode 100644 index 000000000..8f5b57d4b --- /dev/null +++ b/examples/transportation/docusaurus/lanes-rule-form.yaml @@ -0,0 +1,26 @@ +--- +id: overture:transportation:example:lanes-rule +type: Feature +geometry: + type: LineString + coordinates: + - - -123.12244656918179 + - 49.280940587393815 + - - -123.12562968007902 + - 49.27884862879665 +properties: + theme: transportation + type: segment + version: 2 + subtype: road + class: primary + lanes: + - value: + - direction: forward + - direction: forward + - when: {during: Mo-Fr 15:00-18:00} + value: + - direction: forward + - direction: forward + - direction: forward + - direction: forward diff --git a/examples/transportation/docusaurus/simple-road.yaml b/examples/transportation/docusaurus/simple-road.yaml index edb063ea0..f5b34b789 100644 --- a/examples/transportation/docusaurus/simple-road.yaml +++ b/examples/transportation/docusaurus/simple-road.yaml @@ -24,5 +24,9 @@ properties: at: 1 names: primary: Nicola Street + lanes: + - value: + - direction: backward + - direction: forward road_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 new file mode 100644 index 000000000..723b8b649 --- /dev/null +++ b/examples/transportation/segment/road/lanes/lanes-flow-alternating.yaml @@ -0,0 +1,26 @@ +--- +id: overture:transportation:segment:789 +type: Feature +geometry: + type: LineString + coordinates: [[0, 0], [1, 1]] +properties: + theme: transportation + type: segment + version: 4 + subtype: road + class: primary + # `connector_ids` is deprecated in favor of `connectors`, planned to be removed for the October release + connector_ids: [fooConnector, barConnector] + connectors: + - connector_id: fooConnector + at: 0 + - connector_id: barConnector + at: 1 + 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 diff --git a/examples/transportation/segment/road/lanes/lanes-flow-reversible.yaml b/examples/transportation/segment/road/lanes/lanes-flow-reversible.yaml new file mode 100644 index 000000000..ea91cf014 --- /dev/null +++ b/examples/transportation/segment/road/lanes/lanes-flow-reversible.yaml @@ -0,0 +1,36 @@ +--- +id: overture:transportation:segment:1011 +type: Feature +geometry: + type: LineString + coordinates: [[0, 0], [1, 1]] +properties: + theme: transportation + type: segment + version: 5 + subtype: road + class: primary + # `connector_ids` is deprecated in favor of `connectors`, planned to be removed for the October release + connector_ids: [fooConnector, barConnector] + connectors: + - connector_id: fooConnector + at: 0 + - connector_id: barConnector + at: 1 + 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 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 new file mode 100644 index 000000000..6b2b98e88 --- /dev/null +++ b/examples/transportation/segment/road/lanes/lanes-on-straight-road-lr.yaml @@ -0,0 +1,44 @@ +--- +id: "234" +type: Feature +geometry: + type: LineString + coordinates: [[0, 0], [1, 1]] +properties: + # Overture properties + theme: transportation + type: segment + subtype: road + class: primary + version: 1 + 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 diff --git a/examples/transportation/segment/road/lanes/lanes-temporal.yaml b/examples/transportation/segment/road/lanes/lanes-temporal.yaml new file mode 100644 index 000000000..b868f7bf5 --- /dev/null +++ b/examples/transportation/segment/road/lanes/lanes-temporal.yaml @@ -0,0 +1,18 @@ +--- +id: overture:transportation:segment:example:lanes:temporal +type: Feature +geometry: + type: LineString + coordinates: [[0, 0], [1, 0]] +properties: + theme: transportation + type: segment + subtype: road + class: living_street + version: 1 + lanes: + - value: + - direction: forward + - direction: backward + when: + during: "Mo-Fr 08:00-18:00" 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 new file mode 100644 index 000000000..555cf64f8 --- /dev/null +++ b/examples/transportation/segment/road/lanes/restrictions/lanes-access-for-travel-modes.yaml @@ -0,0 +1,45 @@ +--- +id: "234" +type: Feature +geometry: + type: LineString + coordinates: [[0, 0], [1, 1]] +properties: + theme: transportation + type: segment + subtype: road + class: secondary + version: 2 + 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 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 new file mode 100644 index 000000000..a47c98624 --- /dev/null +++ b/examples/transportation/segment/road/lanes/restrictions/lanes-access-with-lr.yaml @@ -0,0 +1,32 @@ +--- +id: "234" +type: Feature +geometry: + type: LineString + coordinates: [[0, 0], [1, 1]] +properties: + theme: transportation + type: segment + subtype: road + class: secondary + version: 2 + 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] 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 new file mode 100644 index 000000000..9b93a9637 --- /dev/null +++ b/examples/transportation/segment/road/lanes/restrictions/lanes-hov-occupancy-scoped.yaml @@ -0,0 +1,38 @@ +--- +id: "234" +type: Feature +geometry: + type: LineString + coordinates: [[0, 0], [1, 1]] +properties: + theme: transportation + type: segment + subtype: road + class: secondary + version: 2 + 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 diff --git a/examples/transportation/segment/road/lanes/restrictions/lanes-hov.yaml b/examples/transportation/segment/road/lanes/restrictions/lanes-hov.yaml new file mode 100644 index 000000000..ee6466cc3 --- /dev/null +++ b/examples/transportation/segment/road/lanes/restrictions/lanes-hov.yaml @@ -0,0 +1,37 @@ +--- +id: "234" +type: Feature +geometry: + type: LineString + coordinates: [[0, 0], [1, 1]] +properties: + theme: transportation + type: segment + subtype: road + class: secondary + version: 2 + 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 diff --git a/examples/transportation/segment/road/lanes/restrictions/lanes-speed-limits.yaml b/examples/transportation/segment/road/lanes/restrictions/lanes-speed-limits.yaml new file mode 100644 index 000000000..7872d63e5 --- /dev/null +++ b/examples/transportation/segment/road/lanes/restrictions/lanes-speed-limits.yaml @@ -0,0 +1,51 @@ +--- +id: "234" +type: Feature +geometry: + type: LineString + coordinates: [[0, 0], [1, 1]] +properties: + theme: transportation + type: segment + subtype: road + class: secondary + version: 2 + 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] diff --git a/examples/transportation/segment/road/road-oneway-with-lanes.yaml b/examples/transportation/segment/road/road-oneway-with-lanes.yaml new file mode 100644 index 000000000..4d766a5e1 --- /dev/null +++ b/examples/transportation/segment/road/road-oneway-with-lanes.yaml @@ -0,0 +1,24 @@ +--- +id: overture:transportation:segment:1213 +type: Feature +geometry: + type: LineString + coordinates: [[0, 0], [1, 1]] +properties: + theme: transportation + type: segment + version: 6 + subtype: road + class: secondary + # `connector_ids` is deprecated in favor of `connectors`, planned to be removed for the October release + connector_ids: [fooConnector, barConnector] + connectors: + - connector_id: fooConnector + at: 0 + - connector_id: barConnector + at: 1 + # one way road in forward direction (lanes only in forward direction) + lanes: + - value: + - direction: forward + - direction: forward diff --git a/examples/transportation/segment/road/road.yaml b/examples/transportation/segment/road/road.yaml index 267848e94..ac126c2ca 100644 --- a/examples/transportation/segment/road/road.yaml +++ b/examples/transportation/segment/road/road.yaml @@ -25,7 +25,7 @@ properties: at: 1 names: primary: Common Road Name - # no access information -> means by default road is accessible in both directions + # 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: diff --git a/schema/transportation/segment.yaml b/schema/transportation/segment.yaml index dd12edb79..ed681ed7f 100644 --- a/schema/transportation/segment.yaml +++ b/schema/transportation/segment.yaml @@ -33,6 +33,7 @@ properties: required: [class] properties: destinations: { "$ref": "#/$defs/propertyDefinitions/destinations" } + lanes: { "$ref": "#/$defs/propertyContainers/lanesContainer" } prohibited_transitions: { "$ref": "#/$defs/propertyContainers/prohibitedTransitionsContainer" } road_surface: { "$ref": "#/$defs/propertyContainers/surfaceContainer"} road_flags: { "$ref": "#/$defs/propertyContainers/flagsContainer" } @@ -185,6 +186,41 @@ properties: - cycleway - bridleway # Similar to track but has implied access only for horses - unknown + lane: + description: Properties for a single lane of traffic. + type: object + unevaluatedProperties: false + required: [direction] + properties: + direction: { "$ref": "#/$defs/propertyDefinitions/laneDirection" } + restrictions: + description: Restrictions on how the lane may be used + "$comment": >- + Lane restrictions may be defined in the same way as for whole roads with the exception + of turns; there are no turn restrictions for lanes. + type: object + unevaluatedProperties: false + properties: + speed_limits: + "$ref": "#/$defs/propertyContainers/speedLimitsContainer" + access: + "$ref": "#/$defs/propertyContainers/accessContainer" + min_occupancy: + description: >- + Minimal occupancy restrictions relate to HOV (high occupancy vehicles) travel modes. + If a lane is restricted for use only by HOVs, then the default minimum vehicle + occupancy qualifying as HOV is 2+ passengers (including the driver). This + restriction can be provided to override the default definition of HOV. + type: integer + minimum: 1 + laneDirection: + type: string + enum: + - forward # Traffic flows in the segment direction. + - backward # Traffic flows against the segment direction. + - both_ways # Traffic flows simultaneously in both directions as, e.g., on a sidewalk. + - alternating # Traffic flows alternately forward and backward following a predictable rhythm. + - reversible # Traffic flows forward, but may be arbitrarily reversed by traffic authorities at any time. heading: description: >- Enumerates possible travel headings along segment geometry. @@ -545,7 +581,7 @@ properties: minimum: 0 unit: { "$ref": "#/$defs/propertyDefinitions/vehicleScopeUnit" } speedLimitsContainer: - description: Rules governing speed on this road segment + description: Rules governing speed on this road segment or lane type: array items: description: An individual speed limit rule @@ -581,7 +617,7 @@ properties: minLength: 1 uniqueItems: true accessContainer: - description: Rules governing access to this road segment + description: Rules governing access to this road segment or lane type: array items: type: object @@ -605,6 +641,36 @@ 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