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

#include <ossimObliqueMercatorProjection.h>

Inheritance diagram for ossimObliqueMercatorProjection:
ossimMapProjection ossimProjection ossimObject ossimErrorStatusInterface ossimReferenced

Public Member Functions

 ossimObliqueMercatorProjection (const ossimEllipsoid &ellipsoid=ossimEllipsoid(), const ossimGpt &origin=ossimGpt())
 
 ossimObliqueMercatorProjection (const ossimEllipsoid &ellipsoid, const ossimGpt &origin, const ossimGpt &point1, const ossimGpt &point2, double falseEasting, double falseNorthing, double scaleFactor)
 
 ~ossimObliqueMercatorProjection ()
 
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 setCentralPoint1 (const ossimGpt &point)
 
void setCentralPoint2 (const ossimGpt &point)
 
void setScaleFactor (double scaleFactor)
 
void setParameters (const ossimGpt &point1, const ossimGpt &point2, double falseEasting, double falseNorthing, double scaleFactor)
 
void setFalseEastingNorthing (double falseEasting, double falseNorthing)
 
void setDefaults ()
 
double getFalseEasting () const
 
double getFalseNorthing () const
 
const ossimGptgetCentralPoint1 () const
 
const ossimGptgetCentralPoint2 () const
 
double getScaleFactor () const
 
virtual bool saveState (ossimKeywordlist &kwl, const char *prefix=0) const
 
virtual bool loadState (const ossimKeywordlist &kwl, const char *prefix=0)
 
virtual bool operator== (const ossimProjection &projection) const
 Returns TRUE if principal parameters are within epsilon tolerance. More...
 
- 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 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
 

Protected Member Functions

long Set_Oblique_Mercator_Parameters (double a, double f, double Origin_Latitude, double Latitude_1, double Longitude_1, double Latitude_2, double Longitude_2, double False_Easting, double False_Northing, double Scale_Factor)
 
void Get_Oblique_Mercator_Parameters (double *a, double *f, double *Origin_Latitude, double *Latitude_1, double *Longitude_1, double *Latitude_2, double *Longitude_2, double *False_Easting, double *False_Northing, double *Scale_Factor) const
 
long Convert_Geodetic_To_Oblique_Mercator (double Latitude, double Longitude, double *Easting, double *Northing) const
 
long Convert_Oblique_Mercator_To_Geodetic (double Easting, double Northing, double *Latitude, double *Longitude) const
 
- Protected Member Functions inherited from ossimMapProjection
virtual ~ossimMapProjection ()
 
void updateFromTransform ()
 
- Protected Member Functions inherited from ossimReferenced
virtual ~ossimReferenced ()
 

Protected Attributes

ossimGpt theCentralPoint1
 
ossimGpt theCentralPoint2
 
double OMerc_a
 
double OMerc_f
 
double es
 
double es_OVER_2
 
double OMerc_A
 
double OMerc_B
 
double OMerc_E
 
double OMerc_gamma
 
double OMerc_azimuth
 
double OMerc_Origin_Long
 
double cos_gamma
 
double sin_gamma
 
double sin_azimuth
 
double cos_azimuth
 
double A_over_B
 
double B_over_A
 
double OMerc_u
 
double OMerc_Origin_Lat
 
double OMerc_Lat_1
 
double OMerc_Lon_1
 
double OMerc_Lat_2
 
double OMerc_Lon_2
 
double OMerc_Scale_Factor
 
double OMerc_False_Northing
 
double OMerc_False_Easting
 
double OMerc_Delta_Northing
 
double OMerc_Delta_Easting
 
- 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 17 of file ossimObliqueMercatorProjection.h.

Constructor & Destructor Documentation

◆ ossimObliqueMercatorProjection() [1/2]

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

Definition at line 48 of file ossimObliqueMercatorProjection.cpp.

References setDefaults(), and update().

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

◆ ossimObliqueMercatorProjection() [2/2]

ossimObliqueMercatorProjection::ossimObliqueMercatorProjection ( const ossimEllipsoid ellipsoid,
const ossimGpt origin,
const ossimGpt point1,
const ossimGpt point2,
double  falseEasting,
double  falseNorthing,
double  scaleFactor 
)

Points 1 and 2 lie along the central line.

Definition at line 56 of file ossimObliqueMercatorProjection.cpp.

References setParameters().

63  : ossimMapProjection(ellipsoid, origin)
64 {
65  setParameters(point1, point2, falseEasting, falseNorthing, scaleFactor);
66 }
virtual ossimGpt origin() const
ossimMapProjection(const ossimEllipsoid &ellipsoid=ossimEllipsoid(), const ossimGpt &origin=ossimGpt())
void setParameters(const ossimGpt &point1, const ossimGpt &point2, double falseEasting, double falseNorthing, double scaleFactor)

◆ ~ossimObliqueMercatorProjection()

ossimObliqueMercatorProjection::~ossimObliqueMercatorProjection ( )
inline

Definition at line 34 of file ossimObliqueMercatorProjection.h.

34 {}

Member Function Documentation

◆ Convert_Geodetic_To_Oblique_Mercator()

long ossimObliqueMercatorProjection::Convert_Geodetic_To_Oblique_Mercator ( double  Latitude,
double  Longitude,
double *  Easting,
double *  Northing 
) const
protected

The function Convert_Geodetic_To_Oblique_Mercator converts geodetic (latitude and longitude) coordinates to Oblique Mercator projection (easting and northing) coordinates, according to the current ellipsoid and Oblique Mercator projection parameters. If any errors occur, the error code(s) are returned by the function, otherwise OMERC_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 505 of file ossimObliqueMercatorProjection.cpp.

References A_over_B, cos_azimuth, cos_gamma, es, es_OVER_2, OMerc_A, OMerc_B, OMerc_E, OMerc_False_Easting, OMerc_False_Northing, OMerc_gamma, OMERC_LON_ERROR, OMERC_NO_ERROR, OMerc_Origin_Long, OMERC_t, OMerc_u, PI_OVER_2, PI_OVER_4, sin_azimuth, and sin_gamma.

Referenced by forward().

509 { /* BEGIN Convert_Geodetic_To_Oblique_Mercator */
510 /*
511  * The function Convert_Geodetic_To_Oblique_Mercator converts geodetic (latitude and
512  * longitude) coordinates to Oblique Mercator projection (easting and
513  * northing) coordinates, according to the current ellipsoid and Oblique Mercator
514  * projection parameters. If any errors occur, the error code(s) are returned
515  * by the function, otherwise OMERC_NO_ERROR is returned.
516  *
517  * Latitude : Latitude (phi), in radians (input)
518  * Longitude : Longitude (lambda), in radians (input)
519  * Easting : Easting (X), in meters (output)
520  * Northing : Northing (Y), in meters (output)
521  */
522 
523  double dlam, B_dlam, cos_B_dlam;
524  double t, S, T, V, U;
525  double Q, Q_inv;
526  /* Coordinate axes defined with respect to the azimuth of the center line */
527  /* Natural origin*/
528  double v = 0;
529  double u = 0;
530  long Error_Code = OMERC_NO_ERROR;
531 
532 // if ((Latitude < -PI_OVER_2) || (Latitude > PI_OVER_2))
533 // { /* Latitude out of range */
534 // Error_Code |= OMERC_LAT_ERROR;
535 // }
536 // if ((Longitude < -M_PI) || (Longitude > TWO_PI))
537 // { /* Longitude out of range */
538 // Error_Code |= OMERC_LON_ERROR;
539 // }
540  if (!Error_Code)
541  { /* no errors */
542  dlam = Longitude - OMerc_Origin_Long;
543 
544 // if (fabs(dlam) >= PI_OVER_2)
545 // { /* Distortion will result if Longitude is 90 degrees or more from the Central Meridian */
546 // Error_Code |= OMERC_LON_WARNING;
547 // }
548 
549 // if (dlam > M_PI)
550 // {
551 // dlam -= TWO_PI;
552 // }
553 // if (dlam < -M_PI)
554 // {
555 // dlam += TWO_PI;
556 // }
557 
558  if (fabs(fabs(Latitude) - PI_OVER_2) > 1.0e-10)
559  {
560  t = OMERC_t(Latitude, es * sin(Latitude), es_OVER_2);
561  Q = OMerc_E / pow(t, OMerc_B);
562  Q_inv = 1.0 / Q;
563  S = (Q - Q_inv) / 2.0;
564  T = (Q + Q_inv) / 2.0;
565  B_dlam = OMerc_B * dlam;
566  V = sin(B_dlam);
567  U = ((-1.0 * V * cos_gamma) + (S * sin_gamma)) / T;
568  if (fabs(fabs(U) - 1.0) < 1.0e-10)
569  { /* Point projects into infinity */
570  Error_Code |= OMERC_LON_ERROR;
571  }
572  else
573  {
574  v = A_over_B * log((1.0 - U) / (1.0 + U)) / 2.0;
575  cos_B_dlam = cos(B_dlam);
576  if (fabs(cos_B_dlam) < 1.0e-10)
577  u = OMerc_A * B_dlam;
578  else
579  u = A_over_B * atan(((S * cos_gamma) + (V * sin_gamma)) / cos_B_dlam);
580  }
581  }
582  else
583  {
584  if (Latitude > 0.0)
585  v = A_over_B * log(tan(PI_OVER_4 - (OMerc_gamma / 2.0)));
586  else
587  v = A_over_B * log(tan(PI_OVER_4 + (OMerc_gamma / 2.0)));
588  u = A_over_B * Latitude;
589  }
590 
591 
592  u = u - OMerc_u;
593 
594  *Easting = OMerc_False_Easting + v * cos_azimuth + u * sin_azimuth;
595  *Northing = OMerc_False_Northing + u * cos_azimuth - v * sin_azimuth;
596 
597  }
598  return (Error_Code);
599 } /* End Convert_Geodetic_To_Oblique_Mercator */
#define OMERC_NO_ERROR
#define OMERC_t(lat, e_sinlat, e_over_2)
#define OMERC_LON_ERROR

◆ Convert_Oblique_Mercator_To_Geodetic()

long ossimObliqueMercatorProjection::Convert_Oblique_Mercator_To_Geodetic ( double  Easting,
double  Northing,
double *  Latitude,
double *  Longitude 
) const
protected

The function Convert_Oblique_Mercator_To_Geodetic converts Oblique Mercator projection (easting and northing) coordinates to geodetic (latitude and longitude) coordinates, according to the current ellipsoid and Oblique Mercator projection coordinates. If any errors occur, the error code(s) are returned by the function, otherwise OMERC_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 602 of file ossimObliqueMercatorProjection.cpp.

References B_over_A, cos_azimuth, cos_gamma, es, es_OVER_2, OMerc_B, OMerc_E, OMerc_False_Easting, OMerc_False_Northing, OMERC_NO_ERROR, OMerc_Origin_Long, OMerc_u, PI_OVER_2, sin_azimuth, and sin_gamma.

Referenced by inverse().

