Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Main Repositories
otb
Commits
a486e95a
Commit
a486e95a
authored
Nov 08, 2013
by
Julien Malik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ENH: warn when deformation grid spacing is inferior to output spacing
parent
db990d66
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
Applications/Projections/otbOrthoRectification.cxx
Applications/Projections/otbOrthoRectification.cxx
+14
-3
No files found.
Applications/Projections/otbOrthoRectification.cxx
View file @
a486e95a
...
...
@@ -641,13 +641,24 @@ private:
// Predict size of deformation grid
ResampleFilterType
::
SizeType
deformationGridSize
;
deformationGridSize
[
0
]
=
GetParameterInt
(
"outputs.sizex"
)
*
GetParameterFloat
(
"outputs.spacingx"
)
/
GetParameterFloat
(
"opt.gridspacing"
);
deformationGridSize
[
1
]
=
GetParameterInt
(
"outputs.sizey"
)
*
GetParameterFloat
(
"outputs.spacingy"
)
/
GetParameterFloat
(
"opt.gridspacing"
);
deformationGridSize
[
0
]
=
static_cast
<
ResampleFilterType
::
SizeType
::
SizeValueType
>
(
vcl_abs
(
GetParameterInt
(
"outputs.sizex"
)
*
GetParameterFloat
(
"outputs.spacingx"
)
/
GetParameterFloat
(
"opt.gridspacing"
)
));
deformationGridSize
[
1
]
=
static_cast
<
ResampleFilterType
::
SizeType
::
SizeValueType
>
(
vcl_abs
(
GetParameterInt
(
"outputs.sizey"
)
*
GetParameterFloat
(
"outputs.spacingy"
)
/
GetParameterFloat
(
"opt.gridspacing"
)
));
otbAppLogINFO
(
"Using a deformation grid with a size of "
<<
deformationGridSize
);
if
(
deformationGridSize
[
0
]
*
deformationGridSize
[
1
]
==
0
)
{
otbAppLogFATAL
(
"Deformation grid degenerated (size of 0). You shall set opt.gridspacing appropriately"
);
otbAppLogFATAL
(
"Deformation grid degenerated (size of 0). "
"You shall set opt.gridspacing appropriately. opt.gridspacing is homogenous to outputs.spacing parameters"
);
}
if
(
vcl_abs
(
GetParameterFloat
(
"opt.gridspacing"
))
<
vcl_abs
(
GetParameterFloat
(
"outputs.spacingx"
))
||
vcl_abs
(
GetParameterFloat
(
"opt.gridspacing"
))
<
vcl_abs
(
GetParameterFloat
(
"outputs.spacingy"
))
)
{
otbAppLogWARNING
(
"Resolution of deformation grid should not be better than "
"resolution of output image. Computation time will be slow, and precision of output won't be better. "
"You shall set opt.gridspacing appropriately."
);
}
//otb::GeoInformationConversion::ToWKT(4326)
...
...
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