OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ossimEckert6Projection Class Reference

#include <ossimEckert6Projection.h>

Inheritance diagram for ossimEckert6Projection:
ossimMapProjection ossimProjection ossimObject ossimErrorStatusInterface ossimReferenced

Public Member Functions

 ossimEckert6Projection (const ossimEllipsoid &ellipsoid=ossimEllipsoid(), const ossimGpt &origin=ossimGpt())
 
 ossimEckert6Projection (const ossimEllipsoid &ellipsoid, const ossimGpt &origin, double falseEasting, double falseNorthing)
 
 ~ossimEckert6Projection ()
 
virtual ossimObjectdup () const
 
virtual ossimGpt inverse (const ossimDpt &eastingNorthing) const
 Will take a point in meters and convert it to ground. More...
 
virtual ossimDpt forward (const ossimGpt &latLon) const
 All map projections will convert the world coordinate to an easting northing (Meters). More...
 
virtual void update ()
 
void setFalseEasting (double falseEasting)
 
void setFalseNorthing (double falseNorthing)
 
void setFalseEastingNorthing (double falseEasting, double falseNorthing)
 
double getFalseEasting () const
 
double getFalseNorthing () const
 
void setDefaults ()
 
void setCentralMeridian (double centralMeridian)
 
virtual bool saveState (ossimKeywordlist &kwl, const char *prefix=0) const
 
virtual bool loadState (const ossimKeywordlist &kwl, const char *prefix=0)
 
- Public Member Functions inherited from ossimMapProjection
 ossimMapProjection (const ossimEllipsoid &ellipsoid=ossimEllipsoid(), const ossimGpt &origin=ossimGpt())
 
 ossimMapProjection (const ossimMapProjection &src)
 
virtual ossimGpt origin () const
 
virtual ossimDpt worldToLineSample (const ossimGpt &worldPoint) const
 
virtual void worldToLineSample (const ossimGpt &worldPoint, ossimDpt &lineSample) const
 
virtual ossimGpt lineSampleToWorld (const ossimDpt &projectedPoint) const
 
virtual void lineSampleToWorld (const ossimDpt &projectedPoint, ossimGpt &gpt) const
 
virtual void lineSampleHeightToWorld (const ossimDpt &lineSampPt, const double &heightAboveEllipsoid, ossimGpt &worldPt) const
 This is the pure virtual that projects the image point to the given elevation above ellipsoid, thereby bypassing reference to a DEM. More...
 
virtual void lineSampleToEastingNorthing (const ossimDpt &liineSample, ossimDpt &eastingNorthing) const
 
virtual void eastingNorthingToLineSample (const ossimDpt &eastingNorthing, ossimDpt &lineSample) const
 
virtual void eastingNorthingToWorld (const ossimDpt &eastingNorthing, ossimGpt &worldPt) const
 
virtual double getStandardParallel1 () const
 Derived classes should implement as needed. More...
 
virtual double getStandardParallel2 () const
 Derived classes should implement as needed. More...
 
virtual void setPcsCode (ossim_uint32 pcsCode)
 
virtual ossim_uint32 getPcsCode () const
 Returns the EPSG PCS code or 32767 if the projection is a custom (non-EPSG) projection. More...
 
virtual ossimString getProjectionName () const
 Returns the projection name. More...
 
virtual double getA () const
 ACCESS METHODS: More...
 
virtual double getB () const
 
virtual double getF () const
 
virtual ossimDpt getMetersPerPixel () const
 
virtual const ossimDptgetDecimalDegreesPerPixel () const
 Returns decimal degrees per pixel as an ossimDpt with "x" representing longitude and "y" representing latitude. More...
 
virtual const ossimDptgetUlEastingNorthing () const
 
virtual const ossimGptgetUlGpt () const
 
virtual const ossimDatumgetDatum () const
 
const ossimEllipsoidgetEllipsoid () const
 
const ossimGptgetOrigin () const
 
virtual bool isGeographic () const
 
virtual void applyScale (const ossimDpt &scale, bool recenterTiePoint)
 Applies scale to theDeltaLonPerPixel, theDeltaLatPerPixel and theMetersPerPixel data members (eg: theDeltaLonPerPixel *= scale.x). More...
 
virtual void setEllipsoid (const ossimEllipsoid &ellipsoid)
 SET METHODS: More...
 
virtual void setAB (double a, double b)
 
virtual void setDatum (const ossimDatum *datum)
 Sets theDatum to datum. More...
 
virtual void setOrigin (const ossimGpt &origin)
 Sets theOrigin to origin. More...
 
virtual void setMetersPerPixel (const ossimDpt &gsd)
 
virtual void setDecimalDegreesPerPixel (const ossimDpt &gsd)
 
