Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julien Cabieces
otb
Commits
ab57c462
Commit
ab57c462
authored
9 years ago
by
Stéphane Albert
Browse files
Options
Downloads
Patches
Plain Diff
TEST: Updated DEMHandler test regarding RFC-2.
parent
5cdbcd6f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Modules/Adapters/OSSIMAdapters/test/CMakeLists.txt
+21
-0
21 additions, 0 deletions
Modules/Adapters/OSSIMAdapters/test/CMakeLists.txt
Modules/Adapters/OSSIMAdapters/test/otbDEMHandlerTest.cxx
+23
-9
23 additions, 9 deletions
Modules/Adapters/OSSIMAdapters/test/otbDEMHandlerTest.cxx
with
44 additions
and
9 deletions
Modules/Adapters/OSSIMAdapters/test/CMakeLists.txt
+
21
−
0
View file @
ab57c462
...
...
@@ -301,6 +301,7 @@ otb_add_test(NAME uaTvDEMHandler_AboveEllipsoid_NoSRTM_NoGeoid_NoData COMMAND ot
otbDEMHandlerTest
no
no
nil
40
8.687917
44.237917
...
...
@@ -313,6 +314,7 @@ otb_add_test(NAME uaTvDEMHandler_AboveMSL_NoSRTM_Geoid COMMAND otbOSSIMAdaptersT
otbDEMHandlerTest
no
${
INPUTDATA
}
/DEM/egm96.grd
true
40
8.434583
44.647083
...
...
@@ -325,6 +327,7 @@ otb_add_test(NAME uaTvDEMHandler_AboveEllipsoid_BadSRTM_Geoid COMMAND otbOSSIMAd
otbDEMHandlerTest
${
INPUTDATA
}
/poupeesTIF/
${
INPUTDATA
}
/DEM/egm96.grd
true
40
8.434583
44.647083
...
...
@@ -338,6 +341,7 @@ otb_add_test(NAME uaTvDEMHandler_AboveMSL_NoSRTM_NoGeoid COMMAND otbOSSIMAdapter
otbDEMHandlerTest
no
no
nil
40
8.434583
44.647083
...
...
@@ -350,6 +354,7 @@ otb_add_test(NAME uaTvDEMHandler_AboveEllipsoid_NoSRTM_Geoid COMMAND otbOSSIMAda
otbDEMHandlerTest
no
${
INPUTDATA
}
/DEM/egm96.grd
true
40
8.434583
44.647083
...
...
@@ -362,6 +367,7 @@ otb_add_test(NAME uaTvDEMHandler_AboveEllipsoid_SRTM_Geoid COMMAND otbOSSIMAdapt
otbDEMHandlerTest
${
INPUTDATA
}
/DEM/srtm_directory/
${
INPUTDATA
}
/DEM/egm96.grd
true
40
8.434583
44.647083
...
...
@@ -374,6 +380,7 @@ otb_add_test(NAME uaTvDEMHandler_AboveMSL_SRTM_NoGeoid_NoSRTMCoverage COMMAND ot
otbDEMHandlerTest
${
INPUTDATA
}
/DEM/srtm_directory/
no
nil
20
10.
# Point not covered
10.
# Point not covered
...
...
@@ -386,6 +393,7 @@ otb_add_test(NAME uaTvDEMHandler_AboveEllipsoid_SRTM_NoGeoid_NoSRTMCoverage COMM
otbDEMHandlerTest
${
INPUTDATA
}
/DEM/srtm_directory/
no
nil
20
10.
# Point not covered
10.
# Point not covered
...
...
@@ -398,6 +406,7 @@ otb_add_test(NAME uaTvDEMHandler_AboveMSL_SRTM_NoGeoid COMMAND otbOSSIMAdaptersT
otbDEMHandlerTest
${
INPUTDATA
}
/DEM/srtm_directory/
no
nil
40
8.434583
44.647083
...
...
@@ -410,6 +419,7 @@ otb_add_test(NAME uaTvDEMHandler_AboveEllipsoid_SRTM_NoGeoid COMMAND otbOSSIMAda
otbDEMHandlerTest
${
INPUTDATA
}
/DEM/srtm_directory/
no
nil
40
8.434583
44.647083
...
...
@@ -422,6 +432,7 @@ otb_add_test(NAME uaTvDEMHandler_AboveEllipsoid_SRTM_Geoid_NoData COMMAND otbOSS
otbDEMHandlerTest
${
INPUTDATA
}
/DEM/srtm_directory/
${
INPUTDATA
}
/DEM/egm96.grd
true
40
8.687917
44.237917
...
...
@@ -434,6 +445,7 @@ otb_add_test(NAME uaTvDEMHandler_AboveEllipsoid_SRTM_BadGeoid COMMAND otbOSSIMAd
otbDEMHandlerTest
${
INPUTDATA
}
/DEM/srtm_directory/
${
INPUTDATA
}
/poupees.jpg
false
40
8.434583
44.647083
...
...
@@ -446,6 +458,7 @@ otb_add_test(NAME uaTvDEMHandler_AboveMSL_SRTM_NoGeoid_NoData COMMAND otbOSSIMAd
otbDEMHandlerTest
${
INPUTDATA
}
/DEM/srtm_directory/
no
nil
40
8.687917
44.237917
...
...
@@ -458,6 +471,7 @@ otb_add_test(NAME uaTvDEMHandler_AboveEllipsoid_BDALTI_TIF_NoGeoid COMMAND otbOS
otbDEMHandlerTest
LARGEINPUT{BD_ALTI/}
no
nil
800
7.283262
48.598675
...
...
@@ -470,6 +484,7 @@ otb_add_test(NAME uaTvDEMHandler_AboveMSL_SRTM_Geoid_NoData COMMAND otbOSSIMAdap
otbDEMHandlerTest
${
INPUTDATA
}
/DEM/srtm_directory/
${
INPUTDATA
}
/DEM/egm96.grd
true
40
8.687917
44.237917
...
...
@@ -482,6 +497,7 @@ otb_add_test(NAME uaTvDEMHandler_AboveMSL_NoSRTM_NoGeoid_NoData COMMAND otbOSSIM
otbDEMHandlerTest
no
no
nil
40
8.687917
44.237917
...
...
@@ -494,6 +510,7 @@ otb_add_test(NAME uaTvDEMHandler_AboveMSL_SRTM_Geoid COMMAND otbOSSIMAdaptersTes
otbDEMHandlerTest
${
INPUTDATA
}
/DEM/srtm_directory/
${
INPUTDATA
}
/DEM/egm96.grd
true
40
8.434583
44.647083
...
...
@@ -506,6 +523,7 @@ otb_add_test(NAME uaTvDEMHandler_AboveEllipsoid_NoSRTM_NoGeoid COMMAND otbOSSIMA
otbDEMHandlerTest
no
no
nil
40
8.434583
44.647083
...
...
@@ -518,6 +536,7 @@ otb_add_test(NAME uaTvDEMHandler_AboveMSL_SRTM_Geoid_NoSRTMCoverage COMMAND otbO
otbDEMHandlerTest
${
INPUTDATA
}
/DEM/srtm_directory/
${
INPUTDATA
}
/DEM/egm96.grd
true
20
10.
# Point not covered
10.
# Point not covered
...
...
@@ -530,6 +549,7 @@ otb_add_test(NAME uaTvDEMHandler_AboveEllipsoid_SRTM_Geoid_NoSRTMCoverage COMMAN
otbDEMHandlerTest
${
INPUTDATA
}
/DEM/srtm_directory/
${
INPUTDATA
}
/DEM/egm96.grd
true
20
10.
# Point not covered
10.
# Point not covered
...
...
@@ -542,6 +562,7 @@ otb_add_test(NAME uaTvDEMHandler_AboveEllipsoid_SRTM_NoGeoid_NoData COMMAND otbO
otbDEMHandlerTest
${
INPUTDATA
}
/DEM/srtm_directory/
no
nil
40
8.687917
44.237917
...
...
This diff is collapsed.
Click to expand it.
Modules/Adapters/OSSIMAdapters/test/otbDEMHandlerTest.cxx
+
23
−
9
View file @
ab57c462
...
...
@@ -21,21 +21,22 @@
int
otbDEMHandlerTest
(
int
argc
,
char
*
argv
[])
{
if
(
argc
!=
9
)
if
(
argc
!=
10
)
{
std
::
cerr
<<
"Usage: "
<<
argv
[
0
]
<<
" demdir[path|no] geoid[path|no] defaultHeight longitude latitude aboveMSLFlag targetValue tolerance"
<<
std
::
endl
;
std
::
cerr
<<
"Usage: "
<<
argv
[
0
]
<<
" demdir[path|no] geoid[path|no]
geoidValid[true|anything]
defaultHeight longitude latitude aboveMSLFlag targetValue tolerance"
<<
std
::
endl
;
return
EXIT_FAILURE
;
}
std
::
string
demdir
=
argv
[
1
];
std
::
string
geoid
=
argv
[
2
];
double
defaultHeight
=
atof
(
argv
[
3
]);
double
longitude
=
atof
(
argv
[
4
]);
double
latitude
=
atof
(
argv
[
5
]);
bool
aboveMSL
=
atoi
(
argv
[
6
]);
double
target
=
atof
(
argv
[
7
]);
double
tolerance
=
atof
(
argv
[
8
]);
std
::
string
isGeoidValid
(
argv
[
3
]
);
double
defaultHeight
=
atof
(
argv
[
4
]);
double
longitude
=
atof
(
argv
[
5
]);
double
latitude
=
atof
(
argv
[
6
]);
bool
aboveMSL
=
atoi
(
argv
[
7
]);
double
target
=
atof
(
argv
[
8
]);
double
tolerance
=
atof
(
argv
[
9
]);
otb
::
DEMHandler
::
Pointer
demHandler
=
otb
::
DEMHandler
::
Instance
();
demHandler
->
SetDefaultHeightAboveEllipsoid
(
defaultHeight
);
...
...
@@ -59,7 +60,20 @@ int otbDEMHandlerTest(int argc, char * argv[])
if
(
geoid
!=
"no"
)
{
demHandler
->
OpenGeoidFile
(
geoid
);
try
{
demHandler
->
OpenGeoidFile
(
geoid
);
}
catch
(
const
std
::
exception
&
exception
)
{
std
::
cout
<<
"Exception thrown while opening geod-file '"
<<
geoid
<<
"':"
<<
std
::
endl
<<
exception
.
what
();
if
(
isGeoidValid
==
"true"
)
fail
=
true
;
}
std
::
cout
<<
"GetGeoidFile() = "
<<
demHandler
->
GetGeoidFile
()
<<
std
::
endl
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment