Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
otb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
273
Issues
273
List
Boards
Labels
Service Desk
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Main Repositories
otb
Commits
d909d88a
Commit
d909d88a
authored
Feb 27, 2008
by
Emmanuel Christophe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Corrections pour lambert + inversions lat/lon avec ossim
parent
5520ebd7
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
16 deletions
+19
-16
Code/Projections/otbLambertConformalConicMapProjection.h
Code/Projections/otbLambertConformalConicMapProjection.h
+2
-1
Code/Projections/otbMapProjection.h
Code/Projections/otbMapProjection.h
+1
-0
Code/Projections/otbMapProjection.txx
Code/Projections/otbMapProjection.txx
+12
-3
Code/Projections/otbTransMercatorMapProjection.h
Code/Projections/otbTransMercatorMapProjection.h
+0
-1
Code/Projections/otbTransMercatorMapProjection.txx
Code/Projections/otbTransMercatorMapProjection.txx
+4
-11
No files found.
Code/Projections/otbLambertConformalConicMapProjection.h
View file @
d909d88a
...
...
@@ -58,7 +58,8 @@ namespace otb
double
GetFalseEasting
()
const
;
void
SetParameters
(
double
parallel1Degree
,
double
parallel2Degree
,
double
falseEasting
,
double
falseNorthing
);
void
SetDefaults
();
protected:
LambertConformalConicMapProjection
();
virtual
~
LambertConformalConicMapProjection
();
...
...
Code/Projections/otbMapProjection.h
View file @
d909d88a
...
...
@@ -100,6 +100,7 @@ namespace otb
virtual
OutputPointType
GetDecimalDegreesPerPixel
()
const
;
virtual
void
SetAB
(
double
a
,
double
b
);
virtual
void
SetOrigin
(
const
InputPointType
&
origin
);
virtual
void
SetOrigin
(
const
InputPointType
&
origin
,
std
::
string
datumCode
);
virtual
void
SetMetersPerPixel
(
const
OutputPointType
&
point
);
virtual
void
SetDecimalDegreesPerPixel
(
const
OutputPointType
&
point
);
virtual
void
ComputeDegreesPerPixel
(
const
InputPointType
&
ground
,
const
OutputPointType
&
metersPerPixel
,
double
&
deltaLat
,
double
&
deltaLon
);
...
...
Code/Projections/otbMapProjection.txx
View file @
d909d88a
...
...
@@ -290,7 +290,16 @@ namespace otb
void MapProjection<TOssimMapProjection, Transform, TScalarType, NInputDimensions, NOutputDimensions>
::SetOrigin(const InputPointType &origin)
{
ossimGpt ossimOrigin(origin[0], origin[1]);
ossimGpt ossimOrigin(origin[1], origin[0]);
m_MapProjection->setOrigin(ossimOrigin);
}
///Set the origin in a given datum
template<class TOssimMapProjection, InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
void MapProjection<TOssimMapProjection, Transform, TScalarType, NInputDimensions, NOutputDimensions>
::SetOrigin(const InputPointType &origin, std::string datumCode)
{
ossimGpt ossimOrigin(origin[1], origin[0], 0, ossimDatumFactory::instance()->create(datumCode));
m_MapProjection->setOrigin(ossimOrigin);
}
...
...
@@ -318,7 +327,7 @@ namespace otb
::ComputeDegreesPerPixel(const InputPointType &ground, const OutputPointType &metersPerPixel, double &deltaLat, double &deltaLon)
{
ossimDpt ossimMetersPerPixel(metersPerPixel[0], metersPerPixel[1]);
ossimGpt ossimGround(ground[
0],ground[1
]);
ossimGpt ossimGround(ground[
1],ground[0
]);
m_MapProjection->computeDegreesPerPixel(ossimGround,ossimMetersPerPixel,deltaLat,deltaLon);
}
...
...
@@ -329,7 +338,7 @@ namespace otb
::ComputeMetersPerPixel(const InputPointType ¢er, double deltaDegreesPerPixelLat, double deltaDegreesPerPixelLon, OutputPointType &metersPerPixel)
{
//Correction
ossimGpt ossimCenter(center[
0],center[1
]);
ossimGpt ossimCenter(center[
1],center[0
]);
ossimDpt ossimMetersPerPixel;
m_MapProjection->computeMetersPerPixel(ossimCenter,deltaDegreesPerPixelLat, deltaDegreesPerPixelLon,ossimMetersPerPixel);
metersPerPixel[0]=ossimMetersPerPixel.x;
...
...
Code/Projections/otbTransMercatorMapProjection.h
View file @
d909d88a
...
...
@@ -49,7 +49,6 @@ namespace otb
/** Run-time type information (and related methods). */
itkTypeMacro
(
TransMercatorMapProjection
,
MapProjection
);
virtual
void
SetEllipsoid
();
virtual
void
SetFalseEasting
(
double
falseEasting
);
virtual
void
SetFalseNorthing
(
double
falseNorthing
);
virtual
void
SetScaleFactor
(
double
scaleFactor
);
...
...
Code/Projections/otbTransMercatorMapProjection.txx
View file @
d909d88a
...
...
@@ -27,6 +27,10 @@ namespace otb
TransMercatorMapProjection<transform>
::TransMercatorMapProjection()
{
ossimEllipsoid ellipsoid= *(ossimEllipsoidFactory::instance()->create("WE"));
ossimGpt origin(49.83,6.16); //TODO check where this is coming from
this->m_MapProjection->setEllipsoid(ellipsoid);
this->m_MapProjection->setOrigin(origin);
}
/// Desctructor
...
...
@@ -36,17 +40,6 @@ namespace otb
{
}
///Set the default ellipsoid
template <InverseOrForwardTransformationEnum transform>
void TransMercatorMapProjection<transform>
::SetEllipsoid()
{
ossimEllipsoid ellipse(6378137.0,6356752.3142);
ossimGpt origin(49.83,6.16);
delete (this->m_MapProjection);
this->m_MapProjection = new ossimTransMercatorProjection(ellipse,origin,80000.0,100000.0,1.0);
}
///Set the false Easting
template <InverseOrForwardTransformationEnum transform>
...
...
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