virtual void setUlTiePoints (const ossimGpt &gpt)
 
virtual void setUlTiePoints (const ossimDpt &eastingNorthing)
 
virtual void setUlEastingNorthing (const ossimDpt &ulEastingNorthing)
 
virtual void setUlGpt (const ossimGpt &ulGpt)
 
virtual void assign (const ossimProjection &aProjection)
 
virtual std::ostream & print (std::ostream &out) const
 Prints data members to stream. More...
 
virtual bool operator== (const ossimProjection &projection) const
 Compares this to arg projection and returns TRUE if the same. More...
 
virtual void computeDegreesPerPixel ()
 Computes the approximate resolution in degrees/pixel. More...
 
virtual void computeMetersPerPixel ()
 This will go from the ground point and give you an approximate meters per pixel. More...
 
void setMatrix (double rotation, const ossimDpt &scale, const ossimDpt &translation)
 
void setMatrixScale (const ossimDpt &scale)
 
void setMatrixRotation (double rotation)
 
void setMatrixTranslation (const ossimDpt &translation)
 
void snapTiePointTo (ossim_float64 multiple, ossimUnitType unitType)
 Utility method to snap the tie point to some multiple. More...
 
void snapTiePointToOrigin ()
 
void setElevationLookupFlag (bool flag)
 
bool getElevationLookupFlag () const
 
ossimUnitType getModelTransformUnitType () const
 
void setModelTransformUnitType (ossimUnitType unit)
 
bool hasModelTransform () const
 
virtual bool isAffectedByElevation () const
 Implementation of pure virtual ossimProjection::isAffectedByElevation method. More...
 
void setProjectionUnits (ossimUnitType units)
 
ossimUnitType getProjectionUnits () const
 OSSIM considers all map projection coordinates (including false eastings and northings) to be in meters. More...
 
virtual bool isEqualTo (const ossimObject &obj, ossimCompareType compareType=OSSIM_COMPARE_FULL) const
 
- Public Member Functions inherited from ossimProjection
 ossimProjection ()
 
virtual ~ossimProjection ()
 
virtual void getRoundTripError (const ossimDpt &imagePoint, ossimDpt &errorResult) const
 
virtual void getRoundTripError (const ossimGpt &groundPoint, ossimDpt &errorResult) const
 
virtual void getGroundClipPoints (ossimGeoPolygon &gpts) const
 
virtual bool operator!= (const ossimProjection &projection) const
 
- Public Member Functions inherited from ossimObject
 ossimObject ()
 
virtual ~ossimObject ()
 
virtual ossimString getShortName () const
 
virtual ossimString getLongName () const
 
virtual ossimString getDescription () const
 
virtual ossimString getClassName () const
 
virtual RTTItypeid getType () const
 
virtual bool canCastTo (ossimObject *obj) const
 
virtual bool canCastTo (const RTTItypeid &id) const
 
virtual bool canCastTo (const ossimString &parentClassName) const
 
virtual void accept (ossimVisitor &visitor)
 
- Public Member Functions inherited from ossimReferenced
 ossimReferenced ()
 
 ossimReferenced (const ossimReferenced &)
 
ossimReferencedoperator= (const ossimReferenced &)
 
void ref () const
 increment the reference count by one, indicating that this object has another pointer which is referencing it. More...
 
void unref () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
void unref_nodelete () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
int referenceCount () const
 
- Public Member Functions inherited from ossimErrorStatusInterface
 ossimErrorStatusInterface ()
 
virtual ~ossimErrorStatusInterface ()
 
virtual ossimErrorCode getErrorStatus () const
 
virtual ossimString getErrorStatusString () const
 
virtual void setErrorStatus (ossimErrorCode error_status) const
 
virtual void setErrorStatus () const
 
virtual void clearErrorStatus () const
 
bool hasError () const
 

Private Member Functions

long Set_Eckert6_Parameters (double a, double f, double Central_Meridian, double False_Easting, double False_Northing)
 
void Get_Eckert6_Parameters (double *a, double *f, double *Central_Meridian, double *False_Easting, double *False_Northing) const
 
long Convert_Geodetic_To_Eckert6 (double Latitude, double Longitude, double *Easting, double *Northing) const
 
long Convert_Eckert6_To_Geodetic (double Easting, double Northing, double *Latitude, double *Longitude) const
 

Private Attributes

double Eck6_a
 
double Eck6_f
 
double es2
 
double es4
 
double es6
 
double Ra_Over_Sqrt_Two_Plus_PI
 
double Inv_Ra_Over_Sqrt_Two_Plus_PI
 
double Eck6_Origin_Long
 
double Eck6_False_Easting
 
double Eck6_False_Northing
 
double Eck6_Delta_Northing
 
double Eck6_Max_Easting
 
double Eck6_Min_Easting
 

Additional Inherited Members

- Protected Member Functions inherited from ossimMapProjection
virtual ~ossimMapProjection ()
 
void updateFromTransform ()
 
- Protected Member Functions inherited from ossimReferenced
virtual ~ossimReferenced ()
 
- Protected Attributes inherited from ossimMapProjection
ossimEllipsoid theEllipsoid
 This method verifies that the projection parameters match the current pcs code. More...
 
ossimGpt theOrigin
 
const ossimDatumtheDatum
 This is only set if we want to have built in datum shifting. More...
 
ossimDpt theMetersPerPixel
 Holds the number of meters per pixel. More...
 
ossimDpt theDegreesPerPixel
 Hold the decimal degrees per pixel. More...
 
ossimGpt theUlGpt
 Hold tie point in decimal degrees. More...
 
ossimDpt theUlEastingNorthing
 Hold tie point as easting northing. More...
 
ossimDpt theFalseEastingNorthing
 Hold the false easting northing. More...
 
ossim_uint32 thePcsCode
 Projection Coordinate System(PCS) code. More...
 
bool theElevationLookupFlag
 
ossimMatrix4x4 theModelTransform
 
ossimMatrix4x4 theInverseModelTransform
 
ossimUnitType theModelTransformUnitType
 
ossimUnitType theProjectionUnits
 Linear units of the projection as indicated in the projection's specification: More...
 
- Protected Attributes inherited from ossimErrorStatusInterface
ossimErrorCode theErrorStatus
 

Detailed Description

Definition at line 18 of file ossimEckert6Projection.h.

Constructor & Destructor Documentation

◆ ossimEckert6Projection() [1/2]

ossimEckert6Projection::ossimEckert6Projection ( const ossimEllipsoid ellipsoid = ossimEllipsoid(),
const ossimGpt origin = ossimGpt() 
)

Definition at line 50 of file ossimEckert6Projection.cpp.

References setDefaults().

52  :ossimMapProjection(ellipsoid, origin)
53 {
54  setDefaults();
55 }
virtual ossimGpt origin() const
ossimMapProjection(const ossimEllipsoid &ellipsoid=ossimEllipsoid(), const ossimGpt &origin=ossimGpt())

◆ ossimEckert6Projection() [2/2]

ossimEckert6Projection::ossimEckert6Projection ( const ossimEllipsoid ellipsoid,
const ossimGpt origin,
double  falseEasting,
double  falseNorthing 
)

Definition at line 57 of file ossimEckert6Projection.cpp.

References Eck6_Delta_Northing, Eck6_False_Easting, Eck6_False_Northing, Eck6_Max_Easting, Eck6_Min_Easting, and update().

61  :ossimMapProjection(ellipsoid, origin)
62 {
63  Eck6_False_Easting = falseEasting;
64  Eck6_False_Northing = falseNorthing;
65  Eck6_Delta_Northing = 8451144.0;
66  Eck6_Max_Easting = 16902288.0;
67  Eck6_Min_Easting = -16902288.0;
68 
69  update();
70 }
virtual ossimGpt origin() const
ossimMapProjection(const ossimEllipsoid &ellipsoid=ossimEllipsoid(), const ossimGpt &origin=ossimGpt())

◆ ~ossimEckert6Projection()

ossimEckert6Projection::~ossimEckert6Projection ( )
inline

Definition at line 27 of file ossimEckert6Projection.h.

27 {}

Member Function Documentation

◆ Convert_Eckert6_To_Geodetic()

long ossimEckert6Projection::Convert_Eckert6_To_Geodetic ( double  Easting,
double  Northing,
double *  Latitude,
double *  Longitude 
) const
private

The function Convert_Eckert6_To_Geodetic converts Eckert VI projection easting and northing coordinates to geodetic (latitude and longitude) coordinates, according to the current ellipsoid and Eckert VI projection coordinates. If any errors occur, the error code(s) are returned by the function, otherwise ECK6_NO_ERROR is returned.

Easting : Easting (X) in meters (input) Northing : Northing (Y) in meters (input) Latitude : Latitude (phi) in radians (output) Longitude : Longitude (lambda) in radians (output)

Definition at line 357 of file ossimEckert6Projection.cpp.

References Eck6_False_Easting, Eck6_False_Northing, ECK6_NO_ERROR, Eck6_Origin_Long, Inv_Ra_Over_Sqrt_Two_Plus_PI, MAX_LAT, and one_PLUS_PI_OVER_2.

Referenced by inverse().

361 { /* Begin Convert_Eckert6_To_Geodetic */
362 /*
363  * The function Convert_Eckert6_To_Geodetic converts Eckert VI projection
364  * (easting and northing) coordinates to geodetic (latitude and longitude)
365  * coordinates, according to the current ellipsoid and Eckert VI projection
366  * coordinates. If any errors occur, the error code(s) are returned by the
367  * function, otherwise ECK6_NO_ERROR is returned.
368  *
369  * Easting : Easting (X) in meters (input)
370  * Northing : Northing (Y) in meters (input)
371  * Latitude : Latitude (phi) in radians (output)
372  * Longitude : Longitude (lambda) in radians (output)
373  */
374 
375  double dx, dy;
376  double theta;
377  double i;
378 
379  long Error_Code = ECK6_NO_ERROR;
380 
381 // if ((Easting < (Eck6_False_Easting + Eck6_Min_Easting))
382 // || (Easting > (Eck6_False_Easting + Eck6_Max_Easting)))
383 // { /* Easting out of range */
384 // Error_Code |= ECK6_EASTING_ERROR;
385 // }
386 // if ((Northing < (Eck6_False_Northing - Eck6_Delta_Northing))
387 // || (Northing > (Eck6_False_Northing + Eck6_Delta_Northing)))
388 // { /* Northing out of range */
389 // Error_Code |= ECK6_NORTHING_ERROR;
390 // }
391 
392  if (!Error_Code)
393  {
394  dy = Northing - Eck6_False_Northing;
395  dx = Easting - Eck6_False_Easting;
396  theta = Inv_Ra_Over_Sqrt_Two_Plus_PI * dy / 2.0;
397  i = (theta + sin(theta)) / one_PLUS_PI_OVER_2;
398  if (i > 1.0)
399  *Latitude = MAX_LAT;
400  else if (i < -1.0)
401  *Latitude = -MAX_LAT;
402  else
403  *Latitude = asin(i);
404  *Longitude = Eck6_Origin_Long + Inv_Ra_Over_Sqrt_Two_Plus_PI * dx / (1 + cos(theta));
405 
406 // if (*Latitude > PI_OVER_2) /* force distorted values to 90, -90 degrees */
407 // *Latitude = PI_OVER_2;
408 // else if (*Latitude < -PI_OVER_2)
409 // *Latitude = -PI_OVER_2;
410 
411 // if (*Longitude > PI)
412 // *Longitude -= TWO_PI;
413 // if (*Longitude < -PI)
414 // *Longitude += TWO_PI;
415 
416 // if (*Longitude > PI) /* force distorted values to 180, -180 degrees */
417 // *Longitude = PI;
418 // else if (*Longitude < -PI)
419 // *Longitude = -PI;
420 
421  }
422  return (Error_Code);
423 
424 } /* End Convert_Eckert6_To_Geodetic */
#define MAX_LAT
#define ECK6_NO_ERROR
const double one_PLUS_PI_OVER_2

◆ Convert_Geodetic_To_Eckert6()

long ossimEckert6Projection::Convert_Geodetic_To_Eckert6 ( double  Latitude,
double  Longitude,
double *  Easting,
double *  Northing 
) const
private

The function Convert_Geodetic_To_Eckert6 converts geodetic (latitude and longitude) coordinates to Eckert VI projection easting, and northing coordinates, according to the current ellipsoid and Eckert VI projection parameters. If any errors occur, the error code(s) are returned by the function, otherwise ECK6_NO_ERROR is returned.

Latitude : Latitude (phi) in radians (input) Longitude : Longitude (lambda) in radians (input) Easting : Easting (X) in meters (output) Northing : Northing (Y) in meters (output)

Definition at line 293 of file ossimEckert6Projection.cpp.

References Eck6_False_Easting, Eck6_False_Northing, ECK6_NO_ERROR, Eck6_Origin_Long, one_PLUS_PI_OVER_2, and Ra_Over_Sqrt_Two_Plus_PI.

Referenced by forward().

298 { /* Begin Convert_Geodetic_To_Eckert6 */
299 /*
300  * The function Convert_Geodetic_To_Eckert6 converts geodetic (latitude and
301  * longitude) coordinates to Eckert VI projection (easting and northing)
302  * coordinates, according to the current ellipsoid and Eckert VI projection
303  * parameters. If any errors occur, the error code(s) are returned by the
304  * function, otherwise ECK6_NO_ERROR is returned.
305  *
306  * Latitude : Latitude (phi) in radians (input)
307  * Longitude : Longitude (lambda) in radians (input)
308  * Easting : Easting (X) in meters (output)
309  * Northing : Northing (Y) in meters (output)
310  */
311 
312  double slat = sin(Latitude);
313  double dlam; /* Longitude - Central Meridan */
314  double theta = Latitude;
315  double delta_theta = 1.0;
316  double dt_tolerance = 4.85e-10; /* approximately 1/1000th of
317  an arc second or 1/10th meter */
318  long Error_Code = ECK6_NO_ERROR;
319 
320 // if ((Latitude < -PI_OVER_2) || (Latitude > PI_OVER_2))
321 // { /* Latitude out of range */
322 // Error_Code |= ECK6_LAT_ERROR;
323 // }
324 // if ((Longitude < -PI) || (Longitude > TWO_PI))
325 // { /* Longitude out of range */
326 // Error_Code|= ECK6_LON_ERROR;
327 // }
328 
329  if (!Error_Code)
330  { /* no errors */
331 
332  dlam = Longitude - Eck6_Origin_Long;
333 // if (dlam > PI)
334 // {
335 // dlam -= TWO_PI;
336 // }
337 // if (dlam < -PI)
338 // {
339 // dlam += TWO_PI;
340 // }
341  while (fabs(delta_theta) > dt_tolerance)
342  {
343  delta_theta = -(theta + sin(theta) - one_PLUS_PI_OVER_2 *
344  slat) / (1.0 + cos(theta));
345  theta += delta_theta;
346  }
347  *Easting = Ra_Over_Sqrt_Two_Plus_PI * dlam * (1.0 + cos(theta)) +
349  *Northing = 2.0 * Ra_Over_Sqrt_Two_Plus_PI * theta + Eck6_False_Northing;
350 
351  }
352  return (Error_Code);
353 
354 } /* End Convert_Geodetic_To_Eckert6 */
#define ECK6_NO_ERROR
const double one_PLUS_PI_OVER_2

◆ dup()

virtual ossimObject* ossimEckert6Projection::dup ( ) const
inlinevirtual

Implements ossimProjection.

Definition at line 28 of file ossimEckert6Projection.h.

28 {return new ossimEckert6Projection(*this);}
ossimEckert6Projection(const ossimEllipsoid &ellipsoid=ossimEllipsoid(), const ossimGpt &origin=ossimGpt())

◆ forward()

ossimDpt ossimEckert6Projection::forward ( const ossimGpt worldPoint) const
virtual

All map projections will convert the world coordinate to an easting northing (Meters).

Implements ossimMapProjection.

Definition at line 99 of file ossimEckert6Projection.cpp.

References ossimGpt::changeDatum(), ossimDatum::code(), Convert_Geodetic_To_Eckert6(), ossimGpt::datum(), ossimGpt::latr(), ossimGpt::lonr(), and ossimMapProjection::theDatum.

100 {
101  double easting = 0.0;
102  double northing = 0.0;
103  ossimGpt gpt = latLon;
104 
105  if (theDatum)
106  {
107  if (theDatum->code() != latLon.datum()->code())
108  {
109  gpt.changeDatum(theDatum); // Shift to our datum.
110  }
111  }
112 
114  gpt.lonr(),
115  &easting,
116  &northing);
117 
118  return ossimDpt(easting, northing);
119 }
virtual const ossimString & code() const
Definition: ossimDatum.h:57
long Convert_Geodetic_To_Eckert6(double Latitude, double Longitude, double *Easting, double *Northing) const
void changeDatum(const ossimDatum *datum)
This will actually perform a shift.
Definition: ossimGpt.cpp:316
double lonr() const
Returns the longitude in radian measure.
Definition: ossimGpt.h:76
double latr() const
latr().
Definition: ossimGpt.h:66
const ossimDatum * theDatum
This is only set if we want to have built in datum shifting.

◆ Get_Eckert6_Parameters()

void ossimEckert6Projection::Get_Eckert6_Parameters ( double *  a,
double *  f,
double *  Central_Meridian,
double *  False_Easting,
double *  False_Northing 
) const
private

The function Get_Eckert6_Parameters returns the current ellipsoid parameters and Eckert VI projection parameters.

a : Semi-major axis of ellipsoid, in meters (output) f : Flattening of ellipsoid (output) Central_Meridian : Longitude in radians at the center of (output) the projection False_Easting : A coordinate value in meters assigned to the central meridian of the projection. (output) False_Northing : A coordinate value in meters assigned to the origin latitude of the projection (output)

Definition at line 263 of file ossimEckert6Projection.cpp.

References Eck6_a, Eck6_f, Eck6_False_Easting, Eck6_False_Northing, and Eck6_Origin_Long.

268 { /* Begin Get_Eckert6_Parameters */
269 /*
270  * The function Get_Eckert6_Parameters returns the current ellipsoid
271  * parameters and Eckert VI projection parameters.
272  *
273  * a : Semi-major axis of ellipsoid, in meters (output)
274  * f : Flattening of ellipsoid (output)
275  * Central_Meridian : Longitude in radians at the center of (output)
276  * the projection
277  * False_Easting : A coordinate value in meters assigned to the
278  * central meridian of the projection. (output)
279  * False_Northing : A coordinate value in meters assigned to the
280  * origin latitude of the projection (output)
281  */
282 
283  *a = Eck6_a;
284  *f = Eck6_f;
285  *Central_Meridian = Eck6_Origin_Long;
286  *False_Easting = Eck6_False_Easting;
287  *False_Northing = Eck6_False_Northing;
288 
289  return;
290 } /* End Get_Eckert6_Parameters */

◆ getFalseEasting()

double ossimEckert6Projection::getFalseEasting ( ) const
inlinevirtual
Returns
The false easting.

Reimplemented from ossimMapProjection.

Definition at line 53 of file ossimEckert6Projection.h.

◆ getFalseNorthing()

double ossimEckert6Projection::getFalseNorthing ( ) const
inlinevirtual
Returns
The false northing.

Reimplemented from ossimMapProjection.

Definition at line 54 of file ossimEckert6Projection.h.

◆ inverse()

ossimGpt ossimEckert6Projection::inverse ( const ossimDpt projectedPoint) const
virtual

Will take a point in meters and convert it to ground.

Implements ossimMapProjection.

Definition at line 86 of file ossimEckert6Projection.cpp.

References Convert_Eckert6_To_Geodetic(), DEG_PER_RAD, ossimMapProjection::theDatum, ossimDpt::x, and ossimDpt::y.

87 {
88  double lat = 0.0;
89  double lon = 0.0;
90 
91  Convert_Eckert6_To_Geodetic(eastingNorthing.x,
92  eastingNorthing.y,
93  &lat,
94  &lon);
95 
96  return ossimGpt(lat*DEG_PER_RAD, lon*DEG_PER_RAD, 0.0, theDatum);
97 }
long Convert_Eckert6_To_Geodetic(double Easting, double Northing, double *Latitude, double *Longitude) const
#define DEG_PER_RAD
const ossimDatum * theDatum
This is only set if we want to have built in datum shifting.

◆ loadState()

bool ossimEckert6Projection::loadState ( const ossimKeywordlist kwl,
const char *  prefix = 0 
)
virtual

Method to the load (recreate) the state of an object from a keyword list. Return true if ok or false on error.

Reimplemented from ossimMapProjection.

Definition at line 163 of file ossimEckert6Projection.cpp.

References Eck6_False_Easting, Eck6_False_Northing, ossimKeywordlist::find(), ossimMapProjection::loadState(), setDefaults(), STATIC_TYPE_NAME, ossimMapProjection::theFalseEastingNorthing, ossimKeywordNames::TYPE_KW, update(), ossimDpt::x, and ossimDpt::y.

164 {
165  bool flag = ossimMapProjection::loadState(kwl, prefix);
166 
167  const char* type = kwl.find(prefix, ossimKeywordNames::TYPE_KW);
168 
169  setDefaults();
170 
172  {
175  }
176 
177  update();
178 
179  return flag;
180 }
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of an object from a keyword list.
const char * find(const char *key) const
double y
Definition: ossimDpt.h:165
static const char * TYPE_KW
#define STATIC_TYPE_NAME(T)
Definition: ossimRtti.h:325
double x
Definition: ossimDpt.h:164
ossimDpt theFalseEastingNorthing
Hold the false easting northing.

◆ saveState()

bool ossimEckert6Projection::saveState ( ossimKeywordlist kwl,
const char *  prefix = 0 
) const
virtual

Method to save the state of an object to a keyword list. Return true if ok or false on error.

Reimplemented from ossimMapProjection.

Definition at line 158 of file ossimEckert6Projection.cpp.

References ossimMapProjection::saveState().

159 {
160  return ossimMapProjection::saveState(kwl, prefix);
161 }
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.

◆ Set_Eckert6_Parameters()

long ossimEckert6Projection::Set_Eckert6_Parameters ( double  a,
double  f,
double  Central_Meridian,
double  False_Easting,
double  False_Northing 
)
private

The function Set_Eckert6_Parameters receives the ellipsoid parameters and Eckert VI projection parameters as inputs, and sets the corresponding state variables. If any errors occur, the error code(s) are returned by the function, otherwise ECK6_NO_ERROR is returned.

a : Semi-major axis of ellipsoid, in meters (input) f : Flattening of ellipsoid (input) Central_Meridian : Longitude in radians at the center of (input) the projection False_Easting : A coordinate value in meters assigned to the central meridian of the projection. (input) False_Northing : A coordinate value in meters assigned to the origin latitude of the projection (input)

Definition at line 188 of file ossimEckert6Projection.cpp.

References Eck6_a, Eck6_f, Eck6_False_Easting, Eck6_False_Northing, Eck6_Max_Easting, Eck6_Min_Easting, ECK6_NO_ERROR, Eck6_Origin_Long, es2, es4, es6, Inv_Ra_Over_Sqrt_Two_Plus_PI, M_PI, and Ra_Over_Sqrt_Two_Plus_PI.

Referenced by update().

193 { /* Begin Set_Eckert6_Parameters */
194 /*
195  * The function Set_Eckert6_Parameters receives the ellipsoid parameters and
196  * Eckert VI projection parameters as inputs, and sets the corresponding state
197  * variables. If any errors occur, the error code(s) are returned by the
198  * function, otherwise ECK6_NO_ERROR is returned.
199  *
200  * a : Semi-major axis of ellipsoid, in meters (input)
201  * f : Flattening of ellipsoid (input)
202  * Central_Meridian : Longitude in radians at the center of (input)
203  * the projection
204  * False_Easting : A coordinate value in meters assigned to the
205  * central meridian of the projection. (input)
206  * False_Northing : A coordinate value in meters assigned to the
207  * origin latitude of the projection (input)
208  */
209 
210  double Ra; /* Spherical radius */
211 // double inv_f = 1 / f;
212  long Error_Code = ECK6_NO_ERROR;
213 
214 // if (a <= 0.0)
215 // { /* Semi-major axis must be greater than zero */
216 // Error_Code |= ECK6_A_ERROR;
217 // }
218 // if ((inv_f < 250) || (inv_f > 350))
219 // { /* Inverse flattening must be between 250 and 350 */
220 // Error_Code |= ECK6_INV_F_ERROR;
221 // }
222 // if ((Central_Meridian < -PI) || (Central_Meridian > TWO_PI))
223 // { /* origin longitude out of range */
224 // Error_Code |= ECK6_CENT_MER_ERROR;
225 // }
226  if (!Error_Code)
227  { /* no errors */
228  Eck6_a = a;
229  Eck6_f = f;
230  es2 = 2 * Eck6_f - Eck6_f * Eck6_f;
231  es4 = es2 * es2;
232  es6 = es4 * es2;
233  /* spherical radius */
234  Ra = Eck6_a * (1.0 - es2 / 6.0 - 17.0 * es4 / 360.0 - 67.0 * es6 /3024.0);
235  Ra_Over_Sqrt_Two_Plus_PI = Ra / (sqrt(2.0 + M_PI));
237 // if (Central_Meridian > PI)
238 // Central_Meridian -= TWO_PI;
239  Eck6_Origin_Long = Central_Meridian;
240  Eck6_False_Easting = False_Easting;
241  Eck6_False_Northing = False_Northing;
242  if (Eck6_Origin_Long > 0)
243  {
244  Eck6_Max_Easting = 17555761.0;
245  Eck6_Min_Easting = -17653839.0;
246  }
247  else if (Eck6_Origin_Long < 0)
248  {
249  Eck6_Max_Easting = 17653838.0;
250  Eck6_Min_Easting = -17555761.0;
251  }
252  else
253  {
254  Eck6_Max_Easting = 17653838.0;
255  Eck6_Min_Easting = -17653838.0;
256  }
257 
258  } /* End if(!Error_Code) */
259  return (Error_Code);
260 } /* End Set_Eckert6_Parameters */
#define M_PI
#define ECK6_NO_ERROR

◆ setCentralMeridian()

void ossimEckert6Projection::setCentralMeridian ( double  centralMeridian)

Definition at line 152 of file ossimEckert6Projection.cpp.

References Eck6_Origin_Long, and update().

153 {
154  Eck6_Origin_Long = centralMeridian;
155  update();
156 }

◆ setDefaults()

void ossimEckert6Projection::setDefaults ( )

Initialize all pramters to default and calls update for pre-computations.

Definition at line 141 of file ossimEckert6Projection.cpp.

References Eck6_Delta_Northing, Eck6_False_Easting, Eck6_False_Northing, Eck6_Max_Easting, Eck6_Min_Easting, and update().

Referenced by loadState(), and ossimEckert6Projection().

142 {
143  Eck6_Delta_Northing = 8451144.0;
144  Eck6_Max_Easting = 16902288.0;
145  Eck6_Min_Easting = -16902288.0;
146  Eck6_False_Easting = 0.0;
147  Eck6_False_Northing = 0.0;
148 
149  update();
150 }

◆ setFalseEasting()

void ossimEckert6Projection::setFalseEasting ( double  falseEasting)

SetFalseEasting. The value is in meters. Update is then called so we can pre-compute paramters

Definition at line 121 of file ossimEckert6Projection.cpp.

References Eck6_False_Easting, and update().

122 {
123  Eck6_False_Easting = falseEasting;
124  update();
125 }

◆ setFalseEastingNorthing()

void ossimEckert6Projection::setFalseEastingNorthing ( double  falseEasting,
double  falseNorthing 
)

Sets both false easting and northing values. The values are expected to be in meters. Update is then called so we can pre-compute paramters

Definition at line 133 of file ossimEckert6Projection.cpp.

References Eck6_False_Easting, Eck6_False_Northing, and update().

135 {
136  Eck6_False_Easting = falseEasting;
137  Eck6_False_Northing = falseNorthing;
138  update();
139 }

◆ setFalseNorthing()

void ossimEckert6Projection::setFalseNorthing ( double  falseNorthing)

SetFalseNorthing. The value is in meters. Update is then called so we can pre-compute paramters

Definition at line 127 of file ossimEckert6Projection.cpp.

References Eck6_False_Northing, and update().

128 {
129  Eck6_False_Northing = falseNorthing;
130  update();
131 }

◆ update()

void ossimEckert6Projection::update ( )
virtual

Reimplemented from ossimMapProjection.

Definition at line 72 of file ossimEckert6Projection.cpp.

References Eck6_False_Easting, Eck6_False_Northing, ossimEllipsoid::getA(), ossimEllipsoid::getFlattening(), ossimGpt::lonr(), Set_Eckert6_Parameters(), ossimMapProjection::theEllipsoid, ossimMapProjection::theFalseEastingNorthing, ossimMapProjection::theOrigin, ossimMapProjection::update(), ossimDpt::x, and ossimDpt::y.

Referenced by loadState(), ossimEckert6Projection(), setCentralMeridian(), setDefaults(), setFalseEasting(), setFalseEastingNorthing(), and setFalseNorthing().

73 {
76  theOrigin.lonr(),
79 
82 
84 }
long Set_Eckert6_Parameters(double a, double f, double Central_Meridian, double False_Easting, double False_Northing)
double y
Definition: ossimDpt.h:165
const double & getA() const
double lonr() const
Returns the longitude in radian measure.
Definition: ossimGpt.h:76
double x
Definition: ossimDpt.h:164
const double & getFlattening() const
ossimEllipsoid theEllipsoid
This method verifies that the projection parameters match the current pcs code.
ossimDpt theFalseEastingNorthing
Hold the false easting northing.

Member Data Documentation

◆ Eck6_a

double ossimEckert6Projection::Eck6_a
mutableprivate

Definition at line 82 of file ossimEckert6Projection.h.

Referenced by Get_Eckert6_Parameters(), and Set_Eckert6_Parameters().

◆ Eck6_Delta_Northing

double ossimEckert6Projection::Eck6_Delta_Northing
mutableprivate

Definition at line 95 of file ossimEckert6Projection.h.

Referenced by ossimEckert6Projection(), and setDefaults().

◆ Eck6_f

double ossimEckert6Projection::Eck6_f
mutableprivate

Definition at line 83 of file ossimEckert6Projection.h.

Referenced by Get_Eckert6_Parameters(), and Set_Eckert6_Parameters().

◆ Eck6_False_Easting

double ossimEckert6Projection::Eck6_False_Easting
mutableprivate

◆ Eck6_False_Northing

double ossimEckert6Projection::Eck6_False_Northing
mutableprivate

◆ Eck6_Max_Easting

double ossimEckert6Projection::Eck6_Max_Easting
mutableprivate

◆ Eck6_Min_Easting

double ossimEckert6Projection::Eck6_Min_Easting
mutableprivate

◆ Eck6_Origin_Long

double ossimEckert6Projection::Eck6_Origin_Long
mutableprivate

◆ es2

double ossimEckert6Projection::es2
mutableprivate

Definition at line 84 of file ossimEckert6Projection.h.

Referenced by Set_Eckert6_Parameters().

◆ es4

double ossimEckert6Projection::es4
mutableprivate

Definition at line 85 of file ossimEckert6Projection.h.

Referenced by Set_Eckert6_Parameters().

◆ es6

double ossimEckert6Projection::es6
mutableprivate

Definition at line 86 of file ossimEckert6Projection.h.

Referenced by Set_Eckert6_Parameters().

◆ Inv_Ra_Over_Sqrt_Two_Plus_PI

double ossimEckert6Projection::Inv_Ra_Over_Sqrt_Two_Plus_PI
mutableprivate

Definition at line 88 of file ossimEckert6Projection.h.

Referenced by Convert_Eckert6_To_Geodetic(), and Set_Eckert6_Parameters().

◆ Ra_Over_Sqrt_Two_Plus_PI

double ossimEckert6Projection::Ra_Over_Sqrt_Two_Plus_PI
mutableprivate

Definition at line 87 of file ossimEckert6Projection.h.

Referenced by Convert_Geodetic_To_Eckert6(), and Set_Eckert6_Parameters().


The documentation for this class was generated from the following files: