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

#include <ossimEquDistCylProjection.h>

Inheritance diagram for ossimEquDistCylProjection:
ossimMapProjection ossimProjection ossimObject ossimErrorStatusInterface ossimReferenced

Public Member Functions

 ossimEquDistCylProjection (const ossimEllipsoid &ellipsoid=ossimEllipsoid(), const ossimGpt &origin=ossimGpt())
 
 ossimEquDistCylProjection (const ossimEllipsoid &ellipsoid, const ossimGpt &origin, double falseEasting, double falseNorthing)
 
 ossimEquDistCylProjection (const ossimEquDistCylProjection &rhs)
 
 ~ossimEquDistCylProjection ()
 
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 ()
 
virtual void setOrigin (const ossimGpt &origin)
 
void setFalseEasting (double falseEasting)
 
void setFalseNorthing (double falseNorthing)
 
void setFalseEastingNorthing (double falseEasting, double falseNorthing)
 
double getFalseEasting () const
 
double getFalseNorthing () 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 worldToLineSample (const ossimGpt &worldPoint, ossimDpt &lineSample) const
 
void worldToLineSample (const ossimGpt &worldPoint, const ossimIpt &imageSize, ossimDpt &lineSample) const
 Specialized worldToLineSample. More...
 
virtual bool isGeographic () const
 
void setDefaults ()
 
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 ossimGpt lineSampleToWorld (const ossimDpt &projectedPoint) const
 
virtual void lineSampleToWorld (const ossimDpt &projectedPoint, ossimGpt &gpt) const
 
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 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 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_Equidistant_Cyl_Parameters (double a, double f, double Std_Parallel, double Central_Meridian, double False_Easting, double False_Northing)
 
void Get_Equidistant_Cyl_Parameters (double *a, double *f, double *Std_Parallel, double *Central_Meridian, double *False_Easting, double *False_Northing) const
 
long Convert_Geodetic_To_Equidistant_Cyl (double Latitude, double Longitude, double *Easting, double *Northing) const
 
long Convert_Equidistant_Cyl_To_Geodetic (double Easting, double Northing, double *Latitude, double *Longitude) const
 

Private Attributes

double Eqcy_a
 
double Eqcy_f
 
double es2
 
double es4
 
double es6
 
double Ra
 
double Eqcy_Std_Parallel
 
double Cos_Eqcy_Std_Parallel
 
double Eqcy_Origin_Long
 
double Eqcy_False_Easting
 
double Eqcy_False_Northing
 
double Eqcy_Delta_Northing
 
double Eqcy_Max_Easting
 
double Eqcy_Min_Easting
 
double Ra_Cos_Eqcy_Std_Parallel
 

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 20 of file ossimEquDistCylProjection.h.

Constructor & Destructor Documentation

◆ ossimEquDistCylProjection() [1/3]

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

Definition at line 56 of file ossimEquDistCylProjection.cpp.

References setDefaults(), and update().

59  :ossimMapProjection(ellipsoid, origin)
60 {
61  setDefaults();
62  update();
63 }
virtual ossimGpt origin() const
ossimMapProjection(const ossimEllipsoid &ellipsoid=ossimEllipsoid(), const ossimGpt &origin=ossimGpt())

◆ ossimEquDistCylProjection() [2/3]

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

Definition at line 65 of file ossimEquDistCylProjection.cpp.

References Eqcy_Delta_Northing, Eqcy_False_Easting, Eqcy_False_Northing, Eqcy_Max_Easting, Eqcy_Min_Easting, and update().

70  :ossimMapProjection(ellipsoid, origin)
71 {
72  Eqcy_False_Easting = falseEasting;
73  Eqcy_False_Northing = falseNorthing;
74 
75  Eqcy_Delta_Northing = 10007555.0;
76  Eqcy_Max_Easting = 20015110.0;
77  Eqcy_Min_Easting = -20015110.0;
78 
79  update();
80 }
virtual ossimGpt origin() const
ossimMapProjection(const ossimEllipsoid &ellipsoid=ossimEllipsoid(), const ossimGpt &origin=ossimGpt())

◆ ossimEquDistCylProjection() [3/3]

ossimEquDistCylProjection::ossimEquDistCylProjection ( const ossimEquDistCylProjection rhs)
inline

Definition at line 30 of file ossimEquDistCylProjection.h.

31  :ossimMapProjection(rhs)
32  // :ossimLlxyProjection(rhs)
33  {
34  *this = rhs;
35  }
ossimMapProjection(const ossimEllipsoid &ellipsoid=ossimEllipsoid(), const ossimGpt &origin=ossimGpt())

◆ ~ossimEquDistCylProjection()

ossimEquDistCylProjection::~ossimEquDistCylProjection ( )
inline

Definition at line 37 of file ossimEquDistCylProjection.h.

37 {}

Member Function Documentation

◆ Convert_Equidistant_Cyl_To_Geodetic()

long ossimEquDistCylProjection::Convert_Equidistant_Cyl_To_Geodetic ( double  Easting,
double  Northing,
double *  Latitude,
double *  Longitude 
) const
private

The function Convert_Equidistant_Cyl_To_Geodetic converts Equidistant Cylindrical projection easting and northing coordinates to geodetic (latitude and longitude) coordinates, according to the current ellipsoid and Equidistant Cylindrical projection coordinates. If any errors occur, the error code(s) are returned by the function, otherwise EQCY_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 624 of file ossimEquDistCylProjection.cpp.

References Eqcy_False_Easting, Eqcy_False_Northing, EQCY_NO_ERROR, Eqcy_Origin_Long, Ra, and Ra_Cos_Eqcy_Std_Parallel.

Referenced by inverse().

628 { /* Begin Convert_Equidistant_Cyl_To_Geodetic */
629 /*
630  * The function Convert_Equidistant_Cyl_To_Geodetic converts Equidistant Cylindrical projection
631  * (easting and northing) coordinates to geodetic (latitude and longitude)
632  * coordinates, according to the current ellipsoid, spherical radius
633  * and Equidistant Cylindrical projection coordinates.
634  * If any errors occur, the error code(s) are returned by the
635  * function, otherwise EQCY_NO_ERROR is returned.
636  *
637  * Easting : Easting (X) in meters (input)
638  * Northing : Northing (Y) in meters (input)
639  * Latitude : Latitude (phi) in radians (output)
640  * Longitude : Longitude (lambda) in radians (output)
641  */
642 
643  double dx, dy;
644  long Error_Code = EQCY_NO_ERROR;
645 
646 // if ((Easting < (Eqcy_False_Easting + Eqcy_Min_Easting))
647 // || (Easting > (Eqcy_False_Easting + Eqcy_Max_Easting)))
648 // { /* Easting out of range */
649 // Error_Code |= EQCY_EASTING_ERROR;
650 // }
651 // if ((Northing < (Eqcy_False_Northing - Eqcy_Delta_Northing))
652 // || (Northing > (Eqcy_False_Northing + Eqcy_Delta_Northing)))
653 // { /* Northing out of range */
654 // Error_Code |= EQCY_NORTHING_ERROR;
655 // }
656 
657  if (!Error_Code)
658  {
659  dy = Northing - Eqcy_False_Northing;
660  dx = Easting - Eqcy_False_Easting;
661  *Latitude = dy / Ra;
662 
663  if (Ra_Cos_Eqcy_Std_Parallel == 0)
664  *Longitude = 0;
665  else
666  *Longitude = Eqcy_Origin_Long + dx / Ra_Cos_Eqcy_Std_Parallel;
667 
668 // if (*Latitude > PI_OVER_2) /* force distorted values to 90, -90 degrees */
669 // *Latitude = PI_OVER_2;
670 // else if (*Latitude < -PI_OVER_2)
671 // *Latitude = -PI_OVER_2;
672 
673 // if (*Longitude > PI)
674 // *Longitude -= TWO_PI;
675 // if (*Longitude < -PI)
676 // *Longitude += TWO_PI;
677 
678 // if (*Longitude > PI) /* force distorted values to 180, -180 degrees */
679 // *Longitude = PI;
680 // else if (*Longitude < -PI)
681 // *Longitude = -PI;
682 
683  }
684  return (Error_Code);
685 
686 } /* End Convert_Equidistant_Cyl_To_Geodetic */
#define EQCY_NO_ERROR

◆ Convert_Geodetic_To_Equidistant_Cyl()

long ossimEquDistCylProjection::Convert_Geodetic_To_Equidistant_Cyl ( double  Latitude,
double  Longitude,
double *  Easting,
double *  Northing 
) const
private

The function Convert_Geodetic_To_Equidistant_Cyl converts geodetic (latitude and longitude) coordinates to Equidistant Cylindrical projection easting, and northing coordinates, according to the current ellipsoid and Equidistant Cylindrical projection parameters. If any errors occur, the error code(s) are returned by the function, otherwise EQCY_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 571 of file ossimEquDistCylProjection.cpp.

References Eqcy_False_Easting, Eqcy_False_Northing, EQCY_NO_ERROR, Eqcy_Origin_Long, Ra, and Ra_Cos_Eqcy_Std_Parallel.

Referenced by forward(), and Set_Equidistant_Cyl_Parameters().

576 { /* Begin Convert_Geodetic_To_Equidistant_Cyl */
577 /*
578  * The function Convert_Geodetic_To_Equidistant_Cyl converts geodetic (latitude and
579  * longitude) coordinates to Equidistant Cylindrical projection (easting and northing)
580  * coordinates, according to the current ellipsoid, spherical radiius
581  * and Equidistant Cylindrical projection parameters.
582  * If any errors occur, the error code(s) are returned by the
583  * function, otherwise EQCY_NO_ERROR is returned.
584  *
585  * Latitude : Latitude (phi) in radians (input)
586  * Longitude : Longitude (lambda) in radians (input)
587  * Easting : Easting (X) in meters (output)
588  * Northing : Northing (Y) in meters (output)
589  */
590 
591  double dlam; /* Longitude - Central Meridan */
592  long Error_Code = EQCY_NO_ERROR;
593 
594 // if ((Latitude < -PI_OVER_2) || (Latitude > PI_OVER_2))
595 // { /* Latitude out of range */
596 // Error_Code |= EQCY_LAT_ERROR;
597 // }
598 // if ((Longitude < -M_PI) || (Longitude > TWO_PI))
599 // { /* Longitude out of range */
600 // Error_Code|= EQCY_LON_ERROR;
601 // }
602 
603  if (!Error_Code)
604  { /* no errors */
605  dlam = Longitude - Eqcy_Origin_Long;
606  //if (dlam >= TWO_PI)
607  //{
608  // dlam -= TWO_PI;
609  // }
610  // if (dlam <= -TWO_PI)
611  // {
612  // dlam += TWO_PI;
613  // }
614 
615  *Easting = Ra_Cos_Eqcy_Std_Parallel * dlam + Eqcy_False_Easting;
616  *Northing = Ra * Latitude + Eqcy_False_Northing;
617 
618  }
619  return (Error_Code);
620 
621 } /* End Convert_Geodetic_To_Equidistant_Cyl */
#define EQCY_NO_ERROR

◆ dup()

virtual ossimObject* ossimEquDistCylProjection::dup ( ) const
inlinevirtual

Implements ossimProjection.

Definition at line 38 of file ossimEquDistCylProjection.h.

39  {
40  return new ossimEquDistCylProjection(*this);
41  }
ossimEquDistCylProjection(const ossimEllipsoid &ellipsoid=ossimEllipsoid(), const ossimGpt &origin=ossimGpt())

◆ forward()

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

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

Implements ossimMapProjection.

Definition at line 376 of file ossimEquDistCylProjection.cpp.

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

Referenced by worldToLineSample().

377 {
378  double easting = 0.0;
379  double northing = 0.0;
380  ossimGpt gpt = latLon;
381 
382  if (theDatum)
383  {
384  if (theDatum->code() != latLon.datum()->code())
385  {
386  gpt.changeDatum(theDatum); // Shift to our datum.
387  }
388  }
389 
391  gpt.lonr(),
392  &easting,
393  &northing);
394 
395  return ossimDpt(easting, northing);
396 }
virtual const ossimString & code() const
Definition: ossimDatum.h:57
void changeDatum(const ossimDatum *datum)
This will actually perform a shift.
Definition: ossimGpt.cpp:316
long Convert_Geodetic_To_Equidistant_Cyl(double Latitude, double Longitude, double *Easting, double *Northing) const
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_Equidistant_Cyl_Parameters()

void ossimEquDistCylProjection::Get_Equidistant_Cyl_Parameters ( double *  a,
double *  f,
double *  Std_Parallel,
double *  Central_Meridian,
double *  False_Easting,
double *  False_Northing 
) const
private

The function Get_Equidistant_Cyl_Parameters returns the current ellipsoid parameters and Equidistant Cylindrical projection parameters.

a : Semi-major axis of ellipsoid, in meters (output) f : Flattening of ellipsoid (output) Std_Parallel : Latitude in radians at which the (output) point scale factor is 1.0 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 standard parallel of the projection (output)

Definition at line 538 of file ossimEquDistCylProjection.cpp.

References Eqcy_a, Eqcy_f, Eqcy_False_Easting, Eqcy_False_Northing, Eqcy_Origin_Long, and Eqcy_Std_Parallel.

544 { /* Begin Get_Equidistant_Cyl_Parameters */
545 /*
546  * The function Get_Equidistant_Cyl_Parameters returns the current ellipsoid
547  * parameters and Equidistant Cylindrical projection parameters.
548  *
549  * a : Semi-major axis of ellipsoid, in meters (output)
550  * f : Flattening of ellipsoid (output)
551  * Std_Parallel : Latitude in radians at which the (output)
552  * point scale factor is 1.0
553  * Central_Meridian : Longitude in radians at the center of (output)
554  * the projection
555  * False_Easting : A coordinate value in meters assigned to the
556  * central meridian of the projection. (output)
557  * False_Northing : A coordinate value in meters assigned to the
558  * standard parallel of the projection (output)
559  */
560 
561  *a = Eqcy_a;
562  *f = Eqcy_f;
563  *Std_Parallel = Eqcy_Std_Parallel;
564  *Central_Meridian = Eqcy_Origin_Long;
565  *False_Easting = Eqcy_False_Easting;
566  *False_Northing = Eqcy_False_Northing;
567  return;
568 } /* End Get_Equidistant_Cyl_Parameters */

◆ getFalseEasting()

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

Reimplemented from ossimMapProjection.

Definition at line 72 of file ossimEquDistCylProjection.h.

◆ getFalseNorthing()

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

Reimplemented from ossimMapProjection.

Definition at line 73 of file ossimEquDistCylProjection.h.

◆ inverse()

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

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

Implements ossimMapProjection.

Definition at line 363 of file ossimEquDistCylProjection.cpp.

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

Referenced by lineSampleHeightToWorld().

364 {
365  double lat = 0.0;
366  double lon = 0.0;
367 
368  Convert_Equidistant_Cyl_To_Geodetic(eastingNorthing.x,
369  eastingNorthing.y,
370  &lat,
371  &lon);
372 
373  return ossimGpt(lat*DEG_PER_RAD, lon*DEG_PER_RAD, 0.0, theDatum);
374 }
#define DEG_PER_RAD
long Convert_Equidistant_Cyl_To_Geodetic(double Easting, double Northing, double *Latitude, double *Longitude) const
const ossimDatum * theDatum
This is only set if we want to have built in datum shifting.

◆ isGeographic()

virtual bool ossimEquDistCylProjection::isGeographic ( ) const
inlinevirtual

Reimplemented from ossimMapProjection.

Definition at line 96 of file ossimEquDistCylProjection.h.

97  {
98  return true;
99  }

◆ lineSampleHeightToWorld()

void ossimEquDistCylProjection::lineSampleHeightToWorld ( const ossimDpt lineSampPt,
const double &  heightAboveEllipsoid,
ossimGpt worldPt 
) const
virtual

