Skip to content

Commit 8935aad

Browse files
added first opendrive 1.8.1 support
1 parent 7420a73 commit 8935aad

File tree

51 files changed

+6291
-99
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+6291
-99
lines changed

rtron-model/src/main/kotlin/io/rtron/model/opendrive/additions/extensions/IdentifierUpdater.kt

+1-3
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,7 @@ fun OpendriveModel.updateAdditionalIdentifiers() {
6767
.toEither { IllegalStateException("Additional ID not available.") }
6868
.getOrElse { throw it }
6969

70-
currentLaneSection.center.lane.forEach { currentLane ->
71-
currentLane.additionalId = LaneIdentifier(currentLane.id, currentLaneSectionId).some()
72-
}
70+
currentLaneSection.center.lane.additionalId = LaneIdentifier(currentLaneSection.center.lane.id, currentLaneSectionId).some()
7371

7472
currentLaneSection.left.onSome { currentLeft ->
7573
currentLeft.lane.forEach { currentLane ->

rtron-model/src/main/kotlin/io/rtron/model/opendrive/additions/optics/Optics.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ val everyRoadLanesLaneSectionRightLane =
8282
RoadLanesLaneSectionRight.lane compose Traversal.list()
8383
val everyRoadLanesLaneSectionCenterLane =
8484
everyLaneSection compose RoadLanesLaneSection.center compose
85-
RoadLanesLaneSectionCenter.lane compose Traversal.list()
85+
RoadLanesLaneSectionCenter.lane
8686

8787
// junction
8888
val everyJunction = OpendriveModel.junction compose Traversal.list()

rtron-model/src/main/kotlin/io/rtron/model/opendrive/junction/Enumerations.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ enum class EElementDir { PLUS, MINUS }
2424

2525
enum class EJunctionSurfaceCRGMode { GLOBAL }
2626

27-
enum class EJunctionType { DEFAULT, VIRTUAL, DIRECT }
27+
enum class EJunctionType { DEFAULT, VIRTUAL, DIRECT, CROSSING }
2828

2929
enum class EJunctionGroupType { ROUNDABOUT, UNKNOWN }
3030

rtron-model/src/main/kotlin/io/rtron/model/opendrive/lane/Enumerations.kt

+5-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ enum class EAccessRestrictionType {
3131
MOTORCYCLE,
3232
NONE,
3333
TRUCKS,
34+
HOV,
3435
}
3536

3637
enum class ELaneType {
@@ -43,6 +44,7 @@ enum class ELaneType {
4344
PARKING,
4445
MEDIAN,
4546
BIKING,
47+
SHARED,
4648
SIDEWALK,
4749
CURB,
4850
EXIT,
@@ -62,13 +64,15 @@ enum class ELaneType {
6264
HOV,
6365
MWY_ENTRY,
6466
MWY_EXIT,
67+
WALKING,
68+
SLIP_LANE,
6569
}
6670

6771
enum class ERoadLanesLaneSectionLCRLaneRoadMarkLaneChange { INCREASE, DECREASE, BOTH, NONE }
6872

6973
enum class ERoadLanesLaneSectionLRLaneAccessRule { ALLOW, DENY }
7074

71-
enum class ERoadMarkColor { STANDARD, BLUE, GREEN, RED, WHITE, YELLOW, ORANGE }
75+
enum class ERoadMarkColor { STANDARD, BLUE, GREEN, RED, WHITE, YELLOW, BLACK, ORANGE, VIOLET }
7276

7377
enum class ERoadMarkRule { NO_PASSING, CAUTION, NONE }
7478

rtron-model/src/main/kotlin/io/rtron/model/opendrive/lane/RoadLanesLaneSection.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ data class RoadLanesLaneSection(
4545

4646
fun getNumberOfLanes() = center.getNumberOfLanes() + getNumberOfLeftRightLanes()
4747

48-
fun getCenterLane() = center.lane.first()
48+
fun getCenterLane() = center.lane
4949

5050
fun getLeftLanes(): Map<Int, RoadLanesLaneSectionLRLane> = left.fold({ emptyMap() }, { it.getLanes() })
5151

rtron-model/src/main/kotlin/io/rtron/model/opendrive/lane/RoadLanesLaneSectionCenter.kt

+3-4
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,14 @@ import io.rtron.model.opendrive.core.OpendriveElement
2121

2222
@optics
2323
data class RoadLanesLaneSectionCenter(
24-
var lane: List<RoadLanesLaneSectionCenterLane> = emptyList(),
24+
var lane: RoadLanesLaneSectionCenterLane = RoadLanesLaneSectionCenterLane(),
2525
) : OpendriveElement() {
2626
// Methods
2727
fun getIndividualCenterLane(): RoadLanesLaneSectionCenterLane {
28-
check(lane.size == 1) { "Must contain exactly one center lane element." }
29-
return lane.first()
28+
return lane
3029
}
3130

32-
fun getNumberOfLanes() = lane.size
31+
fun getNumberOfLanes() = 1 // TODO remove
3332

3433
companion object
3534
}

rtron-model/src/main/kotlin/io/rtron/model/opendrive/lane/RoadLanesLaneSectionCenterLane.kt

+9-12
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,22 @@ package io.rtron.model.opendrive.lane
1818

1919
import arrow.core.None
2020
import arrow.core.Option
21+
import arrow.core.getOrElse
2122
import arrow.optics.optics
2223
import io.rtron.model.opendrive.additions.identifier.AdditionalLaneIdentifier
2324
import io.rtron.model.opendrive.additions.identifier.LaneIdentifier
2425

2526
@optics
2627
data class RoadLanesLaneSectionCenterLane(
2728
var id: Int = 0,
28-
override var link: Option<RoadLanesLaneSectionLCRLaneLink> = None,
29-
override var border: List<RoadLanesLaneSectionLRLaneBorder> = emptyList(),
30-
override var width: List<RoadLanesLaneSectionLRLaneWidth> = emptyList(),
31-
override var roadMark: List<RoadLanesLaneSectionLCRLaneRoadMark> = emptyList(),
32-
override var material: List<RoadLanesLaneSectionLRLaneMaterial> = emptyList(),
33-
override var speed: List<RoadLanesLaneSectionLRLaneSpeed> = emptyList(),
34-
override var access: List<RoadLanesLaneSectionLRLaneAccess> = emptyList(),
35-
override var height: List<RoadLanesLaneSectionLRLaneHeight> = emptyList(),
36-
override var rule: List<RoadLanesLaneSectionLRLaneRule> = emptyList(),
37-
override var level: Option<Boolean> = None,
38-
override var type: ELaneType = ELaneType.NONE,
29+
var link: Option<RoadLanesLaneSectionLCRLaneLink> = None,
30+
var roadMark: List<RoadLanesLaneSectionLCRLaneRoadMark> = emptyList(),
31+
var height: List<RoadLanesLaneSectionLRLaneHeight> = emptyList(),
32+
var level: Option<Boolean> = None,
33+
var type: ELaneType = ELaneType.NONE,
3934
override var additionalId: Option<LaneIdentifier> = None,
40-
) : RoadLanesLaneSectionLRLane(), AdditionalLaneIdentifier {
35+
) : AdditionalLaneIdentifier {
4136
companion object
37+
38+
fun getLevelWithDefault() = level.getOrElse { false }
4239
}

rtron-model/src/main/kotlin/io/rtron/model/opendrive/lane/RoadLanesLaneSectionLRLaneAccess.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ package io.rtron.model.opendrive.lane
1919
import io.rtron.model.opendrive.core.OpendriveElement
2020

2121
data class RoadLanesLaneSectionLRLaneAccess(
22-
var restriction: EAccessRestrictionType = EAccessRestrictionType.NONE,
22+
var restriction: List<RoadLanesLaneSectionLRLaneAccessRestriction> = emptyList(),
2323
var rule: ERoadLanesLaneSectionLRLaneAccessRule = ERoadLanesLaneSectionLRLaneAccessRule.ALLOW,
2424
var sOffset: Double = Double.NaN,
2525
) : OpendriveElement()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
* Copyright 2019-2024 Chair of Geoinformatics, Technical University of Munich
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package io.rtron.model.opendrive.lane
18+
19+
import io.rtron.model.opendrive.core.OpendriveElement
20+
21+
data class RoadLanesLaneSectionLRLaneAccessRestriction(
22+
var type: EAccessRestrictionType = EAccessRestrictionType.NONE,
23+
) : OpendriveElement()

rtron-model/src/main/kotlin/io/rtron/model/opendrive/objects/Enumerations.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ enum class EObjectType {
4040
GANTRY,
4141
SOUND_BARRIER,
4242
ROAD_MARK,
43+
ROAD_SURFACE,
4344
}
4445
// deprecated: CAR, VAN, BUS, TRAILER, BIKE, MOTORBIKE, TRAM, TRAIN, PEDESTRIAN, WIND
4546

@@ -60,7 +61,7 @@ fun EOrientation.toRotation2D() =
6061
else -> Rotation2D(0.0)
6162
}
6263

63-
enum class EOutlineFillType { GRASS, CONCRETE, COBBLE, ASPHALT, PAVEMENT, GRAVEL, SOIL }
64+
enum class EOutlineFillType { GRASS, CONCRETE, COBBLE, ASPHALT, PAVEMENT, GRAVEL, SOIL, PAINT }
6465

6566
enum class ERoadObjectsObjectParkingSpaceAccess { ALL, CAR, WOMEN, HANDICAPPED, BUS, TRUCK, ELECTRIC, RESIDENTS }
6667

rtron-model/src/main/kotlin/io/rtron/model/roadspaces/roadspace/objects/RoadObjectType.kt

+1
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,6 @@ enum class RoadObjectType {
3333
GANTRY,
3434
SOUND_BARRIER,
3535
ROAD_MARK,
36+
ROAD_SURFACE,
3637
SIGNAL,
3738
}

rtron-model/src/main/kotlin/io/rtron/model/roadspaces/roadspace/road/Lane.kt

-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ data class CenterLane(
8888
val level: Boolean = false,
8989
val roadMarkings: List<RoadMarking> = emptyList(),
9090
val type: LaneType = LaneType.NONE,
91-
val laneMaterial: Option<LaneMaterial>,
9291
val attributes: AttributeList = AttributeList.EMPTY,
9392
) {
9493
// Properties and Initializers

rtron-model/src/main/kotlin/io/rtron/model/roadspaces/roadspace/road/LaneType.kt

+3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ enum class LaneType {
2222
STOP,
2323
SHOULDER,
2424
BIKING,
25+
SHARED,
2526
SIDEWALK,
2627
BORDER,
2728
RESTRICTED,
@@ -45,4 +46,6 @@ enum class LaneType {
4546
HOV,
4647
MWY_ENTRY,
4748
MWY_EXIT,
49+
WALKING,
50+
SLIP_LANE,
4851
}

rtron-readerwriter/build.gradle.kts

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,12 @@ xjcGeneration {
9191
javaPackageName = "org.asam.opendrive17"
9292
}
9393

94-
/*create("opendrive18") {
94+
create("opendrive18") {
9595
schemaDir = "opendrive18/"
9696
schemaRootDir = "$projectDir/src/main/resources/schemas/"
9797
bindingFile = "src/main/resources/schemas/opendrive18.xjb"
9898
javaPackageName = "org.asam.opendrive18"
99-
}*/
99+
}
100100
}
101101
}
102102

rtron-readerwriter/src/main/kotlin/io/rtron/readerwriter/opendrive/OpendriveReader.kt

+6
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import io.rtron.model.opendrive.additions.extensions.updateAdditionalIdentifiers
2828
import io.rtron.readerwriter.opendrive.reader.OpendriveUnmarshaller
2929
import io.rtron.readerwriter.opendrive.reader.mapper.opendrive14.Opendrive14Mapper
3030
import io.rtron.readerwriter.opendrive.reader.mapper.opendrive16.Opendrive16Mapper
31+
import io.rtron.readerwriter.opendrive.reader.mapper.opendrive17.Opendrive18Mapper
3132
import io.rtron.readerwriter.opendrive.version.OpendriveVersion
3233
import io.rtron.readerwriter.opendrive.version.OpendriveVersionUtils
3334
import io.rtron.std.BaseException
@@ -78,6 +79,7 @@ object OpendriveReader {
7879
OpendriveVersion.V1_5 -> OpendriveVersion.V1_4
7980
OpendriveVersion.V1_6 -> OpendriveVersion.V1_6
8081
OpendriveVersion.V1_7 -> OpendriveVersion.V1_6
82+
OpendriveVersion.V1_8 -> OpendriveVersion.V1_8
8183
}
8284
if (opendriveVersion != unmarshallerOpendriveVersion) {
8385
logger.warn {
@@ -99,6 +101,10 @@ object OpendriveReader {
99101
val converter = Mappers.getMapper(Opendrive16Mapper::class.java)
100102
converter.mapModel(opendriveVersionSpecificModel as org.asam.opendrive16.OpenDRIVE)
101103
}
104+
OpendriveVersion.V1_8 -> {
105+
val converter = Mappers.getMapper(Opendrive18Mapper::class.java)
106+
converter.mapModel(opendriveVersionSpecificModel as org.asam.opendrive18.OpenDRIVE)
107+
}
102108
else -> throw IllegalStateException("Mapper must be implemented")
103109
}
104110
opendriveModel.updateAdditionalIdentifiers()

rtron-readerwriter/src/main/kotlin/io/rtron/readerwriter/opendrive/reader/OpendriveUnmarshaller.kt

+3
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import org.asam.opendrive14.OpenDRIVE as Opendrive14
3333
import org.asam.opendrive15.OpenDRIVE as Opendrive15
3434
import org.asam.opendrive16.OpenDRIVE as Opendrive16
3535
import org.asam.opendrive17.OpenDRIVE as Opendrive17
36+
import org.asam.opendrive18.OpenDRIVE as Opendrive18
3637

3738
class OpendriveUnmarshaller(val opendriveVersion: OpendriveVersion) {
3839
// Properties and Initializers
@@ -64,6 +65,7 @@ class OpendriveUnmarshaller(val opendriveVersion: OpendriveVersion) {
6465
OpendriveVersion.V1_5 to Opendrive15::class.java,
6566
OpendriveVersion.V1_6 to Opendrive16::class.java,
6667
OpendriveVersion.V1_7 to Opendrive17::class.java,
68+
OpendriveVersion.V1_8 to Opendrive18::class.java,
6769
)
6870
private val OPENDRIVE_SCHEMA_LOCATIONS: Map<OpendriveVersion, String> =
6971
mapOf(
@@ -74,6 +76,7 @@ class OpendriveUnmarshaller(val opendriveVersion: OpendriveVersion) {
7476
OpendriveVersion.V1_5 to "schemas/opendrive15/OpenDRIVE_1.5M.xsd",
7577
OpendriveVersion.V1_6 to "schemas/opendrive16/opendrive_16_core.xsd",
7678
OpendriveVersion.V1_7 to "schemas/opendrive17/opendrive_17_core.xsd",
79+
OpendriveVersion.V1_8 to "schemas/opendrive18/OpenDRIVE_Core.xsd",
7780
)
7881

7982
init {

rtron-readerwriter/src/main/kotlin/io/rtron/readerwriter/opendrive/reader/mapper/opendrive14/Opendrive14LaneMapper.kt

+13
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import io.rtron.model.opendrive.lane.RoadLanesLaneSectionCenterLane
2929
import io.rtron.model.opendrive.lane.RoadLanesLaneSectionLCRLaneLink
3030
import io.rtron.model.opendrive.lane.RoadLanesLaneSectionLCRLaneLinkPredecessorSuccessor
3131
import io.rtron.model.opendrive.lane.RoadLanesLaneSectionLCRLaneRoadMarkType
32+
import io.rtron.model.opendrive.lane.RoadLanesLaneSectionLRLaneAccessRestriction
3233
import io.rtron.model.opendrive.lane.RoadLanesLaneSectionLeft
3334
import io.rtron.model.opendrive.lane.RoadLanesLaneSectionRight
3435
import io.rtron.readerwriter.opendrive.reader.mapper.common.OpendriveCommonMapper
@@ -113,6 +114,18 @@ abstract class Opendrive14LaneMapper {
113114

114115
abstract fun mapLaneChange(source: LaneChange): ERoadLanesLaneSectionLCRLaneRoadMarkLaneChange
115116

117+
//
118+
// Access
119+
//
120+
fun mapLaneAccessRestrictionTypeToList(source: Restriction): List<RoadLanesLaneSectionLRLaneAccessRestriction> =
121+
listOf(mapLaneAccessRestrictionTypeToClass(source))
122+
123+
fun mapLaneAccessRestrictionTypeToClass(source: Restriction): RoadLanesLaneSectionLRLaneAccessRestriction =
124+
RoadLanesLaneSectionLRLaneAccessRestriction(type = mapLaneAccessRestrictionType(source))
125+
126+
@ValueMapping(source = "AUTONOMOUS___TRAFFIC", target = "AUTONOMOUS_TRAFFIC")
127+
abstract fun mapLaneAccessRestrictionType(source: Restriction): EAccessRestrictionType
128+
116129
//
117130
// Enumerations
118131
//

rtron-readerwriter/src/main/kotlin/io/rtron/readerwriter/opendrive/reader/mapper/opendrive16/Opendrive16LaneMapper.kt

+31-14
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ package io.rtron.readerwriter.opendrive.reader.mapper.opendrive16
1919
import arrow.core.None
2020
import arrow.core.Option
2121
import arrow.core.some
22+
import io.github.oshai.kotlinlogging.KotlinLogging
23+
import io.rtron.model.opendrive.lane.EAccessRestrictionType
24+
import io.rtron.model.opendrive.lane.ELaneType
2225
import io.rtron.model.opendrive.lane.ERoadLanesLaneSectionLCRLaneRoadMarkLaneChange
2326
import io.rtron.model.opendrive.lane.ERoadMarkColor
2427
import io.rtron.model.opendrive.lane.ERoadMarkRule
@@ -33,13 +36,16 @@ import io.rtron.model.opendrive.lane.RoadLanesLaneSectionLCRLaneRoadMark
3336
import io.rtron.model.opendrive.lane.RoadLanesLaneSectionLCRLaneRoadMarkExplicit
3437
import io.rtron.model.opendrive.lane.RoadLanesLaneSectionLCRLaneRoadMarkType
3538
import io.rtron.model.opendrive.lane.RoadLanesLaneSectionLCRLaneRoadMarkTypeLine
39+
import io.rtron.model.opendrive.lane.RoadLanesLaneSectionLRLaneAccessRestriction
3640
import io.rtron.model.opendrive.lane.RoadLanesLaneSectionLRLaneBorder
3741
import io.rtron.model.opendrive.lane.RoadLanesLaneSectionLRLaneWidth
3842
import io.rtron.model.opendrive.lane.RoadLanesLaneSectionLeft
3943
import io.rtron.model.opendrive.lane.RoadLanesLaneSectionLeftLane
4044
import io.rtron.model.opendrive.lane.RoadLanesLaneSectionRight
4145
import io.rtron.model.opendrive.lane.RoadLanesLaneSectionRightLane
4246
import io.rtron.readerwriter.opendrive.reader.mapper.common.OpendriveCommonMapper
47+
import org.asam.opendrive16.E_AccessRestrictionType
48+
import org.asam.opendrive16.E_LaneType
4349
import org.asam.opendrive16.E_RoadMarkColor
4450
import org.asam.opendrive16.E_RoadMarkRule
4551
import org.asam.opendrive16.E_RoadMarkType
@@ -73,6 +79,8 @@ import org.mapstruct.ValueMapping
7379
imports = [Option::class],
7480
)
7581
abstract class Opendrive16LaneMapper {
82+
private val logger = KotlinLogging.logger {}
83+
7684
abstract fun mapRoadLanes(sources: T_Road_Lanes): RoadLanes
7785

7886
//
@@ -89,23 +97,17 @@ abstract class Opendrive16LaneMapper {
8997

9098
abstract fun mapRoadLanesLaneSectionRight(source: T_Road_Lanes_LaneSection_Right): RoadLanesLaneSectionRight
9199

92-
abstract fun mapRoadLanesLaneSectionCenterLane(source: T_Road_Lanes_LaneSection_Center_Lane): RoadLanesLaneSectionCenterLane
100+
fun mapRoadLanesLaneSectionCenterLane(source: List<T_Road_Lanes_LaneSection_Center_Lane>): RoadLanesLaneSectionCenterLane {
101+
// TODO: reporting
102+
if (source.size != 1) {
103+
logger.info { "Center lane must have exactly one lane." }
104+
}
93105

94-
@AfterMapping
95-
open fun afterMappingRoadLanesLaneSectionCenterLane(
96-
source: T_Road_Lanes_LaneSection_Center_Lane,
97-
@MappingTarget target: RoadLanesLaneSectionCenterLane,
98-
) {
99-
target.border =
100-
source.borderOrWidth
101-
.filterIsInstance(T_Road_Lanes_LaneSection_Lr_Lane_Border::class.java)
102-
.map { mapLrLaneBorder(it) }
103-
target.width =
104-
source.borderOrWidth
105-
.filterIsInstance(T_Road_Lanes_LaneSection_Lr_Lane_Width::class.java)
106-
.map { mapLrLaneWidth(it) }
106+
return mapRoadLanesLaneSectionCenterLane(source.first())
107107
}
108108

109+
abstract fun mapRoadLanesLaneSectionCenterLane(source: T_Road_Lanes_LaneSection_Center_Lane): RoadLanesLaneSectionCenterLane
110+
109111
abstract fun mapRoadLanesLaneSectionLeftLane(source: T_Road_Lanes_LaneSection_Left_Lane): RoadLanesLaneSectionLeftLane
110112

111113
@AfterMapping
@@ -167,6 +169,17 @@ abstract class Opendrive16LaneMapper {
167169
source: T_Road_Lanes_LaneSection_Lcr_Lane_RoadMark_Explicit,
168170
): RoadLanesLaneSectionLCRLaneRoadMarkExplicit
169171

172+
//
173+
// Access
174+
//
175+
fun mapLaneAccessRestrictionTypeToList(source: E_AccessRestrictionType): List<RoadLanesLaneSectionLRLaneAccessRestriction> =
176+
listOf(mapLaneAccessRestrictionTypeToClass(source))
177+
178+
fun mapLaneAccessRestrictionTypeToClass(source: E_AccessRestrictionType): RoadLanesLaneSectionLRLaneAccessRestriction =
179+
RoadLanesLaneSectionLRLaneAccessRestriction(type = mapLaneAccessRestrictionType(source))
180+
181+
abstract fun mapLaneAccessRestrictionType(source: E_AccessRestrictionType): EAccessRestrictionType
182+
170183
//
171184
// Enumerations
172185
//
@@ -178,6 +191,10 @@ abstract class Opendrive16LaneMapper {
178191
T_Bool.FALSE -> false
179192
}
180193

194+
fun mapLaneTypeToOption(source: E_LaneType?): Option<ELaneType> = source?.let { mapLaneType(it).some() } ?: None
195+
196+
abstract fun mapLaneType(source: E_LaneType): ELaneType
197+
181198
fun mapERoadMarkColorToOption(source: E_RoadMarkColor?): Option<ERoadMarkColor> = source?.let { mapRoadMarkColor(it).some() } ?: None
182199

183200
abstract fun mapRoadMarkColor(source: E_RoadMarkColor): ERoadMarkColor

0 commit comments

Comments
 (0)