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
492432a4
Commit
492432a4
authored
4 years ago
by
Cédric Traizet
Browse files
Options
Downloads
Patches
Plain Diff
BUG: update the GenericRSResampleImageFilter test to check that the output projection is correct
parent
0a8bc22e
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/Filtering/Projection/test/otbGenericRSResampleImageFilter.cxx
+13
-4
13 additions, 4 deletions
...ering/Projection/test/otbGenericRSResampleImageFilter.cxx
with
13 additions
and
4 deletions
Modules/Filtering/Projection/test/otbGenericRSResampleImageFilter.cxx
+
13
−
4
View file @
492432a4
...
...
@@ -113,10 +113,9 @@ int otbGenericRSResampleImageFilter(int argc, char* argv[])
origin
[
1
]
=
strtod
(
argv
[
4
],
nullptr
);
// Origin northing
orthoRectifFilter
->
SetOutputOrigin
(
origin
);
std
::
string
wkt
=
otb
::
SpatialReference
::
FromUTM
(
atoi
(
argv
[
9
]),
atoi
(
argv
[
10
])
?
otb
::
SpatialReference
::
hemisphere
::
north
:
otb
::
SpatialReference
::
hemisphere
::
south
)
.
ToWkt
();
orthoRectifFilter
->
SetOutputProjectionRef
(
wkt
);
auto
inputSpatialRef
=
otb
::
SpatialReference
::
FromUTM
(
atoi
(
argv
[
9
]),
atoi
(
argv
[
10
])
?
otb
::
SpatialReference
::
hemisphere
::
north
:
otb
::
SpatialReference
::
hemisphere
::
south
);
orthoRectifFilter
->
SetOutputProjectionRef
(
inputSpatialRef
.
ToWkt
());
// Displacement Field spacing
VectorImageType
::
SpacingType
gridSpacing
;
...
...
@@ -138,5 +137,15 @@ int otbGenericRSResampleImageFilter(int argc, char* argv[])
writer
->
SetNumberOfDivisionsTiledStreaming
(
4
);
writer
->
Update
();
auto
outputProjectionRef
=
orthoRectifFilter
->
GetOutput
()
->
GetProjectionRef
();
if
(
outputProjectionRef
.
empty
()
||
otb
::
SpatialReference
::
FromDescription
(
outputProjectionRef
)
!=
inputSpatialRef
)
{
std
::
cout
<<
"Input and output projection don't match. "
<<
"The output projection is: "
<<
outputProjectionRef
<<
std
::
endl
;
return
EXIT_FAILURE
;
}
return
EXIT_SUCCESS
;
}
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