cdaproc.h 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. #ifndef CDAPROC_H
  2. #define CDAPROC_H
  3. #include <string>
  4. #include <vector>
  5. #include "excelapi.h"
  6. #include <OpenDrive/OpenDrive.h>
  7. #include "cdadraw.pb.h"
  8. //namespace iv
  9. //{
  10. //struct cdalane
  11. //{
  12. // int mnlanetype; //"shoulder","border","driving","stop","none","parking","biking","sidewalk","median"
  13. // double mflanewidth;
  14. // int mnlanemarkcolor; //0 白色 1 黄色
  15. // int mnlanemarktype; //0 虚线 1 实线 2 双虚线 3 双实线 4 虚实线 5 实虚线 6 无
  16. //};
  17. //struct cdageo
  18. //{
  19. // int mngeotype; //直路 弯路 路口
  20. // double mfradius; //半径
  21. // double mflen; //长度
  22. //};
  23. //class cdaroad
  24. //{
  25. //public:
  26. // int mnclass; //0 高速公路 1 城市 2 乡村
  27. // int mnEle; //0 平路 1 缓上坡 2 上坡 3 缓下坡 4 下坡
  28. // std::vector<cdageo> mvectorgeo;
  29. // std::vector<cdalane> mvectorlane;
  30. //public:
  31. // cdaroad()
  32. // {
  33. // mnclass = 0;
  34. // mnEle = 0;
  35. // cdageo xgeo;
  36. // xgeo.mflen = 100.0;
  37. // xgeo.mfradius = 100;
  38. // xgeo.mngeotype = 0;
  39. // mvectorgeo.push_back(xgeo);
  40. // cdalane xlane;
  41. // xlane.mnlanetype = 2;
  42. // xlane.mflanewidth = 3.75;
  43. // xlane.mnlanemarkcolor = 0;
  44. // xlane.mnlanemarktype = 0;
  45. // mvectorlane.push_back(xlane);
  46. // }
  47. //};
  48. //}
  49. class CDAProc
  50. {
  51. public:
  52. CDAProc();
  53. static int Proc(std::string strxlsxpath,OpenDrive * pxodr);
  54. static int ProcRoads(std::string strxlsxpath,std::string stroutpath);
  55. static int ProcRoad(OpenDrive * pxodr, std::string strtype,std::string strradius,std::string strroadlen,std::string strlanewidth,
  56. std::string strlannecount,std::string strlanetype,std::string strlanemarkcolor,std::string strlanemarktype);
  57. static int ProcLineRoad(OpenDrive * pxodr, std::string strtype,std::string strradius,std::string strroadlen,std::string strlanewidth,
  58. std::string strlannecount,std::string strlanetype,std::string strlanemarkcolor,std::string strlanemarktype);
  59. static int ProcArcRoad(OpenDrive * pxodr, std::string strtype,std::string strradius,std::string strroadlen,std::string strlanewidth,
  60. std::string strlannecount,std::string strlanetype,std::string strlanemarkcolor,std::string strlanemarktype);
  61. static int ProcIntersectionRoad(OpenDrive * pxodr, std::string strtype,std::string strradius,std::string strroadlen,std::string strlanewidth,
  62. std::string strlannecount,std::string strlanetype,std::string strlanemarkcolor,std::string strlanemarktype);
  63. static int ProcIntersectionRoad(OpenDrive * pxodr, iv::map::cdadraw * pcdadraw,int ngeo,int & nroadid,double & nowx,double & nowy, double & nowhdg);
  64. static int ProcCDA(iv::map::cdadraw & xcdadraw,OpenDrive * pxodr);
  65. };
  66. #endif // CDAPROC_H