Commit d8d57ade authored by xuebingbing's avatar xuebingbing

降低boost版本api

1 适配gnu编译器

适配gnu编译器

fix gnu编译器警告

处理gnu编译器警告

fix 注释mode产生的bug
parent 118014fd
......@@ -183,7 +183,7 @@ namespace jfhd {
{
}
bool Convertor::Pcd2Las(const std::string& pcdfilepath, std::string& lasfilepath, const Pcd2LasInfo& info, std::string* errormsg)
bool Convertor::Pcd2Las(const std::string& pcdfilepath, const std::string& lasfilepath, const Pcd2LasInfo& info, std::string* errormsg)
{
//std::string pcdfilepath{ "E:/data/jd/task1-2/1106/JF_PCD/12_ground_utm_add.pcd" };
Eigen::Vector4f origin;
......
......@@ -19,7 +19,7 @@ namespace jfhd {
Convertor();
~Convertor();
static bool Pcd2Las(const std::string& pcdfilepath, std::string& lasfilepath, const Pcd2LasInfo& info, std::string* errormsg);
static bool Pcd2Las(const std::string& pcdfilepath, const std::string& lasfilepath, const Pcd2LasInfo& info, std::string* errormsg);
};
}
}
......
......@@ -40,15 +40,15 @@ int main(int argc, char* argv[])
{
auto res = parse(argc, argv);
std::unordered_set<std::string> modes;
std::string temp = res["mode"].as<std::string>();
std::vector<std::string> vectemp;
boost::split(vectemp, temp, boost::is_any_of(","));
for (auto item : vectemp)
{
boost::trim(item);
modes.insert(item);
}
//std::unordered_set<std::string> modes;
//std::string temp = res["mode"].as<std::string>();
//std::vector<std::string> vectemp;
//boost::split(vectemp, temp, boost::is_any_of(","));
//for (auto item : vectemp)
//{
// boost::trim(item);
// modes.insert(item);
//}
//if (modes.count("pcd2las.auto") > 0)
//{
......@@ -504,7 +504,7 @@ int pcd2lasByStationFiles(const cxxopts::ParseResult& argsresult)
//("jd_station_file", "JD 站心和校正,必须包含E0_UTM_JD:* N0_UTM_JD:* H0_UTM_JD:* 三对UTM 站心(偏移)信息, 可包含E_OFFSET:* N_OFFSET:* H_OFFSET:* 的校正信息", cxxopts::value<std::string>());
boost::system::error_code sys_err_code;
if (argsresult.count("jf_station_file") < 0)
if (argsresult.count("jf_station_file") < 1)
{
std::cout << "ERROR: " << currentmode << " 未指定觉非站心文件" << std::endl;
return -1;
......@@ -521,48 +521,47 @@ int pcd2lasByStationFiles(const cxxopts::ParseResult& argsresult)
jf_stationfilepath = system_complete(jf_stationfilepath, sys_err_code);
//auto jf_stationfilepath = system_complete(path(temp), sys_err_code);
if (sys_err_code.failed() || !exists(jf_stationfilepath) || !is_regular_file(jf_stationfilepath))
if (0 != sys_err_code.value() || !exists(jf_stationfilepath) || !is_regular_file(jf_stationfilepath))
{
std::cout << "ERROR:" << currentmode << " 找不到觉非站心文件:" << jf_stationfilepath.string() << " DETAIL:" << sys_err_code.message() << std::endl;
return -1;
}
if (argsresult.count("jd_station_file") < 0)
if (argsresult.count("jd_station_file") < 1)
{
std::cout << "ERROR: " << currentmode << " 未指定京东站心文件" << std::endl;
return -1;
}
temp = argsresult["jd_station_file"].as<std::string>();
//auto jd_stationfilepath = system_complete(path(temp), sys_err_code);
auto jd_stationfilepath = system_complete(path(temp));
if (!exists(jd_stationfilepath) || !is_regular_file(jd_stationfilepath))
auto jd_stationfilepath = system_complete(path(temp), sys_err_code);
if (0 != sys_err_code.value() || !exists(jd_stationfilepath) || !is_regular_file(jd_stationfilepath))
{
std::cout << "ERROR:" << currentmode << " 找不到京东站心文件:" << jf_stationfilepath.string() << " DETAIL:" << sys_err_code.message() << std::endl;
return -1;
}
temp = argsresult["pcdfile"].as<std::string>();
if (argsresult.count("pcdfile") < 0)
if (argsresult.count("pcdfile") < 1)
{
std::cout << "ERROR: " << currentmode << " 未指定输入pcd文件" << std::endl;
return -1;
}
//path pcd_filepath(temp);
auto pcd_filepath = system_complete(path(temp));
if (!exists(pcd_filepath) || !is_regular_file(pcd_filepath))
auto pcd_filepath = system_complete(path(temp), sys_err_code);
if (0 != sys_err_code.value() || !exists(pcd_filepath) || !is_regular_file(pcd_filepath))
{
std::cout << "ERROR:" << currentmode << " 指定pcd文件错误:" << jf_stationfilepath.string() << " DETAIL:" << sys_err_code.message() << std::endl;
return -1;
}
temp = argsresult["lasfile"].as<std::string>();
if (argsresult.count("lasfile") < 0)
if (argsresult.count("lasfile") < 1)
{
std::cout << "ERROR: " << currentmode << " 未指定输入las文件" << std::endl;
return -1;
}
auto las_filepath = system_complete(path(temp));
if (exists(las_filepath) && is_regular_file(las_filepath))
auto las_filepath = system_complete(path(temp), sys_err_code);
if (!sys_err_code && exists(las_filepath) && is_regular_file(las_filepath))
{
std::cout << "INFO:" << currentmode << " 指定输出las文件已存在,将覆盖原文件 " << las_filepath.string() << std::endl;
//return -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment