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
8c71bcf1
Commit
8c71bcf1
authored
Jan 08, 2021
by
xuebingbing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 注释文件夹模式和指定参数模式;
2. 更新说明文件
parent
d665484f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
37 deletions
+30
-37
readme.md
docker/ubuntu1804/readme.md
+5
-9
main.cpp
src/jfhdconvertor/main.cpp
+25
-28
No files found.
docker/ubuntu1804/readme.md
View file @
8c71bcf1
...
...
@@ -4,20 +4,15 @@
eg:
docker exec -it
<container
_id
>
/usr/bin/jfhdconvertor --help
-
example command line options
Usage:
/usr/bin/jfhdconvertor
[
OPTION...
]
jfhdconvertor.exe
[
OPTION...
]
-m, --mode arg pcd2las : must args --workdir; pcd2las.auto: must args
--pcdfile,--lasfile; pcd2las.stationfiles : must args
--pcdfile,--lasfile,--jf_station_file, --jd_station_file (default:
pcd2las.stationfiles)
-h, --help Print help
-h, --help Print help
options options:
--workdir arg 自动化的任务根目录
--pcdfile arg 输入pcd文件路径
--lasfile arg 输出las文件路径
--offsetxyz arg A list of doubles (default: 0.0,0.0,0.0)
--jf_station_file arg JF 站心定义文件,必须包含 E0_PROJECT:
*
N0_PROJECT:
* H0_PROJECT:*
三对UTM
站心(偏移)信息
...
...
@@ -25,10 +20,11 @@ Usage:
N0_UTM_JD:
* H0_UTM_JD:*
三对UTM
站心(偏移)信息, 可包含E_OFFSET:
* N_OFFSET:*
H_OFFSET:
*
的校正信息
例子(指定输入pcd,输出las文件,jf站心文件,jd站心文件):
说明:此模式必须指定 --pcdfile,--lasfile,--jf_station_file,--jd_station_file 四个参数,下方是一条真实的使用命令:
-
m pcd2las.stationfiles -
-pcdfile E:/data/jd/10-1/pcd_utm_merge/12_ground_utm_add_object.pcd --lasfile E:/data/jd/10-1/submit/jd/0107/12_ground_utm_add_object.las --jf_station_file E:/data/jd/10-1/10-1_station_jf.txt --jd_station_file E:/data/jd/10-1/10-1_station_jd.txt
--pcdfile E:/data/jd/10-1/pcd_utm_merge/12_ground_utm_add_object.pcd --lasfile E:/data/jd/10-1/submit/jd/0107/12_ground_utm_add_object.las --jf_station_file E:/data/jd/10-1/10-1_station_jf.txt --jd_station_file E:/data/jd/10-1/10-1_station_jd.txt
路径使用 posix 的 / 作为分级符号,输出的las文件的目标文件加不存在会自动创建
...
...
src/jfhdconvertor/main.cpp
View file @
8c71bcf1
...
...
@@ -41,38 +41,35 @@ int main(int argc, char* argv[])
auto
res
=
parse
(
argc
,
argv
);
std
::
unordered_set
<
std
::
string
>
modes
;
if
(
res
.
count
(
"mode"
))
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
)
{
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
);
}
boost
::
trim
(
item
);
modes
.
insert
(
item
);
}
if
(
modes
.
count
(
"pcd2las.auto"
)
>
0
)
{
std
::
cout
<<
">>>begin pcd2las.auto --------------------------------------------------"
<<
std
::
endl
;
pcd2lasauto
(
res
);
std
::
cout
<<
">>>end pcd2las.auto --------------------------------------------------"
<<
std
::
endl
;
}
//
if (modes.count("pcd2las.auto") > 0)
//
{
//
std::cout << ">>>begin pcd2las.auto --------------------------------------------------" << std::endl;
//
pcd2lasauto(res);
//
std::cout << ">>>end pcd2las.auto --------------------------------------------------" << std::endl;
//
}
if
(
modes
.
count
(
"pcs2las"
)
>
0
)
{
std
::
cout
<<
">>>begin pcd2las--------------------------------------------------"
<<
std
::
endl
;
pcd2las
(
res
);
std
::
cout
<<
">>>end pcd2las--------------------------------------------------"
<<
std
::
endl
;
}
//
if (modes.count("pcs2las") > 0)
//
{
//
std::cout << ">>>begin pcd2las--------------------------------------------------" << std::endl;
//
pcd2las(res);
//
std::cout << ">>>end pcd2las--------------------------------------------------" << std::endl;
//
}
if
(
modes
.
count
(
"pcd2las.stationfiles"
)
>
0
)
{
//
if (modes.count("pcd2las.stationfiles") > 0)
//
{
std
::
cout
<<
">>>begin pcd2las.stationfiles--------------------------------------------------"
<<
std
::
endl
;
pcd2lasByStationFiles
(
res
);
std
::
cout
<<
">>>end pcd2las.stationfiles--------------------------------------------------"
<<
std
::
endl
;
}
//
}
return
true
;
...
...
@@ -122,8 +119,8 @@ cxxopts::ParseResult parse(int argc, char* argv[])
options
.
allow_unrecognised_options
()
.
add_options
()
(
"m,mode"
,
"pcd2las : must args --workdir; pcd2las.auto: must args --pcdfile,--lasfile; pcd2las.stationfiles : must args --pcdfile,--lasfile,--jf_station_file, --jd_station_file"
,
cxxopts
::
value
<
std
::
string
>
()
->
default_value
(
"pcd2las.stationfiles"
))
//
("m,mode", "pcd2las : must args --workdir; pcd2las.auto: must args --pcdfile,--lasfile; pcd2las.stationfiles : must args --pcdfile,--lasfile,--jf_station_file, --jd_station_file",
//
cxxopts::value<std::string>()->default_value("pcd2las.stationfiles"))
(
"h,help"
,
"Print help"
)
#ifdef CXXOPTS_USE_UNICODE
(
"unicode"
,
u8"A help option with non-ascii: à. Here the size of the"
...
...
@@ -147,10 +144,10 @@ cxxopts::ParseResult parse(int argc, char* argv[])
// ;
options
.
add_options
(
"options"
)
(
"workdir"
,
"自动化的任务根目录"
,
cxxopts
::
value
<
std
::
string
>
())
//
("workdir", "自动化的任务根目录", cxxopts::value<std::string>())
(
"pcdfile"
,
"输入pcd文件路径"
,
cxxopts
::
value
<
std
::
string
>
())
(
"lasfile"
,
"输出las文件路径"
,
cxxopts
::
value
<
std
::
string
>
())
(
"offsetxyz"
,
"A list of doubles"
,
cxxopts
::
value
<
std
::
vector
<
double
>>
()
->
default_value
(
"0.0,0.0,0.0"
))
//
("offsetxyz", "A list of doubles", cxxopts::value<std::vector<double>>()->default_value("0.0,0.0,0.0"))
(
"jf_station_file"
,
"JF 站心定义文件,必须包含 E0_PROJECT:* N0_PROJECT:* H0_PROJECT:* 三对UTM 站心(偏移)信息"
,
cxxopts
::
value
<
std
::
string
>
())
(
"jd_station_file"
,
"JD 站心和校正,必须包含E0_UTM_JD:* N0_UTM_JD:* H0_UTM_JD:* 三对UTM 站心(偏移)信息, 可包含E_OFFSET:* N_OFFSET:* H_OFFSET:* 的校正信息"
,
cxxopts
::
value
<
std
::
string
>
());
...
...
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