File tree Expand file tree Collapse file tree 5 files changed +24
-11
lines changed
rtron-model/src/main/kotlin/io/rtron/model/opendrive/junction
rtron-readerwriter/src/main
kotlin/io/rtron/readerwriter/opendrive/reader/mapper
resources/schemas/opendrive18 Expand file tree Collapse file tree 5 files changed +24
-11
lines changed Original file line number Diff line number Diff line change @@ -26,13 +26,14 @@ import io.rtron.model.opendrive.additions.identifier.AdditionalJunctionIdentifie
26
26
import io.rtron.model.opendrive.additions.identifier.JunctionIdentifier
27
27
import io.rtron.model.opendrive.core.OpendriveElement
28
28
import io.rtron.model.opendrive.objects.EOrientation
29
+ import io.rtron.model.opendrive.road.RoadSurface
29
30
30
31
@optics
31
32
data class Junction (
32
33
var connection : List <JunctionConnection > = emptyList(),
33
34
var priority : List <JunctionPriority > = emptyList(),
34
35
var controller : List <JunctionController > = emptyList(),
35
- var surface : Option <JunctionSurface > = None ,
36
+ var surface : Option <RoadSurface > = None ,
36
37
var id : String = " " ,
37
38
var mainRoad : Option <String > = None ,
38
39
var name : Option <String > = None ,
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ import io.rtron.model.opendrive.junction.EContactPoint
25
25
import io.rtron.model.opendrive.junction.EElementDir
26
26
import io.rtron.model.opendrive.junction.EJunctionType
27
27
import io.rtron.model.opendrive.junction.JunctionPredecessorSuccessor
28
- import io.rtron.model.opendrive.junction.JunctionSurface
28
+ import io.rtron.model.opendrive.road.RoadSurface
29
29
import io.rtron.readerwriter.opendrive.reader.mapper.common.OpendriveCommonMapper
30
30
import io.rtron.readerwriter.opendrive.reader.mapper.common.toUpperCaseVariations
31
31
import org.asam.opendrive16.E_Junction_Type
@@ -42,10 +42,9 @@ import org.mapstruct.NullValueCheckStrategy
42
42
abstract class Opendrive16JunctionMapper {
43
43
private val logger = KotlinLogging .logger {}
44
44
45
- fun mapJunctionSurfaceToOption (source : T_Junction_Surface ? ): Option <JunctionSurface > =
46
- source?.let { mapJunctionSurface(it).some() } ? : None
45
+ fun mapJunctionSurfaceToOption (source : T_Junction_Surface ? ): Option <RoadSurface > = source?.let { mapJunctionSurface(it).some() } ? : None
47
46
48
- abstract fun mapJunctionSurface (source : T_Junction_Surface ): JunctionSurface
47
+ abstract fun mapJunctionSurface (source : T_Junction_Surface ): RoadSurface
49
48
50
49
fun mapJunctionPredecessorSuccessorToOption (source : T_Junction_PredecessorSuccessor ? ): Option <JunctionPredecessorSuccessor > =
51
50
source?.let { mapJunctionPredecessorSuccessor(it).some() } ? : None
Original file line number Diff line number Diff line change @@ -23,10 +23,12 @@ import io.github.oshai.kotlinlogging.KotlinLogging
23
23
import io.rtron.model.opendrive.junction.EContactPoint
24
24
import io.rtron.model.opendrive.junction.EElementDir
25
25
import io.rtron.model.opendrive.junction.EJunctionType
26
+ import io.rtron.model.opendrive.junction.JunctionConnection
26
27
import io.rtron.model.opendrive.junction.JunctionPredecessorSuccessor
27
28
import io.rtron.readerwriter.opendrive.reader.mapper.common.OpendriveCommonMapper
28
29
import io.rtron.readerwriter.opendrive.reader.mapper.common.toUpperCaseVariations
29
30
import org.asam.opendrive18.E_Junction_Type
31
+ import org.asam.opendrive18.T_Junction_Connection_Direct
30
32
import org.asam.opendrive18.T_Junction_PredecessorSuccessor
31
33
import org.mapstruct.Mapper
32
34
import org.mapstruct.NullValueCheckStrategy
@@ -44,6 +46,11 @@ abstract class Opendrive18JunctionMapper {
44
46
45
47
abstract fun mapJunctionPredecessorSuccessor (source : T_Junction_PredecessorSuccessor ): JunctionPredecessorSuccessor
46
48
49
+ //
50
+ // Connection
51
+ //
52
+ abstract fun mapJunctionConnection (source : T_Junction_Connection_Direct ): JunctionConnection
53
+
47
54
//
48
55
// Enumerations
49
56
//
Original file line number Diff line number Diff line change @@ -29,6 +29,9 @@ See www.asam.net/license.html for further details.
29
29
<xs:alternative test="@type='crossing'" type="t_junction_crossing"/>
30
30
<xs:alternative type="t_junction_common"/>
31
31
</xs:element>-->
32
+ <!-- TODO: generalize: for non-common junction types-->
33
+ <xs : element maxOccurs =" unbounded" minOccurs =" 0" name =" junction" type =" t_junction_common" />
34
+
32
35
<xs : element maxOccurs =" unbounded" minOccurs =" 0" name =" junctionGroup" type =" t_junctionGroup" />
33
36
<xs : element maxOccurs =" unbounded" minOccurs =" 0" name =" station" type =" t_station" />
34
37
<xs : group maxOccurs =" unbounded" minOccurs =" 0" ref =" g_additionalData" />
Original file line number Diff line number Diff line change @@ -145,10 +145,11 @@ See www.asam.net/license.html for further details.
145
145
<xs : complexContent >
146
146
<xs : extension base =" _OpenDriveElement" >
147
147
<xs : sequence >
148
+ <!-- TODO: enable
148
149
<xs:element maxOccurs="unbounded" minOccurs="1" name="segment" type="t_junction_boundary_segment">
149
- <!-- < xs:alternative test="@type='lane'" type="t_junction_boundary_segment_lane"/>
150
- <xs:alternative test="@type='joint'" type="t_junction_boundary_segment_joint"/>-->
151
- </xs : element >
150
+ <xs:alternative test="@type='lane'" type="t_junction_boundary_segment_lane"/>
151
+ <xs:alternative test="@type='joint'" type="t_junction_boundary_segment_joint"/>
152
+ </xs:element>-->
152
153
<xs : group maxOccurs =" unbounded" minOccurs =" 0" ref =" g_additionalData" />
153
154
</xs : sequence >
154
155
</xs : extension >
@@ -649,10 +650,12 @@ See www.asam.net/license.html for further details.
649
650
<xs : complexContent >
650
651
<xs : extension base =" t_junction" >
651
652
<xs : sequence >
653
+ <!-- TODO: enable
652
654
<xs:element maxOccurs="unbounded" minOccurs="0" name="connection" type="t_junction_connection">
653
- <!-- <xs:alternative test="@type='virtual'" type="t_junction_connection_virtual"/>
654
- <xs:alternative type="t_junction_connection_virtual_default"/>-->
655
- </xs : element >
655
+ <xs:alternative test="@type='virtual'" type="t_junction_connection_virtual"/>
656
+ <xs:alternative type="t_junction_connection_virtual_default"/>
657
+ </xs:element>-->
658
+ <xs : element maxOccurs =" unbounded" minOccurs =" 0" name =" connection" type =" t_junction_connection" />
656
659
<xs : element maxOccurs =" unbounded" minOccurs =" 0" name =" crossPath" type =" t_junction_crossPath" />
657
660
<xs : element maxOccurs =" unbounded" minOccurs =" 0" name =" priority" type =" t_junction_priority" />
658
661
<xs : element maxOccurs =" unbounded" minOccurs =" 0" name =" controller" type =" t_junction_controller" />
You can’t perform that action at this time.
0 commit comments