Skip to content
Snippets Groups Projects
Commit 8b6c5a32 authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

Read the contact point whatever the type of the predecessor/successor. Removed the NA.

parent 760009e0
No related branches found
No related tags found
No related merge requests found
......@@ -182,13 +182,12 @@ bool OpenDriveXmlParser::ReadRoadLink (Road* road, TiXmlElement *node, short in
{
string elementType;
string elementId;
string contactPoint="NA";
string contactPoint;
int checker=TIXML_SUCCESS;
checker+=node->QueryStringAttribute("elementType",&elementType);
checker+=node->QueryStringAttribute("elementId",&elementId);
if (elementType.compare("road")==0)
checker+=node->QueryStringAttribute("contactPoint",&contactPoint);
checker+=node->QueryStringAttribute("contactPoint",&contactPoint);
if (checker!=TIXML_SUCCESS)
{
......@@ -203,13 +202,12 @@ bool OpenDriveXmlParser::ReadRoadLink (Road* road, TiXmlElement *node, short in
{
string elementType;
string elementId;
string contactPoint="NA";
string contactPoint;
int checker=TIXML_SUCCESS;
checker+=node->QueryStringAttribute("elementType",&elementType);
checker+=node->QueryStringAttribute("elementId",&elementId);
if (elementType.compare("road")==0)
checker+=node->QueryStringAttribute("contactPoint",&contactPoint);
checker+=node->QueryStringAttribute("contactPoint",&contactPoint);
if (checker!=TIXML_SUCCESS)
{
......
......@@ -4,7 +4,7 @@
<road name="road0" length="2.5000000000000000e+01" id="0" junction="-1">
<link>
<predecessor elementType="road" elementId="9" contactPoint="end" />
<successor elementType="junction" elementId="1" contactPoint="NA" />
<successor elementType="junction" elementId="1" contactPoint="end" />
</link>
<type s="0.0000000000000000e+00" type="town" />
<planView>
......@@ -44,7 +44,7 @@
</road>
<road name="road1" length="2.5000000000000000e+01" id="1" junction="-1">
<link>
<predecessor elementType="junction" elementId="1" contactPoint="NA" />
<predecessor elementType="junction" elementId="1" contactPoint="end" />
<successor elementType="road" elementId="2" contactPoint="start" />
</link>
<type s="0.0000000000000000e+00" type="town" />
......@@ -221,7 +221,7 @@
<road name="road5" length="2.5000000000000000e+01" id="5" junction="-1">
<link>
<predecessor elementType="road" elementId="4" contactPoint="end" />
<successor elementType="junction" elementId="2" contactPoint="NA" />
<successor elementType="junction" elementId="2" contactPoint="end" />
</link>
<type s="0.0000000000000000e+00" type="town" />
<planView>
......@@ -261,10 +261,10 @@
</road>
<road name="road6" length="2.5000000000000000e+01" id="6" junction="-1">
<link>
<predecessor elementType="junction" elementId="2" contactPoint="NA" />
<predecessor elementType="junction" elementId="2" contactPoint="end" />
<successor elementType="road" elementId="7" contactPoint="start" />
</link>
<type s="0.0000000000000000e+00" type="Default" />
<type s="0.0000000000000000e+00" type="town" />
<planView>
<geometry s="0.0000000000000000e+00" x="2.5000000000000000e+01" y="8.0000000000000000e+01" hdg="3.1415926540000001e+00" length="2.5000000000000000e+01">
<line />
......@@ -352,7 +352,7 @@
<predecessor elementType="road" elementId="7" contactPoint="end" />
<successor elementType="road" elementId="9" contactPoint="start" />
</link>
<type s="0.0000000000000000e+00" type="Default" />
<type s="0.0000000000000000e+00" type="town" />
<planView>
<geometry s="0.0000000000000000e+00" x="-1.0000000000000000e+01" y="7.0000000000000000e+01" hdg="4.7123889800000001e+00" length="6.0000000000000000e+01">
<line />
......@@ -437,8 +437,8 @@
</road>
<road name="road10" length="6.0000000000000000e+01" id="10" junction="-1">
<link>
<predecessor elementType="junction" elementId="1" contactPoint="NA" />
<successor elementType="junction" elementId="2" contactPoint="NA" />
<predecessor elementType="junction" elementId="1" contactPoint="end" />
<successor elementType="junction" elementId="2" contactPoint="end" />
</link>
<type s="0.0000000000000000e+00" type="town" />
<planView>
......@@ -478,7 +478,7 @@
</road>
<road name="road11" length="5.0000000000000000e+01" id="11" junction="-1">
<link>
<predecessor elementType="junction" elementId="1" contactPoint="NA" />
<predecessor elementType="junction" elementId="1" contactPoint="end" />
</link>
<type s="0.0000000000000000e+00" type="town" />
<planView>
......@@ -518,9 +518,9 @@
</road>
<road name="road12" length="2.0000000000000000e+01" id="12" junction="-1">
<link>
<predecessor elementType="junction" elementId="1" contactPoint="NA" />
<predecessor elementType="junction" elementId="1" contactPoint="end" />
</link>
<type s="0.0000000000000000e+00" type="Default" />
<type s="0.0000000000000000e+00" type="town" />
<planView>
<geometry s="0.0000000000000000e+00" x="4.5000000000000000e+01" y="1.0000000000000000e+01" hdg="7.8539800000000004e-01" length="2.0000000000000000e+01">
<line />
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment