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
David Youssefi
otb
Commits
d3dc09ab
Commit
d3dc09ab
authored
13 years ago
by
Otmane Lahlou
Browse files
Options
Downloads
Patches
Plain Diff
ENH: use the ElevationParametersHandler in the OrthoRectification application
parent
07563c6a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Applications/Projections/otbOrthoRectification.cxx
+30
-14
30 additions, 14 deletions
Applications/Projections/otbOrthoRectification.cxx
with
30 additions
and
14 deletions
Applications/Projections/otbOrthoRectification.cxx
+
30
−
14
View file @
d3dc09ab
...
...
@@ -29,6 +29,9 @@
// MapProjection handler
#include
"otbWrapperMapProjectionParametersHandler.h"
// Elevation handler
#include
"otbWrapperElevationParametersHandler.h"
#include
"otbMacro.h"
#include
"otbWrapperRAMParameter.h"
...
...
@@ -154,13 +157,8 @@ private:
SetParameterDescription
(
"outputs.isotropic"
,
isotropOss
.
str
());
EnableParameter
(
"outputs.isotropic"
);
AddParameter
(
ParameterType_Group
,
"elev"
,
"Elevation management"
);
SetParameterDescription
(
"elev"
,
"This group of parameters allows to manage elevation values in the ortho-rectification process."
);
// DEM
AddParameter
(
ParameterType_Directory
,
"elev.dem"
,
"DEM directory"
);
SetParameterDescription
(
"elev.dem"
,
"This parameter allows to select a directory containing Digital Elevation Model tiles. Supported formats are SRTM, DTED or any geotiff processed by the DEM import application"
);
MandatoryOff
(
"elev.dem"
);
// Elevation
ElevationParametersHandler
::
AddElevationParameters
(
this
,
"elev"
);
// Interpolators
AddParameter
(
ParameterType_Choice
,
"interpolator"
,
"Interpolation"
);
...
...
@@ -389,23 +387,41 @@ private:
break
;
}
//
DEM
if
(
IsParameterEnabled
(
"elev.dem"
)
&&
HasValue
(
"elev
.dem
"
))
//
Elevation through the elevation handler
switch
(
ElevationParametersHandler
::
GetElevationType
(
this
,
"elev"
))
{
m_ResampleFilter
->
SetDEMDirectory
(
GetParameterString
(
"elev.dem"
));
}
else
case
Elevation_DEM
:
{
if
(
otb
::
ConfigurationFile
::
GetInstance
()
->
IsValid
()
)
if
(
!
ElevationParametersHandler
::
GetDEMDirectory
(
this
,
"elev"
).
empty
())
{
m_ResampleFilter
->
SetDEMDirectory
(
ElevationParametersHandler
::
GetDEMDirectory
(
this
,
"elev"
));
}
else
{
m_ResampleFilter
->
SetDEMDirectory
(
otb
::
ConfigurationFile
::
GetInstance
()
->
GetDEMDirectory
());
}
}
break
;
case
Elevation_Average
:
{
m_ResampleFilter
->
SetAverageElevation
(
ElevationParametersHandler
::
GetAverageElevation
(
this
,
"elev"
));
}
break
;
// Commented cause using a tiff file is not implemented yet
// case Elevation_Tiff:
// {
// }
// break;
case
Elevation_Geoid
:
{
m_ResampleFilter
->
SetGeoidFile
(
ElevationParametersHandler
::
GetGeoidFile
(
this
,
"elev"
));
}
break
;
}
// If activated, generate RPC model
if
(
IsParameterEnabled
(
"opt.rpc"
))
{
//std::cout <<"Estimating the rpc Model " <<std::endl;
m_ResampleFilter
->
EstimateInputRpcModelOn
();
m_ResampleFilter
->
SetInputRpcGridSize
(
GetParameterInt
(
"opt.rpc"
));
}
...
...
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