Main.cpp 1.4 KB
Newer Older
oscar's avatar
oscar committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
#include <iostream>

#include "qichecheng/MapInterface.hpp"

// #ifdef STANDALONE
int main(int argc, char **argv) {
    std::string prj = argv[1];
    std::string folder = argv[2];

    std::cout << "prj: " << prj << ", folder: " << folder << std::endl;
    jf::MapInterface mi(prj, folder);

    std::vector<jf::Point> points =  // mi.m_mlMapLib.m_hlHdLib.LoadGpses();
        {
            jf::Point(120.44124321, 31.59069762, 0),
        };
    int n = 0;
    for (auto ptInLoc : points) {
        double dCarAngle = 45;
        long lRoadId = 0;
        std::vector<long> vctlPLinkIds = {};
        std::vector<long> vctlNLinkIds = {};
        int nOutLaneCnt = 0;
        int nOutLaneNum = 0;
        jf::LaneType nOutLaneType = jf::LaneType::NotInvestigated;
        jf::EdgeCrossType nOutLeftEdgeCrossType = jf::EdgeCrossType::NotInvestigated;
        jf::EdgeCrossType nOutRightEdgeCrossType = jf::EdgeCrossType::NotInvestigated;
        int nOutSpeedLimit = 0;
        double dOutLaneAngle = 0;
        jf::Point ptOutFoot = {};
        bool ret = mi.GetMapData(ptInLoc, dCarAngle, lRoadId, vctlPLinkIds, vctlNLinkIds, nOutLaneCnt, nOutLaneNum, nOutLaneType, nOutLeftEdgeCrossType, nOutRightEdgeCrossType, nOutSpeedLimit, dOutLaneAngle, ptOutFoot);
        if (ret == false) {
            std::cout.precision(16);
            std::cout << ptInLoc.dLon << ", " << ptInLoc.dLat << ",,,,";
        }
    }

    return 0;
}