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
54139244
Commit
54139244
authored
17 years ago
by
Julien Michel
Browse files
Options
Downloads
Patches
Plain Diff
Correction warning de compilation enum.
parent
757a18ac
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Code/Projections/otbMapProjection.h
+2
-1
2 additions, 1 deletion
Code/Projections/otbMapProjection.h
Code/Projections/otbMapProjection.txx
+31
-25
31 additions, 25 deletions
Code/Projections/otbMapProjection.txx
with
33 additions
and
26 deletions
Code/Projections/otbMapProjection.h
+
2
−
1
View file @
54139244
...
@@ -75,8 +75,9 @@ itkNewMacro( Self );
...
@@ -75,8 +75,9 @@ itkNewMacro( Self );
/** Run-time type information (and related methods). */
/** Run-time type information (and related methods). */
itkTypeMacro
(
MapProjection
,
Transform
);
itkTypeMacro
(
MapProjection
,
Transform
);
typedef
InverseOrForwardTransformationEnum
DirectionOfMappingEnumType
;
itkStaticConstMacro
(
DirectionOfMapping
,
InverseOrForwardTransformationEnum
,
transform
);
itkStaticConstMacro
(
DirectionOfMapping
,
DirectionOfMappingEnumType
,
transform
);
itkStaticConstMacro
(
InputSpaceDimension
,
unsigned
int
,
NInputDimensions
);
itkStaticConstMacro
(
InputSpaceDimension
,
unsigned
int
,
NInputDimensions
);
itkStaticConstMacro
(
OutputSpaceDimension
,
unsigned
int
,
NOutputDimensions
);
itkStaticConstMacro
(
OutputSpaceDimension
,
unsigned
int
,
NOutputDimensions
);
itkStaticConstMacro
(
SpaceDimension
,
unsigned
int
,
NInputDimensions
);
itkStaticConstMacro
(
SpaceDimension
,
unsigned
int
,
NInputDimensions
);
...
...
This diff is collapsed.
Click to expand it.
Code/Projections/otbMapProjection.txx
+
31
−
25
View file @
54139244
...
@@ -136,34 +136,40 @@ MapProjection<TOssimMapProjection, TScalarType, NInputDimensions, NOutputDimensi
...
@@ -136,34 +136,40 @@ MapProjection<TOssimMapProjection, TScalarType, NInputDimensions, NOutputDimensi
{
{
OutputPointType outputPoint;
OutputPointType outputPoint;
if (DirectionOfMapping == INVERSE)
switch(DirectionOfMapping)
{
{
//On transforme le type "itk::point" en type "ossim::ossimDpt"
case INVERSE:
ossimDpt ossimDPoint(point[0], point[1]);
{
//On transforme le type "itk::point" en type "ossim::ossimDpt"
//On le projte sur la carte
ossimDpt ossimDPoint(point[0], point[1]);
ossimGpt ossimGPoint;
ossimGPoint=m_MapProjection->inverse(ossimDPoint);
//On le projte sur la carte
ossimGpt ossimGPoint;
outputPoint[0]=ossimGPoint.lat;
ossimGPoint=m_MapProjection->inverse(ossimDPoint);
outputPoint[1]=ossimGPoint.lon;
}
outputPoint[0]=ossimGPoint.lat;
else if (DirectionOfMapping == FORWARD)
outputPoint[1]=ossimGPoint.lon;
break;
}
case FORWARD:
{
{
//On transforme le type "itk::point" en type "ossim::ossimGpt"
//On transforme le type "itk::point" en type "ossim::ossimGpt"
ossimGpt ossimGPoint(point[0], point[1]);
ossimGpt ossimGPoint(point[0], point[1]);
//On le projte sur la carte
//On le projte sur la carte
ossimDpt ossimDPoint;
ossimDpt ossimDPoint;
ossimDPoint=m_MapProjection->forward(ossimGPoint);
ossimDPoint=m_MapProjection->forward(ossimGPoint);
outputPoint[0]=ossimDPoint.x;
outputPoint[0]=ossimDPoint.x;
outputPoint[1]=ossimDPoint.y;
outputPoint[1]=ossimDPoint.y;
break;
}
}
else
default:
{
{
itkExceptionMacro(<<"Model is INVERSE or FORWARD only !!");
itkExceptionMacro(<<"Model is INVERSE or FORWARD only !!");
}
break;
}
}
return outputPoint;
return outputPoint;
}
}
...
...
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