diff --git a/OpenRoadEd/CMakeLists.txt b/OpenRoadEd/CMakeLists.txt index c9e1be4e53661e2baa04d049be20f9e0d666cef8..3b489e18a4e98bbbda7ca49238fc6baf2a7381d4 100644 --- a/OpenRoadEd/CMakeLists.txt +++ b/OpenRoadEd/CMakeLists.txt @@ -47,6 +47,7 @@ set(TARGET_H "${CMAKE_SOURCE_DIR}/OpenDrive/OpenDriveXmlParser.h" "${CMAKE_SOURCE_DIR}/Qt/SettingsWidgets/SettingsLaneSpeedRecord.h" "${CMAKE_SOURCE_DIR}/Qt/SettingsWidgets/SettingsJunction.h" "${CMAKE_SOURCE_DIR}/Qt/SettingsWidgets/SettingsGeometryLine.h" + "${CMAKE_SOURCE_DIR}/Qt/SettingsWidgets/SettingsGeometryParamPoly3.h" "${CMAKE_SOURCE_DIR}/Qt/SettingsWidgets/SettingsLaneRoadMark.h" "${CMAKE_SOURCE_DIR}/Qt/SettingsWidgets/SettingsLaneHeightRecord.h" "${CMAKE_SOURCE_DIR}/Qt/SettingsWidgets/SettingsJunctionConnection.h" @@ -114,6 +115,7 @@ set(TARGET_CPP "${CMAKE_SOURCE_DIR}/OpenDrive/OpenDriveXmlWriter.cpp" "${CMAKE_SOURCE_DIR}/Qt/SettingsWidgets/SettingsLane.cpp" "${CMAKE_SOURCE_DIR}/Qt/SettingsWidgets/SettingsLaneSection.cpp" "${CMAKE_SOURCE_DIR}/Qt/SettingsWidgets/SettingsGeometryLine.cpp" + "${CMAKE_SOURCE_DIR}/Qt/SettingsWidgets/SettingsGeometryParamPoly3.cpp" "${CMAKE_SOURCE_DIR}/Qt/SettingsWidgets/SettingsLaneVisibilityRecord.cpp" "${CMAKE_SOURCE_DIR}/Qt/SettingsWidgets/SettingsJunction.cpp" "${CMAKE_SOURCE_DIR}/Qt/SettingsWidgets/SettingsLateralProfileCrossfall.cpp" diff --git a/OpenRoadEd/OpenDrive/Lane.cpp b/OpenRoadEd/OpenDrive/Lane.cpp index 4e40fbb4b6077ffb365612b2002e3e531b9a05c1..3549fa40aada95a88cd6df8235998bdad617922e 100644 --- a/OpenRoadEd/OpenDrive/Lane.cpp +++ b/OpenRoadEd/OpenDrive/Lane.cpp @@ -1506,4 +1506,4 @@ void LaneHeight::SetS(double value) void LaneHeight::SetInner(double value) { mInner=value; } void LaneHeight::SetOuter(double value) -{ mOuter=value; } \ No newline at end of file +{ mOuter=value; } diff --git a/OpenRoadEd/OpenDrive/OpenDriveXmlParser.cpp b/OpenRoadEd/OpenDrive/OpenDriveXmlParser.cpp index b3785a28b070163cc79b58bb8b1108e59b96aa00..8c06fa67231a2cbe01086a44a91aead8653e5c76 100644 --- a/OpenRoadEd/OpenDrive/OpenDriveXmlParser.cpp +++ b/OpenRoadEd/OpenDrive/OpenDriveXmlParser.cpp @@ -333,6 +333,11 @@ bool OpenDriveXmlParser::ReadPlanView(Road* road, TiXmlElement *node) { ReadGeometryBlock(road, subNode,2); //load a polynom spline block } + else if (subNodeType->ValueStr().compare("paramPoly3")==0) + { + ReadGeometryBlock(road, subNode,3); //load a polynom spline block + } + else cout<<"Unsupported geometry type for road " << road->GetRoadName() << ": " << subNodeType->ValueStr() << endl; @@ -363,6 +368,9 @@ bool OpenDriveXmlParser::ReadGeometryBlock (Road* road, TiXmlElement *&node, sho case 2: ReadGeometry(geomBlock, node, 3); break; + case 3: + ReadGeometry(geomBlock, node, 4); + break; } return true; @@ -420,7 +428,7 @@ bool OpenDriveXmlParser::ReadGeometry(GeometryBlock* geomBlock, TiXmlElement *no break; - case 3: //poly3 + case 3: //poly3 checker=TIXML_SUCCESS; double a,b,c,d; checker+=subNode->QueryDoubleAttribute("a",&a); @@ -429,12 +437,34 @@ bool OpenDriveXmlParser::ReadGeometry(GeometryBlock* geomBlock, TiXmlElement *no checker+=subNode->QueryDoubleAttribute("d",&d); if (checker!=TIXML_SUCCESS) { - cout<<"Error parsing arc attributes"<<endl; + cout<<"Error parsing poly3 attributes"<<endl; return false; } geomBlock->AddGeometryPoly3(s,x,y,hdg,length,a,b,c,d); break; + + case 4: //parampoly3 + checker=TIXML_SUCCESS; + double au,bu,cu,du; + double av,bv,cv,dv; + checker+=subNode->QueryDoubleAttribute("aU",&au); + checker+=subNode->QueryDoubleAttribute("bU",&bu); + checker+=subNode->QueryDoubleAttribute("cU",&cu); + checker+=subNode->QueryDoubleAttribute("dU",&du); + checker+=subNode->QueryDoubleAttribute("aV",&av); + checker+=subNode->QueryDoubleAttribute("bV",&bv); + checker+=subNode->QueryDoubleAttribute("cV",&cv); + checker+=subNode->QueryDoubleAttribute("dV",&dv); + if (checker!=TIXML_SUCCESS) + { + cout<<"Error parsing paramPoly3 attributes"<<endl; + return false; + } + + geomBlock->AddGeometryParamPoly3(s,x,y,hdg,length,au,bu,cu,du,av,bv,cv,dv); + break; + } return true; @@ -679,13 +709,16 @@ bool OpenDriveXmlParser::ReadLane (LaneSection* laneSection, TiXmlElement *node, lane->SetSuccessor(successor); } - //Proceed to the Road width - subNode=node->FirstChildElement("width"); - while (subNode) - { - ReadLaneWidth(lane, subNode); - subNode=subNode->NextSiblingElement("width"); - } + if(side!=0) + { + //Proceed to the Road width + subNode=node->FirstChildElement("width"); + while (subNode) + { + ReadLaneWidth(lane, subNode); + subNode=subNode->NextSiblingElement("width"); + } + } //Proceed to the Road Mark subNode=node->FirstChildElement("roadMark"); @@ -695,45 +728,48 @@ bool OpenDriveXmlParser::ReadLane (LaneSection* laneSection, TiXmlElement *node, subNode=subNode->NextSiblingElement("roadMark"); } - //Proceed to the Lane Material - subNode=node->FirstChildElement("material"); - while (subNode) - { - ReadLaneMaterial(lane, subNode); - subNode=subNode->NextSiblingElement("material"); - } - - //Proceed to the Lane Visibility - subNode=node->FirstChildElement("visibility"); - while (subNode) - { - ReadLaneVisibility(lane, subNode); - subNode=subNode->NextSiblingElement("visibility"); - } - - //Proceed to the Lane speed - subNode=node->FirstChildElement("speed"); - while (subNode) - { - ReadLaneSpeed(lane, subNode); - subNode=subNode->NextSiblingElement("speed"); - } - - //Proceed to the Lane access - subNode=node->FirstChildElement("access"); - while (subNode) - { - ReadLaneAccess(lane, subNode); - subNode=subNode->NextSiblingElement("access"); - } - - //Proceed to the Lane height - subNode=node->FirstChildElement("height"); - while (subNode) - { - ReadLaneHeight(lane, subNode); - subNode=subNode->NextSiblingElement("height"); - } + if(side!=0) + { + //Proceed to the Lane Material + subNode=node->FirstChildElement("material"); + while (subNode) + { + ReadLaneMaterial(lane, subNode); + subNode=subNode->NextSiblingElement("material"); + } + + //Proceed to the Lane Visibility + subNode=node->FirstChildElement("visibility"); + while (subNode) + { + ReadLaneVisibility(lane, subNode); + subNode=subNode->NextSiblingElement("visibility"); + } + + //Proceed to the Lane speed + subNode=node->FirstChildElement("speed"); + while (subNode) + { + ReadLaneSpeed(lane, subNode); + subNode=subNode->NextSiblingElement("speed"); + } + + //Proceed to the Lane access + subNode=node->FirstChildElement("access"); + while (subNode) + { + ReadLaneAccess(lane, subNode); + subNode=subNode->NextSiblingElement("access"); + } + + //Proceed to the Lane height + subNode=node->FirstChildElement("height"); + while (subNode) + { + ReadLaneHeight(lane, subNode); + subNode=subNode->NextSiblingElement("height"); + } + } return true; } @@ -753,7 +789,7 @@ bool OpenDriveXmlParser::ReadLaneWidth(Lane* lane, TiXmlElement *node) if (checker!=TIXML_SUCCESS) { - cout<<"Error parsing Lane Weight attributes"<<endl; + cout<<"Error parsing Lane Width attributes"<<endl; return false; } @@ -781,7 +817,7 @@ bool OpenDriveXmlParser::ReadLaneRoadMark(Lane* lane, TiXmlElement *node) if (checker!=TIXML_SUCCESS) { - cout<<"Error parsing Lane Weight attributes"<<endl; + cout<<"Error parsing Lane road mark attributes"<<endl; return false; } else @@ -822,7 +858,7 @@ bool OpenDriveXmlParser::ReadLaneMaterial(Lane* lane, TiXmlElement *node) checker+=node->QueryDoubleAttribute("roughness",&roughness); if (checker!=TIXML_SUCCESS) { - cout<<"Error parsing Lane Weight attributes"<<endl; + cout<<"Error parsing Lane material attributes"<<endl; return false; } @@ -849,7 +885,7 @@ bool OpenDriveXmlParser::ReadLaneVisibility(Lane* lane, TiXmlElement *node) checker+=node->QueryDoubleAttribute("right",&right); if (checker!=TIXML_SUCCESS) { - cout<<"Error parsing Lane Weight attributes"<<endl; + cout<<"Error parsing Lane visibility attributes"<<endl; return false; } @@ -869,7 +905,7 @@ bool OpenDriveXmlParser::ReadLaneSpeed(Lane* lane, TiXmlElement *node) checker+=node->QueryDoubleAttribute("max",&max); if (checker!=TIXML_SUCCESS) { - cout<<"Error parsing Lane Weight attributes"<<endl; + cout<<"Error parsing Lane speed attributes"<<endl; return false; } @@ -889,7 +925,7 @@ bool OpenDriveXmlParser::ReadLaneAccess(Lane* lane, TiXmlElement *node) checker+=node->QueryStringAttribute("restriction",&restriction); if (checker!=TIXML_SUCCESS) { - cout<<"Error parsing Lane Weight attributes"<<endl; + cout<<"Error parsing Lane access attributes"<<endl; return false; } @@ -911,7 +947,7 @@ bool OpenDriveXmlParser::ReadLaneHeight(Lane* lane, TiXmlElement *node) checker+=node->QueryDoubleAttribute("outer",&outer); if (checker!=TIXML_SUCCESS) { - cout<<"Error parsing Lane Weight attributes"<<endl; + cout<<"Error parsing Lane height attributes"<<endl; return false; } diff --git a/OpenRoadEd/OpenDrive/OpenDriveXmlWriter.cpp b/OpenRoadEd/OpenDrive/OpenDriveXmlWriter.cpp index e6fbb959920f176f30536d4c8e9e9defb381c961..fc3053d3d764cea53311ef8543f23beaf07d0d78 100644 --- a/OpenRoadEd/OpenDrive/OpenDriveXmlWriter.cpp +++ b/OpenRoadEd/OpenDrive/OpenDriveXmlWriter.cpp @@ -220,6 +220,14 @@ bool OpenDriveXmlWriter::WriteGeometryBlock (TiXmlElement *node, GeometryBlock* { WriteGeometry(node, geometryBlock->GetGeometryAt(0), 0); } + else if(geometryBlock->CheckIfPoly3()) + { + WriteGeometry(node, geometryBlock->GetGeometryAt(0), 3); + } + else if(geometryBlock->CheckIfParamPoly3()) + { + WriteGeometry(node, geometryBlock->GetGeometryAt(0), 4); + } else { WriteGeometry(node, geometryBlock->GetGeometryAt(0), 1); @@ -315,8 +323,58 @@ bool OpenDriveXmlWriter::WriteGeometry(TiXmlElement *node, RoadGeometry* roadGeo case 3: { //poly3 + GeometryPoly3 *lPoly3=static_cast<GeometryPoly3*>(roadGeometry); + TiXmlElement *nodePoly3 = new TiXmlElement("poly3"); + nodeGeometry->LinkEndChild(nodePoly3); + std::stringstream svalue; + svalue << setprecision(16) << setiosflags (ios_base::scientific) << lPoly3->GetA(); + nodePoly3->SetAttribute("a",svalue.str()); + svalue.str(""); + svalue << setprecision(16) << setiosflags (ios_base::scientific) << lPoly3->GetB(); + nodePoly3->SetAttribute("b",svalue.str()); + svalue.str(""); + svalue << setprecision(16) << setiosflags (ios_base::scientific) << lPoly3->GetC(); + nodePoly3->SetAttribute("c",svalue.str()); + svalue.str(""); + svalue << setprecision(16) << setiosflags (ios_base::scientific) << lPoly3->GetD(); + nodePoly3->SetAttribute("d",svalue.str()); + svalue.str(""); break; } + case 4: + { + //param poly3 + GeometryParamPoly3 *lParamPoly3=static_cast<GeometryParamPoly3*>(roadGeometry); + TiXmlElement *nodeParamPoly3 = new TiXmlElement("paramPoly3"); + nodeGeometry->LinkEndChild(nodeParamPoly3); + std::stringstream svalue; + svalue << setprecision(16) << setiosflags (ios_base::scientific) << lParamPoly3->GetAu(); + nodeParamPoly3->SetAttribute("aU",svalue.str()); + svalue.str(""); + svalue << setprecision(16) << setiosflags (ios_base::scientific) << lParamPoly3->GetBu(); + nodeParamPoly3->SetAttribute("bU",svalue.str()); + svalue.str(""); + svalue << setprecision(16) << setiosflags (ios_base::scientific) << lParamPoly3->GetCu(); + nodeParamPoly3->SetAttribute("cU",svalue.str()); + svalue.str(""); + svalue << setprecision(16) << setiosflags (ios_base::scientific) << lParamPoly3->GetDu(); + nodeParamPoly3->SetAttribute("dU",svalue.str()); + svalue.str(""); + svalue << setprecision(16) << setiosflags (ios_base::scientific) << lParamPoly3->GetAv(); + nodeParamPoly3->SetAttribute("aV",svalue.str()); + svalue.str(""); + svalue << setprecision(16) << setiosflags (ios_base::scientific) << lParamPoly3->GetBv(); + nodeParamPoly3->SetAttribute("bV",svalue.str()); + svalue.str(""); + svalue << setprecision(16) << setiosflags (ios_base::scientific) << lParamPoly3->GetCv(); + nodeParamPoly3->SetAttribute("cV",svalue.str()); + svalue.str(""); + svalue << setprecision(16) << setiosflags (ios_base::scientific) << lParamPoly3->GetDv(); + nodeParamPoly3->SetAttribute("dV",svalue.str()); + svalue.str(""); + break; + } + } return true; @@ -509,7 +567,7 @@ bool OpenDriveXmlWriter::WriteLaneSections (TiXmlElement *node, LaneSection *lan } else if(lType==0) { - WriteLane(nodeLanesCenter, lLane); + WriteLane(nodeLanesCenter, lLane,true); } else if(lType<0 && nodeLanesRight!=NULL) { @@ -521,7 +579,7 @@ bool OpenDriveXmlWriter::WriteLaneSections (TiXmlElement *node, LaneSection *lan } //-------------- -bool OpenDriveXmlWriter::WriteLane (TiXmlElement *node, Lane* lane) +bool OpenDriveXmlWriter::WriteLane (TiXmlElement *node, Lane* lane, bool center) { //Write Lane attributes int id; @@ -563,13 +621,15 @@ bool OpenDriveXmlWriter::WriteLane (TiXmlElement *node, Lane* lane) nodeLaneLinkSuccessor->SetAttribute("id",successor); } - //Lane Width - unsigned int lLaneWidthCount = lane->GetLaneWidthCount(); - for(unsigned int i=0; i<lLaneWidthCount; i++) - { - WriteLaneWidth(nodeLane, lane->GetLaneWidth(i)); - } - + if(!center) + { + //Lane Width + unsigned int lLaneWidthCount = lane->GetLaneWidthCount(); + for(unsigned int i=0; i<lLaneWidthCount; i++) + { + WriteLaneWidth(nodeLane, lane->GetLaneWidth(i)); + } + } //Lane Road Mark unsigned int lLaneRoadMark = lane->GetLaneRoadMarkCount(); for(unsigned int i=0; i<lLaneRoadMark; i++) @@ -577,40 +637,43 @@ bool OpenDriveXmlWriter::WriteLane (TiXmlElement *node, Lane* lane) WriteLaneRoadMark(nodeLane, lane->GetLaneRoadMark(i)); } - //Lane Material - unsigned int lLaneMaterial = lane->GetLaneMaterialCount(); - for(unsigned int i=0; i<lLaneMaterial; i++) - { - WriteLaneMaterial(nodeLane, lane->GetLaneMaterial(i)); - } - - //Lane Visibility - unsigned int lLaneVisibility = lane->GetLaneVisibilityCount(); - for(unsigned int i=0; i<lLaneVisibility; i++) - { - WriteLaneVisibility(nodeLane, lane->GetLaneVisibility(i)); - } - - //Lane speed - unsigned int lLaneSpeed = lane->GetLaneSpeedCount(); - for(unsigned int i=0; i<lLaneSpeed; i++) - { - WriteLaneSpeed(nodeLane, lane->GetLaneSpeed(i)); - } - - //Lane access - unsigned int lLaneAccess = lane->GetLaneAccessCount(); - for(unsigned int i=0; i<lLaneAccess; i++) - { - WriteLaneAccess(nodeLane, lane->GetLaneAccess(i)); - } - - //Lane height - unsigned int lLaneHeight = lane->GetLaneHeightCount(); - for(unsigned int i=0; i<lLaneHeight; i++) - { - WriteLaneHeight(nodeLane, lane->GetLaneHeight(i)); - } + if(!center) + { + //Lane Material + unsigned int lLaneMaterial = lane->GetLaneMaterialCount(); + for(unsigned int i=0; i<lLaneMaterial; i++) + { + WriteLaneMaterial(nodeLane, lane->GetLaneMaterial(i)); + } + + //Lane Visibility + unsigned int lLaneVisibility = lane->GetLaneVisibilityCount(); + for(unsigned int i=0; i<lLaneVisibility; i++) + { + WriteLaneVisibility(nodeLane, lane->GetLaneVisibility(i)); + } + + //Lane speed + unsigned int lLaneSpeed = lane->GetLaneSpeedCount(); + for(unsigned int i=0; i<lLaneSpeed; i++) + { + WriteLaneSpeed(nodeLane, lane->GetLaneSpeed(i)); + } + + //Lane access + unsigned int lLaneAccess = lane->GetLaneAccessCount(); + for(unsigned int i=0; i<lLaneAccess; i++) + { + WriteLaneAccess(nodeLane, lane->GetLaneAccess(i)); + } + + //Lane height + unsigned int lLaneHeight = lane->GetLaneHeightCount(); + for(unsigned int i=0; i<lLaneHeight; i++) + { + WriteLaneHeight(nodeLane, lane->GetLaneHeight(i)); + } + } return true; } diff --git a/OpenRoadEd/OpenDrive/OpenDriveXmlWriter.h b/OpenRoadEd/OpenDrive/OpenDriveXmlWriter.h index 2b51002ed10b38128b3e2b601efdd36004d8fa66..f4bf2a4d48438eb02bbc9da6880cc78a19a737e9 100644 --- a/OpenRoadEd/OpenDrive/OpenDriveXmlWriter.h +++ b/OpenRoadEd/OpenDrive/OpenDriveXmlWriter.h @@ -53,7 +53,7 @@ public: bool WriteLanes (TiXmlElement *node, Road* road); bool WriteLaneSections (TiXmlElement *node, LaneSection *laneSection); - bool WriteLane (TiXmlElement *node, Lane* lane); + bool WriteLane (TiXmlElement *node, Lane* lane,bool center=false); bool WriteLaneWidth(TiXmlElement *node, LaneWidth* laneWidth); bool WriteLaneRoadMark(TiXmlElement *node, LaneRoadMark* laneRoadMark); bool WriteLaneMaterial(TiXmlElement *node, LaneMaterial* laneMaterial); diff --git a/OpenRoadEd/OpenDrive/RoadGeometry.cpp b/OpenRoadEd/OpenDrive/RoadGeometry.cpp index bfffe48d4286cc170de18329db5f961876aba79f..b127dc8eb218bca3deaa651462f666de478919fb 100644 --- a/OpenRoadEd/OpenDrive/RoadGeometry.cpp +++ b/OpenRoadEd/OpenDrive/RoadGeometry.cpp @@ -481,6 +481,159 @@ void GeometrySpiral::GetCoords(double s_check, double &retX, double &retY, doubl retY=mY+ tmpY*mRotCos+tmpX*mRotSin; } +//*********************************************************************************** +//ParamPoly3 geometry +//*********************************************************************************** +/** + * Constructor that initializes the base properties of the record + */ +GeometryParamPoly3::GeometryParamPoly3 (double s, double x, double y, double hdg, double length,double au,double bu,double cu,double du, double av, double bv, double cv, double dv): RoadGeometry(s, x, y, hdg, length) +{ + SetGeomType(4); + mAu=au; + mBu=bu; + mCu=cu; + mDu=du; + mAv=av; + mBv=bv; + mCv=cv; + mDv=dv; + ComputeVars(); +} + +/** + * Computes the required vars + */ +void GeometryParamPoly3::ComputeVars() +{ +} + +/** + * Clones and returns the new geometry record + */ +RoadGeometry* GeometryParamPoly3::Clone() const +{ + GeometryParamPoly3* ret=new GeometryParamPoly3(mS,mX,mY, mHdg, mLength,mAu,mBu,mCu,mDu,mAv,mBv,mCv,mDv); + return ret; +} + + +//------------------------------------------------- + +/** + * Setter for the base properties + */ +void GeometryParamPoly3::SetAll(double s, double x, double y, double hdg, double length,double au,double bu,double cu,double du, double av, double bv, double cv, double dv) +{ + SetBase(s,x,y,hdg,length,false); + mAu=au; + mBu=bu; + mCu=cu; + mDu=du; + mAv=av; + mBv=bv; + mCv=cv; + mDv=dv; + ComputeVars(); +} + +void GeometryParamPoly3::SetAu(double value) +{ + mAu=value; +} +void GeometryParamPoly3::SetBu(double value) +{ + mBu=value; +} +void GeometryParamPoly3::SetCu(double value) +{ + mCu=value; +} +void GeometryParamPoly3::SetDu(double value) +{ + mDu=value; +} +void GeometryParamPoly3::SetAv(double value) +{ + mAv=value; +} +void GeometryParamPoly3::SetBv(double value) +{ + mBv=value; +} +void GeometryParamPoly3::SetCv(double value) +{ + mCv=value; +} +void GeometryParamPoly3::SetDv(double value) +{ + mDv=value; +} +//------------------------------------------------- + +/** + * Getter for the base properties + */ +double GeometryParamPoly3::GetAu(void) +{ + return mAu; +} +double GeometryParamPoly3::GetBu(void) +{ + return mBu; +} +double GeometryParamPoly3::GetCu(void) +{ + return mCu; +} +double GeometryParamPoly3::GetDu(void) +{ + return mDu; +} +double GeometryParamPoly3::GetAv(void) +{ + return mAv; +} +double GeometryParamPoly3::GetBv(void) +{ + return mBv; +} +double GeometryParamPoly3::GetCv(void) +{ + return mCv; +} +double GeometryParamPoly3::GetDv(void) +{ + return mDv; +} +//------------------------------------------------- +/** + * Gets the coordinates at the sample S offset + */ +void GeometryParamPoly3::GetCoords(double s_check, double &retX, double &retY) +{ + double param=s_check/mLength; + double sX,sY; + + sX=mAu+mBu*param+mCu*pow(param,2.0)+mDu*pow(param,3.0); + sY=mAv+mBv*param+mCv*pow(param,2.0)+mDv*pow(param,3.0); + + retX=mX+sX*cos(mHdg)-sY*sin(mHdg); + retY=mY+sX*sin(mHdg)+sY*cos(mHdg); +} + +void GeometryParamPoly3::GetCoords(double s_check, double &retX, double &retY, double &retHDG) +{ + double param=s_check/mLength; + double diff_sX,diff_sY; + + GetCoords(s_check,retX,retY); + + diff_sX=mBu+2.0*mCu*param+3*mDu*pow(param,2.0); + diff_sY=mBv+2.0*mCv*param+3*mDv*pow(param,2.0); + retHDG=mHdg+atan2(diff_sY,diff_sX); +} + @@ -519,6 +672,25 @@ void GeometryPoly3::SetAll(double s, double x, double y, double hdg, double leng ComputeVars(); } +/** + * Getter for the base properties + */ +double GeometryPoly3::GetA(void) +{ + return mA; +} +double GeometryPoly3::GetB(void) +{ + return mB; +} +double GeometryPoly3::GetC(void) +{ + return mC; +} +double GeometryPoly3::GetD(void) +{ + return mD; +} @@ -567,6 +739,10 @@ const GeometryBlock& GeometryBlock::operator=(const GeometryBlock& otherGeomBloc { delete poly; } + else if(GeometryParamPoly3 *paramPoly = dynamic_cast<GeometryParamPoly3 *>(*member)) + { + delete paramPoly; + } } mGeometryBlockElement.clear(); @@ -598,6 +774,10 @@ void GeometryBlock::AddGeometryPoly3(double s, double x, double y, double hdg, d { mGeometryBlockElement.push_back(new GeometryPoly3(s, x, y, hdg, length, a, b, c, d)); } +void GeometryBlock::AddGeometryParamPoly3(double s, double x, double y, double hdg, double length, double au,double bu,double cu,double du,double av,double bv,double cv,double dv) +{ + mGeometryBlockElement.push_back(new GeometryParamPoly3(s, x, y, hdg, length, au, bu, cu, du,av,bv,cv,dv)); +} //------------------------------------------------- @@ -627,8 +807,47 @@ double GeometryBlock::GetBlockLength() */ bool GeometryBlock::CheckIfLine() { + int type; + if(mGeometryBlockElement.size()>1) return false; - else return true; + else + { + type=mGeometryBlockElement.at(0)->GetGeomType(); + if(type==0) + return true; + else + return false; + } +} + +bool GeometryBlock::CheckIfParamPoly3() +{ + int type; + + if(mGeometryBlockElement.size()>1) return false; + else + { + type=mGeometryBlockElement.at(0)->GetGeomType(); + if(type==4) + return true; + else + return false; + } +} + +bool GeometryBlock::CheckIfPoly3() +{ + int type; + + if(mGeometryBlockElement.size()>1) return false; + else + { + type=mGeometryBlockElement.at(0)->GetGeomType(); + if(type==3) + return true; + else + return false; + } } //------------------------------------------------- @@ -643,15 +862,38 @@ void GeometryBlock::Recalculate(double s, double x, double y, double hdg) double lX=x; double lY=y; double lHdg=hdg; + int type; if(mGeometryBlockElement.size()==1) { - GeometryLine *lGeometryLine = static_cast<GeometryLine*>(mGeometryBlockElement.at(0)); - if(lGeometryLine!=NULL) - { - // Updates the line to reflect the changes of the previous block - lGeometryLine->SetBase(lS,lX,lY,lHdg,lGeometryLine->GetLength()); - } + type=mGeometryBlockElement.at(0)->GetGeomType(); + if(type==0) + { + GeometryLine *lGeometryLine = static_cast<GeometryLine*>(mGeometryBlockElement.at(0)); + if(lGeometryLine!=NULL) + { + // Updates the line to reflect the changes of the previous block + lGeometryLine->SetBase(lS,lX,lY,lHdg,lGeometryLine->GetLength()); + } + } + else if(type==3) + { + GeometryPoly3 *lGeometryPoly3 = static_cast<GeometryPoly3*>(mGeometryBlockElement.at(0)); + if(lGeometryPoly3!=NULL) + { + // Updates the line to reflect the changes of the previous block + lGeometryPoly3->SetBase(lS,lX,lY,lHdg,lGeometryPoly3->GetLength()); + } + } + else if(type==4) + { + GeometryParamPoly3 *lGeometryParamPoly3 = static_cast<GeometryParamPoly3*>(mGeometryBlockElement.at(0)); + if(lGeometryParamPoly3!=NULL) + { + // Updates the line to reflect the changes of the previous block + lGeometryParamPoly3->SetBase(lS,lX,lY,lHdg,lGeometryParamPoly3->GetLength()); + } + } } else if(mGeometryBlockElement.size()==3) { @@ -792,6 +1034,10 @@ GeometryBlock::~GeometryBlock() { delete poly; } + else if(GeometryParamPoly3 *paramPoly = dynamic_cast<GeometryParamPoly3 *>(*member)) + { + delete paramPoly; + } } mGeometryBlockElement.clear(); } diff --git a/OpenRoadEd/OpenDrive/RoadGeometry.h b/OpenRoadEd/OpenDrive/RoadGeometry.h index 52983c75bb41eef3d5e30fa19532603130dd2ed5..0f800a583b2a51eeff4c2e007acea743128d41ae 100644 --- a/OpenRoadEd/OpenDrive/RoadGeometry.h +++ b/OpenRoadEd/OpenDrive/RoadGeometry.h @@ -46,7 +46,7 @@ public: /** * Sets the type of the geometry - * 0: Line, 1: Arc, 2: Spiral + * 0: Line, 1: Arc, 2: Spiral 3: poly3 4: paramPloy3 */ void SetGeomType(short int geomType); @@ -261,6 +261,86 @@ protected: virtual void ComputeVars(); }; +//---------------------------------------------------------------------------------- +/** + * GeometryParamPoly3 inherits the RoadGeometry class and adds parametric properties + * + */ +class GeometryParamPoly3: public RoadGeometry +{ +private: + /** + * Base record properties + */ + double mAu; + double mBu; + double mCu; + double mDu; + double mAv; + double mBv; + double mCv; + double mDv; + + /** + * Computation variables + */ + double mEndX; + double mEndY; + +public: + /** + * Constructor that initializes the base properties of the record + */ + GeometryParamPoly3 (double s, double x, double y, double hdg, double length, double au,double bu,double cu,double du,double av,double bv,double cv,double dv); + + /** + * Clones and returns the new geometry record + */ + RoadGeometry* Clone() const; + + //------------------------------------------------- + + /** + * Setter for the base properties + */ + void SetAll(double s, double x, double y, double hdg, double length,double au,double bu,double cu,double du,double av,double bv,double cv,double dv); + + void SetAu(double value); + void SetBu(double value); + void SetCu(double value); + void SetDu(double value); + void SetAv(double value); + void SetBv(double value); + void SetCv(double value); + void SetDv(double value); + + //------------------------------------------------- + /** + * Getter for the base properties + */ + double GetAu(void); + double GetBu(void); + double GetCu(void); + double GetDu(void); + double GetAv(void); + double GetBv(void); + double GetCv(void); + double GetDv(void); + + //------------------------------------------------- + /** + * Gets the coordinates at the sample S offset + */ + void GetCoords(double s_check, double &retX, double &retY, double &retHDG); + void GetCoords(double s_check, double &retX, double &retY); +protected: + + /** + * Computes the required vars + */ + virtual void ComputeVars(); +}; + //---------------------------------------------------------------------------------- /** @@ -294,10 +374,17 @@ public: */ void SetAll(double s, double x, double y, double hdg, double length, double a,double b,double c,double d); + //------------------------------------------------- + /** + * Getter for the base properties + */ + double GetA(void); + double GetB(void); + double GetC(void); + double GetD(void); }; - //---------------------------------------------------------------------------------- /** * GeometryBlock is a class used to combine multiple geometry records into blocks. @@ -337,6 +424,7 @@ public: void AddGeometryArc(double s, double x, double y, double hdg, double length, double curvature); void AddGeometrySpiral(double s, double x, double y, double hdg, double length, double curvatureStart,double curvatureEnd); void AddGeometryPoly3(double s, double x, double y, double hdg, double length, double a,double b,double c,double d); + void AddGeometryParamPoly3(double s, double x, double y, double hdg, double length, double au,double bu,double cu,double du,double av,double bv,double cv,double dv); //------------------------------------------------- @@ -354,6 +442,8 @@ public: * Checks if the block is a straight line block or a turn */ bool CheckIfLine(); + bool CheckIfPoly3(); + bool CheckIfParamPoly3(); //------------------------------------------------- diff --git a/OpenRoadEd/Osg/OSGRoad.cpp b/OpenRoadEd/Osg/OSGRoad.cpp index dd009eb6350447a9974678a423f6551cd181ddb9..b36498cdfefba19bd0af90d3119af126b6c4fea4 100644 --- a/OpenRoadEd/Osg/OSGRoad.cpp +++ b/OpenRoadEd/Osg/OSGRoad.cpp @@ -334,7 +334,6 @@ void OSGRoad::CreateRoadGeometry (vector<osg::ref_ptr<osg::Geometry>> &geometrie short int alphaDepthState) { - //================================================================ //Check if everything needed for the road generation exists //================================================================ diff --git a/OpenRoadEd/Qt/MainWindow.cpp b/OpenRoadEd/Qt/MainWindow.cpp index 3b8a71d5fd42ed18ea1c4d8fc682671bc2c02fe9..cae2b501abcf8c6f03f099f640bc05ad2f2ecd47 100644 --- a/OpenRoadEd/Qt/MainWindow.cpp +++ b/OpenRoadEd/Qt/MainWindow.cpp @@ -57,6 +57,7 @@ void MainWindow::initRoadTreeAndSettings() connect(mRoadTree, SIGNAL(RoadTypeSelected(RoadType*,double,double)), mSettingsPage, SLOT(OnRoadTypeSelected(RoadType*,double,double))); connect(mRoadTree, SIGNAL(GeometryLineSelected(GeometryBlock*,bool)), mSettingsPage, SLOT(OnGeometryLineSelected(GeometryBlock*,bool))); connect(mRoadTree, SIGNAL(GeometryTurnSelected(GeometryBlock*,bool)), mSettingsPage, SLOT(OnGeometryTurnSelected(GeometryBlock*,bool))); + connect(mRoadTree, SIGNAL(GeometryParamPoly3Selected(GeometryBlock*,bool)), mSettingsPage, SLOT(OnGeometryParamPoly3Selected(GeometryBlock*,bool))); connect(mRoadTree, SIGNAL(ElevationSelected(Elevation*,double,double)), mSettingsPage, SLOT(OnElevationSelected(Elevation*,double,double))); connect(mRoadTree, SIGNAL(SuperElevationSelected(SuperElevation*,double,double)), mSettingsPage, SLOT(OnSuperElevationSelected(SuperElevation*,double,double))); connect(mRoadTree, SIGNAL(CrossfallSelected(Crossfall*,double,double)), mSettingsPage, SLOT(OnCrossfallSelected(Crossfall*,double,double))); @@ -98,6 +99,7 @@ void MainWindow::initCreation() connect(mRoadTree, SIGNAL(RoadTypeSelected(RoadType*,double,double)), mCreationPage, SLOT(SomethingSelected())); connect(mRoadTree, SIGNAL(GeometryLineSelected(GeometryBlock*,bool)), mCreationPage, SLOT(SomethingSelected())); connect(mRoadTree, SIGNAL(GeometryTurnSelected(GeometryBlock*,bool)), mCreationPage, SLOT(SomethingSelected())); + connect(mRoadTree, SIGNAL(GeometryParamPoly3Selected(GeometryBlock*,bool)), mCreationPage, SLOT(SomethingSelected())); connect(mRoadTree, SIGNAL(ElevationSelected(Elevation*,double,double)), mCreationPage, SLOT(SomethingSelected())); connect(mRoadTree, SIGNAL(SuperElevationSelected(SuperElevation*,double,double)), mCreationPage, SLOT(SomethingSelected())); connect(mRoadTree, SIGNAL(CrossfallSelected(Crossfall*,double,double)), mCreationPage, SLOT(SomethingSelected())); @@ -348,6 +350,7 @@ void MainWindow::initOSG(OSGMain *osgMain) connect(mRoadTree, SIGNAL(RoadTypeSelected(RoadType*,double,double)), mOSGViewer, SLOT(SomethingSelected())); connect(mRoadTree, SIGNAL(GeometryLineSelected(GeometryBlock*,bool)), mOSGViewer, SLOT(SomethingSelected())); connect(mRoadTree, SIGNAL(GeometryTurnSelected(GeometryBlock*,bool)), mOSGViewer, SLOT(SomethingSelected())); + connect(mRoadTree, SIGNAL(GeometryParamPoly3Selected(GeometryBlock*,bool)), mOSGViewer, SLOT(SomethingSelected())); connect(mRoadTree, SIGNAL(ElevationSelected(Elevation*,double,double)), mOSGViewer, SLOT(SomethingSelected())); connect(mRoadTree, SIGNAL(SuperElevationSelected(SuperElevation*,double,double)), mOSGViewer, SLOT(SomethingSelected())); connect(mRoadTree, SIGNAL(CrossfallSelected(Crossfall*,double,double)), mOSGViewer, SLOT(SomethingSelected())); diff --git a/OpenRoadEd/Qt/QOSGWidget.cpp b/OpenRoadEd/Qt/QOSGWidget.cpp index d72ed227ce82608668efc51841d1d7706cb26ce2..7010fbcc47938930eabe828f0cbef9e8664e14eb 100644 --- a/OpenRoadEd/Qt/QOSGWidget.cpp +++ b/OpenRoadEd/Qt/QOSGWidget.cpp @@ -214,6 +214,14 @@ void QOSGWidget::SomethingSelected() mOsgMain->MakeSelection(&osgNode); break; } + case GEOMETRY_PARAMPOLY3: + { + osgNode.SetNodeType(GEOMETRY_BLOCK_NODE); + osgNode.AddNodeInfoIndex(lSelection->GetIndex(0)); + osgNode.AddNodeInfoIndex(lSelection->GetIndex(1)); + mOsgMain->MakeSelection(&osgNode); + break; + } case ELEVATION: { osgNode.SetNodeType(ELEVATION_NODE); diff --git a/OpenRoadEd/Qt/SettingsWidgets/SettingsGeometryParamPoly3.cpp b/OpenRoadEd/Qt/SettingsWidgets/SettingsGeometryParamPoly3.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fb60ee69281b3e0b2b245a4a378025a6a8a9586e --- /dev/null +++ b/OpenRoadEd/Qt/SettingsWidgets/SettingsGeometryParamPoly3.cpp @@ -0,0 +1,351 @@ +#include "SettingsGeometryParamPoly3.h" +#include "moc_SettingsGeometryParamPoly3.cpp" + +/** + * Initializes the properties panel and the UI elements + */ +SettingsGeometryParamPoly3::SettingsGeometryParamPoly3(QWidget *parent ) +{ + // Resets the record + mParamPoly3=NULL; + + // Main vertical layout + QVBoxLayout *mainLayout = new QVBoxLayout; + + //------------------------------------------------- + // Group for settings + QGroupBox *settingsGroup = new QGroupBox; + settingsGroup->setSizePolicy(QSizePolicy::Preferred,QSizePolicy::Maximum); + settingsGroup->setTitle(tr("Line geometry settings")); + + mS = new QLineEdit; + mS->setDisabled(true); + mX = new QDoubleSpinBox; + mX->setKeyboardTracking(false); + mX->setDecimals(9); + mX->setRange(-1000000,1000000); + mY = new QDoubleSpinBox; + mY->setKeyboardTracking(false); + mY->setDecimals(9); + mY->setRange(-1000000,1000000); + mHeading = new QDoubleSpinBox; + mHeading->setKeyboardTracking(false); + mHeading->setDecimals(9); + mHeading->setSingleStep(0.001); + mLength = new QDoubleSpinBox; + mLength->setKeyboardTracking(false); + mLength->setDecimals(9); + mLength->setRange(-1000000,1000000); + mAU = new QDoubleSpinBox; + mAU->setKeyboardTracking(false); + mAU->setDecimals(9); + mAU->setRange(-1000000,1000000); + mBU = new QDoubleSpinBox; + mBU->setKeyboardTracking(false); + mBU->setDecimals(9); + mBU->setRange(-1000000,1000000); + mCU = new QDoubleSpinBox; + mCU->setKeyboardTracking(false); + mCU->setDecimals(9); + mCU->setRange(-1000000,1000000); + mDU = new QDoubleSpinBox; + mDU->setKeyboardTracking(false); + mDU->setDecimals(9); + mDU->setRange(-1000000,1000000); + mAV = new QDoubleSpinBox; + mAV->setKeyboardTracking(false); + mAV->setDecimals(9); + mAV->setRange(-1000000,1000000); + mBV = new QDoubleSpinBox; + mBV->setKeyboardTracking(false); + mBV->setDecimals(9); + mBV->setRange(-1000000,1000000); + mCV = new QDoubleSpinBox; + mCV->setKeyboardTracking(false); + mCV->setDecimals(9); + mCV->setRange(-1000000,1000000); + mDV = new QDoubleSpinBox; + mDV->setKeyboardTracking(false); + mDV->setDecimals(9); + mDV->setRange(-1000000,1000000); + + // Form Layout inside group + QFormLayout *settingsFormLayout = new QFormLayout; + settingsFormLayout->addRow(tr("S:"),mS); + settingsFormLayout->addRow(tr("X position:"),mX); + settingsFormLayout->addRow(tr("Y position:"),mY); + settingsFormLayout->addRow(tr("Heading:"),mHeading); + settingsFormLayout->addRow(tr("Length:"),mLength); + settingsFormLayout->addRow(tr("aU:"),mAU); + settingsFormLayout->addRow(tr("bU:"),mBU); + settingsFormLayout->addRow(tr("cU:"),mCU); + settingsFormLayout->addRow(tr("dU:"),mDU); + settingsFormLayout->addRow(tr("aV:"),mAV); + settingsFormLayout->addRow(tr("bV:"),mBV); + settingsFormLayout->addRow(tr("cV:"),mCV); + settingsFormLayout->addRow(tr("dV:"),mDV); + + settingsGroup->setLayout(settingsFormLayout); + //------------------------------------------------- + // Group for help + QGroupBox *helpGroup = new QGroupBox; + helpGroup->setTitle(tr("Help")); + + QTextEdit *helpText = new QTextEdit; + helpText->setSizePolicy(QSizePolicy::Preferred,QSizePolicy::Expanding); + helpText->setReadOnly(true); + helpText->setHtml("This record describes a straight line as part of the road’s chord line." + "<p><b>S</b> - start position (s-offset) [meters]</p>" + "<p><b>X</b> - start position X [meters]</p>" + "<p><b>Y</b> - start position Y [meters]</p>" + "<p><b>Heading</b> - start orientation [radians]</p>" + "<p><b>Length</b> - length of the chord line for this record [meters]</p>" + "<p><b>aU</b> - a coefficient for the parameteric polynomial in x </p>" + "<p><b>bU</b> - b coefficient for the parameteric polynomial in x </p>" + "<p><b>cU</b> - c coefficient for the parameteric polynomial in x </p>" + "<p><b>dU</b> - d coefficient for the parameteric polynomial in x </p>" + "<p><b>aV</b> - a coefficient for the parameteric polynomial in y </p>" + "<p><b>bV</b> - b coefficient for the parameteric polynomial in y </p>" + "<p><b>cV</b> - c coefficient for the parameteric polynomial in y </p>" + "<p><b>dV</b> - d coefficient for the parameteric polynomial in y </p>"); + + QVBoxLayout *helpLayout = new QVBoxLayout; + helpLayout->addWidget(helpText); + + helpGroup->setLayout(helpLayout); + //------------------------------------------------- + + mainLayout->addWidget(settingsGroup); + mainLayout->addWidget(helpGroup); + setLayout(mainLayout); +} + +/** + * Loads the data for a given record + * + * @param block Geometry block record whose properties are to be loaded + * @param first Set to true if it is the first record for this road + */ +void SettingsGeometryParamPoly3::LoadData(GeometryBlock *block) +{ + if(block!=NULL) + { + // Disconnects the "value changed" signals while the values are loaded + disconnect(mS, SIGNAL(textChanged(const QString &)), this, SLOT(SChanged())); + disconnect(mX, SIGNAL(valueChanged(double)), this, SLOT(XChanged(double))); + disconnect(mY, SIGNAL(valueChanged(double)), this, SLOT(YChanged(double))); + disconnect(mHeading, SIGNAL(valueChanged(double)), this, SLOT(HeadingChanged(double))); + disconnect(mLength, SIGNAL(valueChanged(double)), this, SLOT(LengthChanged(double))); + disconnect(mAU, SIGNAL(valueChanged(double)), this, SLOT(AUChanged(double))); + disconnect(mBU, SIGNAL(valueChanged(double)), this, SLOT(BUChanged(double))); + disconnect(mCU, SIGNAL(valueChanged(double)), this, SLOT(CUChanged(double))); + disconnect(mDU, SIGNAL(valueChanged(double)), this, SLOT(DUChanged(double))); + disconnect(mAV, SIGNAL(valueChanged(double)), this, SLOT(AVChanged(double))); + disconnect(mBV, SIGNAL(valueChanged(double)), this, SLOT(BVChanged(double))); + disconnect(mCV, SIGNAL(valueChanged(double)), this, SLOT(CVChanged(double))); + disconnect(mDV, SIGNAL(valueChanged(double)), this, SLOT(DVChanged(double))); + + // Sets the record properties to the input widgets + mParamPoly3=block; + + GeometryParamPoly3 *lGeometryParamPoly3 = static_cast<GeometryParamPoly3*>(mParamPoly3->GetGeometryAt(0)); + if(lGeometryParamPoly3!=NULL) + { + mS->setText(QString("%1").arg(lGeometryParamPoly3->GetS())); + mX->setValue(lGeometryParamPoly3->GetX()); + mY->setValue(lGeometryParamPoly3->GetY()); + mHeading->setValue(lGeometryParamPoly3->GetHdg()); + mLength->setValue(lGeometryParamPoly3->GetLength()); + mAU->setValue(lGeometryParamPoly3->GetAu()); + mBU->setValue(lGeometryParamPoly3->GetBu()); + mCU->setValue(lGeometryParamPoly3->GetCu()); + mDU->setValue(lGeometryParamPoly3->GetDu()); + mAV->setValue(lGeometryParamPoly3->GetAv()); + mBV->setValue(lGeometryParamPoly3->GetBv()); + mCV->setValue(lGeometryParamPoly3->GetCv()); + mDV->setValue(lGeometryParamPoly3->GetDv()); + } + + // Connects the "value changed" signals back + connect(mS, SIGNAL(textChanged(const QString &)), this, SLOT(SChanged())); + connect(mX, SIGNAL(valueChanged(double)), this, SLOT(XChanged(double))); + connect(mY, SIGNAL(valueChanged(double)), this, SLOT(YChanged(double))); + connect(mHeading, SIGNAL(valueChanged(double)), this, SLOT(HeadingChanged(double))); + connect(mLength, SIGNAL(valueChanged(double)), this, SLOT(LengthChanged(double))); + connect(mAU, SIGNAL(valueChanged(double)), this, SLOT(AUChanged(double))); + connect(mBU, SIGNAL(valueChanged(double)), this, SLOT(BUChanged(double))); + connect(mCU, SIGNAL(valueChanged(double)), this, SLOT(CUChanged(double))); + connect(mDU, SIGNAL(valueChanged(double)), this, SLOT(DUChanged(double))); + connect(mAV, SIGNAL(valueChanged(double)), this, SLOT(AVChanged(double))); + connect(mBV, SIGNAL(valueChanged(double)), this, SLOT(BVChanged(double))); + connect(mCV, SIGNAL(valueChanged(double)), this, SLOT(CVChanged(double))); + connect(mDV, SIGNAL(valueChanged(double)), this, SLOT(DVChanged(double))); + } +} + +/** + * Makes this record the first for the road, thus enabling controls that only + * the first record has, such as the X and Y coordinates, which are otherwise + * computed automatically and are disabled + */ +void SettingsGeometryParamPoly3::SetFirst(bool first) +{ + if(first) + { + mX->setEnabled(true); + mY->setEnabled(true); + mHeading->setEnabled(true); + } + else + { + mX->setEnabled(false); + mY->setEnabled(false); + mHeading->setEnabled(false); + } +} + +/** + * Methods called when properties change + */ +void SettingsGeometryParamPoly3::SChanged() +{ + // Shouldn't be called + GeometryParamPoly3 *lGeometryParamPoly3 = static_cast<GeometryParamPoly3*>(mParamPoly3->GetGeometryAt(0)); + if(lGeometryParamPoly3!=NULL) + { + lGeometryParamPoly3->SetS(mS->text().toDouble()); + } +} +void SettingsGeometryParamPoly3::XChanged(double value) +{ + // Gets the first geometry record from the block + GeometryParamPoly3 *lGeometryParamPoly3 = static_cast<GeometryParamPoly3*>(mParamPoly3->GetGeometryAt(0)); + if(lGeometryParamPoly3!=NULL) + { + // Set the new value to the record's property + lGeometryParamPoly3->SetX(value); + // Emit the road changed signal so the road gets redrawn + emit RoadGeometryChanged(true); + } +} +void SettingsGeometryParamPoly3::YChanged(double value) +{ + // See the first method in this group for details + + GeometryParamPoly3 *lGeometryParamPoly3 = static_cast<GeometryParamPoly3*>(mParamPoly3->GetGeometryAt(0)); + if(lGeometryParamPoly3!=NULL) + { + lGeometryParamPoly3->SetY(value); + emit RoadGeometryChanged(true); + } +} +void SettingsGeometryParamPoly3::HeadingChanged(double value) +{ + // See the first method in this group for details + + GeometryParamPoly3 *lGeometryParamPoly3 = static_cast<GeometryParamPoly3*>(mParamPoly3->GetGeometryAt(0)); + if(lGeometryParamPoly3!=NULL) + { + lGeometryParamPoly3->SetHdg(value); + emit RoadGeometryChanged(true); + } +} +void SettingsGeometryParamPoly3::LengthChanged(double value) +{ + // See the first method in this group for details + + GeometryParamPoly3 *lGeometryParamPoly3 = static_cast<GeometryParamPoly3*>(mParamPoly3->GetGeometryAt(0)); + if(lGeometryParamPoly3!=NULL) + { + lGeometryParamPoly3->SetLength(value); + emit RoadGeometryChanged(true); + } +} +void SettingsGeometryParamPoly3::AUChanged(double value) +{ + // See the first method in this group for details + + GeometryParamPoly3 *lGeometryParamPoly3 = static_cast<GeometryParamPoly3*>(mParamPoly3->GetGeometryAt(0)); + if(lGeometryParamPoly3!=NULL) + { + lGeometryParamPoly3->SetAu(value); + emit RoadGeometryChanged(true); + } +} +void SettingsGeometryParamPoly3::BUChanged(double value) +{ + // See the first method in this group for details + + GeometryParamPoly3 *lGeometryParamPoly3 = static_cast<GeometryParamPoly3*>(mParamPoly3->GetGeometryAt(0)); + if(lGeometryParamPoly3!=NULL) + { + lGeometryParamPoly3->SetBu(value); + emit RoadGeometryChanged(true); + } +} +void SettingsGeometryParamPoly3::CUChanged(double value) +{ + // See the first method in this group for details + + GeometryParamPoly3 *lGeometryParamPoly3 = static_cast<GeometryParamPoly3*>(mParamPoly3->GetGeometryAt(0)); + if(lGeometryParamPoly3!=NULL) + { + lGeometryParamPoly3->SetCu(value); + emit RoadGeometryChanged(true); + } +} +void SettingsGeometryParamPoly3::DUChanged(double value) +{ + // See the first method in this group for details + + GeometryParamPoly3 *lGeometryParamPoly3 = static_cast<GeometryParamPoly3*>(mParamPoly3->GetGeometryAt(0)); + if(lGeometryParamPoly3!=NULL) + { + lGeometryParamPoly3->SetDu(value); + emit RoadGeometryChanged(true); + } +} +void SettingsGeometryParamPoly3::AVChanged(double value) +{ + // See the first method in this group for details + + GeometryParamPoly3 *lGeometryParamPoly3 = static_cast<GeometryParamPoly3*>(mParamPoly3->GetGeometryAt(0)); + if(lGeometryParamPoly3!=NULL) + { + lGeometryParamPoly3->SetAv(value); + emit RoadGeometryChanged(true); + } +} +void SettingsGeometryParamPoly3::BVChanged(double value) +{ + // See the first method in this group for details + + GeometryParamPoly3 *lGeometryParamPoly3 = static_cast<GeometryParamPoly3*>(mParamPoly3->GetGeometryAt(0)); + if(lGeometryParamPoly3!=NULL) + { + lGeometryParamPoly3->SetBv(value); + emit RoadGeometryChanged(true); + } +} +void SettingsGeometryParamPoly3::CVChanged(double value) +{ + // See the first method in this group for details + + GeometryParamPoly3 *lGeometryParamPoly3 = static_cast<GeometryParamPoly3*>(mParamPoly3->GetGeometryAt(0)); + if(lGeometryParamPoly3!=NULL) + { + lGeometryParamPoly3->SetCv(value); + emit RoadGeometryChanged(true); + } +} +void SettingsGeometryParamPoly3::DVChanged(double value) +{ + // See the first method in this group for details + + GeometryParamPoly3 *lGeometryParamPoly3 = static_cast<GeometryParamPoly3*>(mParamPoly3->GetGeometryAt(0)); + if(lGeometryParamPoly3!=NULL) + { + lGeometryParamPoly3->SetDv(value); + emit RoadGeometryChanged(true); + } +} diff --git a/OpenRoadEd/Qt/SettingsWidgets/SettingsGeometryParamPoly3.h b/OpenRoadEd/Qt/SettingsWidgets/SettingsGeometryParamPoly3.h new file mode 100644 index 0000000000000000000000000000000000000000..70f9c7eb85c32e9b5f5d27428b004b0f25c0dd6c --- /dev/null +++ b/OpenRoadEd/Qt/SettingsWidgets/SettingsGeometryParamPoly3.h @@ -0,0 +1,87 @@ +#ifndef SETTINGSGEOMETRYPARAMPOLY3_H +#define SETTINGSGEOMETRYPARAMPOLY3_H + + +#include <QtGui/QWidget> +#include <QtGui/QtGui> + +#include "../../OpenDrive/RoadGeometry.h" + +/** + * Class that holds all the properties for the GEOMETRY_LINE record + * + */ +class SettingsGeometryParamPoly3 : public QWidget +{ + Q_OBJECT +public: + /** + * Initializes the properties panel and the UI elements + */ + SettingsGeometryParamPoly3(QWidget *parent = 0); + + /** + * Loads the data for a given record + * + * @param block Geometry block record whose properties are to be loaded + * @param first Set to true if it is the first record for this road + */ + void LoadData(GeometryBlock *block); + + /** + * Makes this record the first for the road, thus enabling controls that only + * the first record has, such as the X and Y coordinates, which are otherwise + * computed automatically and are disabled + */ + void SetFirst(bool first); +private: + /** + * Geometry record whose properties are to be displayed + */ + GeometryBlock *mParamPoly3; + + /** + * Interface widgets + */ + QLineEdit *mS; + QDoubleSpinBox *mX; + QDoubleSpinBox *mY; + QDoubleSpinBox *mHeading; + QDoubleSpinBox *mLength; + QDoubleSpinBox *mAU; + QDoubleSpinBox *mBU; + QDoubleSpinBox *mCU; + QDoubleSpinBox *mDU; + QDoubleSpinBox *mAV; + QDoubleSpinBox *mBV; + QDoubleSpinBox *mCV; + QDoubleSpinBox *mDV; + +public slots: + /** + * Methods called when properties change + */ + void SChanged(); + void XChanged(double value); + void YChanged(double value); + void HeadingChanged(double value); + void LengthChanged(double value); + void AUChanged(double value); + void BUChanged(double value); + void CUChanged(double value); + void DUChanged(double value); + void AVChanged(double value); + void BVChanged(double value); + void CVChanged(double value); + void DVChanged(double value); +signals: + /** + * Signal emitted when critical road items are changed + * that require that the road to be redrawn + * + * @param recalculateRoad Set to true if geometry records have to be recalculated (usualy true for this record) + */ + void RoadGeometryChanged(bool recalculateRoad); +}; + +#endif diff --git a/OpenRoadEd/Qt/SettingsWidgets/SettingsPage.cpp b/OpenRoadEd/Qt/SettingsWidgets/SettingsPage.cpp index a58cae9f859b33786632cdeafd9ed1ef69aef182..1125411bc5b5b96b15326d7e849418206a426d93 100644 --- a/OpenRoadEd/Qt/SettingsWidgets/SettingsPage.cpp +++ b/OpenRoadEd/Qt/SettingsWidgets/SettingsPage.cpp @@ -30,6 +30,8 @@ SettingsPage::SettingsPage(OpenDrive *openDrive,RoadTree *roadTree) mGeometryLine->hide(); mGeometryTurn = new SettingsGeometryTurn; mGeometryTurn->hide(); + mGeometryParamPoly3 = new SettingsGeometryParamPoly3; + mGeometryParamPoly3->hide(); mElevation = new SettingsElevationRecord; mElevation->hide(); mSuperElevation = new SettingsLateralProfileSuper; @@ -75,6 +77,7 @@ SettingsPage::SettingsPage(OpenDrive *openDrive,RoadTree *roadTree) mainLayout->addWidget(mRoadType); mainLayout->addWidget(mGeometryLine); mainLayout->addWidget(mGeometryTurn); + mainLayout->addWidget(mGeometryParamPoly3); mainLayout->addWidget(mElevation); mainLayout->addWidget(mSuperElevation); mainLayout->addWidget(mCrossfall); @@ -107,6 +110,7 @@ SettingsPage::SettingsPage(OpenDrive *openDrive,RoadTree *roadTree) connect(mRoadType, SIGNAL(RoadRoadTypeChanged(bool)), this, SLOT(OnRoadGeometryChanged(bool))); connect(mGeometryLine, SIGNAL(RoadGeometryChanged(bool)), this, SLOT(OnRoadGeometryChanged(bool))); connect(mGeometryTurn, SIGNAL(RoadGeometryChanged(bool)), this, SLOT(OnRoadGeometryChanged(bool))); + connect(mGeometryParamPoly3, SIGNAL(RoadGeometryChanged(bool)), this, SLOT(OnRoadGeometryChanged(bool))); connect(mElevation, SIGNAL(RoadElevationChanged(bool)), this, SLOT(OnRoadGeometryChanged(bool))); connect(mSuperElevation, SIGNAL(RoadSuperElevationChanged(bool)), this, SLOT(OnRoadGeometryChanged(bool))); connect(mCrossfall, SIGNAL(RoadCrossfallChanged(bool)), this, SLOT(OnRoadGeometryChanged(bool))); @@ -135,6 +139,7 @@ void SettingsPage::HideAll() mRoadType->hide(); mGeometryLine->hide(); mGeometryTurn->hide(); + mGeometryParamPoly3->hide(); mElevation->hide(); mSuperElevation->hide(); mCrossfall->hide(); @@ -206,6 +211,15 @@ void SettingsPage::OnGeometryTurnSelected(GeometryBlock *node, bool first) mGeometryTurn->LoadData(node); mGeometryTurn->SetFirst(first); } +void SettingsPage::OnGeometryParamPoly3Selected(GeometryBlock *node, bool first) +{ + // See the first few methods in this group for details + + HideAll(); + mGeometryParamPoly3->show(); + mGeometryParamPoly3->LoadData(node); + mGeometryParamPoly3->SetFirst(first); +} void SettingsPage::OnElevationSelected(Elevation *node, double minS, double maxS) { // See the first few methods in this group for details diff --git a/OpenRoadEd/Qt/SettingsWidgets/SettingsPage.h b/OpenRoadEd/Qt/SettingsWidgets/SettingsPage.h index 243edd3db927cced8ca980e53bc3764d6fa7a0c2..065d5954d31af5b9f8592f4d52b1f6021681c4a9 100644 --- a/OpenRoadEd/Qt/SettingsWidgets/SettingsPage.h +++ b/OpenRoadEd/Qt/SettingsWidgets/SettingsPage.h @@ -14,6 +14,7 @@ #include "SettingsRoadTypeRecord.h" #include "SettingsGeometryLine.h" #include "SettingsGeometryTurn.h" +#include "SettingsGeometryParamPoly3.h" #include "SettingsElevationRecord.h" #include "SettingsLateralProfileSuper.h" #include "SettingsLateralProfileCrossfall.h" @@ -67,6 +68,7 @@ private: SettingsRoadTypeRecord *mRoadType; SettingsGeometryLine *mGeometryLine; SettingsGeometryTurn *mGeometryTurn; + SettingsGeometryParamPoly3 *mGeometryParamPoly3; SettingsElevationRecord *mElevation; SettingsLateralProfileSuper *mSuperElevation; SettingsLateralProfileCrossfall *mCrossfall; @@ -106,6 +108,7 @@ public slots: void OnRoadTypeSelected(RoadType *node, double minS, double maxS); void OnGeometryLineSelected(GeometryBlock *node, bool first); void OnGeometryTurnSelected(GeometryBlock *node, bool first); + void OnGeometryParamPoly3Selected(GeometryBlock *node, bool first); void OnElevationSelected(Elevation *node, double minS, double maxS); void OnSuperElevationSelected(SuperElevation *node, double minS, double maxS); void OnCrossfallSelected(Crossfall *node, double minS, double maxS); diff --git a/OpenRoadEd/Qt/Tree/RoadTree.cpp b/OpenRoadEd/Qt/Tree/RoadTree.cpp index cdb66612d3140a099532ab3ad830e87b591fa91d..60c0291280dc63de6d826a261213ced57e321083 100644 --- a/OpenRoadEd/Qt/Tree/RoadTree.cpp +++ b/OpenRoadEd/Qt/Tree/RoadTree.cpp @@ -225,6 +225,7 @@ void RoadTree::FillInSelectionObject(RoadTreeItemBase *item) case ROAD_TYPE: case GEOMETRY_LINE: case GEOMETRY_TURN: + case GEOMETRY_PARAMPOLY3: case ELEVATION: case SUPERELEVATION: case CROSSFALL: @@ -375,7 +376,13 @@ void RoadTree::AddGeometry(int indexRoad, int indexGeometry, RoadTreeItem *&geom if(lRoad==NULL) return; disconnect(mTreeWidget, SIGNAL(itemSelectionChanged()), this, SLOT(OnItemSelected())); if(select) mTreeWidget->clearSelection(); - int lType = GetRealGeometry(indexRoad, indexGeometry)->CheckIfLine(); + int lType; + if(GetRealGeometry(indexRoad, indexGeometry)->CheckIfLine()) + lType=1; + else if(GetRealGeometry(indexRoad, indexGeometry)->CheckIfParamPoly3()) + lType=4; + else + lType=2; lRoad->AddGeometryBlock(indexGeometry,geometry,lType); connect(mTreeWidget, SIGNAL(itemSelectionChanged()), this, SLOT(OnItemSelected())); if(select) @@ -1949,7 +1956,13 @@ void RoadTree::LoadStructure(OpenDrive *openDrive) //========= GEOMETRY ==========// for(unsigned int iRoadGeometry=0; iRoadGeometry<openDrive->GetRoad(iRoad)->GetGeometryBlockCount(); iRoadGeometry++) { - int lType = GetRealGeometry(iRoad, iRoadGeometry)->CheckIfLine(); + int lType; + if(GetRealGeometry(iRoad, iRoadGeometry)->CheckIfLine()) + lType=1; + else if(GetRealGeometry(iRoad, iRoadGeometry)->CheckIfParamPoly3()) + lType=4; + else + lType=2; lRoad->AddGeometryBlock(iRoadGeometry, lType); } @@ -2163,6 +2176,17 @@ void RoadTree::OnItemActivation( QTreeWidgetItem * item, int column) if(lRoadGeometry!=NULL) emit GeometryTurnSelected(lRoadGeometry, lFirst); break; } + case GEOMETRY_PARAMPOLY3: + { + GeometryBlock *lRoadGeometry = GetRealGeometry(); + + bool lFirst=false; + if(mSelection[1]==0) lFirst=true; + + if(lRoadGeometry!=NULL) emit GeometryParamPoly3Selected(lRoadGeometry, lFirst); + break; + } + case ELEVATION: { Elevation *lElevation=GetRealElevation(); diff --git a/OpenRoadEd/Qt/Tree/RoadTree.h b/OpenRoadEd/Qt/Tree/RoadTree.h index 444e8720e83b53786bd0f9142ed61ceefaa83601..2f6f91d976bfdd8a3dcf0b822f276e04d9cf9c48 100644 --- a/OpenRoadEd/Qt/Tree/RoadTree.h +++ b/OpenRoadEd/Qt/Tree/RoadTree.h @@ -414,6 +414,7 @@ signals: void RoadTypeSelected(RoadType *node, double minS, double maxS); void GeometryLineSelected(GeometryBlock *node, bool first); void GeometryTurnSelected(GeometryBlock *node, bool first); + void GeometryParamPoly3Selected(GeometryBlock *node, bool first); void ElevationSelected(Elevation *node, double minS, double maxS); void SuperElevationSelected(SuperElevation *node, double minS, double maxS); void CrossfallSelected(Crossfall *node, double minS, double maxS); diff --git a/OpenRoadEd/Qt/Tree/RoadTreeItems.cpp b/OpenRoadEd/Qt/Tree/RoadTreeItems.cpp index 1112d0d7df0884ee2e188d5dd349d07070c7e3eb..77ebfcd595364222de33c3a9d2211f4d30e43b95 100644 --- a/OpenRoadEd/Qt/Tree/RoadTreeItems.cpp +++ b/OpenRoadEd/Qt/Tree/RoadTreeItems.cpp @@ -91,6 +91,10 @@ void RoadTreeItemBase::ColorCode(bool enable) setBackground(0,RoadTreeItemConfig::GeometryColor()); setIcon(0,QIcon(":/Icons/Turn.png")); break; + case GEOMETRY_PARAMPOLY3: + setBackground(0,RoadTreeItemConfig::GeometryColor()); + setIcon(0,QIcon(":/Icons/Line.png")); + break; case ELEVATION: setBackground(0,RoadTreeItemConfig::ElevationColor()); setIcon(0,QIcon(":/Icons/Elevation.png")); @@ -377,6 +381,9 @@ void RoadTreeItem::SetTextByType() case GEOMETRY_TURN: setText(0,QString("Geometry %1: Turn").arg(mIndex)); break; + case GEOMETRY_PARAMPOLY3: + setText(0,QString("Geometry %1: ParamPoly3").arg(mIndex)); + break; case ELEVATION: setText(0,QString("Elevation %1").arg(mIndex)); break; @@ -564,7 +571,8 @@ void RTIRoad::AddGeometryBlock(int index, int type) void RTIRoad::AddGeometryBlock(int index, RoadTreeItem *&roadGeometry, int type) { RoadTreeItemType lGType; - if(type) lGType=GEOMETRY_LINE; + if(type==1) lGType=GEOMETRY_LINE; + else if(type==4) lGType=GEOMETRY_PARAMPOLY3; else lGType=GEOMETRY_TURN; if(index>=mGeometryBlockContainer->childCount()) diff --git a/OpenRoadEd/Qt/Tree/RoadTreeItems.h b/OpenRoadEd/Qt/Tree/RoadTreeItems.h index 57909a2e153153b2b051cf8f7a98135bbb709bcf..1008d046892c52665426af7eb1360847d0a3d82f 100644 --- a/OpenRoadEd/Qt/Tree/RoadTreeItems.h +++ b/OpenRoadEd/Qt/Tree/RoadTreeItems.h @@ -52,6 +52,7 @@ enum RoadTreeItemType GEOMETRY_CONTAINER, GEOMETRY_LINE, GEOMETRY_TURN, + GEOMETRY_PARAMPOLY3, ELEVATION_CONTAINER, ELEVATION, SUPERELEVATION_CONTAINER, diff --git a/Samples/adc_road.xodr b/Samples/adc_road.xodr new file mode 100644 index 0000000000000000000000000000000000000000..6030acb83e29a428ebcbeb01b546c733ba96031c --- /dev/null +++ b/Samples/adc_road.xodr @@ -0,0 +1,997 @@ +<?xml version="1.0" ?> +<OpenDRIVE> + <header revMajor="1" revMinor="1" name="Testfile" version="1" date="Thu Feb 8 14:24:06 2007" north="0.0000000000000000e+00" south="0.0000000000000000e+00" east="0.0000000000000000e+00" west="0.0000000000000000e+00" /> + <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="end" /> + </link> + <type s="0.0000000000000000e+00" type="town" /> + <planView> + <geometry s="0.0000000000000000e+00" x="0.0000000000000000e+00" y="0.0000000000000000e+00" hdg="0.0000000000000000e+00" length="2.5000000000000000e+01"> + <line /> + </geometry> + </planView> + <elevationProfile /> + <lateralProfile /> + <lanes> + <laneSection s="0.0000000000000000e+00"> + <left> + <lane id="1" type="driving" level="false"> + <link /> + <width sOffset="0.0000000000000000e+00" a="4.4000000000000004e+00" b="0.0000000000000000e+00" c="0.0000000000000000e+00" d="0.0000000000000000e+00" /> + <roadMark sOffset="0.0000000000000000e+00" type="solid" weight="standard" color="standard" width="2.9999999999999999e-01" laneChange="both" /> + <speed sOffset="0.0000000000000000e+00" max="6.0000000000000000e+01" /> + </lane> + </left> + <center> + <lane id="0" type="driving" level="false"> + <link /> + <width sOffset="0.0000000000000000e+00" a="0.0000000000000000e+00" b="0.0000000000000000e+00" c="0.0000000000000000e+00" d="0.0000000000000000e+00" /> + <roadMark sOffset="0.0000000000000000e+00" type="broken" weight="standard" color="standard" width="2.0000000000000001e-01" laneChange="both" /> + </lane> + </center> + <right> + <lane id="-1" type="driving" level="false"> + <link /> + <width sOffset="0.0000000000000000e+00" a="4.4000000000000004e+00" b="0.0000000000000000e+00" c="0.0000000000000000e+00" d="0.0000000000000000e+00" /> + <roadMark sOffset="0.0000000000000000e+00" type="solid" weight="standard" color="standard" width="2.9999999999999999e-01" laneChange="both" /> + <speed sOffset="0.0000000000000000e+00" max="6.0000000000000000e+01" /> + </lane> + </right> + </laneSection> + </lanes> + <objects /> + <signals /> + </road> + <road name="road1" length="2.5000000000000000e+01" id="1" junction="-1"> + <link> + <predecessor elementType="junction" elementId="1" contactPoint="end" /> + <successor elementType="road" elementId="2" contactPoint="start" /> + </link> + <type s="0.0000000000000000e+00" type="town" /> + <planView> + <geometry s="0.0000000000000000e+00" x="4.5000000000000000e+01" y="0.0000000000000000e+00" hdg="0.0000000000000000e+00" length="2.5000000000000000e+01"> + <line /> + </geometry> + </planView> + <elevationProfile /> + <lateralProfile /> + <lanes> + <laneSection s="0.0000000000000000e+00"> + <left> + <lane id="1" type="driving" level="false"> + <link /> + <width sOffset="0.0000000000000000e+00" a="4.4000000000000004e+00" b="0.0000000000000000e+00" c="0.0000000000000000e+00" d="0.0000000000000000e+00" /> + <roadMark sOffset="0.0000000000000000e+00" type="solid" weight="standard" color="standard" width="2.9999999999999999e-01" laneChange="both" /> + <speed sOffset="0.0000000000000000e+00" max="6.0000000000000000e+01" /> + </lane> + </left> + <center> + <lane id="0" type="driving" level="false"> + <link /> + <width sOffset="0.0000000000000000e+00" a="0.0000000000000000e+00" b="0.0000000000000000e+00" c="0.0000000000000000e+00" d="0.0000000000000000e+00" /> + <roadMark sOffset="0.0000000000000000e+00" type="broken" weight="standard" color="standard" width="2.0000000000000001e-01" laneChange="both" /> + </lane> + </center> + <right> + <lane id="-1" type="driving" level="false"> + <link /> + <width sOffset="0.0000000000000000e+00" a="4.4000000000000004e+00" b="0.0000000000000000e+00" c="0.0000000000000000e+00" d="0.0000000000000000e+00" /> + <roadMark sOffset="0.0000000000000000e+00" type="solid" weight="standard" color="standard" width="2.9999999999999999e-01" laneChange="both" /> + <speed sOffset="0.0000000000000000e+00" max="6.0000000000000000e+01" /> + </lane> + </right> + </laneSection> + </lanes> + <objects /> + <signals /> + </road> + <road name="road2" length="1.5707963270000000e+01" id="2" junction="-1"> + <link> + <predecessor elementType="road" elementId="1" contactPoint="end" /> + <successor elementType="road" elementId="3" contactPoint="start" /> + </link> + <type s="0.0000000000000000e+00" type="town" /> + <planView> + <geometry s="0.0000000000000000e+00" x="7.0000000000000000e+01" y="0.0000000000000000e+00" hdg="0.0000000000000000e+00" length="1.0000000000000000e-03"> + <spiral curvStart="0.0000000000000000e+00" curvEnd="1.0000000000000001e-01" /> + </geometry> + <geometry s="1.0000000000000000e-03" x="7.0000999999999749e+01" y="1.6666666663690484e-08" hdg="5.0000000000000002e-05" length="1.5707963270000000e+01"> + <arc curvature="1.0000000000000001e-01" /> + </geometry> + <geometry s="1.5708963270000000e+01" x="8.0000499987499865e+01" y="1.0000500006217495e+01" hdg="1.5708463270000002e+00" length="-1.0000000000000000e-03"> + <spiral curvStart="1.0000000000000001e-01" curvEnd="0.0000000000000000e+00" /> + </geometry> + </planView> + <elevationProfile /> + <lateralProfile /> + <lanes> + <laneSection s="0.0000000000000000e+00"> + <left> + <lane id="1" type="driving" level="false"> + <link /> + <width sOffset="0.0000000000000000e+00" a="4.4000000000000004e+00" b="0.0000000000000000e+00" c="0.0000000000000000e+00" d="0.0000000000000000e+00" /> + <roadMark sOffset="0.0000000000000000e+00" type="solid" weight="standard" color="standard" width="2.9999999999999999e-01" laneChange="both" /> + <speed sOffset="0.0000000000000000e+00" max="6.0000000000000000e+01" /> + </lane> + </left> + <center> + <lane id="0" type="driving" level="false"> + <link /> + <width sOffset="0.0000000000000000e+00" a="0.0000000000000000e+00" b="0.0000000000000000e+00" c="0.0000000000000000e+00" d="0.0000000000000000e+00" /> + <roadMark sOffset="0.0000000000000000e+00" type="broken" weight="standard" color="standard" width="2.0000000000000001e-01" laneChange="both" /> + </lane> + </center> + <right> + <lane id="-1" type="driving" level="false"> + <link /> + <width sOffset="0.0000000000000000e+00" a="4.4000000000000004e+00" b="0.0000000000000000e+00" c="0.0000000000000000e+00" d="0.0000000000000000e+00" /> + <roadMark sOffset="0.0000000000000000e+00" type="solid" weight="standard" color="standard" width="2.9999999999999999e-01" laneChange="both" /> + <speed sOffset="0.0000000000000000e+00" max="6.0000000000000000e+01" /> + </lane> + </right> + </laneSection> + </lanes> + <objects /> + <signals /> + </road> + <road name="road3" length="6.0000000000000000e+01" id="3" junction="-1"> + <link> + <predecessor elementType="road" elementId="2" contactPoint="end" /> + <successor elementType="road" elementId="4" contactPoint="start" /> + </link> + <type s="0.0000000000000000e+00" type="town" /> + <planView> + <geometry s="0.0000000000000000e+00" x="8.0000000000000000e+01" y="1.0000000000000000e+01" hdg="1.5707963270000000e+00" length="6.0000000000000000e+01"> + <line /> + </geometry> + </planView> + <elevationProfile /> + <lateralProfile /> + <lanes> + <laneSection s="0.0000000000000000e+00"> + <left> + <lane id="1" type="driving" level="false"> + <link /> + <width sOffset="0.0000000000000000e+00" a="4.4000000000000004e+00" b="0.0000000000000000e+00" c="0.0000000000000000e+00" d="0.0000000000000000e+00" /> + <roadMark sOffset="0.0000000000000000e+00" type="solid" weight="standard" color="standard" width="2.9999999999999999e-01" laneChange="both" /> + <speed sOffset="0.0000000000000000e+00" max="6.0000000000000000e+01" /> + </lane> + </left> + <center> + <lane id="0" type="driving" level="false"> + <link /> + <width sOffset="0.0000000000000000e+00" a="0.0000000000000000e+00" b="0.0000000000000000e+00" c="0.0000000000000000e+00" d="0.0000000000000000e+00" /> + <roadMark sOffset="0.0000000000000000e+00" type="broken" weight="standard" color="standard" width="2.0000000000000001e-01" laneChange="both" /> + </lane> + </center> + <right> + <lane id="-1" type="driving" level="false"> + <link /> + <width sOffset="0.0000000000000000e+00" a="4.4000000000000004e+00" b="0.0000000000000000e+00" c="0.0000000000000000e+00" d="0.0000000000000000e+00" /> + <roadMark sOffset="0.0000000000000000e+00" type="solid" weight="standard" color="standard" width="2.9999999999999999e-01" laneChange="both" /> + <speed sOffset="0.0000000000000000e+00" max="6.0000000000000000e+01" /> + </lane> + </right> + </laneSection> + </lanes> + <objects /> + <signals /> + </road> + <road name="road4" length="1.5707963270000000e+01" id="4" junction="-1"> + <link> + <predecessor elementType="road" elementId="3" contactPoint="end" /> + <successor elementType="road" elementId="5" contactPoint="start" /> + </link> + <type s="0.0000000000000000e+00" type="town" /> + <planView> + <geometry s="0.0000000000000000e+00" x="8.0000000000000000e+01" y="7.0000000000000000e+01" hdg="1.5707963270000000e+00" length="1.0000000000000000e-03"> + <spiral curvStart="0.0000000000000000e+00" curvEnd="1.0000000000000001e-01" /> + </geometry> + <geometry s="1.0000000000000000e-03" x="7.9999999983333140e+01" y="7.0000999999999749e+01" hdg="1.5708463270000002e+00" length="1.5707963270000000e+01"> + <arc curvature="1.0000000000000001e-01" /> + </geometry> + <geometry s="1.5708963270000000e+01" x="6.9999499991731369e+01" y="8.0000499985448712e+01" hdg="3.1416426540000000e+00" length="-1.0000000000000000e-03"> + <spiral curvStart="1.0000000000000001e-01" curvEnd="0.0000000000000000e+00" /> + </geometry> + </planView> + <elevationProfile /> + <lateralProfile /> + <lanes> + <laneSection s="0.0000000000000000e+00"> + <left> + <lane id="1" type="driving" level="false"> + <link /> + <width sOffset="0.0000000000000000e+00" a="4.4000000000000004e+00" b="0.0000000000000000e+00" c="0.0000000000000000e+00" d="0.0000000000000000e+00" /> + <roadMark sOffset="0.0000000000000000e+00" type="solid" weight="standard" color="standard" width="2.9999999999999999e-01" laneChange="both" /> + <speed sOffset="0.0000000000000000e+00" max="6.0000000000000000e+01" /> + </lane> + </left> + <center> + <lane id="0" type="driving" level="false"> + <link /> + <width sOffset="0.0000000000000000e+00" a="0.0000000000000000e+00" b="0.0000000000000000e+00" c="0.0000000000000000e+00" d="0.0000000000000000e+00" /> + <roadMark sOffset="0.0000000000000000e+00" type="broken" weight="standard" color="standard" width="2.0000000000000001e-01" laneChange="both" /> + </lane> + </center> + <right> + <lane id="-1" type="driving" level="false"> + <link /> + <width sOffset="0.0000000000000000e+00" a="4.4000000000000004e+00" b="0.0000000000000000e+00" c="0.0000000000000000e+00" d="0.0000000000000000e+00" /> + <roadMark sOffset="0.0000000000000000e+00" type="solid" weight="standard" color="standard" width="2.9999999999999999e-01" laneChange="both" /> + <speed sOffset="0.0000000000000000e+00" max="6.0000000000000000e+01" /> + </lane> + </right> + </laneSection> + </lanes> + <objects /> + <signals /> + </road> + <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="end" /> + </link> + <type s="0.0000000000000000e+00" type="town" /> + <planView> + <geometry s="0.0000000000000000e+00" x="7.0000000000000000e+01" y="8.0000000000000000e+01" hdg="3.1415926540000001e+00" length="2.5000000000000000e+01"> + <line /> + </geometry> + </planView> + <elevationProfile /> + <lateralProfile /> + <lanes> + <laneSection s="0.0000000000000000e+00"> + <left> + <lane id="1" type="driving" level="false"> + <link /> + <width sOffset="0.0000000000000000e+00" a="4.4000000000000004e+00" b="0.0000000000000000e+00" c="0.0000000000000000e+00" d="0.0000000000000000e+00" /> + <roadMark sOffset="0.0000000000000000e+00" type="solid" weight="standard" color="standard" width="2.9999999999999999e-01" laneChange="both" /> + <speed sOffset="0.0000000000000000e+00" max="6.0000000000000000e+01" /> + </lane> + </left> + <center> + <lane id="0" type="driving" level="false"> + <link /> + <width sOffset="0.0000000000000000e+00" a="0.0000000000000000e+00" b="0.0000000000000000e+00" c="0.0000000000000000e+00" d="0.0000000000000000e+00" /> + <roadMark sOffset="0.0000000000000000e+00" type="broken" weight="standard" color="standard" width="2.0000000000000001e-01" laneChange="both" /> + </lane> + </center> + <right> + <lane id="-1" type="driving" level="false"> + <link /> + <width sOffset="0.0000000000000000e+00" a="4.4000000000000004e+00" b="0.0000000000000000e+00" c="0.0000000000000000e+00" d="0.0000000000000000e+00" /> + <roadMark sOffset="0.0000000000000000e+00" type="solid" weight="standard" color="standard" width="2.9999999999999999e-01" laneChange="both" /> + <speed sOffset="0.0000000000000000e+00" max="6.0000000000000000e+01" /> + </lane> + </right> + </laneSection> + </lanes> + <objects /> + <signals /> + </road> + <road name="road6" length="2.5000000000000000e+01" id="6" junction="-1"> + <link> + <predecessor elementType="junction" elementId="2" contactPoint="end" /> + <successor elementType="road" elementId="7" contactPoint="start" /> + </link> + <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 /> + </geometry> + </planView> + <elevationProfile /> + <lateralProfile /> + <lanes> + <laneSection s="0.0000000000000000e+00"> + <left> + <lane id="1" type="driving" level="false"> + <link /> + <width sOffset="0.0000000000000000e+00" a="4.4000000000000004e+00" b="0.0000000000000000e+00" c="0.0000000000000000e+00" d="0.0000000000000000e+00" /> + <roadMark sOffset="0.0000000000000000e+00" type="solid" weight="standard" color="standard" width="2.9999999999999999e-01" laneChange="both" /> + <speed sOffset="0.0000000000000000e+00" max="6.0000000000000000e+01" /> + </lane> + </left> + <center> + <lane id="0" type="driving" level="false"> + <link /> + <width sOffset="0.0000000000000000e+00" a="0.0000000000000000e+00" b="0.0000000000000000e+00" c="0.0000000000000000e+00" d="0.0000000000000000e+00" /> + <roadMark sOffset="0.0000000000000000e+00" type="broken" weight="standard" color="standard" width="2.0000000000000001e-01" laneChange="both" /> + </lane> + </center> + <right> + <lane id="-1" type="driving" level="false"> + <link /> + <width sOffset="0.0000000000000000e+00" a="4.4000000000000004e+00" b="0.0000000000000000e+00" c="0.0000000000000000e+00" d="0.0000000000000000e+00" /> + <roadMark sOffset="0.0000000000000000e+00" type="solid" weight="standard" color="standard" width="2.9999999999999999e-01" laneChange="both" /> + <speed sOffset="0.0000000000000000e+00" max="6.0000000000000000e+01" /> + </lane> + </right> + </laneSection> + </lanes> + <objects /> + <signals /> + </road> + <road name="road7" length="1.5707963270000000e+01" id="7" junction="-1"> + <link> + <predecessor elementType="road" elementId="6" contactPoint="end" /> + <successor elementType="road" elementId="8" contactPoint="start" /> + </link> + <type s="0.0000000000000000e+00" type="town" /> + <planView> + <geometry s="0.0000000000000000e+00" x="0.0000000000000000e+00" y="8.0000000000000000e+01" hdg="3.1415926540000001e+00" length="1.0000000000000000e-03"> + <spiral curvStart="0.0000000000000000e+00" curvEnd="1.0000000000000001e-01" /> + </geometry> + <geometry s="1.0000000000000000e-03" x="-9.9999999974999297e-04" y="7.9999999983332927e+01" hdg="3.1416426540000000e+00" length="1.5707963270000000e+01"> + <arc curvature="1.0000000000000001e-01" /> + </geometry> + <geometry s="1.5708963270000000e+01" x="-1.0000499983397582e+01" y="6.9999499989680245e+01" hdg="4.7124389810000000e+00" length="-1.0000000000000000e-03"> + <spiral curvStart="1.0000000000000001e-01" curvEnd="0.0000000000000000e+00" /> + </geometry> + </planView> + <elevationProfile /> + <lateralProfile /> + <lanes> + <laneSection s="0.0000000000000000e+00"> + <left> + <lane id="1" type="driving" level="false"> + <link /> + <width sOffset="0.0000000000000000e+00" a="4.4000000000000004e+00" b="0.0000000000000000e+00" c="0.0000000000000000e+00" d="0.0000000000000000e+00" /> + <roadMark sOffset="0.0000000000000000e+00" type="solid" weight="standard" color="standard" width="2.9999999999999999e-01" laneChange="both" /> + <speed sOffset="0.0000000000000000e+00" max="6.0000000000000000e+01" /> + </lane> + </left> + <center> + <lane id="0" type="driving" level="false"> + <link /> + <width sOffset="0.0000000000000000e+00" a="0.0000000000000000e+00" b="0.0000000000000000e+00" c="0.0000000000000000e+00" d="0.0000000000000000e+00" /> + <roadMark sOffset="0.0000000000000000e+00" type="broken" weight="standard" color="standard" width="2.0000000000000001e-01" laneChange="both" /> + </lane> + </center> + <right> + <lane id="-1" type="driving" level="false"> + <link /> + <width sOffset="0.0000000000000000e+00" a="4.4000000000000004e+00" b="0.0000000000000000e+00" c="0.0000000000000000e+00" d="0.0000000000000000e+00" /> + <roadMark sOffset="0.0000000000000000e+00" type="solid" weight="standard" color="standard" width="2.9999999999999999e-01" laneChange="both" /> + <speed sOffset="0.0000000000000000e+00" max="6.0000000000000000e+01" /> + </lane> + </right> + </laneSection> + </lanes> + <objects /> + <signals /> + </road> + <road name="road8" length="6.0000000000000000e+01" id="8" junction="-1"> + <link> + <predecessor elementType="road" elementId="7" contactPoint="end" /> + <successor elementType="road" elementId="9" contactPoint="start" /> + </link> + <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 /> + </geometry> + </planView> + <elevationProfile /> + <lateralProfile /> + <lanes> + <laneSection s="0.0000000000000000e+00"> + <left> + <lane id="1" type="driving" level="false"> + <link /> + <width sOffset="0.0000000000000000e+00" a="4.4000000000000004e+00" b="0.0000000000000000e+00" c="0.0000000000000000e+00" d="0.0000000000000000e+00" /> + <roadMark sOffset="0.0000000000000000e+00" type="solid" weight="standard" color="standard" width="2.9999999999999999e-01" laneChange="both" /> + <speed sOffset="0.0000000000000000e+00" max="6.0000000000000000e+01" /> + </lane> + </left> + <center> + <lane id="0" type="driving" level="false"> + <link /> + <width sOffset="0.0000000000000000e+00" a="0.0000000000000000e+00" b="0.0000000000000000e+00" c="0.0000000000000000e+00" d="0.0000000000000000e+00" /> + <roadMark sOffset="0.0000000000000000e+00" type="broken" weight="standard" color="standard" width="2.0000000000000001e-01" laneChange="both" /> + </lane> + </center> + <right> + <lane id="-1" type="driving" level="false"> + <link /> + <width sOffset="0.0000000000000000e+00" a="4.4000000000000004e+00" b="0.0000000000000000e+00" c="0.0000000000000000e+00" d="0.0000000000000000e+00" /> + <roadMark sOffset="0.0000000000000000e+00" type="solid" weight="standard" color="standard" width="2.9999999999999999e-01" laneChange="both" /> + <speed sOffset="0.0000000000000000e+00" max="6.0000000000000000e+01" /> + </lane> + </right> + </laneSection> + </lanes> + <objects /> + <signals /> + </road> + <road name="road9" length="1.5707963270000000e+01" id="9" junction="-1"> + <link> + <predecessor elementType="road" elementId="8" contactPoint="end" /> + <successor elementType="road" elementId="0" contactPoint="start" /> + </link> + <type s="0.0000000000000000e+00" type="town" /> + <planView> + <geometry s="0.0000000000000000e+00" x="-1.0000000000000000e+01" y="1.0000000000000000e+01" hdg="4.7123889800000001e+00" length="1.0000000000000000e-03"> + <spiral curvStart="0.0000000000000000e+00" curvEnd="1.0000000000000001e-01" /> + </geometry> + <geometry s="1.0000000000000000e-03" x="-1.0000000272313564e+01" y="9.9990000000371886e+00" hdg="4.7123889800000001e+00" length="1.5707963270000000e+01"> + <arc curvature="1.0000000000000001e-01" /> + </geometry> + <geometry s="1.5707963270000000e+01" x="-3.3536281043515387e-03" y="-3.3892401329413957e-03" hdg="6.2831853070000001e+00" length="-1.0000000000000000e-03"> + <spiral curvStart="1.0000000000000001e-01" curvEnd="0.0000000000000000e+00" /> + </geometry> + </planView> + <elevationProfile /> + <lateralProfile /> + <lanes> + <laneSection s="0.0000000000000000e+00"> + <left> + <lane id="1" type="driving" level="false"> + <link /> + <width sOffset="0.0000000000000000e+00" a="4.4000000000000004e+00" b="0.0000000000000000e+00" c="0.0000000000000000e+00" d="0.0000000000000000e+00" /> + <roadMark sOffset="0.0000000000000000e+00" type="solid" weight="standard" color="standard" width="2.9999999999999999e-01" laneChange="both" /> + <speed sOffset="0.0000000000000000e+00" max="6.0000000000000000e+01" /> + </lane> + </left> + <center> + <lane id="0" type="driving" level="false"> + <link /> + <width sOffset="0.0000000000000000e+00" a="0.0000000000000000e+00" b="0.0000000000000000e+00" c="0.0000000000000000e+00" d="0.0000000000000000e+00" /> + <roadMark sOffset="0.0000000000000000e+00" type="broken" weight="standard" color="standard" width="2.0000000000000001e-01" laneChange="both" /> + </lane> + </center> + <right> + <lane id="-1" type="driving" level="false"> + <link /> + <width sOffset="0.0000000000000000e+00" a="4.4000000000000004e+00" b="0.0000000000000000e+00" c="0.0000000000000000e+00" d="0.0000000000000000e+00" /> + <roadMark sOffset="0.0000000000000000e+00" type="solid" weight="standard" color="standard" width="2.9999999999999999e-01" laneChange="both" /> + <speed sOffset="0.0000000000000000e+00" max="6.0000000000000000e+01" /> + </lane> + </right> + </laneSection> + </lanes> + <objects /> + <signals /> + </road> + <road name="road10" length="6.0000000000000000e+01" id="10" junction="-1"> + <link> + <predecessor elementType="junction" elementId="1" contactPoint="end" /> + <successor elementType="junction" elementId="2" contactPoint="end" /> + </link> + <type s="0.0000000000000000e+00" type="town" /> + <planView> + <geometry s="0.0000000000000000e+00" x="3.5000000000000000e+01" y="1.0000000000000000e+01" hdg="1.5707963270000000e+00" length="6.0000000000000000e+01"> + <line /> + </geometry> + </planView> + <elevationProfile /> + <lateralProfile /> + <lanes> + <laneSection s="0.0000000000000000e+00"> + <left> + <lane id="1" type="driving" level="false"> + <link /> + <width sOffset="0.0000000000000000e+00" a="4.4000000000000004e+00" b="0.0000000000000000e+00" c="0.0000000000000000e+00" d="0.0000000000000000e+00" /> + <roadMark sOffset="0.0000000000000000e+00" type="solid" weight="standard" color="standard" width="2.9999999999999999e-01" laneChange="both" /> + <speed sOffset="0.0000000000000000e+00" max="6.0000000000000000e+01" /> + </lane> + </left> + <center> + <lane id="0" type="driving" level="false"> + <link /> + <width sOffset="0.0000000000000000e+00" a="0.0000000000000000e+00" b="0.0000000000000000e+00" c="0.0000000000000000e+00" d="0.0000000000000000e+00" /> + <roadMark sOffset="0.0000000000000000e+00" type="broken" weight="standard" color="standard" width="2.0000000000000001e-01" laneChange="both" /> + </lane> + </center> + <right> + <lane id="-1" type="driving" level="false"> + <link /> + <width sOffset="0.0000000000000000e+00" a="4.4000000000000004e+00" b="0.0000000000000000e+00" c="0.0000000000000000e+00" d="0.0000000000000000e+00" /> + <roadMark sOffset="0.0000000000000000e+00" type="solid" weight="standard" color="standard" width="2.9999999999999999e-01" laneChange="both" /> + <speed sOffset="0.0000000000000000e+00" max="6.0000000000000000e+01" /> + </lane> + </right> + </laneSection> + </lanes> + <objects /> + <signals /> + </road> + <road name="junction_0_-1_1_-1" length="2.0000000000000000e+01" id="1000" junction="1"> + <link> + <predecessor elementType="road" elementId="0" contactPoint="end" /> + <successor elementType="road" elementId="1" contactPoint="start" /> + </link> + <type s="0.0000000000000000e+00" type="town" /> + <planView> + <geometry s="0.0000000000000000e+00" x="2.5000000000000000e+01" y="0.0000000000000000e+00" hdg="0.0000000000000000e+00" length="2.0000000000000000e+01"> + <line /> + </geometry> + </planView> + <elevationProfile /> + <lateralProfile /> + <lanes> + <laneSection s="0.0000000000000000e+00"> + <center> + <lane id="0" type="driving" level="false"> + <link /> + </lane> + </center> + <right> + <lane id="-1" type="driving" level="false"> + <link /> + <width sOffset="0.0000000000000000e+00" a="4.4000000000000004e+00" b="0.0000000000000000e+00" c="0.0000000000000000e+00" d="0.0000000000000000e+00" /> + <speed sOffset="0.0000000000000000e+00" max="6.0000000000000000e+01" /> + </lane> + </right> + </laneSection> + </lanes> + <objects /> + <signals /> + </road> + <road name="junction_1_1_0_1" length="2.0000000000000000e+01" id="1001" junction="1"> + <link> + <predecessor elementType="road" elementId="1" contactPoint="start" /> + <successor elementType="road" elementId="0" contactPoint="end" /> + </link> + <type s="0.0000000000000000e+00" type="town" /> + <planView> + <geometry s="0.0000000000000000e+00" x="4.5000000000000000e+01" y="0.0000000000000000e+00" hdg="3.1415799999999998e+00" length="2.0000000000000000e+01"> + <line /> + </geometry> + </planView> + <elevationProfile /> + <lateralProfile /> + <lanes> + <laneSection s="0.0000000000000000e+00"> + <center> + <lane id="0" type="driving" level="false"> + <link /> + </lane> + </center> + <right> + <lane id="-1" type="driving" level="false"> + <link /> + <width sOffset="0.0000000000000000e+00" a="4.4000000000000004e+00" b="0.0000000000000000e+00" c="0.0000000000000000e+00" d="0.0000000000000000e+00" /> + <speed sOffset="0.0000000000000000e+00" max="6.0000000000000000e+01" /> + </lane> + </right> + </laneSection> + </lanes> + <objects /> + <signals /> + </road> + <road name="junction_0_-1_10_-1" length="1.5709921586393582e+01" id="1002" junction="1"> + <link> + <predecessor elementType="road" elementId="0" contactPoint="end" /> + <successor elementType="road" elementId="10" contactPoint="start" /> + </link> + <type s="0.0000000000000000e+00" type="town" /> + <planView> + <geometry s="0.0000000000000000e+00" x="2.5000000000000000e+01" y="0.0000000000000000e+00" hdg="0.0000000000000000e+00" length="2.0510348974767112e-09"> + <line /> + </geometry> + <geometry s="2.0510348974767112e-09" x="2.5000000002051035e+01" y="0.0000000000000000e+00" hdg="0.0000000000000000e+00" length="1.0000000000000000e-03"> + <spiral curvStart="0.0000000000000000e+00" curvEnd="1.0000026537984180e-01" /> + </geometry> + <geometry s="1.0000020510348975e-03" x="2.5001000002050784e+01" y="1.6666710893664086e-08" hdg="5.0000132689920889e-05" length="1.5707921584342548e+01"> + <arc curvature="1.0000026537984180e-01" /> + </geometry> + <geometry s="1.5708921586393583e+01" x="3.5000473451637099e+01" y="1.0000473468303746e+01" hdg="1.5708463271326900e+00" length="1.0000000000000000e-03"> + <spiral curvStart="1.0000026537984180e-01" curvEnd="0.0000000000000000e+00" /> + </geometry> + </planView> + <elevationProfile /> + <lateralProfile /> + <lanes> + <laneSection s="0.0000000000000000e+00"> + <center> + <lane id="0" type="driving" level="false"> + <link /> + </lane> + </center> + <right> + <lane id="-1" type="driving" level="false"> + <link /> + <width sOffset="0.0000000000000000e+00" a="4.4000000000000004e+00" b="0.0000000000000000e+00" c="0.0000000000000000e+00" d="0.0000000000000000e+00" /> + <speed sOffset="0.0000000000000000e+00" max="6.0000000000000000e+01" /> + </lane> + </right> + </laneSection> + </lanes> + <objects /> + <signals /> + </road> + <road name="junction_10_1_0_1" length="1.5709975894455384e+01" id="1003" junction="1"> + <link> + <predecessor elementType="road" elementId="10" contactPoint="start" /> + <successor elementType="road" elementId="0" contactPoint="end" /> + </link> + <type s="0.0000000000000000e+00" type="town" /> + <planView> + <geometry s="0.0000000000000000e+00" x="3.5000000000000000e+01" y="1.0000000000000000e+01" hdg="4.7123763269999994e+00" length="2.5306974480443500e-04"> + <line /> + </geometry> + <geometry s="2.5306974480443500e-04" x="3.4999999996797811e+01" y="9.9997469302552151e+00" hdg="4.7123763269999994e+00" length="1.0000000000000000e-03"> + <spiral curvStart="0.0000000000000000e+00" curvEnd="-1.0000153074568541e-01" /> + </geometry> + <geometry s="1.2530697448044350e-03" x="3.4999999967477500e+01" y="9.9987469302557557e+00" hdg="4.7123263262346269e+00" length="1.5707722824710581e+01"> + <arc curvature="-1.0000153074568541e-01" /> + </geometry> + <geometry s="1.5708975894455385e+01" x="2.4999526525369703e+01" y="-4.7344598170084851e-04" hdg="3.1415299992346277e+00" length="1.0000000000000000e-03"> + <spiral curvStart="-1.0000153074568541e-01" curvEnd="0.0000000000000000e+00" /> + </geometry> + </planView> + <elevationProfile /> + <lateralProfile /> + <lanes> + <laneSection s="0.0000000000000000e+00"> + <center> + <lane id="0" type="driving" level="false"> + <link /> + </lane> + </center> + <right> + <lane id="-1" type="driving" level="false"> + <link /> + <width sOffset="0.0000000000000000e+00" a="4.4000000000000004e+00" b="0.0000000000000000e+00" c="0.0000000000000000e+00" d="0.0000000000000000e+00" /> + <speed sOffset="0.0000000000000000e+00" max="6.0000000000000000e+01" /> + </lane> + </right> + </laneSection> + </lanes> + <objects /> + <signals /> + </road> + <road name="junction_10_1_1_-1" length="1.5710120346678314e+01" id="1004" junction="1"> + <link> + <predecessor elementType="road" elementId="10" contactPoint="start" /> + <successor elementType="road" elementId="1" contactPoint="start" /> + </link> + <type s="0.0000000000000000e+00" type="town" /> + <planView> + <geometry s="0.0000000000000000e+00" x="3.5000000000000000e+01" y="1.0000000000000000e+01" hdg="4.7123763269999994e+00" length="1.0000000000000000e-03"> + <spiral curvStart="0.0000000000000000e+00" curvEnd="9.9998999976484537e-02" /> + </geometry> + <geometry s="1.0000000000000000e-03" x="3.5000000004013110e+01" y="9.9990000000001178e+00" hdg="4.7124263264999877e+00" length="1.5707993813631946e+01"> + <arc curvature="9.9998999976484537e-02" /> + </geometry> + <geometry s="1.5708993813631945e+01" x="4.5000346926064282e+01" y="-7.2653541527145649e-04" hdg="6.2832099994999879e+00" length="1.0000000000000000e-03"> + <spiral curvStart="9.9998999976484537e-02" curvEnd="0.0000000000000000e+00" /> + </geometry> + <geometry s="1.5709993813631945e+01" x="4.5001346926062482e+01" y="-7.2647738995110136e-04" hdg="6.2832599989999762e+00" length="1.2653304636955909e-04"> + <line /> + </geometry> + </planView> + <elevationProfile /> + <lateralProfile /> + <lanes> + <laneSection s="0.0000000000000000e+00"> + <center> + <lane id="0" type="driving" level="false"> + <link /> + </lane> + </center> + <right> + <lane id="-1" type="driving" level="false"> + <link /> + <width sOffset="0.0000000000000000e+00" a="4.4000000000000004e+00" b="0.0000000000000000e+00" c="0.0000000000000000e+00" d="0.0000000000000000e+00" /> + <speed sOffset="0.0000000000000000e+00" max="6.0000000000000000e+01" /> + </lane> + </right> + </laneSection> + </lanes> + <objects /> + <signals /> + </road> + <road name="junction_1_1_10_-1" length="1.5709921584511781e+01" id="1005" junction="1"> + <link> + <predecessor elementType="road" elementId="1" contactPoint="start" /> + <successor elementType="road" elementId="10" contactPoint="start" /> + </link> + <type s="0.0000000000000000e+00" type="town" /> + <planView> + <geometry s="0.0000000000000000e+00" x="4.5000000000000000e+01" y="0.0000000000000000e+00" hdg="3.1415799999999998e+00" length="1.2653464747280907e-04"> + <line /> + </geometry> + <geometry s="1.2653464747280907e-04" x="4.4999873465352536e+01" y="1.6011175237333795e-09" hdg="3.1415799999999998e+00" length="1.0000000000000000e-03"> + <spiral curvStart="0.0000000000000000e+00" curvEnd="-1.0000026534682657e-01" /> + </geometry> + <geometry s="1.1265346474728091e-03" x="4.4998873465353078e+01" y="3.0921418200480930e-08" hdg="3.1415299998673265e+00" length="1.5707795049864309e+01"> + <arc curvature="-1.0000026534682657e-01" /> + </geometry> + <geometry s="1.5708921584511781e+01" x="3.4999526548027013e+01" y="1.0000473474630535e+01" hdg="1.5707463268673272e+00" length="1.0000000000000000e-03"> + <spiral curvStart="-1.0000026534682657e-01" curvEnd="0.0000000000000000e+00" /> + </geometry> + </planView> + <elevationProfile /> + <lateralProfile /> + <lanes> + <laneSection s="0.0000000000000000e+00"> + <center> + <lane id="0" type="driving" level="false"> + <link /> + </lane> + </center> + <right> + <lane id="-1" type="driving" level="false"> + <link /> + <width sOffset="0.0000000000000000e+00" a="4.4000000000000004e+00" b="0.0000000000000000e+00" c="0.0000000000000000e+00" d="0.0000000000000000e+00" /> + <speed sOffset="0.0000000000000000e+00" max="6.0000000000000000e+01" /> + </lane> + </right> + </laneSection> + </lanes> + <objects /> + <signals /> + </road> + <road name="junction_5_-1_6_-1" length="2.0000000000000000e+01" id="1006" junction="2"> + <link> + <predecessor elementType="road" elementId="5" contactPoint="end" /> + <successor elementType="road" elementId="6" contactPoint="start" /> + </link> + <type s="0.0000000000000000e+00" type="town" /> + <planView> + <geometry s="0.0000000000000000e+00" x="4.5000000000000000e+01" y="7.9999999989744822e+01" hdg="3.1415926540000001e+00" length="2.0000000000000000e+01"> + <line /> + </geometry> + </planView> + <elevationProfile /> + <lateralProfile /> + <lanes> + <laneSection s="0.0000000000000000e+00"> + <center> + <lane id="0" type="driving" level="false"> + <link /> + </lane> + </center> + <right> + <lane id="-1" type="driving" level="false"> + <link /> + <width sOffset="0.0000000000000000e+00" a="4.4000000000000004e+00" b="0.0000000000000000e+00" c="0.0000000000000000e+00" d="0.0000000000000000e+00" /> + <speed sOffset="0.0000000000000000e+00" max="6.0000000000000000e+01" /> + </lane> + </right> + </laneSection> + </lanes> + <objects /> + <signals /> + </road> + <road name="junction_5_-1_10_1" length="1.5709921580400758e+01" id="1007" junction="2"> + <link> + <predecessor elementType="road" elementId="5" contactPoint="end" /> + <successor elementType="road" elementId="10" contactPoint="end" /> + </link> + <type s="0.0000000000000000e+00" type="town" /> + <planView> + <geometry s="0.0000000000000000e+00" x="4.5000000000000000e+01" y="7.9999999989744822e+01" hdg="3.1415926540000001e+00" length="1.0000000000000000e-03"> + <spiral curvStart="0.0000000000000000e+00" curvEnd="1.0000026520325046e-01" /> + </geometry> + <geometry s="1.0000000000000000e-03" x="4.4999000000000251e+01" y="7.9999999973077692e+01" hdg="3.1416426541326019e+00" length="1.5707795072416884e+01"> + <arc curvature="1.0000026520325046e-01" /> + </geometry> + <geometry s="1.5708795072416883e+01" x="3.4999526531330694e+01" y="6.9999653039344068e+01" hdg="4.7124263271326008e+00" length="1.0000000000000000e-03"> + <spiral curvStart="1.0000026520325046e-01" curvEnd="0.0000000000000000e+00" /> + </geometry> + <geometry s="1.5709795072416883e+01" x="3.4999526602010867e+01" y="6.9998653039346678e+01" hdg="4.7124763272652022e+00" length="1.2650798387525697e-04"> + <line /> + </geometry> + </planView> + <elevationProfile /> + <lateralProfile /> + <lanes> + <laneSection s="0.0000000000000000e+00"> + <center> + <lane id="0" type="driving" level="false"> + <link /> + </lane> + </center> + <right> + <lane id="-1" type="driving" level="false"> + <link /> + <width sOffset="0.0000000000000000e+00" a="4.4000000000000004e+00" b="0.0000000000000000e+00" c="0.0000000000000000e+00" d="0.0000000000000000e+00" /> + <speed sOffset="0.0000000000000000e+00" max="6.0000000000000000e+01" /> + </lane> + </right> + </laneSection> + </lanes> + <objects /> + <signals /> + </road> + <road name="junction_6_1_10_1" length="1.5709975881268994e+01" id="1008" junction="2"> + <link> + <predecessor elementType="road" elementId="6" contactPoint="start" /> + <successor elementType="road" elementId="10" contactPoint="end" /> + </link> + <type s="0.0000000000000000e+00" type="town" /> + <planView> + <geometry s="0.0000000000000000e+00" x="2.5000000000000000e+01" y="8.0000000000000000e+01" hdg="6.2831726539999995e+00" length="2.5305333638492300e-04"> + <line /> + </geometry> + <geometry s="2.5305333638492300e-04" x="2.5000253053336365e+01" y="7.9999999996798067e+01" hdg="6.2831726539999995e+00" length="1.0000000000000000e-03"> + <spiral curvStart="0.0000000000000000e+00" curvEnd="-1.0000153072517273e-01" /> + </geometry> + <geometry s="1.2530533363849230e-03" x="2.5001253053335827e+01" y="7.9999999967477976e+01" hdg="6.2831226532346367e+00" length="1.5707722827932610e+01"> + <arc curvature="-1.0000153072517273e-01" /> + </geometry> + <geometry s="1.5708975881268994e+01" x="3.5000473433675587e+01" y="6.9999526525369802e+01" hdg="4.7123263262346367e+00" length="1.0000000000000000e-03"> + <spiral curvStart="-1.0000153072517273e-01" curvEnd="0.0000000000000000e+00" /> + </geometry> + </planView> + <elevationProfile /> + <lateralProfile /> + <lanes> + <laneSection s="0.0000000000000000e+00"> + <center> + <lane id="0" type="driving" level="false"> + <link /> + </lane> + </center> + <right> + <lane id="-1" type="driving" level="false"> + <link /> + <width sOffset="0.0000000000000000e+00" a="4.4000000000000004e+00" b="0.0000000000000000e+00" c="0.0000000000000000e+00" d="0.0000000000000000e+00" /> + <speed sOffset="0.0000000000000000e+00" max="6.0000000000000000e+01" /> + </lane> + </right> + </laneSection> + </lanes> + <objects /> + <signals /> + </road> + <road name="junction_6_1_5_1" length="2.0000000000000000e+01" id="1009" junction="2"> + <link> + <predecessor elementType="road" elementId="6" contactPoint="start" /> + <successor elementType="road" elementId="5" contactPoint="end" /> + </link> + <type s="0.0000000000000000e+00" type="town" /> + <planView> + <geometry s="0.0000000000000000e+00" x="2.5000000000000000e+01" y="8.0000000000000000e+01" hdg="6.2831726539999995e+00" length="2.0000000000000000e+01"> + <line /> + </geometry> + </planView> + <elevationProfile /> + <lateralProfile /> + <lanes> + <laneSection s="0.0000000000000000e+00"> + <center> + <lane id="0" type="driving" level="false"> + <link /> + </lane> + </center> + <right> + <lane id="-1" type="driving" level="false"> + <link /> + <width sOffset="0.0000000000000000e+00" a="4.4000000000000004e+00" b="0.0000000000000000e+00" c="0.0000000000000000e+00" d="0.0000000000000000e+00" /> + <speed sOffset="0.0000000000000000e+00" max="6.0000000000000000e+01" /> + </lane> + </right> + </laneSection> + </lanes> + <objects /> + <signals /> + </road> + <road name="junction_10_-1_5_1" length="1.5710120342567388e+01" id="1010" junction="2"> + <link> + <predecessor elementType="road" elementId="10" contactPoint="end" /> + <successor elementType="road" elementId="5" contactPoint="end" /> + </link> + <type s="0.0000000000000000e+00" type="town" /> + <planView> + <geometry s="0.0000000000000000e+00" x="3.4999999987693798e+01" y="7.0000000000000000e+01" hdg="1.5707963270000000e+00" length="1.2650638310240936e-04"> + <line /> + </geometry> + <geometry s="1.2650638310240936e-04" x="3.4999999987693769e+01" y="7.0000126506383097e+01" hdg="1.5707963270000000e+00" length="1.0000000000000000e-03"> + <spiral curvStart="0.0000000000000000e+00" curvEnd="-9.9998999832913604e-02" /> + </geometry> + <geometry s="1.1265063831024094e-03" x="3.5000000004360061e+01" y="7.0001126506382846e+01" hdg="1.5707463275000837e+00" length="1.5707993836184286e+01"> + <arc curvature="-9.9998999832913604e-02" /> + </geometry> + <geometry s="1.5709120342567388e+01" x="4.5000473468303561e+01" y="8.0000726519169589e+01" hdg="-3.7345499916519032e-05" length="1.0000000000000000e-03"> + <spiral curvStart="-9.9998999832913604e-02" curvEnd="0.0000000000000000e+00" /> + </geometry> + </planView> + <elevationProfile /> + <lateralProfile /> + <lanes> + <laneSection s="0.0000000000000000e+00"> + <center> + <lane id="0" type="driving" level="false"> + <link /> + </lane> + </center> + <right> + <lane id="-1" type="driving" level="false"> + <link /> + <width sOffset="0.0000000000000000e+00" a="4.4000000000000004e+00" b="0.0000000000000000e+00" c="0.0000000000000000e+00" d="0.0000000000000000e+00" /> + <speed sOffset="0.0000000000000000e+00" max="6.0000000000000000e+01" /> + </lane> + </right> + </laneSection> + </lanes> + <objects /> + <signals /> + </road> + <road name="junction_10_-1_6_-1" length="1.5709921580249619e+01" id="1011" junction="2"> + <link> + <predecessor elementType="road" elementId="10" contactPoint="end" /> + <successor elementType="road" elementId="6" contactPoint="start" /> + </link> + <type s="0.0000000000000000e+00" type="town" /> + <planView> + <geometry s="0.0000000000000000e+00" x="3.4999999987693798e+01" y="7.0000000000000000e+01" hdg="1.5707963270000000e+00" length="1.8459305195506204e-08"> + <line /> + </geometry> + <geometry s="1.8459305195506204e-08" x="3.4999999987693798e+01" y="7.0000000018459303e+01" hdg="1.5707963270000000e+00" length="1.0000000000000000e-03"> + <spiral curvStart="0.0000000000000000e+00" curvEnd="1.0000026552341455e-01" /> + </geometry> + <geometry s="1.0000184593051955e-03" x="3.4999999971026881e+01" y="7.0001000018459052e+01" hdg="1.5708463271327617e+00" length="1.5707921561790315e+01"> + <arc curvature="1.0000026552341455e-01" /> + </geometry> + <geometry s="1.5708921580249619e+01" x="2.4999526531696123e+01" y="8.0000473451637035e+01" hdg="3.1416426541327618e+00" length="1.0000000000000000e-03"> + <spiral curvStart="1.0000026552341455e-01" curvEnd="0.0000000000000000e+00" /> + </geometry> + </planView> + <elevationProfile /> + <lateralProfile /> + <lanes> + <laneSection s="0.0000000000000000e+00"> + <center> + <lane id="0" type="driving" level="false"> + <link /> + </lane> + </center> + <right> + <lane id="-1" type="driving" level="false"> + <link /> + <width sOffset="0.0000000000000000e+00" a="4.4000000000000004e+00" b="0.0000000000000000e+00" c="0.0000000000000000e+00" d="0.0000000000000000e+00" /> + <speed sOffset="0.0000000000000000e+00" max="6.0000000000000000e+01" /> + </lane> + </right> + </laneSection> + </lanes> + <objects /> + <signals /> + </road> + <junction name="junction_1" id="1"> + <connection id="1" incomingRoad="0" connectingRoad="1" contactPoint="end"> + <laneLink from="-1" to="-1" /> + </connection> + <connection id="2" incomingRoad="1" connectingRoad="0" contactPoint="start"> + <laneLink from="1" to="1" /> + </connection> + <connection id="3" incomingRoad="0" connectingRoad="10" contactPoint="end"> + <laneLink from="-1" to="-1" /> + </connection> + <connection id="4" incomingRoad="10" connectingRoad="0" contactPoint="start"> + <laneLink from="1" to="1" /> + </connection> + <connection id="5" incomingRoad="10" connectingRoad="1" contactPoint="start"> + <laneLink from="1" to="-1" /> + </connection> + <connection id="6" incomingRoad="1" connectingRoad="10" contactPoint="start"> + <laneLink from="1" to="-1" /> + </connection> + </junction> + <junction name="junction_2" id="2"> + <connection id="1" incomingRoad="5" connectingRoad="6" contactPoint="end"> + <laneLink from="-1" to="-1" /> + </connection> + <connection id="2" incomingRoad="5" connectingRoad="10" contactPoint="end"> + <laneLink from="-1" to="1" /> + </connection> + <connection id="3" incomingRoad="6" connectingRoad="10" contactPoint="start"> + <laneLink from="1" to="1" /> + </connection> + <connection id="4" incomingRoad="6" connectingRoad="5" contactPoint="start"> + <laneLink from="1" to="1" /> + </connection> + <connection id="5" incomingRoad="10" connectingRoad="5" contactPoint="end"> + <laneLink from="-1" to="1" /> + </connection> + <connection id="6" incomingRoad="10" connectingRoad="6" contactPoint="end"> + <laneLink from="-1" to="-1" /> + </connection> + </junction> +</OpenDRIVE>