This is the pure virtual that projects the image point to the given elevation above ellipsoid, thereby bypassing reference to a DEM.

Useful for projections that are sensitive to elevation.

Reimplemented from ossimMapProjection.

Definition at line 152 of file ossimEquDistCylProjection.cpp.

References ossimGpt::datum(), ossimElevManager::getHeightAboveEllipsoid(), ossimDpt::hasNans(), ossimGpt::hgt, ossimElevManager::instance(), inverse(), ossimGpt::isLatNan(), ossimGpt::isLonNan(), ossimMapProjection::lineSampleHeightToWorld(), ossimGpt::makeNan(), OSSIM_UNIT_UNKNOWN, ossimMapProjection::theDatum, ossimMapProjection::theElevationLookupFlag, ossimMapProjection::theMetersPerPixel, ossimMapProjection::theModelTransformUnitType, ossimMapProjection::theUlEastingNorthing, ossimDpt::x, and ossimDpt::y.

155 {
156  //
157  // make sure that the passed in lineSample is good and
158  // check to make sure our easting northing is good so
159  // we can compute the line sample.
160  //
161  //
162  if(lineSample.hasNans())
163  {
164  gpt.makeNan();
165  return;
166  }
168  {
169  ossimMapProjection::lineSampleHeightToWorld(lineSample, hgtEllipsoid, gpt);
170  return;
171  }
172  else
173  {
175  {
176  gpt.makeNan();
177  return;
178  }
179  ossimDpt eastingNorthing;
180 
181  eastingNorthing = (theUlEastingNorthing);
182 
183  eastingNorthing.x += (lineSample.x*theMetersPerPixel.x);
184 
185  //
186  // Note: the Northing is positive up. In image space
187  // the positive axis is down so we must multiply by
188  // -1
189  //
190  eastingNorthing.y += (-lineSample.y*theMetersPerPixel.y);
191 
192  //
193  // now invert the meters into a ground point.
194  //
195  gpt = inverse(eastingNorthing);
196  gpt.datum(theDatum);
197 
198  if(gpt.isLatNan() && gpt.isLonNan())
199  {
200  gpt.makeNan();
201  }
202  else
203  {
204  // Finally assign the specified height:
205  gpt.hgt = hgtEllipsoid;
206  }
207  }
209  {
211  }
212 }
double y
Definition: ossimDpt.h:165
ossimDpt theUlEastingNorthing
Hold tie point as easting northing.
static ossimElevManager * instance()
METHOD: instance() Implements singelton pattern.
ossimDpt theMetersPerPixel
Holds the number of meters per pixel.
ossimUnitType theModelTransformUnitType
virtual double getHeightAboveEllipsoid(const ossimGpt &gpt)
bool hasNans() const
Definition: ossimDpt.h:67
double x
Definition: ossimDpt.h:164
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...
virtual ossimGpt inverse(const ossimDpt &eastingNorthing) const
Will take a point in meters and convert it to ground.
const ossimDatum * theDatum
This is only set if we want to have built in datum shifting.

◆ loadState()

bool ossimEquDistCylProjection::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 405 of file ossimEquDistCylProjection.cpp.

406 {
407  if (traceDebug())
408  {
409  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimEquDistCylProjection::loadState: Input keyword list is \n" << kwl << endl;
410  }
411 
412  // ossimLlxyProjection::loadState(kwl, prefix);
413  ossimMapProjection::loadState(kwl, prefix);
415 
416  // Make sure the origin.lat is defined since it is needed to relate degrees/meter:
418  {
421  theOrigin.lat = 0.0;
422  }
423 
424  // Make sure degrees per pixel is defined:
427 
428  const char* type = kwl.find(prefix, ossimKeywordNames::TYPE_KW);
429 
430  setDefaults();
431  // make sure we are of the same type. If we are then the easting
432  // northing values will make since
433  //
435  {
438  }
439  else
440  {
442  }
443  // finalize the initialization.
444  update();
445 
446  return true;
447 }
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
ossimDpt theUlEastingNorthing
Hold tie point as easting northing.
ossimGpt theUlGpt
Hold tie point in decimal degrees.
static const char * TYPE_KW
#define STATIC_TYPE_NAME(T)
Definition: ossimRtti.h:325
ossimDpt theMetersPerPixel
Holds the number of meters per pixel.
ossimUnitType theProjectionUnits
Linear units of the projection as indicated in the projection&#39;s specification:
bool hasNans() const
Definition: ossimDpt.h:67
ossimDpt theDegreesPerPixel
Hold the decimal degrees per pixel.
double x
Definition: ossimDpt.h:164
ossim_float64 lat
Definition: ossimGpt.h:265
ossimDpt theFalseEastingNorthing
Hold the false easting northing.
virtual void computeDegreesPerPixel()
Computes the approximate resolution in degrees/pixel.
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
void makeNan()
Definition: ossimDpt.h:65
bool isnan(const float &v)
isnan Test for floating point Not A Number (NAN) value.
Definition: ossimCommon.h:91

◆ saveState()

bool ossimEquDistCylProjection::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 400 of file ossimEquDistCylProjection.cpp.

References ossimMapProjection::saveState().

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

◆ Set_Equidistant_Cyl_Parameters()

long ossimEquDistCylProjection::Set_Equidistant_Cyl_Parameters ( double  a,
double  f,
double  Std_Parallel,
double  Central_Meridian,
double  False_Easting,
double  False_Northing 
)
private

The function Set_Equidistant_Cyl_Parameters receives the ellipsoid parameters and projection parameters as inputs, and sets the corresponding state variables. It also calculates the spherical radius of the sphere having the same area as the ellipsoid. If any errors occur, the error code(s) are returned by the function, otherwise EQCY_NO_ERROR is returned.

a : Semi-major axis of ellipsoid, in meters (input) f : Flattening of ellipsoid (input) Std_Parallel : Latitude in radians at which the (input) point scale factor is 1.0 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 standard parallel of the projection (input)

Definition at line 455 of file ossimEquDistCylProjection.cpp.

References Convert_Geodetic_To_Equidistant_Cyl(), Cos_Eqcy_Std_Parallel, Eqcy_a, Eqcy_f, Eqcy_False_Easting, Eqcy_False_Northing, Eqcy_Max_Easting, Eqcy_Min_Easting, EQCY_NO_ERROR, Eqcy_Origin_Long, Eqcy_Std_Parallel, es2, es4, es6, M_PI, ONE, PI_OVER_2, Ra, and Ra_Cos_Eqcy_Std_Parallel.

Referenced by update().

461 { /* Begin Set_Equidistant_Cyl_Parameters */
462 /*
463  * The function Set_Equidistant_Cyl_Parameters receives the ellipsoid parameters and
464  * projection parameters as inputs, and sets the corresponding state
465  * variables. It also calculates the spherical radius of the sphere having
466  * the same area as the ellipsoid. If any errors occur, the error code(s)
467  * are returned by the function, otherwise EQCY_NO_ERROR is returned.
468  *
469  * a : Semi-major axis of ellipsoid, in meters (input)
470  * f : Flattening of ellipsoid (input)
471  * Std_Parallel : Latitude in radians at which the (input)
472  * point scale factor is 1.0
473  * Central_Meridian : Longitude in radians at the center of (input)
474  * the projection
475  * False_Easting : A coordinate value in meters assigned to the
476  * central meridian of the projection. (input)
477  * False_Northing : A coordinate value in meters assigned to the
478  * standard parallel of the projection (input)
479  */
480 
481  double temp;
482 // double inv_f = 1 / f;
483  long Error_Code = EQCY_NO_ERROR;
484 
485 // if (a <= 0.0)
486 // { /* Semi-major axis must be greater than zero */
487 // Error_Code |= EQCY_A_ERROR;
488 // }
489 // if ((inv_f < 250) || (inv_f > 350))
490 // { /* Inverse flattening must be between 250 and 350 */
491 // Error_Code |= EQCY_INV_F_ERROR;
492 // }
493 // if ((Std_Parallel < -PI_OVER_2) || (Std_Parallel > PI_OVER_2))
494 // { /* standard parallel out of range */
495 // Error_Code |= EQCY_STDP_ERROR;
496 // }
497 // if ((Central_Meridian < -PI) || (Central_Meridian > TWO_PI))
498 // { /* origin longitude out of range */
499 // Error_Code |= EQCY_CENT_MER_ERROR;
500 // }
501  if (!Error_Code)
502  { /* no errors */
503  Eqcy_a = a;
504  Eqcy_f = f;
505  es2 = 2 * Eqcy_f - Eqcy_f * Eqcy_f;
506  es4 = es2 * es2;
507  es6 = es4 * es2;
508  /* spherical radius */
509  Ra = Eqcy_a * (1.0 - es2 / 6.0 - 17.0 * es4 / 360.0 - 67.0 * es6 /3024.0);
510  Eqcy_Std_Parallel = Std_Parallel;
513 // if (Central_Meridian > M_PI)
514 // Central_Meridian -= TWO_PI;
515  Eqcy_Origin_Long = Central_Meridian;
516  Eqcy_False_Easting = False_Easting;
517  Eqcy_False_Northing = False_Northing;
518  if (Eqcy_Origin_Long > 0)
519  {
522  }
523  else if (Eqcy_Origin_Long < 0)
524  {
527  }
528  else
529  {
532  }
533  } /* End if(!Error_Code) */
534  return (Error_Code);
535 } /* End Set_Equidistant_Cyl_Parameters */
#define PI_OVER_2
long Convert_Geodetic_To_Equidistant_Cyl(double Latitude, double Longitude, double *Easting, double *Northing) const
#define M_PI
#define EQCY_NO_ERROR

◆ setDefaults()

void ossimEquDistCylProjection::setDefaults ( )

◆ setFalseEasting()

void ossimEquDistCylProjection::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 ossimEquDistCylProjection.cpp.

References Eqcy_False_Easting, and update().

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

◆ setFalseEastingNorthing()

void ossimEquDistCylProjection::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 ossimEquDistCylProjection.cpp.

References Eqcy_False_Easting, Eqcy_False_Northing, and update().

135 {
136  Eqcy_False_Easting = falseEasting;
137  Eqcy_False_Northing = falseNorthing;
138 
139  update();
140 }

◆ setFalseNorthing()

void ossimEquDistCylProjection::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 ossimEquDistCylProjection.cpp.

References Eqcy_False_Northing, and update().

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

◆ setOrigin()

void ossimEquDistCylProjection::setOrigin ( const ossimGpt origin)
virtual

This method needs to be overridden here because of bug that causes bad projections if the origin is set without reseting the tiepoint. (OLK Jun2015)

Reimplemented from ossimMapProjection.

Definition at line 109 of file ossimEquDistCylProjection.cpp.

References ossimMapProjection::getMetersPerPixel(), ossimMapProjection::origin(), ossimMapProjection::setMetersPerPixel(), ossimMapProjection::setOrigin(), ossimMapProjection::setUlTiePoints(), ossimMapProjection::theUlGpt, ossimDpt::x, and ossimDpt::y.

Referenced by ossimGdalOgrVectorAnnotation::computeDefaultView(), ossimKmlSuperOverlayReader::createDefaultProj(), ossimOgrVectorTileSource::createDefaultProj(), ossimEpsgProjectionFactory::createProjFromAutoCode(), ossimDtedTileSource::getImageGeometry(), and ossimNitfProjectionFactory::makeEuiDistant().

110 {
111  ossimMapProjection::setOrigin(origin); // breaks the projection
112  setUlTiePoints(theUlGpt); // needed to reset easting northing
113 
114  // Changing the projection origin from the equator implies a scale change in the longitude
115  // direction to maintain GSD (meters) square at origin:
116  ossimDpt gsd = getMetersPerPixel();
117  gsd.x = gsd.y; // reset X (longitude) direction GSD
118  setMetersPerPixel(gsd);
119 }
double y
Definition: ossimDpt.h:165
virtual void setOrigin(const ossimGpt &origin)
Sets theOrigin to origin.
ossimGpt theUlGpt
Hold tie point in decimal degrees.
virtual void setMetersPerPixel(const ossimDpt &gsd)
virtual ossimGpt origin() const
double x
Definition: ossimDpt.h:164
virtual void setUlTiePoints(const ossimGpt &gpt)
virtual ossimDpt getMetersPerPixel() const

◆ update()

void ossimEquDistCylProjection::update ( )
virtual

Reimplemented from ossimMapProjection.

Definition at line 82 of file ossimEquDistCylProjection.cpp.

References ossimDatum::epsgCode(), Eqcy_False_Easting, Eqcy_False_Northing, ossimEllipsoid::getA(), ossimEllipsoid::getFlattening(), ossimGpt::latr(), ossimGpt::lonr(), ossimDpt::makeNan(), Set_Equidistant_Cyl_Parameters(), ossimMapProjection::theDatum, ossimMapProjection::theEllipsoid, ossimMapProjection::theFalseEastingNorthing, ossimMapProjection::theMetersPerPixel, ossimMapProjection::theOrigin, ossimMapProjection::thePcsCode, ossimMapProjection::update(), ossimDpt::x, and ossimDpt::y.

Referenced by ossimEpsgProjectionFactory::createProjFromAutoCode(), ossimEquDistCylProjection(), setFalseEasting(), setFalseEastingNorthing(), and setFalseNorthing().

83 {
86  theOrigin.latr(),
87  theOrigin.lonr(),
90 
93 
94  theMetersPerPixel.makeNan(); // force recompute by base class
95 
97 
98  // For geographic projection, the PCS EPSG code can be derived from the datum in most cases:
99  if ((thePcsCode == 0) && (theDatum != NULL))
100  {
101  ossim_uint32 datum_code = theDatum->epsgCode();
102  if ((datum_code >= 6000) && (datum_code < 7000))
103  thePcsCode = datum_code - 2000;
104  }
105 
106  // Workaround for bug
107 }
virtual ossim_uint32 epsgCode() const
Definition: ossimDatum.h:59
double y
Definition: ossimDpt.h:165
ossimDpt theMetersPerPixel
Holds the number of meters per pixel.
const double & getA() const
double lonr() const
Returns the longitude in radian measure.
Definition: ossimGpt.h:76
unsigned int ossim_uint32
long Set_Equidistant_Cyl_Parameters(double a, double f, double Std_Parallel, double Central_Meridian, double False_Easting, double False_Northing)
ossim_uint32 thePcsCode
Projection Coordinate System(PCS) code.
double x
Definition: ossimDpt.h:164
double latr() const
latr().
Definition: ossimGpt.h:66
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.
void makeNan()
Definition: ossimDpt.h:65
const ossimDatum * theDatum
This is only set if we want to have built in datum shifting.

◆ worldToLineSample() [1/2]

void ossimEquDistCylProjection::worldToLineSample ( const ossimGpt worldPoint,
ossimDpt lineSampPt 
) const
virtual

METHOD: worldToLineSample() Performs the forward projection from ground point to line, sample.

Reimplemented from ossimMapProjection.

Definition at line 214 of file ossimEquDistCylProjection.cpp.

References ossimGpt::changeDatum(), forward(), ossimGpt::isLatNan(), ossimGpt::isLonNan(), ossimDpt::isNan(), ossimDpt::makeNan(), OSSIM_UNIT_UNKNOWN, ossimMapProjection::theDatum, ossimMapProjection::theMetersPerPixel, ossimMapProjection::theModelTransformUnitType, ossimMapProjection::theUlEastingNorthing, ossimMapProjection::worldToLineSample(), ossimDpt::x, and ossimDpt::y.

216 {
218  {
219  ossimMapProjection::worldToLineSample(worldPoint, lineSample);
220  return;
221  }
222 
223  // make sure our tie point is good and world point is good.
224  if(theUlEastingNorthing.isNan() || worldPoint.isLatNan() || worldPoint.isLonNan())
225  {
226  lineSample.makeNan();
227  return;
228  }
229 
230  // see if we have a datum set and if so shift the world to our datum. If not then
231  // find the easting northing value for the world point.
232  ossimDpt gptEastingNorthing;
233  if(theDatum)
234  {
235  ossimGpt gpt = worldPoint;
236  gpt.changeDatum(theDatum);
237  gptEastingNorthing = forward(gpt);
238  }
239  else
240  {
241  gptEastingNorthing = forward(worldPoint);
242  }
243 
244  // check the final result to make sure there were no problems.
245  if(!gptEastingNorthing.isNan())
246  {
247  lineSample.x = ((gptEastingNorthing.x - theUlEastingNorthing.x)/theMetersPerPixel.x);
248 
249  // We must remember that the Northing is negative since the positive
250  // axis for an image is assumed to go down since it's image space.
251  lineSample.y = (-(gptEastingNorthing.y - theUlEastingNorthing.y)/theMetersPerPixel.y);
252  }
253 }
bool isLonNan() const
Definition: ossimGpt.h:140
virtual ossimDpt worldToLineSample(const ossimGpt &worldPoint) const
double y
Definition: ossimDpt.h:165
ossimDpt theUlEastingNorthing
Hold tie point as easting northing.
bool isNan() const
Definition: ossimDpt.h:72
bool isLatNan() const
Definition: ossimGpt.h:139
void changeDatum(const ossimDatum *datum)
This will actually perform a shift.
Definition: ossimGpt.cpp:316
ossimDpt theMetersPerPixel
Holds the number of meters per pixel.
ossimUnitType theModelTransformUnitType
virtual ossimDpt forward(const ossimGpt &latLon) const
All map projections will convert the world coordinate to an easting northing (Meters).
double x
Definition: ossimDpt.h:164
const ossimDatum * theDatum
This is only set if we want to have built in datum shifting.

◆ worldToLineSample() [2/2]

void ossimEquDistCylProjection::worldToLineSample ( const ossimGpt worldPoint,
const ossimIpt imageSize,
ossimDpt lineSample 
) const

Specialized worldToLineSample.

Takes into consideration the image size and crossing the date line. Also makes local points outside of image negative or positive based on there relative closeness to left or right edge.

Parameters
worldPointGround point to convert to line sample.
imageSizeSize of image in pixels.
lineSampleInitialized by this.

Definition at line 255 of file ossimEquDistCylProjection.cpp.

References ossimGpt::changeDatum(), forward(), ossimGpt::isLatNan(), ossimGpt::isLonNan(), ossimIpt::isNan(), ossimDpt::isNan(), ossimGpt::lat, ossimGpt::lon, ossimDpt::makeNan(), OSSIM_UNIT_UNKNOWN, ossimMapProjection::theDatum, ossimMapProjection::theMetersPerPixel, ossimMapProjection::theModelTransformUnitType, ossimMapProjection::theUlEastingNorthing, ossimMapProjection::worldToLineSample(), ossimIpt::x, ossimDpt::x, and ossimDpt::y.

258 {
260  {
261  // Make sure our points are good.
262  if( !theUlEastingNorthing.isNan() && !worldPoint.isLatNan() && !worldPoint.isLonNan() &&
263  !imageSize.isNan() )
264  {
265  ossimGpt gpt = worldPoint;
266 
267  //---
268  // See if we have a datum set and if so shift the world to our datum. If not then
269  // find the easting northing value for the world point.
270  if(theDatum)
271  {
272  gpt.changeDatum(theDatum);
273  }
274 
275  // Convert to easting northing.
276  ossimDpt gptEastingNorthing = forward(gpt);
277 
278  if( !gptEastingNorthing.isNan() )
279  {
280 #if 0
281  if ( imageSize.x > 0.0 )
282  {
283  ossimGpt edge(gpt.lat, -180.0, 0.0);
284  ossimDpt leftProjectionEdge = forward(edge);
285 
286  edge.lon = 180;
287  ossimDpt rightProjectionEdge = forward(edge);
288 
289  // Right edge Easting of image from tie.
291  ossim_float64 rightImageX = leftImageX + (imageSize.x * theMetersPerPixel.x);
292 
293  if ( rightImageX < rightProjectionEdge.x ) // Image edge left of date line.
294  {
295  // Image does not cross the date line.
296  lineSample.x =
297  (gptEastingNorthing.x - theUlEastingNorthing.x) / theMetersPerPixel.x;
298  }
299  else // Crossed date line:
300  {
301  // Normalize the right image point to account for wrap:
302  ossim_float64 normRightX =
303  rightImageX - rightProjectionEdge.x + leftProjectionEdge.x;
304 
305  if ( ( gptEastingNorthing.x >= leftImageX ) &&
306  ( gptEastingNorthing.x <= rightProjectionEdge.x ) )
307  {
308  // Between tie and date line.
309  lineSample.x =
310  (gptEastingNorthing.x - theUlEastingNorthing.x)/theMetersPerPixel.x;
311  }
312  else if ( ( gptEastingNorthing.x >= leftProjectionEdge.x ) &&
313  ( gptEastingNorthing.x <= normRightX ) )
314  {
315  // Between date line and right image point.
316  lineSample.x = ( rightProjectionEdge.x - theUlEastingNorthing.x +
317  gptEastingNorthing.x - leftProjectionEdge.x )/theMetersPerPixel.x;
318  }
319  else
320  {
321  // Point in between normalized right x and tie:
322  ossim_float64 deltaToLeft = theUlEastingNorthing.x - gptEastingNorthing.x;
323  ossim_float64 deltaToRight = gptEastingNorthing.x - normRightX;
324 
325  // Make relative to the closest edge.
326  if ( deltaToRight < deltaToLeft )
327  {
328  lineSample.x = (imageSize.x - 1) + deltaToRight/theMetersPerPixel.x;
329  }
330  else
331  {
332  lineSample.x = -(deltaToLeft/theMetersPerPixel.x );
333  }
334  }
335  }
336 
337  } // Matches: if ( ( imageSize.x > 0.0 ) && ( imageSize.y > 0.0 ) )
338  else
339  {
340  lineSample.x = (gptEastingNorthing.x - theUlEastingNorthing.x)/theMetersPerPixel.x;
341  }
342  #endif
343  lineSample.x = (gptEastingNorthing.x - theUlEastingNorthing.x)/theMetersPerPixel.x;
344  // We must remember that the Northing is negative since the positive
345  // axis for an image is assumed to go down since it's image space.
346  lineSample.y = (theUlEastingNorthing.y - gptEastingNorthing.y) / theMetersPerPixel.y;
347 
348  } // Matches: if( !lineSample.isNan() )
349  }
350  else // Some point we need has nans...
351  {
352  lineSample.makeNan();
353  }
354  } // Matches: if( theModelTransformUnitType == OSSIM_UNIT_UNKNOWN )
355  else
356  {
357  // Has transform:
358  ossimMapProjection::worldToLineSample(worldPoint, lineSample);
359  }
360 
361 } // End: ossimEquDistCylProjection::worldToLineSample(worldPoint, lineSample, imageSize)
bool isLonNan() const
Definition: ossimGpt.h:140
virtual ossimDpt worldToLineSample(const ossimGpt &worldPoint) const
double y
Definition: ossimDpt.h:165
ossimDpt theUlEastingNorthing
Hold tie point as easting northing.
bool isNan() const
Definition: ossimIpt.h:62
bool isNan() const
Definition: ossimDpt.h:72
bool isLatNan() const
Definition: ossimGpt.h:139
void changeDatum(const ossimDatum *datum)
This will actually perform a shift.
Definition: ossimGpt.cpp:316
double ossim_float64
ossimDpt theMetersPerPixel
Holds the number of meters per pixel.
ossimUnitType theModelTransformUnitType
virtual ossimDpt forward(const ossimGpt &latLon) const
All map projections will convert the world coordinate to an easting northing (Meters).
double x
Definition: ossimDpt.h:164
ossim_int32 x
Definition: ossimIpt.h:141
ossim_float64 lat
Definition: ossimGpt.h:265
void makeNan()
Definition: ossimDpt.h:65
const ossimDatum * theDatum
This is only set if we want to have built in datum shifting.

Member Data Documentation

◆ Cos_Eqcy_Std_Parallel

double ossimEquDistCylProjection::Cos_Eqcy_Std_Parallel
mutableprivate

Definition at line 127 of file ossimEquDistCylProjection.h.

Referenced by Set_Equidistant_Cyl_Parameters().

◆ Eqcy_a

double ossimEquDistCylProjection::Eqcy_a
mutableprivate

◆ Eqcy_Delta_Northing

double ossimEquDistCylProjection::Eqcy_Delta_Northing
mutableprivate

Definition at line 131 of file ossimEquDistCylProjection.h.

Referenced by ossimEquDistCylProjection(), and setDefaults().

◆ Eqcy_f

double ossimEquDistCylProjection::Eqcy_f
mutableprivate

◆ Eqcy_False_Easting

double ossimEquDistCylProjection::Eqcy_False_Easting
mutableprivate

◆ Eqcy_False_Northing

double ossimEquDistCylProjection::Eqcy_False_Northing
mutableprivate

◆ Eqcy_Max_Easting

double ossimEquDistCylProjection::Eqcy_Max_Easting
mutableprivate

◆ Eqcy_Min_Easting

double ossimEquDistCylProjection::Eqcy_Min_Easting
mutableprivate

◆ Eqcy_Origin_Long

double ossimEquDistCylProjection::Eqcy_Origin_Long
mutableprivate

◆ Eqcy_Std_Parallel

double ossimEquDistCylProjection::Eqcy_Std_Parallel
mutableprivate

◆ es2

double ossimEquDistCylProjection::es2
mutableprivate

Definition at line 120 of file ossimEquDistCylProjection.h.

Referenced by Set_Equidistant_Cyl_Parameters().

◆ es4

double ossimEquDistCylProjection::es4
mutableprivate

Definition at line 121 of file ossimEquDistCylProjection.h.

Referenced by Set_Equidistant_Cyl_Parameters().

◆ es6

double ossimEquDistCylProjection::es6
mutableprivate

Definition at line 122 of file ossimEquDistCylProjection.h.

Referenced by Set_Equidistant_Cyl_Parameters().

◆ Ra

double ossimEquDistCylProjection::Ra
mutableprivate

◆ Ra_Cos_Eqcy_Std_Parallel

double ossimEquDistCylProjection::Ra_Cos_Eqcy_Std_Parallel
mutableprivate

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