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
a44048c4
Commit
a44048c4
authored
15 years ago
by
Emmanuel Christophe
Browse files
Options
Downloads
Patches
Plain Diff
ENH: add the possibility to use the altitude given by the point in the ForwardSensorModel
parent
af9b7922
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
Code/Projections/otbForwardSensorModel.txx
+26
-10
26 additions, 10 deletions
Code/Projections/otbForwardSensorModel.txx
with
26 additions
and
10 deletions
Code/Projections/otbForwardSensorModel.txx
+
26
−
10
View file @
a44048c4
...
...
@@ -59,15 +59,14 @@ ForwardSensorModel< TScalarType, NInputDimensions, NOutputDimensions>
itkExceptionMacro(<<"TransformPoint(): Invalid Model pointer m_Model == NULL !");
}
this->m_Model->lineSampleToWorld(ossimPoint, ossimGPoint);
if ((this->m_UseDEM) || (this->m_AverageElevation != -10000))
//Use of DEM: need iteration to reach the correct point
if (this->m_UseDEM)
{
this->m_Model->lineSampleToWorld(ossimPoint, ossimGPoint);
ossimGpt ossimGPointRef = ossimGPoint;
double height(0.), heightTmp(0.);
double diffHeight = 100; // arbitrary value
itk::Point<double, 2>
p
oint;
itk::Point<double, 2>
currentP
oint;
int nbIter = 0;
otbMsgDevMacro(<< "USING DEM ! ");
...
...
@@ -81,13 +80,13 @@ ForwardSensorModel< TScalarType, NInputDimensions, NOutputDimensions>
// otbMsgDevMacro(<< "PointG Before iter : (" << ossimGPointRef.lat << "," << ossimGPointRef.lon <<")");
p
oint[0] = ossimGPointRef.lon;
p
oint[1] = ossimGPointRef.lat;
currentP
oint[0] = ossimGPointRef.lon;
currentP
oint[1] = ossimGPointRef.lat;
// otbMsgDevMacro(<< "PointP Before iter : (" << point[1] << "," << point[0] <<")");
if (this->m_UseDEM)
{
heightTmp = this->m_DEMHandler->GetHeightAboveMSL(
p
oint);
heightTmp = this->m_DEMHandler->GetHeightAboveMSL(
currentP
oint);
}
else
{
...
...
@@ -102,10 +101,27 @@ ForwardSensorModel< TScalarType, NInputDimensions, NOutputDimensions>
++nbIter;
}
ossimGPoint = ossimGPointRef;
ossimGPoint = ossimGPointRef;
}
//Altitude of the point is provided (in the sensor coordinate)
else if (InputPointType::PointDimension == 3)
{
this->m_Model->lineSampleHeightToWorld(ossimPoint, point[2], ossimGPoint);
}
//Use of average elevation
else if (this->m_AverageElevation != -10000)
{
this->m_Model->lineSampleHeightToWorld(ossimPoint, this->m_AverageElevation, ossimGPoint);
}
//Otherwise, just don't consider the altitude
else
{
this->m_Model->lineSampleToWorld(ossimPoint, ossimGPoint);
}
// "OutputPointType" storage.
OutputPointType outputPoint;
outputPoint[0]=ossimGPoint.lon;
...
...
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