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
0b757d29
Commit
0b757d29
authored
5 years ago
by
Guillaume Pasero
Browse files
Options
Downloads
Patches
Plain Diff
TEST: update test logic
parent
6be218fe
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Modules/Core/ImageBase/test/otbExtractROITestMetaData.cxx
+9
-8
9 additions, 8 deletions
Modules/Core/ImageBase/test/otbExtractROITestMetaData.cxx
with
9 additions
and
8 deletions
Modules/Core/ImageBase/test/otbExtractROITestMetaData.cxx
+
9
−
8
View file @
0b757d29
...
...
@@ -30,8 +30,6 @@
#include
"otbImageFileReader.h"
#include
"otbImageFileWriter.h"
#include
"otb_boost_string_header.h"
int
otbExtractROITestMetaData
(
int
itkNotUsed
(
argc
),
char
*
argv
[])
{
typedef
float
PixelType
;
...
...
@@ -100,17 +98,20 @@ int otbExtractROITestMetaData(int itkNotUsed(argc), char* argv[])
reader00
->
SetFileName
(
argv
[
2
]);
reader00
->
GenerateOutputInformation
();
if
(
reader00
->
GetOutput
()
->
GetProjectionRef
()
!=
""
||
boost
::
algorithm
::
istarts_with
(
reader00
->
GetOutput
()
->
GetProjectionRef
(),
"LOCAL_CS"
))
// The input image should have a sensor model and GCP, but the output images
// should only have the sensor model (priority over GCP). This behaviour
// must be consistent regardless of the ROI.
if
(
reader00
->
GetOutput
()
->
GetProjectionRef
().
size
())
{
std
::
cout
<<
"The read generated extract from index (0, 0) must NOT contain a ProjectionReference."
<<
std
::
endl
;
std
::
cout
<<
"Found ProjectionReference: "
<<
reader00
->
GetOutput
()
->
GetProjectionRef
()
<<
std
::
endl
;
return
EXIT_FAILURE
;
}
if
(
reader00
->
GetOutput
()
->
GetGCPCount
()
==
0
)
if
(
reader00
->
GetOutput
()
->
GetGCPCount
())
{
std
::
cout
<<
"The read generated extract from index (0, 0) must contain a list a GCPs.."
<<
std
::
endl
;
std
::
cout
<<
"The read generated extract from index (0, 0) must
NOT
contain a list a GCPs.."
<<
std
::
endl
;
return
EXIT_FAILURE
;
}
...
...
@@ -118,14 +119,14 @@ int otbExtractROITestMetaData(int itkNotUsed(argc), char* argv[])
reader57
->
SetFileName
(
argv
[
3
]);
reader57
->
GenerateOutputInformation
();
if
(
reader57
->
GetOutput
()
->
GetProjectionRef
()
!=
""
||
boost
::
algorithm
::
istarts_with
(
reader57
->
GetOutput
()
->
GetProjectionRef
(),
"LOCAL_CS"
))
if
(
reader57
->
GetOutput
()
->
GetProjectionRef
()
.
size
(
))
{
std
::
cout
<<
"The read generated extract from index (x, y) must NOT contain a ProjectionReference."
<<
std
::
endl
;
std
::
cout
<<
"Found ProjectionReference: "
<<
reader57
->
GetOutput
()
->
GetProjectionRef
()
<<
std
::
endl
;
return
EXIT_FAILURE
;
}
if
(
reader57
->
GetOutput
()
->
GetGCPCount
()
!=
0
)
if
(
reader57
->
GetOutput
()
->
GetGCPCount
())
{
std
::
cout
<<
"The read generated extract from index (x, y) must NOT contain a list a GCPs.."
<<
std
::
endl
;
return
EXIT_FAILURE
;
...
...
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