Browse Source

change tool/map_lanetoxodr. fix u turn create s error to driver_map_xodr plan fail. now ok.

yuchuli 3 years ago
parent
commit
b054e093a9

+ 7 - 0
src/driver/driver_map_xodrload/globalplan.cpp

@@ -1259,6 +1259,7 @@ static std::vector<PlanPoint> getparampoly3dpoint(GeometryParamPoly3 * parc,cons
 std::vector<PlanPoint> GetPoint(pathsection xpath,const double fspace = 0.1)
 {
     Road * pRoad = xpath.mpRoad;
+    //s_start  s_end for select now section data.
     double s_start,s_end;
     LaneSection * pLS = pRoad->GetLaneSection(xpath.msectionid);
     s_start = pLS->GetS();
@@ -1268,6 +1269,12 @@ std::vector<PlanPoint> GetPoint(pathsection xpath,const double fspace = 0.1)
         s_end = pRoad->GetLaneSection(xpath.msectionid+1)->GetS();
     }
 
+//    if(xpath.mroadid == 10190)
+//    {
+//        int a = 1;
+//        a++;
+//    }
+
     std::vector<PlanPoint> xvectorPPS;
     double s = 0;
 

+ 11 - 0
src/tool/map_lanetoxodr/mainwindow.cpp

@@ -2816,6 +2816,11 @@ void MainWindow::onClickLoad()
 //        mxodr.GetHeader()->SetgeoReference(strgeoref);
 //        mxodr.GetHeader()->SetuserData(struserData);
     }
+    else
+    {
+        lat0 = 39.0;
+        lon0 = 119.0;
+    }
 
     double xMoveX = 0;
     double xMoveY = 0;
@@ -2838,6 +2843,11 @@ void MainWindow::onClickLoad()
 
     if(bAddToNow )bNeedAjustID = true;
 
+    if(bAddToNow == false)
+    {
+        mbSetOrigin = false;
+    }
+
     if(mbSetOrigin == false)
     {
         bNeedMove = false;
@@ -3504,6 +3514,7 @@ void MainWindow::onClickCreateRoad()
             s = s + xvectorgeo1[j].mfLen;
         }
 
+        s=0.0;
         for(j=0;j<xvectorgeo2.size();j++)
         {
             proad2->AddGeometryBlock();