Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
fmt_converter
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xuebingbing
fmt_converter
Commits
d8d57ade
Commit
d8d57ade
authored
Jan 08, 2021
by
xuebingbing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
降低boost版本api
1 适配gnu编译器 适配gnu编译器 fix gnu编译器警告 处理gnu编译器警告 fix 注释mode产生的bug
parent
118014fd
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
23 deletions
+22
-23
convertor.cpp
src/jfhdconvert/convertor.cpp
+1
-1
convertor.h
src/jfhdconvert/convertor.h
+1
-1
main.cpp
src/jfhdconvertor/main.cpp
+20
-21
No files found.
src/jfhdconvert/convertor.cpp
View file @
d8d57ade
...
...
@@ -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
;
...
...
src/jfhdconvert/convertor.h
View file @
d8d57ade
...
...
@@ -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
);
};
}
}
...
...
src/jfhdconvertor/main.cpp
View file @
d8d57ade
...
...
@@ -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;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment