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
277676b7
Commit
277676b7
authored
14 years ago
by
Julien Michel
Browse files
Options
Downloads
Patches
Plain Diff
BUG: Fixing lat/lon confusion
parent
d9d035a1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Code/Projections/otbGCPsToRPCSensorModelImageFilter.h
+0
-3
0 additions, 3 deletions
Code/Projections/otbGCPsToRPCSensorModelImageFilter.h
Code/Projections/otbGCPsToRPCSensorModelImageFilter.txx
+13
-19
13 additions, 19 deletions
Code/Projections/otbGCPsToRPCSensorModelImageFilter.txx
with
13 additions
and
22 deletions
Code/Projections/otbGCPsToRPCSensorModelImageFilter.h
+
0
−
3
View file @
277676b7
...
...
@@ -212,9 +212,6 @@ private:
/** RPC Projection */
ossimRefPtr
<
ossimRpcProjection
>
m_RpcProjection
;
/** Projection */
ossimRefPtr
<
ossimProjection
>
m_Projection
;
/** Keywordlist */
ImageKeywordlist
m_Keywordlist
;
...
...
This diff is collapsed.
Click to expand it.
Code/Projections/otbGCPsToRPCSensorModelImageFilter.txx
+
13
−
19
View file @
277676b7
...
...
@@ -37,8 +37,7 @@ GCPsToRPCSensorModelImageFilter<TImage>
m_MeanElevation(0.),
m_DEMHandler(),
m_GCPsContainer(),
m_RpcProjection(),
m_Projection()
m_RpcProjection()
{
// This filter does not modify the image buffer, but only its
// metadata.Therefore, it can be run inplace to reduce memory print.
...
...
@@ -114,8 +113,8 @@ GCPsToRPCSensorModelImageFilter<TImage>
// Create the ground point with elevation
Point3DType groundPointWithElevation;
// Fill it with ground point data
groundPointWithElevation[
0
] = groundPoint[0];
groundPointWithElevation[
1
] = groundPoint[1];
groundPointWithElevation[
1
] = groundPoint[0];
groundPointWithElevation[
0
] = groundPoint[1];
// Check wether we are using a DEM or not
if (m_UseDEM)
...
...
@@ -233,12 +232,12 @@ GCPsToRPCSensorModelImageFilter<TImage>
gpoint.hgt = height;
if (m_Projection != NULL)
if (m_
Rpc
Projection != NULL)
{
m_Projection->lineSampleToWorld(spoint, gpoint);
m_
Rpc
Projection->lineSampleToWorld(spoint, gpoint);
groundPoint[
0
] = gpoint.lon;
groundPoint[
1
] = gpoint.lat;
groundPoint[
1
] = gpoint.lon;
groundPoint[
0
] = gpoint.lat;
groundPoint[2] = gpoint.hgt;
}
else
...
...
@@ -288,17 +287,15 @@ GCPsToRPCSensorModelImageFilter<TImage>
idTrans3D[1] = groundPointTemp[1];
idTrans3D[2] = groundPointTemp[2];
double distance = idOut3D.EuclideanDistanceTo(idTrans3D);
double error = vcl_sqrt(distance);
double error = idOut3D.EuclideanDistanceTo(idTrans3D);
// Add error to the container
m_ErrorsContainer.push_back(error);
// Compute mean error
sum +=
distance
;
sum +=
error
;
}
sum = vcl_sqrt(sum);
m_MeanError = sum / static_cast<double>(m_ErrorsContainer.size());
}
...
...
@@ -339,7 +336,7 @@ GCPsToRPCSensorModelImageFilter<TImage>
}
// Build the ossim rpc solver
ossimRefPtr<ossimRpcSolver> rpcSolver = new ossimRpcSolver(
fals
e, false);
ossimRefPtr<ossimRpcSolver> rpcSolver = new ossimRpcSolver(
tru
e, false);
// Call the solve method
rpcSolver->solveCoefficients(sensorPoints, geoPoints);
...
...
@@ -355,14 +352,11 @@ GCPsToRPCSensorModelImageFilter<TImage>
rpcModel->saveState(geom_kwl);
// Compute projection
ossimRefPtr<ossi
mRpcProjection
> objp
= dynamic_cast<ossimRpcProjection*>(
m
_
RpcProjection = dynamic_cast<ossimRpcProjection*>(
rpcSolver->createRpcProjection()->getProjection());
ossimKeywordlist kwl;
objp->saveState(kwl);
m_RpcProjection->loadState(kwl);
m_Projection = m_RpcProjection.get();
// Compute errors
m_RpcProjection->saveState(kwl);
// Compute errors
this->ComputeErrors();
// Build an otb::ImageKeywordList
...
...
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