Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Main Repositories
otb
Commits
3d4b262a
Commit
3d4b262a
authored
Nov 25, 2020
by
Julien Osman
Browse files
TEST: improve tests prTvTestCreateInverseForwardSensorModel
parent
0777d9f3
Pipeline
#6267
passed with stages
in 76 minutes and 11 seconds
Changes
4
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Data/Baseline/OTB/Files/prTvTestCreateInverseForwardSensorModel_Cevennes.txt
0 → 100644
View file @
3d4b262a
Testing geopoint: [3.740934, 44.107956]
Testing InverseSensorModel: [3.740934, 44.107956] -> [14190.558, 13591.703]
Testing ForwardSensorModel: [14190.558, 13591.703] -> [3.7409338, 44.107956]
Data/Baseline/OTB/Files/prTvTestCreateInverseForwardSensorModel_Toulouse.txt
0 → 100644
View file @
3d4b262a
Testing geopoint: [1.4434869, 43.604688]
Testing InverseSensorModel: [1.4434869, 43.604688] -> [11234.662, 8124.3911]
Testing ForwardSensorModel: [11234.662, 8124.3911] -> [1.4434869, 43.604688]
Modules/Core/Transform/test/CMakeLists.txt
View file @
3d4b262a
...
...
@@ -63,13 +63,25 @@ otb_add_test(NAME prTvGenericRSTransformWithSRID COMMAND otbTransformTestDriver
)
otb_add_test
(
NAME prTvTestCreateInverseForwardSensorModel_Cevennes COMMAND otbTransformTestDriver
--compare-ascii
${
EPSILON_4
}
${
BASELINE_FILES
}
/prTvTestCreateInverseForwardSensorModel_Cevennes.txt
${
TEMP
}
/prTvTestCreateInverseForwardSensorModel_Cevennes.txt
otbCreateInverseForwardSensorModel
LARGEINPUT{QUICKBIRD/CEVENNES/06FEB12104912-P1BS-005533998070_01_P001.TIF}
${
TEMP
}
/prTvTestCreateInverseForwardSensorModel_Cevennes.txt
3.740934
44.107956
)
otb_add_test
(
NAME prTvTestCreateInverseForwardSensorModel_Toulouse COMMAND otbTransformTestDriver
--compare-ascii
${
EPSILON_4
}
${
BASELINE_FILES
}
/prTvTestCreateInverseForwardSensorModel_Toulouse.txt
${
TEMP
}
/prTvTestCreateInverseForwardSensorModel_Toulouse.txt
otbCreateInverseForwardSensorModel
LARGEINPUT{QUICKBIRD/TOULOUSE/000000128955_01_P001_PAN/02APR01105228-P1BS-000000128955_01_P001.TIF}
${
TEMP
}
/prTvTestCreateInverseForwardSensorModel_Toulouse.txt
1.44348693
43.60468837
)
otb_add_test
(
NAME prTvTestCreateProjectionWithOSSIM_Cevennes COMMAND otbTransformTestDriver
...
...
@@ -151,7 +163,6 @@ set(FWDBWDChecking_INPUTS
#LARGEINPUT{RAPIDEYE/level3A/2008-12-25T005918_RE3_3A-NAC_752656_40091.tif}
)
otb_add_test
(
NAME bfTvInverseLogPolarTransform COMMAND otbTransformTestDriver
--compare-ascii
${
NOTOL
}
${
BASELINE_FILES
}
/bfInverseLogPolarTransformResults.txt
...
...
Modules/Core/Transform/test/otbCreateInverseForwardSensorModel.cxx
View file @
3d4b262a
...
...
@@ -18,16 +18,6 @@
* limitations under the License.
*/
/*!
*
* PURPOSE:
*
* Application to rproject an image region into gepgraphical coordinates
* usinf un Interpolator+regionextractor and an Iterator.
*
*/
// iostream is used for general output
#include
<iostream>
#include
<iterator>
...
...
@@ -43,9 +33,9 @@
int
otbCreateInverseForwardSensorModel
(
int
argc
,
char
*
argv
[])
{
if
(
argc
!=
2
)
if
(
argc
!=
5
)
{
std
::
cout
<<
argv
[
0
]
<<
" <input filename>
"
<
<
std
::
endl
;
std
::
cout
<<
argv
[
0
]
<<
" <input filename> <
output filename> <test_point_X> <test_point_Y>
\n
"
;
return
EXIT_FAILURE
;
}
...
...
@@ -82,5 +72,20 @@ int otbCreateInverseForwardSensorModel(int argc, char* argv[])
return
EXIT_FAILURE
;
}
std
::
ofstream
ofs
(
argv
[
2
],
std
::
ofstream
::
out
);
ofs
.
precision
(
8
);
InverseModelType
::
InputPointType
geoPoint
;
geoPoint
[
0
]
=
atof
(
argv
[
3
]);
geoPoint
[
1
]
=
atof
(
argv
[
4
]);
ofs
<<
"Testing geopoint: "
<<
geoPoint
<<
"
\n\n
"
;
auto
indexPoint
=
inverse_model
->
TransformPoint
(
geoPoint
);
ofs
<<
"Testing InverseSensorModel: "
<<
geoPoint
<<
" -> "
<<
indexPoint
<<
"
\n
"
;
auto
newGeoPoint
=
forward_model
->
TransformPoint
(
indexPoint
);
ofs
<<
"Testing ForwardSensorModel: "
<<
indexPoint
<<
" -> "
<<
newGeoPoint
<<
"
\n
"
;
return
EXIT_SUCCESS
;
}
Write
Preview
Supports
Markdown
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