Skip to content

Commit

Permalink
add test ref #13686 #21
Browse files Browse the repository at this point in the history
Signed-off-by: m-kro <m.barthauer@t-online.de>
  • Loading branch information
m-kro committed Aug 2, 2023
1 parent 998f922 commit d0005f3
Show file tree
Hide file tree
Showing 9 changed files with 364 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/netconvert/config.netconvert
Expand Up @@ -23,6 +23,7 @@ copy_test_path:osm.xml.gz
copy_test_path:matsim.xml
copy_test_path:vissim.inpx
copy_test_path:opendrive.xodr
copy_test_path:included.xodr
copy_test_path:input_plain.nod.xml
copy_test_path:input_plain.edg.xml
copy_test_path:input_plain.con.xml
Expand Down
Empty file.
204 changes: 204 additions & 0 deletions tests/netconvert/import/openDRIVE/simple1_include/foreign.netconvert
@@ -0,0 +1,204 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- generated on 2023-01-13 10:29:34 by Eclipse SUMO netconvert Version v1_15_0+1617-9355f8dde13
This data file and the accompanying materials
are made available under the terms of the Eclipse Public License v2.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v20.html
This file may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the Eclipse
Public License 2.0 are satisfied: GNU General Public License, version 2
or later which is available at
https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/netconvertConfiguration.xsd">
<input>
<opendrive-files value="opendrive.xodr"/>
</input>
<output>
<write-license value="true"/>
<output-file value="net.net.xml"/>
<opendrive-output value="foreign.net"/>
</output>
<junctions>
<no-turnarounds.except-deadend value="true"/>
</junctions>
<report>
<verbose value="true"/>
<xml-validation value="never"/>
</report>
</configuration>
-->

<OpenDRIVE>
<header revMajor="1" revMinor="4" name="" version="1.00" date="Fri Jan 13 10:29:34 2023" north="0.00" south="0.00" east="50.00" west="0.00"/>
<road name="a1" length="50.00000000" id="20" junction="-1">
<link>
<predecessor elementType="junction" elementId="1"/>
<successor elementType="junction" elementId="2"/>
</link>
<type s="0" type="town"/>
<planView>
<geometry s="0.00000000" x="0.00000000" y="0.00000000" hdg="0.00000000" length="50.00000000">
<line/>
</geometry>
</planView>
<elevationProfile>
<elevation s="0" a="0.00" b="0" c="0" d="0"/>
</elevationProfile>
<lateralProfile/>
<lanes>
<laneSection s="0">
<center>
<lane id="0" type="none" level="true">
<link/>
<roadMark sOffset="0" type="solid" weight="standard" color="standard" width="0.13"/>
</lane>
</center>
<right>
<lane id="-1" type="driving" level="true">
<link/>
<width sOffset="0" a="3.00" b="0" c="0" d="0"/>
<roadMark sOffset="0" type="solid" weight="standard" color="standard" width="0.13"/>
<speed sOffset="0" max="13.89"/>
</lane>
</right>
</laneSection>
</lanes>
<objects/>
<signals/>
</road>
<road name="a1" length="50.00000000" id="21" junction="-1">
<link>
<predecessor elementType="junction" elementId="2"/>
<successor elementType="junction" elementId="1"/>
</link>
<type s="0" type="town"/>
<planView>
<geometry s="0.00000000" x="50.00000000" y="0.00000000" hdg="3.14159265" length="50.00000000">
<line/>
</geometry>
</planView>
<elevationProfile>
<elevation s="0" a="0.00" b="0" c="0" d="0"/>
</elevationProfile>
<lateralProfile/>
<lanes>
<laneSection s="0">
<center>
<lane id="0" type="none" level="true">
<link/>
<roadMark sOffset="0" type="solid" weight="standard" color="standard" width="0.13"/>
</lane>
</center>
<right>
<lane id="-1" type="driving" level="true">
<link/>
<width sOffset="0" a="3.00" b="0" c="0" d="0"/>
<roadMark sOffset="0" type="solid" weight="standard" color="standard" width="0.13"/>
<speed sOffset="0" max="13.89"/>
</lane>
</right>
</laneSection>
</lanes>
<objects/>
<signals/>
</road>

<road name=":1.begin_0" length="8.85886644" id="22" junction="1">
<link>
<predecessor elementType="road" elementId="21" contactPoint="end"/>
<successor elementType="road" elementId="20" contactPoint="start"/>
</link>
<type s="0" type="town"/>
<planView>
<geometry s="0.00000000" x="0.00000000" y="3.00000000" hdg="-2.67794504" length="8.85886644">
<paramPoly3 aU="-0.00000000" bU="13.41640786" cU="-10.73312629" dU="0.00000000" aV="0.00000000" bV="-0.00000000" cV="5.36656315" dV="0.00000000" pRange="normalized"/>
</geometry>
</planView>
<elevationProfile>
<elevation s="0" a="0.00" b="0" c="0" d="0"/>
</elevationProfile>
<lateralProfile/>
<lanes>
<laneOffset s="0" a="3.00" b="0" c="0" d="0"/>
<laneSection s="0">
<center>
<lane id="0" type="none" level="true">
<link/>
<roadMark sOffset="0" type="solid" weight="standard" color="standard" width="0.00"/>
</lane>
</center>
<right>
<lane id="-1" type="driving" level="true">
<link>
<predecessor id="-1"/>
<successor id="-1"/>
</link>
<width sOffset="0" a="3.00" b="0.00" c="0.00" d="0.00"/>
<roadMark sOffset="0" type="none" weight="standard" color="standard" width="0.13"/>
<speed sOffset="0" max="3.53"/>
</lane>
</right>
</laneSection>
</lanes>
<objects/>
<signals/>
</road>
<road name=":1.end_0" length="8.85886644" id="23" junction="2">
<link>
<predecessor elementType="road" elementId="20" contactPoint="end"/>
<successor elementType="road" elementId="21" contactPoint="start"/>
</link>
<type s="0" type="town"/>
<planView>
<geometry s="0.00000000" x="50.00000000" y="-3.00000000" hdg="0.46364761" length="8.85886644">
<paramPoly3 aU="0.00000000" bU="13.41640786" cU="-10.73312629" dU="0.00000000" aV="0.00000000" bV="0.00000000" cV="5.36656315" dV="0.00000000" pRange="normalized"/>
</geometry>
</planView>
<elevationProfile>
<elevation s="0" a="0.00" b="0" c="0" d="0"/>
</elevationProfile>
<lateralProfile/>
<lanes>
<laneOffset s="0" a="3.00" b="0" c="0" d="0"/>
<laneSection s="0">
<center>
<lane id="0" type="none" level="true">
<link/>
<roadMark sOffset="0" type="solid" weight="standard" color="standard" width="0.00"/>
</lane>
</center>
<right>
<lane id="-1" type="driving" level="true">
<link>
<predecessor id="-1"/>
<successor id="-1"/>
</link>
<width sOffset="0" a="3.00" b="0.00" c="0.00" d="0.00"/>
<roadMark sOffset="0" type="none" weight="standard" color="standard" width="0.13"/>
<speed sOffset="0" max="3.53"/>
</lane>
</right>
</laneSection>
</lanes>
<objects/>
<signals/>
</road>

<junction name="1.begin" id="1">
<connection id="0" incomingRoad="21" connectingRoad="22" contactPoint="start">
<laneLink from="-1" to="-1"/>
</connection>
</junction>
<junction name="1.end" id="2">
<connection id="0" incomingRoad="20" connectingRoad="23" contactPoint="start">
<laneLink from="-1" to="-1"/>
</connection>
</junction>
</OpenDRIVE>
21 changes: 21 additions & 0 deletions tests/netconvert/import/openDRIVE/simple1_include/included.xodr
@@ -0,0 +1,21 @@
<?xml version="1.0" ?>
<laneSection>
<left>
<lane id="1" type="driving" level="false">
<link />
<width sOffset="0.0000000000000000e+000" a="3.0000000000000000e+000" b="0.0000000000000000e+000" c="0.0000000000000000e+000" d="0.0000000000000000e+000" />
</lane>
</left>
<center>
<lane id="0" type="none" level="false">
<link />
<width sOffset="0.0000000000000000e+000" a="0.0000000000000000e+000" b="0.0000000000000000e+000" c="0.0000000000000000e+000" d="0.0000000000000000e+000" />
</lane>
</center>
<right>
<lane id="-1" type="driving" level="false">
<link />
<width sOffset="0.0000000000000000e+000" a="3.0000000000000000e+000" b="0.0000000000000000e+000" c="0.0000000000000000e+000" d="0.0000000000000000e+000" />
</lane>
</right>
</laneSection>
71 changes: 71 additions & 0 deletions tests/netconvert/import/openDRIVE/simple1_include/net.netconvert
@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- generated on 2023-05-09 15:52:24 by Eclipse SUMO netconvert Version v1_17_0+0192-02ed9c7dd44
This data file and the accompanying materials
are made available under the terms of the Eclipse Public License v2.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v20.html
This file may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the Eclipse
Public License 2.0 are satisfied: GNU General Public License, version 2
or later which is available at
https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/netconvertConfiguration.xsd">
<input>
<opendrive-files value="opendrive.xodr"/>
</input>
<output>
<write-license value="true"/>
<output-file value="net.net.xml"/>
<opendrive-output value="foreign.net"/>
</output>
<junctions>
<no-turnarounds.except-deadend value="true"/>
</junctions>
<report>
<verbose value="true"/>
<xml-validation value="never"/>
</report>
</configuration>
-->

<net version="1.16" junctionCornerDetail="5" rectangularLaneCut="true" limitTurnSpeed="5.50" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/net_file.xsd">

<location netOffset="0.00,0.00" convBoundary="0.00,0.00,50.00,0.00" origBoundary="0.00,0.00,50.00,0.00" projParameter="!"/>

<type id="driving" priority="1" speed="13.89" disallow="pedestrian tram rail_urban rail rail_electric rail_fast ship" width="3.65"/>

<edge id=":1.begin_0" function="internal">
<lane id=":1.begin_0_0" index="0" disallow="pedestrian tram rail_urban rail rail_electric rail_fast ship" speed="3.53" length="4.38" width="3.00" shape="0.00,1.50 -1.12,0.75 -1.50,0.00 -1.12,-0.75 0.00,-1.50"/>
</edge>
<edge id=":1.end_0" function="internal">
<lane id=":1.end_0_0" index="0" disallow="pedestrian tram rail_urban rail rail_electric rail_fast ship" speed="3.53" length="4.38" width="3.00" shape="50.00,-1.50 51.12,-0.75 51.50,0.00 51.12,0.75 50.00,1.50"/>
</edge>

<edge id="-1" from="1.begin" to="1.end" priority="1" type="driving">
<lane id="-1_0" index="0" disallow="pedestrian tram rail_urban rail rail_electric rail_fast ship" speed="13.89" length="50.00" width="3.00" shape="0.00,-1.50 50.00,-1.50" type="driving"/>
</edge>
<edge id="1" from="1.end" to="1.begin" priority="1" type="driving">
<lane id="1_0" index="0" disallow="pedestrian tram rail_urban rail rail_electric rail_fast ship" speed="13.89" length="50.00" width="3.00" shape="50.00,1.50 0.00,1.50" type="driving"/>
</edge>

<junction id="1.begin" type="priority" x="0.00" y="0.00" incLanes="1_0" intLanes=":1.begin_0_0" shape="0.00,0.00 0.00,3.00 0.00,0.00">
<request index="0" response="0" foes="0" cont="0"/>
</junction>
<junction id="1.end" type="priority" x="50.00" y="0.00" incLanes="-1_0" intLanes=":1.end_0_0" shape="50.00,0.00 50.00,-3.00 50.00,0.00">
<request index="0" response="0" foes="0" cont="0"/>
</junction>

<connection from="-1" to="1" fromLane="0" toLane="0" via=":1.end_0_0" dir="t" state="M"/>
<connection from="1" to="-1" fromLane="0" toLane="0" via=":1.begin_0_0" dir="t" state="M"/>

<connection from=":1.begin_0" to="-1" fromLane="0" toLane="0" dir="t" state="M"/>
<connection from=":1.end_0" to="1" fromLane="0" toLane="0" dir="t" state="M"/>

</net>
21 changes: 21 additions & 0 deletions tests/netconvert/import/openDRIVE/simple1_include/opendrive.xodr
@@ -0,0 +1,21 @@
<?xml version="1.0" ?>
<OpenDRIVE>
<header revMajor="1" revMinor="1" name="Testfile" version="1" date="Thu Feb 8 14:24:06 2007" north="2.0000000000000000e+003" south="-2.0000000000000000e+003" east="2.0000000000000000e+003" west="-2.0000000000000000e+003" />
<road name="a1" length="5.0000000000000000e+001" id="1" junction="-1">
<link />
<planView>
<geometry s="0.0000000000000000e+000" x="0.0000000000000000e+000" y="0.0000000000000000e+000" hdg="0.0000000000000000e+000" length="5.0000000000000000e+001">
<line />
</geometry>
</planView>
<elevationProfile />
<lateralProfile />
<lanes>
<laneSection s="0.0000000000000000e+000">
<include file="included.xodr"/>
</laneSection>
</lanes>
<objects />
<signals />
</road>
</OpenDRIVE>
@@ -0,0 +1 @@
--opendrive opendrive.xodr -v --opendrive-output foreign.net --output net.net.xml
@@ -0,0 +1,42 @@
Parsing types from 'D:\Repos\sumo/data/typemap/opendriveNetconvert.typ.xml' ... done.
Parsing opendrive from 'opendrive.xodr' ... Parsing included opendrive from 'included.xodr' ... done.
done.
Import done:
2 nodes loaded.
21 types loaded.
2 edges loaded.
Removing self-loops ... done (0ms).
Removing empty nodes ... done (1ms).
0 nodes removed.
Moving network to origin ... done (0ms).
Computing turning directions ... done (0ms).
Assigning nodes to traffic lights ... done (0ms).
Sorting nodes' edges ... done (0ms).
Computing node shapes ... done (1ms).
Computing edge shapes ... done (1ms).
Computing node types ... done (0ms).
Computing priorities ... done (0ms).
Computing approached edges ... done (1ms).
Guessing and setting roundabouts ... done (0ms).
Computing approaching lanes ... done (0ms).
Dividing of lanes on approached lanes ... done (0ms).
Processing turnarounds ... done (0ms).
Rechecking of lane endings ... done (0ms).
Computing traffic light control information ... done (0ms).
Computing node logics ... done (0ms).
Computing traffic light logics ... done (0ms).
0 traffic light(s) computed.
Building inner edges ... done (1ms).
-----------------------------------------------------
Summary:
Node type statistics:
Unregulated junctions : 0
Priority junctions : 2
Right-before-left junctions : 0
Network boundaries:
Original boundary : 0.00,0.00,50.00,0.00
Applied offset : 0.00,0.00
Converted boundary : 0.00,0.00,50.00,0.00
-----------------------------------------------------
Writing network ... done (11ms).
Success.
3 changes: 3 additions & 0 deletions tests/netconvert/import/openDRIVE/testsuite.netconvert
Expand Up @@ -7,6 +7,9 @@ simple1_remove
simple1_noturnarounds
simple1_left_nt
simple1_right_nt

# read OpenDRIVE from second file referenced in the main file
simple1_include
simple2_noturnarounds
simple2_left_nt
simple2_right_nt
Expand Down

0 comments on commit d0005f3

Please sign in to comment.