yuchuli 2 жил өмнө
parent
commit
138e505b68

+ 69 - 1
src/tool/map_lanetoxodr/dialogaddroadfromcda.cpp

@@ -3,12 +3,30 @@
 
 #include <QLibrary>
 #include <iostream>
+#include <QMessageBox>
 
-DialogAddRoadFromCDA::DialogAddRoadFromCDA(QWidget *parent) :
+
+DialogAddRoadFromCDA::DialogAddRoadFromCDA(OpenDrive * pxodr, QWidget *parent) :
     QDialog(parent),
     ui(new Ui::DialogAddRoadFromCDA)
 {
     ui->setupUi(this);
+    mpxodr = pxodr;
+    ui->comboBox_Type->addItem(tr("直路"));
+    ui->comboBox_Type->addItem(tr("弯路"));
+    ui->comboBox_Type->addItem(tr("路口"));
+
+    ui->comboBox_lanecolor->addItem(tr("白色"));
+    ui->comboBox_lanecolor->addItem(tr("黄色"));
+
+    ui->comboBox_lanemarktype->addItem(tr("虚线"));
+    ui->comboBox_lanemarktype->addItem(tr("实线"));
+
+    ui->comboBox_Type->setCurrentIndex(0);
+    ui->comboBox_lanecolor->setCurrentIndex(0);
+    ui->comboBox_lanemarktype->setCurrentIndex(0);
+
+    setWindowTitle(tr("Draw Road From CDA"));
 
 }
 
@@ -16,3 +34,53 @@ DialogAddRoadFromCDA::~DialogAddRoadFromCDA()
 {
     delete ui;
 }
+
+void DialogAddRoadFromCDA::on_pushButton_Create_clicked()
+{
+    OpenDrive * pxodr = mpxodr;
+    std::string strtype = ui->comboBox_Type->currentText().toStdString();
+    std::string strradius = ui->lineEdit_radius->text().toStdString();
+    std::string strlen = ui->lineEdit_len->text().toStdString();
+    std::string strlanewidth = ui->lineEdit_lanewidth->text().toStdString();
+    std::string strlanecount = ui->lineEdit_lanecount->text().toStdString();
+    std::string strlanecolor = ui->comboBox_lanecolor->currentText().toStdString();
+    std::string strlanemarktype = ui->comboBox_lanemarktype->currentText().toStdString();
+
+    if(atof(strradius.data())<0.0000000001)
+    {
+        if(ui->comboBox_Type->currentIndex() == 1)
+        {
+            QMessageBox::warning(this,tr("Warning"),tr("Radius is 0"),QMessageBox::YesAll);
+            return;
+        }
+    }
+
+    if(atof(strlen.data())<0.0000000001)
+    {
+        QMessageBox::warning(this,tr("Warning"),tr("Length is 0"),QMessageBox::YesAll);
+        return;
+    }
+
+    if(atof(strlanewidth.data())<0.0000000001)
+    {
+        QMessageBox::warning(this,tr("Warning"),tr("Lane Width is 0"),QMessageBox::YesAll);
+        return;
+    }
+
+    if(atoi(strlanecount.data())<1)
+    {
+        QMessageBox::warning(this,tr("Warning"),tr("Lane Count is 0"),QMessageBox::YesAll);
+        return;
+    }
+
+    int nrtn = CDAProc::ProcRoad(pxodr,strtype,strradius,strlen,strlanewidth,strlanecount," ",strlanecolor,strlanemarktype);
+
+    if(nrtn == 0)
+    {
+        this->accept();
+    }
+    else
+    {
+        QMessageBox::warning(this,tr("Warning"),tr("CDAProc ProcRoad Fail."),QMessageBox::YesAll);
+    }
+}

+ 8 - 1
src/tool/map_lanetoxodr/dialogaddroadfromcda.h

@@ -3,6 +3,9 @@
 
 #include <QDialog>
 
+#include "cdaproc.h"
+#include <OpenDrive/OpenDrive.h>
+
 namespace Ui {
 class DialogAddRoadFromCDA;
 }
@@ -12,11 +15,15 @@ class DialogAddRoadFromCDA : public QDialog
     Q_OBJECT
 
 public:
-    explicit DialogAddRoadFromCDA(QWidget *parent = 0);
+    explicit DialogAddRoadFromCDA(OpenDrive * pxodr, QWidget *parent = 0);
     ~DialogAddRoadFromCDA();
 
+private slots:
+    void on_pushButton_Create_clicked();
+
 private:
     Ui::DialogAddRoadFromCDA *ui;
+    OpenDrive * mpxodr;
 };
 
 #endif // DIALOGADDROADFROMCDA_H

+ 176 - 2
src/tool/map_lanetoxodr/dialogaddroadfromcda.ui

@@ -6,13 +6,187 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>579</width>
-    <height>397</height>
+    <width>802</width>
+    <height>515</height>
    </rect>
   </property>
   <property name="windowTitle">
    <string>Dialog</string>
   </property>
+  <widget class="QComboBox" name="comboBox_Type">
+   <property name="geometry">
+    <rect>
+     <x>180</x>
+     <y>60</y>
+     <width>161</width>
+     <height>41</height>
+    </rect>
+   </property>
+  </widget>
+  <widget class="QLabel" name="label">
+   <property name="geometry">
+    <rect>
+     <x>60</x>
+     <y>60</y>
+     <width>141</width>
+     <height>41</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>道路类型:</string>
+   </property>
+  </widget>
+  <widget class="QLabel" name="label_2">
+   <property name="geometry">
+    <rect>
+     <x>60</x>
+     <y>150</y>
+     <width>101</width>
+     <height>41</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>半径:</string>
+   </property>
+  </widget>
+  <widget class="QLineEdit" name="lineEdit_radius">
+   <property name="geometry">
+    <rect>
+     <x>180</x>
+     <y>150</y>
+     <width>161</width>
+     <height>41</height>
+    </rect>
+   </property>
+  </widget>
+  <widget class="QLabel" name="label_3">
+   <property name="geometry">
+    <rect>
+     <x>440</x>
+     <y>150</y>
+     <width>101</width>
+     <height>41</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>长度:</string>
+   </property>
+  </widget>
+  <widget class="QLineEdit" name="lineEdit_len">
+   <property name="geometry">
+    <rect>
+     <x>560</x>
+     <y>150</y>
+     <width>161</width>
+     <height>41</height>
+    </rect>
+   </property>
+  </widget>
+  <widget class="QLabel" name="label_4">
+   <property name="geometry">
+    <rect>
+     <x>60</x>
+     <y>240</y>
+     <width>101</width>
+     <height>41</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>车道宽度:</string>
+   </property>
+  </widget>
+  <widget class="QLineEdit" name="lineEdit_lanewidth">
+   <property name="geometry">
+    <rect>
+     <x>180</x>
+     <y>240</y>
+     <width>161</width>
+     <height>41</height>
+    </rect>
+   </property>
+  </widget>
+  <widget class="QLineEdit" name="lineEdit_lanecount">
+   <property name="geometry">
+    <rect>
+     <x>560</x>
+     <y>240</y>
+     <width>161</width>
+     <height>41</height>
+    </rect>
+   </property>
+  </widget>
+  <widget class="QLabel" name="label_5">
+   <property name="geometry">
+    <rect>
+     <x>440</x>
+     <y>240</y>
+     <width>101</width>
+     <height>41</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>车道数量:</string>
+   </property>
+  </widget>
+  <widget class="QLabel" name="label_6">
+   <property name="geometry">
+    <rect>
+     <x>60</x>
+     <y>330</y>
+     <width>121</width>
+     <height>41</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>车道线颜色:</string>
+   </property>
+  </widget>
+  <widget class="QLabel" name="label_7">
+   <property name="geometry">
+    <rect>
+     <x>440</x>
+     <y>330</y>
+     <width>121</width>
+     <height>41</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>车道线类型:</string>
+   </property>
+  </widget>
+  <widget class="QComboBox" name="comboBox_lanecolor">
+   <property name="geometry">
+    <rect>
+     <x>180</x>
+     <y>330</y>
+     <width>161</width>
+     <height>41</height>
+    </rect>
+   </property>
+  </widget>
+  <widget class="QComboBox" name="comboBox_lanemarktype">
+   <property name="geometry">
+    <rect>
+     <x>560</x>
+     <y>330</y>
+     <width>161</width>
+     <height>41</height>
+    </rect>
+   </property>
+  </widget>
+  <widget class="QPushButton" name="pushButton_Create">
+   <property name="geometry">
+    <rect>
+     <x>320</x>
+     <y>430</y>
+     <width>161</width>
+     <height>51</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>创建</string>
+   </property>
+  </widget>
  </widget>
  <resources/>
  <connections/>

+ 36 - 17
src/tool/map_lanetoxodr/function/cdaproc.cpp

@@ -207,9 +207,10 @@ int CDAProc::ProcIntersectionRoad(OpenDrive * pxodr,  std::string strtype,std::s
 int CDAProc::ProcArcRoad(OpenDrive * pxodr,  std::string strtype,std::string strradius,std::string strroadlen,std::string strlanewidth,
     std::string strlannecount,std::string strlanetype,std::string strlanemarkcolor,std::string strlanemarktype)
 {
+
     double fRoadLen =  atof(strroadlen.data());
     double fRadius = atof(strradius.data());
-    if(fabs(fRadius) < 0.000000000000001)return -1;
+    if(fabs(fRadius) < 0.000000000000001)return -5;
     pxodr->AddRoad("wd",fRoadLen,"1","-1");
     Road * pRoad = pxodr->GetLastAddedRoad();
 
@@ -308,6 +309,39 @@ int CDAProc::ProcLineRoad(OpenDrive * pxodr,  std::string strtype,std::string st
     return 0;
 }
 
+int CDAProc::ProcRoad(OpenDrive * pxodr,  std::string strtype,std::string strradius,std::string strroadlen,std::string strlanewidth,
+                      std::string strlannecount,std::string strlanetype,std::string strlanemarkcolor,std::string strlanemarktype)
+{
+    if(atof(strroadlen.data())<0.00000001)
+    {
+        return -2;
+    }
+    if(atof(strlanewidth.data())<0.00000001)
+    {
+        return -3;
+    }
+    if(atoi(strlannecount.data())<1)
+    {
+        return -4;
+    }
+    if(strtype == "直路" )
+    {
+        std::cout<<" is zl . "<<std::endl;
+        return ProcLineRoad(pxodr,strtype,strradius,strroadlen,strlanewidth,strlannecount,strlanetype,strlanemarkcolor,strlanemarktype);
+    }
+    if(strtype == "弯路" )
+    {
+        std::cout<<" is wl . "<<std::endl;
+        return ProcArcRoad(pxodr,strtype,strradius,strroadlen,strlanewidth,strlannecount,strlanetype,strlanemarkcolor,strlanemarktype);
+    }
+    if(strtype == "路口" )
+    {
+        std::cout<<" is lk . "<<std::endl;
+        return ProcIntersectionRoad(pxodr,strtype,strradius,strroadlen,strlanewidth,strlannecount,strlanetype,strlanemarkcolor,strlanemarktype);
+    }
+    return -1;
+}
+
 int CDAProc::Proc(std::string strxlsxpath,OpenDrive * pxodr)
 {
 
@@ -331,20 +365,5 @@ int CDAProc::Proc(std::string strxlsxpath,OpenDrive * pxodr)
     std::cout<<"type : "<<strtype<<std::endl;
     ServiceExcelAPI.Closexlsx(pexcel);
 
-    if(strtype == "直路" )
-    {
-        std::cout<<" is zl . "<<std::endl;
-        return ProcLineRoad(pxodr,strtype,strradius,strroadlen,strlanewidth,strlannecount,strlanetype,strlanemarkcolor,strlanemarktype);
-    }
-    if(strtype == "弯路" )
-    {
-        std::cout<<" is wl . "<<std::endl;
-        return ProcArcRoad(pxodr,strtype,strradius,strroadlen,strlanewidth,strlannecount,strlanetype,strlanemarkcolor,strlanemarktype);
-    }
-    if(strtype == "路口" )
-    {
-        std::cout<<" is lk . "<<std::endl;
-        return ProcIntersectionRoad(pxodr,strtype,strradius,strroadlen,strlanewidth,strlannecount,strlanetype,strlanemarkcolor,strlanemarktype);
-    }
-    return 0;
+    return ProcRoad(pxodr,strtype,strradius,strroadlen,strlanewidth,strlannecount,strlanemarktype,strlanemarkcolor,strlanemarktype);
 }

+ 2 - 0
src/tool/map_lanetoxodr/function/cdaproc.h

@@ -11,6 +11,8 @@ class CDAProc
 public:
     CDAProc();
     static int Proc(std::string strxlsxpath,OpenDrive * pxodr);
+    static int ProcRoad(OpenDrive * pxodr,  std::string strtype,std::string strradius,std::string strroadlen,std::string strlanewidth,
+                        std::string strlannecount,std::string strlanetype,std::string strlanemarkcolor,std::string strlanemarktype);
     static int ProcLineRoad(OpenDrive * pxodr,  std::string strtype,std::string strradius,std::string strroadlen,std::string strlanewidth,
         std::string strlannecount,std::string strlanetype,std::string strlanemarkcolor,std::string strlanemarktype);
     static int ProcArcRoad(OpenDrive * pxodr,  std::string strtype,std::string strradius,std::string strroadlen,std::string strlanewidth,

+ 84 - 19
src/tool/map_lanetoxodr/function/ndsdataproc.cpp

@@ -20,7 +20,7 @@ NDSDataProc::NDSDataProc()
 //-2 can't open vehicle data file
 //-3 no valid line data.
 //-4 no valid vehicle data.
-int NDSDataProc::ProcNDSData(std::string strlinepath,std::string strvehiclepath,OpenDrive * mpxodr)
+int NDSDataProc::ProcNDSData(std::string strlinepath,std::string strvehiclepath,OpenDrive * mpxodr,int nleftlanecount,int nrightlanecount)
 {
     mnProc = 0;
     mstrState = "Loading Data.";
@@ -42,6 +42,9 @@ int NDSDataProc::ProcNDSData(std::string strlinepath,std::string strvehiclepath,
         return -2;
     }
 
+    double flaneavgwidthtotal = 0;
+    double flaneavgwidth = 3.5;
+
 
     std::vector<iv::nds_line> xvectorline;
     std::vector<iv::nds_vehicle> xvectorvehicle;
@@ -72,10 +75,16 @@ int NDSDataProc::ProcNDSData(std::string strlinepath,std::string strvehiclepath,
             xline.nlanetype = badata[23].toDouble();
             if(xline.feature >=0)xvectorline.push_back(xline);
 
+            flaneavgwidthtotal = flaneavgwidthtotal + xline.lanewidth;
         }
 
     }
 
+    if(nline>0)
+    {
+        flaneavgwidth = flaneavgwidthtotal/nline;
+    }
+
     if(xvectorline.size() < 2)
     {
         xFileline.close();
@@ -671,6 +680,64 @@ int NDSDataProc::ProcNDSData(std::string strlinepath,std::string strvehiclepath,
     LaneSection * pLS = p->GetLaneSection(0);
 
     pLS->AddLane(0,0,"none",false);
+
+    int noldtype = 0;
+    int ntype = 0;
+    Lane * pCenterLane = pLS->GetLastCenterLane();
+    if(nleftlanecount == 0)
+    {
+        if(nvlsize > 0)
+        {
+            ntype = xvectorvehicle[xvectorvl[0].mvehindex].nleftlanetype;
+            pCenterLane->AddRoadMarkRecord(xvectorvehicle[xvectorvl[0].mvehindex].s,roadmarktypetostr(ntype),"standard","white",0.15,"none");
+            noldtype = ntype;
+        }
+        for(i=1;i<(int)(nvlsize-1);i++)
+        {
+            int ntype = xvectorvehicle[xvectorvl[i].mvehindex].nleftlanetype;
+            if(ntype!= noldtype )
+            {
+                pCenterLane->AddRoadMarkRecord(xvectorvehicle[xvectorvl[i].mvehindex].s,roadmarktypetostr(ntype),"standard","white",0.15,"none");
+                noldtype = ntype;
+            }
+        }
+    }
+    else
+    {
+        pCenterLane->AddRoadMarkRecord(0,"solid","standard","yellow",0.15,"none");
+        p->AddLaneOffset(0,nleftlanecount*flaneavgwidth,0,0,0);
+        int k;
+        for(k=0;k<nleftlanecount;k++)
+        {
+            pLS->AddLane(-1,(-1)*(pLS->GetRightLaneCount()+1),"driving",false);
+            Lane * pLane = pLS->GetLastRightLane();
+            pLane->AddWidthRecord(0,flaneavgwidth,0,0,0);
+            if(k != (nleftlanecount-1))
+            {
+                pLane->AddRoadMarkRecord(0,"broken","standard","standard",0.15,"none");
+            }
+            else
+            {
+                if(nvlsize > 0)
+                {
+                    ntype = xvectorvehicle[xvectorvl[0].mvehindex].nleftlanetype;
+                    pLane->AddRoadMarkRecord(xvectorvehicle[xvectorvl[0].mvehindex].s,roadmarktypetostr(ntype),"standard","white",0.15,"none");
+                    noldtype = ntype;
+                }
+                for(i=1;i<(int)(nvlsize-1);i++)
+                {
+                    int ntype = xvectorvehicle[xvectorvl[i].mvehindex].nleftlanetype;
+                    if(ntype!= noldtype )
+                    {
+                        pLane->AddRoadMarkRecord(xvectorvehicle[xvectorvl[i].mvehindex].s,roadmarktypetostr(ntype),"standard","white",0.15,"none");
+                        noldtype = ntype;
+                    }
+                }
+            }
+        }
+    }
+
+
     pLS->AddLane(-1,(-1)*(pLS->GetRightLaneCount()+1),"driving",false);
     Lane * pLane = pLS->GetLastRightLane();
     for(j=0;j<(int)xvectorwidthabcd.size();j++)
@@ -685,24 +752,7 @@ int NDSDataProc::ProcNDSData(std::string strlinepath,std::string strvehiclepath,
         p->AddElevation(pwa->s,pwa->A,pwa->B,pwa->C,pwa->D);
     }
 
-    int noldtype = 0;
-    int ntype = 0;
-    Lane * pCenterLane = pLS->GetLastCenterLane();
-    if(nvlsize > 0)
-    {
-        ntype = xvectorvehicle[xvectorvl[0].mvehindex].nleftlanetype;
-        pCenterLane->AddRoadMarkRecord(xvectorvehicle[xvectorvl[0].mvehindex].s,roadmarktypetostr(ntype),"standard","white",0.15,"none");
-        noldtype = ntype;
-    }
-    for(i=1;i<(int)(nvlsize-1);i++)
-    {
-        int ntype = xvectorvehicle[xvectorvl[i].mvehindex].nleftlanetype;
-        if(ntype!= noldtype )
-        {
-            pCenterLane->AddRoadMarkRecord(xvectorvehicle[xvectorvl[i].mvehindex].s,roadmarktypetostr(ntype),"standard","white",0.15,"none");
-            noldtype = ntype;
-        }
-    }
+
 
     noldtype = 0;
     ntype = 0;
@@ -722,6 +772,21 @@ int NDSDataProc::ProcNDSData(std::string strlinepath,std::string strvehiclepath,
         }
     }
 
+    for(i=0;i<nrightlanecount;i++)
+    {
+        pLS->AddLane(-1,(-1)*(pLS->GetRightLaneCount()+1),"driving",false);
+        Lane * pLane = pLS->GetLastRightLane();
+        pLane->AddWidthRecord(0,flaneavgwidth,0,0,0);
+        if(i != (nrightlanecount-1))
+        {
+            pLane->AddRoadMarkRecord(0,"broken","standard","standard",0.15,"none");
+        }
+        else
+        {
+            pLane->AddRoadMarkRecord(0,"solid","standard","standard",0.15,"none");
+        }
+    }
+
 
     mnProc = 100;
     mstrState = " Complete. ";

+ 1 - 1
src/tool/map_lanetoxodr/function/ndsdataproc.h

@@ -77,7 +77,7 @@ public:
     NDSDataProc();
 
 public:
-    int ProcNDSData(std::string strlinepath,std::string strvehiclepath,OpenDrive * mpxodr);
+    int ProcNDSData(std::string strlinepath,std::string strvehiclepath,OpenDrive * mpxodr,int nleftlanecount,int nrightlanecount);
     std::string roadmarktypetostr(int ntype);
 
 private:

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

@@ -5856,6 +5856,15 @@ void MainWindow::on_actionAdd_Road_From_NDS_triggered()
 {
     DialogAddRoadFromNDS rnd(&mxodr, this);
     rnd.exec();
+
+    updateJunction();
+    updateCBRoad();
+    mbRefresh = true;
+    update();
+    if(mpCBViewMode->currentIndex() == 1)
+    {
+        UpdateScene();
+    }
 }
 
 void MainWindow::on_CreateBefore_triggered()
@@ -5998,6 +6007,12 @@ void MainWindow::on_actionAdd_Road_From_CDA_triggered()
     int nrtn = CDAProc::Proc(str.toStdString(),&mxodr);
 
 
+    if(nrtn<0)
+    {
+        std::cout<<" CDAProc::Proc return code:  "<<nrtn<<std::endl;
+        QMessageBox::warning(this,tr("Warning"),tr("CDA Create road fail."),QMessageBox::YesAll);
+    }
+
     AutoConnect pAC(&mxodr);
     pAC.Connect();
     updateJunction();
@@ -6011,3 +6026,29 @@ void MainWindow::on_actionAdd_Road_From_CDA_triggered()
 
 
 }
+
+void MainWindow::on_actionDraw_Road_From_CDA_triggered()
+{
+    DialogAddRoadFromCDA xdlg(&mxodr, this);
+
+    if(xdlg.exec() == QDialog::Accepted)
+    {
+
+    }
+    else
+    {
+        return;
+    }
+
+
+    AutoConnect pAC(&mxodr);
+    pAC.Connect();
+    updateJunction();
+    updateCBRoad();
+    mbRefresh = true;
+    update();
+    if(mpCBViewMode->currentIndex() == 1)
+    {
+        UpdateScene();
+    }
+}

+ 2 - 0
src/tool/map_lanetoxodr/mainwindow.h

@@ -244,6 +244,8 @@ private slots:
 
     void on_actionAdd_Road_From_CDA_triggered();
 
+    void on_actionDraw_Road_From_CDA_triggered();
+
 private:
 
 

+ 6 - 0
src/tool/map_lanetoxodr/mainwindow.ui

@@ -61,6 +61,7 @@
     <addaction name="CreateBefore"/>
     <addaction name="CreateAfter"/>
     <addaction name="actionAdd_Road_From_CDA"/>
+    <addaction name="actionDraw_Road_From_CDA"/>
    </widget>
    <widget class="QMenu" name="menuView">
     <property name="title">
@@ -212,6 +213,11 @@
     <string>Add Road From CDA</string>
    </property>
   </action>
+  <action name="actionDraw_Road_From_CDA">
+   <property name="text">
+    <string>Draw Road From CDA</string>
+   </property>
+  </action>
  </widget>
  <layoutdefault spacing="6" margin="11"/>
  <resources>

+ 10 - 3
src/tool/map_lanetoxodr/ui/dialogaddroadfromnds.cpp

@@ -4,6 +4,7 @@
 
 #include <QFileDialog>
 #include <QMessageBox>
+#include <QInputDialog>
 
 DialogAddRoadFromNDS::DialogAddRoadFromNDS(OpenDrive * pxodr,QWidget *parent) :
     QDialog(parent),
@@ -44,16 +45,22 @@ void DialogAddRoadFromNDS::on_pushButton_clicked()
     QString strfileline = QFileDialog::getOpenFileName(this,tr("Open line file"),"",tr("line File(*.csv)"));
     if(strfileline.isEmpty())return;
 
+    bool ok;
+    int leftlanecount = QInputDialog::getInt(this,tr("当前车道左侧车道数"),tr("车道数:"),0,0,10,1,&ok);
+    if(ok == false)return;
+    int rightlanecount = QInputDialog::getInt(this,tr("当前车道右侧车道数"),tr("车道数:"),0,0,10,1,&ok);
+    if(ok == false)return;
+
     mndsproc.mnProc = 0;
     mndsproc.mstrState = "Initialzing";
     ui->pushButton->setEnabled(false);
-    mpthread = new std::thread(&DialogAddRoadFromNDS::updateProgress,this,strfileline,strfilevehicle);
+    mpthread = new std::thread(&DialogAddRoadFromNDS::updateProgress,this,strfileline,strfilevehicle,leftlanecount,rightlanecount);
     mpTimer->start(100);
 }
 
-void DialogAddRoadFromNDS::updateProgress(QString strfileline,QString strfilevehicle)
+void DialogAddRoadFromNDS::updateProgress(QString strfileline,QString strfilevehicle,int nleftlanecount,int nrightlanecount)
 {
-    int nrtn = mndsproc.ProcNDSData(strfileline.toStdString(),strfilevehicle.toStdString(),mpxodr);
+    int nrtn = mndsproc.ProcNDSData(strfileline.toStdString(),strfilevehicle.toStdString(),mpxodr,nleftlanecount,nrightlanecount);
     emit ndsproccomplete(nrtn);
 }
 

+ 1 - 1
src/tool/map_lanetoxodr/ui/dialogaddroadfromnds.h

@@ -21,7 +21,7 @@ public:
     explicit DialogAddRoadFromNDS(OpenDrive * pxodr,QWidget *parent = nullptr);
     ~DialogAddRoadFromNDS();
 
-    void updateProgress(QString strfileline,QString strfilevehicle);
+    void updateProgress(QString strfileline,QString strfilevehicle,int nleftlanecount,int nrightlanecount);
 
 private slots:
     void on_pushButton_clicked();