Commit 7e26a709 authored by xuebingbing's avatar xuebingbing

1 当转换pcd到las经度小渝1e-2时报出警告信息;

2 完善说明文件
parent 91b3d007
# 说明文件 # 说明文件
## 注意事项
程序导出的las可能会造成经度损失为不可逆的。因为las中保存坐标是将double放大到符合经度的int32保存的。
## 命令行参数 ## 命令行参数
--pcdfile E:/data/jd/1986/1986_1_ground.pcd --lasfile E:/data/jd/1986/1986_1_ground.las --jf_station_file E:/data/jd/1986/1986_station_jf.txt --jd_station_file E:/data/jd/1986/1986_station_jd.txt --pcdfile E:/data/jd/1986/1986_1_ground.pcd --lasfile E:/data/jd/1986/1986_1_ground.las --jf_station_file E:/data/jd/1986/1986_station_jf.txt --jd_station_file E:/data/jd/1986/1986_station_jd.txt
......
...@@ -287,6 +287,13 @@ namespace jfhd { ...@@ -287,6 +287,13 @@ namespace jfhd {
int y_presion_len = get_intpartlen_func(max_xyz[1], y_offset) - kMaxPresionLen; int y_presion_len = get_intpartlen_func(max_xyz[1], y_offset) - kMaxPresionLen;
int z_presion_len = get_intpartlen_func(max_xyz[2], z_offset) - kMaxPresionLen; int z_presion_len = get_intpartlen_func(max_xyz[2], z_offset) - kMaxPresionLen;
if (x_presion_len > -2 || y_presion_len > -2 || z_presion_len > -2)
{
std::stringstream ss;
ss << "WARNING:x,y,z double presion less 1e-2, [" << pcdfilepath << "]";
*errormsg = ss.str();
}
double x_scale = std::pow(10., x_presion_len); double x_scale = std::pow(10., x_presion_len);
double y_scale = std::pow(10., y_presion_len); double y_scale = std::pow(10., y_presion_len);
double z_scale = std::pow(10., z_presion_len); double z_scale = std::pow(10., z_presion_len);
......
...@@ -598,7 +598,10 @@ int pcd2lasByStationFiles(const cxxopts::ParseResult& argsresult) ...@@ -598,7 +598,10 @@ int pcd2lasByStationFiles(const cxxopts::ParseResult& argsresult)
} }
else else
{ {
std::cout << "INFO: successed " << pcd_filepath.string() << ">>" << las_filepath.string() << std::endl; std::cout << "INFO: successed " << pcd_filepath.string() << ">>" << las_filepath.string();
if (!errormsg.empty())
std::cout << " DETAIL: " << errormsg;
std::cout << std::endl;
} }
return 0; return 0;
......
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