606 { /* Begin Convert_Oblique_Mercator_To_Geodetic */
607 /*
608  * The function Convert_Oblique_Mercator_To_Geodetic converts Oblique Mercator projection
609  * (easting and northing) coordinates to geodetic (latitude and longitude)
610  * coordinates, according to the current ellipsoid and Oblique Mercator projection
611  * coordinates. If any errors occur, the error code(s) are returned by the
612  * function, otherwise OMERC_NO_ERROR is returned.
613  *
614  * Easting : Easting (X), in meters (input)
615  * Northing : Northing (Y), in meters (input)
616  * Latitude : Latitude (phi), in radians (output)
617  * Longitude : Longitude (lambda), in radians (output)
618  */
619 
620  double dx, dy;
621  /* Coordinate axes defined with respect to the azimuth of the center line */
622  /* Natural origin*/
623  double u, v;
624  double Q_prime, Q_prime_inv;
625  double S_prime, T_prime, V_prime, U_prime;
626  double t;
627  double es_sin;
628  double u_B_over_A;
629  double phi;
630  double temp_phi = 0.0;
631  long Error_Code = OMERC_NO_ERROR;
632 
633 // if ((Easting < (OMerc_False_Easting - OMerc_Delta_Easting))
634 // || (Easting > (OMerc_False_Easting + OMerc_Delta_Easting)))
635 // { /* Easting out of range */
636 // Error_Code |= OMERC_EASTING_ERROR;
637 // }
638 // if ((Northing < (OMerc_False_Northing - OMerc_Delta_Northing))
639 // || (Northing > (OMerc_False_Northing + OMerc_Delta_Northing)))
640 // { /* Northing out of range */
641 // Error_Code |= OMERC_NORTHING_ERROR;
642 // }
643 
644  if (!Error_Code)
645  {
646  dy = Northing - OMerc_False_Northing;
647  dx = Easting - OMerc_False_Easting;
648  v = dx * cos_azimuth - dy * sin_azimuth;
649  u = dy * cos_azimuth + dx * sin_azimuth;
650  u = u + OMerc_u;
651  Q_prime = exp(-1.0 * (v * B_over_A ));
652  Q_prime_inv = 1.0 / Q_prime;
653  S_prime = (Q_prime - Q_prime_inv) / 2.0;
654  T_prime = (Q_prime + Q_prime_inv) / 2.0;
655  u_B_over_A = u * B_over_A;
656  V_prime = sin(u_B_over_A);
657  U_prime = (V_prime * cos_gamma + S_prime * sin_gamma) / T_prime;
658  if (fabs(fabs(U_prime) - 1.0) < 1.0e-10)
659  {
660  if (U_prime > 0)
661  *Latitude = PI_OVER_2;
662  else
663  *Latitude = -PI_OVER_2;
664  *Longitude = OMerc_Origin_Long;
665  }
666  else
667  {
668  t = pow(OMerc_E / sqrt((1.0 + U_prime) / (1.0 - U_prime)), 1.0 / OMerc_B);
669  phi = PI_OVER_2 - 2.0 * atan(t);
670  while (fabs(phi - temp_phi) > 1.0e-10)
671  {
672  temp_phi = phi;
673  es_sin = es * sin(phi);
674  phi = PI_OVER_2 - 2.0 * atan(t * pow((1.0 - es_sin) / (1.0 + es_sin), es_OVER_2));
675  }
676  *Latitude = phi;
677  *Longitude = OMerc_Origin_Long - atan2((S_prime * cos_gamma - V_prime * sin_gamma), cos(u_B_over_A)) / OMerc_B;
678  }
679 
680 // if (fabs(*Latitude) < 2.0e-7) /* force lat to 0 to avoid -0 degrees */
681 // *Latitude = 0.0;
682 // if (*Latitude > PI_OVER_2) /* force distorted values to 90, -90 degrees */
683 // *Latitude = PI_OVER_2;
684 // else if (*Latitude < -PI_OVER_2)
685 // *Latitude = -PI_OVER_2;
686 
687 // if (*Longitude > PI)
688 // *Longitude -= TWO_PI;
689 // if (*Longitude < -PI)
690 // *Longitude += TWO_PI;
691 
692 // if (fabs(*Longitude) < 2.0e-7) /* force lon to 0 to avoid -0 degrees */
693 // *Longitude = 0.0;
694 // if (*Longitude > PI) /* force distorted values to 180, -180 degrees */
695 // *Longitude = PI;
696 // else if (*Longitude < -PI)
697 // *Longitude = -PI;
698 
699 // if (fabs(*Longitude - OMerc_Origin_Long) >= PI_OVER_2)
700 // { /* Distortion will result if Longitude is 90 degrees or more from the Central Meridian */
701 // Error_Code |= OMERC_LON_WARNING;
702 // }
703 
704  }
705  return (Error_Code);
706 } /* End Convert_Oblique_Mercator_To_Geodetic */
#define OMERC_NO_ERROR

◆ dup()

virtual ossimObject* ossimObliqueMercatorProjection::dup ( ) const
inlinevirtual

Implements ossimProjection.

Definition at line 35 of file ossimObliqueMercatorProjection.h.

36  {
37  return new ossimObliqueMercatorProjection(*this);
38  }
ossimObliqueMercatorProjection(const ossimEllipsoid &ellipsoid=ossimEllipsoid(), const ossimGpt &origin=ossimGpt())

◆ forward()

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

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

Implements ossimMapProjection.

Definition at line 177 of file ossimObliqueMercatorProjection.cpp.

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

178 {
179  double easting = 0.0;
180  double northing = 0.0;
181  ossimGpt gpt = latLon;
182 
183  if (theDatum)
184  {
185  if (theDatum->code() != latLon.datum()->code())
186  {
187  gpt.changeDatum(theDatum); // Shift to our datum.
188  }
189  }
190 
192  gpt.lonr(),
193  &easting,
194  &northing);
195  return ossimDpt(easting, northing);
196 }
virtual const ossimString & code() const
Definition: ossimDatum.h:57
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
long Convert_Geodetic_To_Oblique_Mercator(double Latitude, double Longitude, double *Easting, double *Northing) const
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_Oblique_Mercator_Parameters()

void ossimObliqueMercatorProjection::Get_Oblique_Mercator_Parameters ( double *  a,
double *  f,
double *  Origin_Latitude,
double *  Latitude_1,
double *  Longitude_1,
double *  Latitude_2,
double *  Longitude_2,
double *  False_Easting,
double *  False_Northing,
double *  Scale_Factor 
) const
protected

The function Get_Oblique_Mercator_Parameters returns the current ellipsoid parameters and Oblique Mercator projection parameters.

a : Semi-major axis of ellipsoid, in meters (output) f : Flattening of ellipsoid (output) Origin_Latitude : Latitude, in radians, at which the (output) point scale factor is 1.0 Latitude_1 : Latitude, in radians, of first point lying on central line (output) Longitude_1 : Longitude, in radians, of first point lying on central line (output) Latitude_2 : Latitude, in radians, of second point lying on central line (output) Longitude_2 : Longitude, in radians, of second point lying on central line (output) 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) Scale_Factor : Multiplier which reduces distances in the projection to the actual distance on the ellipsoid (output)

Definition at line 455 of file ossimObliqueMercatorProjection.cpp.

References OMerc_a, OMerc_f, OMerc_False_Easting, OMerc_False_Northing, OMerc_Lat_1, OMerc_Lat_2, OMerc_Lon_1, OMerc_Lon_2, OMerc_Origin_Lat, and OMerc_Scale_Factor.

465 { /* Begin Get_Oblique_Mercator_Parameters */
466 /*
467  * The function Get_Oblique_Mercator_Parameters returns the current ellipsoid
468  * parameters and Oblique Mercator projection parameters.
469  *
470  * a : Semi-major axis of ellipsoid, in meters (output)
471  * f : Flattening of ellipsoid (output)
472  * Origin_Latitude : Latitude, in radians, at which the (output)
473  * point scale factor is 1.0
474  * Latitude_1 : Latitude, in radians, of first point lying on
475  * central line (output)
476  * Longitude_1 : Longitude, in radians, of first point lying on
477  * central line (output)
478  * Latitude_2 : Latitude, in radians, of second point lying on
479  * central line (output)
480  * Longitude_2 : Longitude, in radians, of second point lying on
481  * central line (output)
482  * False_Easting : A coordinate value, in meters, assigned to the
483  * central meridian of the projection (output)
484  * False_Northing : A coordinate value, in meters, assigned to the
485  * origin latitude of the projection (output)
486  * Scale_Factor : Multiplier which reduces distances in the
487  * projection to the actual distance on the
488  * ellipsoid (output)
489  */
490 
491  *a = OMerc_a;
492  *f = OMerc_f;
493  *Origin_Latitude = OMerc_Origin_Lat;
494  *Latitude_1 = OMerc_Lat_1;
495  *Longitude_1 = OMerc_Lon_1;
496  *Latitude_2 = OMerc_Lat_2;
497  *Longitude_2 = OMerc_Lon_2;
498  *Scale_Factor = OMerc_Scale_Factor;
499  *False_Easting = OMerc_False_Easting;
500  *False_Northing = OMerc_False_Northing;
501 
502  return;
503 } /* End Get_Azimuthal_Equidistant_Parameters */

◆ getCentralPoint1()

const ossimGpt& ossimObliqueMercatorProjection::getCentralPoint1 ( ) const
inline

◆ getCentralPoint2()

const ossimGpt& ossimObliqueMercatorProjection::getCentralPoint2 ( ) const
inline

◆ getFalseEasting()

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

Reimplemented from ossimMapProjection.

Definition at line 74 of file ossimObliqueMercatorProjection.h.

◆ getFalseNorthing()

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

Reimplemented from ossimMapProjection.

Definition at line 75 of file ossimObliqueMercatorProjection.h.

◆ getScaleFactor()

double ossimObliqueMercatorProjection::getScaleFactor ( ) const
inline

◆ inverse()

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

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

Implements ossimMapProjection.

Definition at line 164 of file ossimObliqueMercatorProjection.cpp.

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

165 {
166  double lat = 0.0;
167  double lon = 0.0;
168 
169  Convert_Oblique_Mercator_To_Geodetic(eastingNorthing.x,
170  eastingNorthing.y,
171  &lat,
172  &lon);
173 
174  return ossimGpt(lat*DEG_PER_RAD, lon*DEG_PER_RAD, 0.0, theDatum);
175 }
#define DEG_PER_RAD
long Convert_Oblique_Mercator_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.

◆ loadState()

bool ossimObliqueMercatorProjection::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 229 of file ossimObliqueMercatorProjection.cpp.

References ossimKeywordNames::CENTRAL_POINT1_LAT_KW, ossimKeywordNames::CENTRAL_POINT1_LON_KW, ossimKeywordNames::CENTRAL_POINT2_LAT_KW, ossimKeywordNames::CENTRAL_POINT2_LON_KW, ossimKeywordlist::find(), ossimGpt::latd(), ossimMapProjection::loadState(), ossimGpt::lond(), OMerc_False_Easting, OMerc_False_Northing, OMerc_Scale_Factor, ossimKeywordNames::SCALE_FACTOR_KW, setDefaults(), STATIC_TYPE_NAME, theCentralPoint1, theCentralPoint2, ossimMapProjection::theFalseEastingNorthing, ossimString::toDouble(), ossimKeywordNames::TYPE_KW, update(), ossimDpt::x, and ossimDpt::y.

231 {
232  bool flag = ossimMapProjection::loadState(kwl, prefix);
233  const char* type = kwl.find(prefix, ossimKeywordNames::TYPE_KW);
234  const char* point1Lat = kwl.find(prefix, ossimKeywordNames::CENTRAL_POINT1_LAT_KW);
235  const char* point1Lon = kwl.find(prefix, ossimKeywordNames::CENTRAL_POINT1_LON_KW);
236  const char* point2Lat = kwl.find(prefix, ossimKeywordNames::CENTRAL_POINT2_LAT_KW);
237  const char* point2Lon = kwl.find(prefix, ossimKeywordNames::CENTRAL_POINT2_LON_KW);
238  const char* scale = kwl.find(prefix, ossimKeywordNames::SCALE_FACTOR_KW);
239 
240  setDefaults();
241 
243  {
246 
247  if(point1Lat&&point1Lon&&point2Lat&&point2Lon)
248  {
249  theCentralPoint1.latd(ossimString(point1Lat).toDouble());
250  theCentralPoint1.lond(ossimString(point1Lon).toDouble());
251  theCentralPoint2.latd(ossimString(point2Lat).toDouble());
252  theCentralPoint2.lond(ossimString(point2Lon).toDouble());
253  }
254  if(scale)
255  {
257  }
258  }
259 
260  update();
261 
262  return flag;
263 
264 }
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of an object from a keyword list.
double lond() const
Will convert the radian measure to degrees.
Definition: ossimGpt.h:97
static const char * CENTRAL_POINT2_LON_KW
const char * find(const char *key) const
double y
Definition: ossimDpt.h:165
double latd() const
Will convert the radian measure to degrees.
Definition: ossimGpt.h:87
static const char * TYPE_KW
#define STATIC_TYPE_NAME(T)
Definition: ossimRtti.h:325
double toDouble() const
static const char * CENTRAL_POINT2_LAT_KW
static const char * CENTRAL_POINT1_LON_KW
double x
Definition: ossimDpt.h:164
static const char * SCALE_FACTOR_KW
ossimDpt theFalseEastingNorthing
Hold the false easting northing.
static const char * CENTRAL_POINT1_LAT_KW

◆ operator==()

bool ossimObliqueMercatorProjection::operator== ( const ossimProjection projection) const
virtual

Returns TRUE if principal parameters are within epsilon tolerance.

Reimplemented from ossimMapProjection.

Definition at line 711 of file ossimObliqueMercatorProjection.cpp.

References ossim::almostEqual(), OMerc_Scale_Factor, theCentralPoint1, and theCentralPoint2.

712 {
713  if (!ossimMapProjection::operator==(proj))
714  return false;
715 
717  dynamic_cast<const ossimObliqueMercatorProjection*>(&proj);
718  if (!p) return false;
719 
720  if (theCentralPoint1 != p->theCentralPoint1) return false;
721  if (theCentralPoint2 != p->theCentralPoint2) return false;
723 
724  return true;
725 }
bool almostEqual(T x, T y, T tolerance=FLT_EPSILON)
Definition: ossimCommon.h:53

◆ saveState()

bool ossimObliqueMercatorProjection::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 198 of file ossimObliqueMercatorProjection.cpp.

References ossimKeywordlist::add(), ossimKeywordNames::CENTRAL_POINT1_LAT_KW, ossimKeywordNames::CENTRAL_POINT1_LON_KW, ossimKeywordNames::CENTRAL_POINT2_LAT_KW, ossimKeywordNames::CENTRAL_POINT2_LON_KW, ossimGpt::latd(), ossimGpt::lond(), OMerc_Scale_Factor, ossimMapProjection::saveState(), ossimKeywordNames::SCALE_FACTOR_KW, theCentralPoint1, and theCentralPoint2.

199 {
200  kwl.add(prefix,
203  true);
204 
205  kwl.add(prefix,
208  true);
209 
210  kwl.add(prefix,
213  true);
214 
215  kwl.add(prefix,
218  true);
219 
220  kwl.add(prefix,
223  true);
224 
225 
226  return ossimMapProjection::saveState(kwl, prefix);
227 }
double lond() const
Will convert the radian measure to degrees.
Definition: ossimGpt.h:97
static const char * CENTRAL_POINT2_LON_KW
double latd() const
Will convert the radian measure to degrees.
Definition: ossimGpt.h:87
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.
static const char * CENTRAL_POINT2_LAT_KW
static const char * CENTRAL_POINT1_LON_KW
static const char * SCALE_FACTOR_KW
static const char * CENTRAL_POINT1_LAT_KW

◆ Set_Oblique_Mercator_Parameters()

long ossimObliqueMercatorProjection::Set_Oblique_Mercator_Parameters ( double  a,
double  f,
double  Origin_Latitude,
double  Latitude_1,
double  Longitude_1,
double  Latitude_2,
double  Longitude_2,
double  False_Easting,
double  False_Northing,
double  Scale_Factor 
)
protected

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

a : Semi-major axis of ellipsoid, in meters (input) f : Flattening of ellipsoid (input) Origin_Latitude : Latitude, in radians, at which the (input) point scale factor is 1.0 Latitude_1 : Latitude, in radians, of first point lying on central line (input) Longitude_1 : Longitude, in radians, of first point lying on central line (input) Latitude_2 : Latitude, in radians, of second point lying on central line (input) Longitude_2 : Longitude, in radians, of second point lying on central line (input) 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) Scale_Factor : Multiplier which reduces distances in the projection to the actual distance on the ellipsoid (input)

Definition at line 270 of file ossimObliqueMercatorProjection.cpp.

Referenced by update().

280 { /* BEGIN Set_Oblique_Mercator_Parameters */
281 /*
282  * The function Set_Oblique_Mercator_Parameters receives the ellipsoid parameters and
283  * projection parameters as inputs, and sets the corresponding state
284  * variables. If any errors occur, the error code(s) are returned by the function,
285  * otherwise OMERC_NO_ERROR is returned.
286  *
287  * a : Semi-major axis of ellipsoid, in meters (input)
288  * f : Flattening of ellipsoid (input)
289  * Origin_Latitude : Latitude, in radians, at which the (input)
290  * point scale factor is 1.0
291  * Latitude_1 : Latitude, in radians, of first point lying on
292  * central line (input)
293  * Longitude_1 : Longitude, in radians, of first point lying on
294  * central line (input)
295  * Latitude_2 : Latitude, in radians, of second point lying on
296  * central line (input)
297  * Longitude_2 : Longitude, in radians, of second point lying on
298  * central line (input)
299  * False_Easting : A coordinate value, in meters, assigned to the
300  * central meridian of the projection (input)
301  * False_Northing : A coordinate value, in meters, assigned to the
302  * origin latitude of the projection (input)
303  * Scale_Factor : Multiplier which reduces distances in the
304  * projection to the actual distance on the
305  * ellipsoid (input)
306  */
307 
308 // double inv_f = 1 / f;
309  double es2, one_MINUS_es2;
310  double cos_olat, cos_olat2;
311  double sin_olat, sin_olat2, es2_sin_olat2;
312  double t0, t1, t2;
313  double D, D2, D2_MINUS_1, sqrt_D2_MINUS_1;
314  double H, L, LH;
315  double E2;
316  double F, G, J, P;
317  double dlon;
318  long Error_Code = OMERC_NO_ERROR;
319 
320 // if (a <= 0.0)
321 // { /* Semi-major axis must be greater than zero */
322 // Error_Code |= OMERC_A_ERROR;
323 // }
324 // if ((inv_f < 250) || (inv_f > 350))
325 // { /* Inverse flattening must be between 250 and 350 */
326 // Error_Code |= OMERC_INV_F_ERROR;
327 // }
328 // if ((Origin_Latitude <= -PI_OVER_2) || (Origin_Latitude >= PI_OVER_2))
329 // { /* origin latitude out of range - can not be at a pole */
330 // Error_Code |= OMERC_ORIGIN_LAT_ERROR;
331 // }
332 // if ((Latitude_1 <= -PI_OVER_2) || (Latitude_1 >= PI_OVER_2))
333 // { /* first latitude out of range - can not be at a pole */
334 // Error_Code |= OMERC_LAT1_ERROR;
335 // }
336 // if ((Latitude_2 <= -PI_OVER_2) || (Latitude_2 >= PI_OVER_2))
337 // { /* second latitude out of range - can not be at a pole */
338 // Error_Code |= OMERC_LAT2_ERROR;
339 // }
340 // if (Latitude_1 == 0.0)
341 // { /* first latitude can not be at the equator */
342 // Error_Code |= OMERC_LAT1_ERROR;
343 // }
344 // if (Latitude_1 == Latitude_2)
345 // { /* first and second latitudes can not be equal */
346 // Error_Code |= OMERC_LAT1_LAT2_ERROR;
347 // }
348 // if (((Latitude_1 < 0.0) && (Latitude_2 > 0.0)) ||
349 // ((Latitude_1 > 0.0) && (Latitude_2 < 0.0)))
350 // { /*first and second points can not be in different hemispheres */
351 // Error_Code |= OMERC_DIFF_HEMISPHERE_ERROR;
352 // }
353 // if ((Longitude_1 < -PI) || (Longitude_1 > TWO_PI))
354 // { /* first longitude out of range */
355 // Error_Code |= OMERC_LON1_ERROR;
356 // }
357 // if ((Longitude_2 < -PI) || (Longitude_2 > TWO_PI))
358 // { /* first longitude out of range */
359 // Error_Code |= OMERC_LON2_ERROR;
360 // }
361 // if ((Scale_Factor < MIN_SCALE_FACTOR) || (Scale_Factor > MAX_SCALE_FACTOR))
362 // { /* scale factor out of range */
363 // Error_Code |= OMERC_SCALE_FACTOR_ERROR;
364 // }
365  if (!Error_Code)
366  { /* no errors */
367 
368  OMerc_a = a;
369  OMerc_f = f;
370  OMerc_Origin_Lat = Origin_Latitude;
371  OMerc_Lat_1 = Latitude_1;
372  OMerc_Lat_2 = Latitude_2;
373  OMerc_Lon_1 = Longitude_1;
374  OMerc_Lon_2 = Longitude_2;
375  OMerc_Scale_Factor = Scale_Factor;
376  OMerc_False_Northing = False_Northing;
377  OMerc_False_Easting = False_Easting;
378 
379  es2 = 2 * OMerc_f - OMerc_f * OMerc_f;
380  es = sqrt(es2);
381  one_MINUS_es2 = 1 - es2;
382  es_OVER_2 = es / 2.0;
383 
384  cos_olat = cos(OMerc_Origin_Lat);
385  cos_olat2 = cos_olat * cos_olat;
386  sin_olat = sin(OMerc_Origin_Lat);
387  sin_olat2 = sin_olat * sin_olat;
388  es2_sin_olat2 = es2 * sin_olat2;
389 
390  OMerc_B = sqrt(1 + (es2 * cos_olat2 * cos_olat2) / one_MINUS_es2);
391  OMerc_A = (OMerc_a * OMerc_B * OMerc_Scale_Factor * sqrt(one_MINUS_es2)) / (1.0 - es2_sin_olat2);
394 
395  t0 = OMERC_t(OMerc_Origin_Lat, es * sin_olat, es_OVER_2);
396  t1 = OMERC_t(OMerc_Lat_1, es * sin(OMerc_Lat_1), es_OVER_2);
397  t2 = OMERC_t(OMerc_Lat_2, es * sin(OMerc_Lat_2), es_OVER_2);
398 
399  D = (OMerc_B * sqrt(one_MINUS_es2)) / (cos_olat * sqrt(1.0 - es2_sin_olat2));
400  D2 = D * D;
401  if (D2 < 1.0)
402  D2 = 1.0;
403  D2_MINUS_1 = D2 - 1.0;
404  sqrt_D2_MINUS_1 = sqrt(D2_MINUS_1);
405  if (D2_MINUS_1 > 1.0e-10)
406  {
407  if (OMerc_Origin_Lat >= 0.0)
408  OMerc_E = (D + sqrt_D2_MINUS_1) * pow(t0, OMerc_B);
409  else
410  OMerc_E = (D - sqrt_D2_MINUS_1) * pow(t0, OMerc_B);
411  }
412  else
413  OMerc_E = D * pow(t0, OMerc_B);
414  H = pow(t1, OMerc_B);
415  L = pow(t2, OMerc_B);
416  F = OMerc_E / H;
417  G = (F - 1.0 / F) / 2.0;
418  E2 = OMerc_E * OMerc_E;
419  LH = L * H;
420  J = (E2 - LH) / (E2 + LH);
421  P = (L - H) / (L + H);
422 
423  dlon = OMerc_Lon_1 - OMerc_Lon_2;
424  if (dlon < -M_PI )
425  OMerc_Lon_2 -= TWO_PI;
426  if (dlon > M_PI)
427  OMerc_Lon_2 += TWO_PI;
428  dlon = OMerc_Lon_1 - OMerc_Lon_2;
429  OMerc_Origin_Long = (OMerc_Lon_1 + OMerc_Lon_2) / 2.0 - (atan(J * tan(OMerc_B * dlon / 2.0) / P)) / OMerc_B;
430 
432 // if (dlon < -M_PI )
433 // OMerc_Origin_Long -= TWO_PI;
434 // if (dlon > M_PI)
435 // OMerc_Origin_Long += TWO_PI;
436 
438  OMerc_gamma = atan(sin(OMerc_B * dlon) / G);
439  cos_gamma = cos(OMerc_gamma);
440  sin_gamma = sin(OMerc_gamma);
441 
442  OMerc_azimuth = asin(D * sin_gamma);
443  cos_azimuth = cos(OMerc_azimuth);
444  sin_azimuth = sin(OMerc_azimuth);
445 
446  if (OMerc_Origin_Lat >= 0)
447  OMerc_u = A_over_B * atan(sqrt_D2_MINUS_1/cos_azimuth);
448  else
449  OMerc_u = -A_over_B * atan(sqrt_D2_MINUS_1/cos_azimuth);
450 
451  } /* End if(!Error_Code) */
452  return (Error_Code);
453 } /* End Set_Oblique_Mercator_Parameters */
#define OMERC_NO_ERROR
#define M_PI
#define OMERC_t(lat, e_sinlat, e_over_2)

◆ setCentralPoint1()

void ossimObliqueMercatorProjection::setCentralPoint1 ( const ossimGpt point)

Definition at line 107 of file ossimObliqueMercatorProjection.cpp.

References theCentralPoint1, and update().

◆ setCentralPoint2()

void ossimObliqueMercatorProjection::setCentralPoint2 ( const ossimGpt point)

Definition at line 114 of file ossimObliqueMercatorProjection.cpp.

References theCentralPoint2, and update().

◆ setDefaults()

void ossimObliqueMercatorProjection::setDefaults ( )

Definition at line 141 of file ossimObliqueMercatorProjection.cpp.

References ossimGpt::clampLat(), ossimGpt::clampLon(), ossimGpt::latd(), ossimGpt::lond(), OMerc_Delta_Easting, OMerc_Delta_Northing, OMerc_False_Easting, OMerc_False_Northing, OMerc_Scale_Factor, theCentralPoint1, theCentralPoint2, and ossimMapProjection::theOrigin.

Referenced by loadState(), and ossimObliqueMercatorProjection().

142 {
143  // initialize the central points to be 5 degrees about the origin.
144  OMerc_Delta_Northing = 40000000.0;
145  OMerc_Delta_Easting = 40000000.0;
146 
151 
152  theCentralPoint1.clampLat(-90.0, 90.0);
153  theCentralPoint1.clampLon(-180.0, 180.0);
154  theCentralPoint2.clampLat(-90.0, 90.0);
155  theCentralPoint2.clampLon(-180.0, 180.0);
156 
157  OMerc_False_Easting = 0.0;
158  OMerc_False_Northing = 0.0;
159 
160  OMerc_Scale_Factor = 1.0;
161 }
double lond() const
Will convert the radian measure to degrees.
Definition: ossimGpt.h:97
void clampLon(double low, double high)
Definition: ossimGpt.h:228
double latd() const
Will convert the radian measure to degrees.
Definition: ossimGpt.h:87
void clampLat(double low, double high)
Definition: ossimGpt.h:234

◆ setFalseEasting()

void ossimObliqueMercatorProjection::setFalseEasting ( double  falseEasting)

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

Definition at line 87 of file ossimObliqueMercatorProjection.cpp.

References OMerc_False_Easting, and update().

◆ setFalseEastingNorthing()

void ossimObliqueMercatorProjection::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 99 of file ossimObliqueMercatorProjection.cpp.

References OMerc_False_Easting, OMerc_False_Northing, and update().

◆ setFalseNorthing()

void ossimObliqueMercatorProjection::setFalseNorthing ( double  falseNorthing)

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

Definition at line 93 of file ossimObliqueMercatorProjection.cpp.

References OMerc_False_Northing, and update().

◆ setParameters()

void ossimObliqueMercatorProjection::setParameters ( const ossimGpt point1,
const ossimGpt point2,
double  falseEasting,
double  falseNorthing,
double  scaleFactor 
)

◆ setScaleFactor()

void ossimObliqueMercatorProjection::setScaleFactor ( double  scaleFactor)

Definition at line 120 of file ossimObliqueMercatorProjection.cpp.

References OMerc_Scale_Factor, and update().

◆ update()

void ossimObliqueMercatorProjection::update ( )
virtual

Reimplemented from ossimMapProjection.

Definition at line 68 of file ossimObliqueMercatorProjection.cpp.

References ossimEllipsoid::getA(), ossimEllipsoid::getFlattening(), ossimGpt::latr(), ossimGpt::lonr(), OMerc_False_Easting, OMerc_False_Northing, OMerc_Scale_Factor, Set_Oblique_Mercator_Parameters(), theCentralPoint1, theCentralPoint2, ossimMapProjection::theEllipsoid, ossimMapProjection::theFalseEastingNorthing, ossimMapProjection::theOrigin, ossimMapProjection::update(), ossimDpt::x, and ossimDpt::y.

Referenced by loadState(), ossimObliqueMercatorProjection(), setCentralPoint1(), setCentralPoint2(), setFalseEasting(), setFalseEastingNorthing(), setFalseNorthing(), setParameters(), and setScaleFactor().

69 {
72  theOrigin.latr(),
80 
83 
85 }
double y
Definition: ossimDpt.h:165
const double & getA() const
double lonr() const
Returns the longitude in radian measure.
Definition: ossimGpt.h:76
long Set_Oblique_Mercator_Parameters(double a, double f, double Origin_Latitude, double Latitude_1, double Longitude_1, double Latitude_2, double Longitude_2, double False_Easting, double False_Northing, double Scale_Factor)
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.

Member Data Documentation

◆ A_over_B

double ossimObliqueMercatorProjection::A_over_B
mutableprotected

◆ B_over_A

double ossimObliqueMercatorProjection::B_over_A
mutableprotected

◆ cos_azimuth

double ossimObliqueMercatorProjection::cos_azimuth
mutableprotected

◆ cos_gamma

double ossimObliqueMercatorProjection::cos_gamma
mutableprotected

◆ es

double ossimObliqueMercatorProjection::es
mutableprotected

◆ es_OVER_2

double ossimObliqueMercatorProjection::es_OVER_2
mutableprotected

◆ OMerc_a

double ossimObliqueMercatorProjection::OMerc_a
mutableprotected

Definition at line 103 of file ossimObliqueMercatorProjection.h.

Referenced by Get_Oblique_Mercator_Parameters().

◆ OMerc_A

double ossimObliqueMercatorProjection::OMerc_A
mutableprotected

◆ OMerc_azimuth

double ossimObliqueMercatorProjection::OMerc_azimuth
mutableprotected

Definition at line 111 of file ossimObliqueMercatorProjection.h.

◆ OMerc_B

double ossimObliqueMercatorProjection::OMerc_B
mutableprotected

◆ OMerc_Delta_Easting

double ossimObliqueMercatorProjection::OMerc_Delta_Easting
mutableprotected

Definition at line 132 of file ossimObliqueMercatorProjection.h.

Referenced by setDefaults().

◆ OMerc_Delta_Northing

double ossimObliqueMercatorProjection::OMerc_Delta_Northing
mutableprotected

Definition at line 131 of file ossimObliqueMercatorProjection.h.

Referenced by setDefaults().

◆ OMerc_E

double ossimObliqueMercatorProjection::OMerc_E
mutableprotected

◆ OMerc_f

double ossimObliqueMercatorProjection::OMerc_f
mutableprotected

Definition at line 104 of file ossimObliqueMercatorProjection.h.

Referenced by Get_Oblique_Mercator_Parameters().

◆ OMerc_False_Easting

double ossimObliqueMercatorProjection::OMerc_False_Easting
mutableprotected

◆ OMerc_False_Northing

double ossimObliqueMercatorProjection::OMerc_False_Northing
mutableprotected

◆ OMerc_gamma

double ossimObliqueMercatorProjection::OMerc_gamma
mutableprotected

◆ OMerc_Lat_1

double ossimObliqueMercatorProjection::OMerc_Lat_1
mutableprotected

Definition at line 123 of file ossimObliqueMercatorProjection.h.

Referenced by Get_Oblique_Mercator_Parameters().

◆ OMerc_Lat_2

double ossimObliqueMercatorProjection::OMerc_Lat_2
mutableprotected

Definition at line 125 of file ossimObliqueMercatorProjection.h.

Referenced by Get_Oblique_Mercator_Parameters().

◆ OMerc_Lon_1

double ossimObliqueMercatorProjection::OMerc_Lon_1
mutableprotected

Definition at line 124 of file ossimObliqueMercatorProjection.h.

Referenced by Get_Oblique_Mercator_Parameters().

◆ OMerc_Lon_2

double ossimObliqueMercatorProjection::OMerc_Lon_2
mutableprotected

Definition at line 126 of file ossimObliqueMercatorProjection.h.

Referenced by Get_Oblique_Mercator_Parameters().

◆ OMerc_Origin_Lat

double ossimObliqueMercatorProjection::OMerc_Origin_Lat
mutableprotected

Definition at line 122 of file ossimObliqueMercatorProjection.h.

Referenced by Get_Oblique_Mercator_Parameters().

◆ OMerc_Origin_Long

double ossimObliqueMercatorProjection::OMerc_Origin_Long
mutableprotected

◆ OMerc_Scale_Factor

double ossimObliqueMercatorProjection::OMerc_Scale_Factor
mutableprotected

◆ OMerc_u

double ossimObliqueMercatorProjection::OMerc_u
mutableprotected

◆ sin_azimuth

double ossimObliqueMercatorProjection::sin_azimuth
mutableprotected

◆ sin_gamma

double ossimObliqueMercatorProjection::sin_gamma
mutableprotected

◆ theCentralPoint1

ossimGpt ossimObliqueMercatorProjection::theCentralPoint1
protected

◆ theCentralPoint2

ossimGpt ossimObliqueMercatorProjection::theCentralPoint2
protected

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