OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimEquDistCylProjection.h
Go to the documentation of this file.
1 //*******************************************************************
2 //
3 // License: See top level LICENSE.txt file.
4 //
5 // Author: Garrett Potts
6 //
7 // Description:
8 //
9 // Calls Geotrans Equidistant Cylinder projection code.
10 //*******************************************************************
11 // $Id: ossimEquDistCylProjection.h 23373 2015-06-13 17:16:38Z okramer $
12 
13 #ifndef ossimEquDistCylProjection_HEADER
14 #define ossimEquDistCylProjection_HEADER
15 
17 
18 class ossimIpt;
19 
20 class OSSIMDLLEXPORT ossimEquDistCylProjection : public ossimMapProjection//public ossimLlxyProjection
21 {
22 public:
24  const ossimGpt& origin = ossimGpt());
26  const ossimGpt& origin,
27  double falseEasting,
28  double falseNorthing);
29 
31  :ossimMapProjection(rhs)
32  // :ossimLlxyProjection(rhs)
33  {
34  *this = rhs;
35  }
36 
38  virtual ossimObject *dup()const
39  {
40  return new ossimEquDistCylProjection(*this);
41  }
42 
43  virtual ossimGpt inverse(const ossimDpt &eastingNorthing)const;
44  virtual ossimDpt forward(const ossimGpt &latLon)const;
45  virtual void update();
46 
51  virtual void setOrigin(const ossimGpt& origin);
52 
57  void setFalseEasting(double falseEasting);
58 
63  void setFalseNorthing(double falseNorthing);
64 
70  void setFalseEastingNorthing(double falseEasting, double falseNorthing);
71 
72  double getFalseEasting()const{return Eqcy_False_Easting;}
73  double getFalseNorthing()const{return Eqcy_False_Northing;}
74 
75  virtual void lineSampleHeightToWorld(const ossimDpt& lineSampPt,
76  const double& heightAboveEllipsoid,
77  ossimGpt& worldPt) const;
78  virtual void worldToLineSample(const ossimGpt &worldPoint,
79  ossimDpt& lineSample)const;
80 
92  void worldToLineSample( const ossimGpt& worldPoint,
93  const ossimIpt& imageSize,
94  ossimDpt& lineSample ) const;
95 
96  virtual bool isGeographic()const
97  {
98  return true;
99  }
100  void setDefaults();
101 
106  virtual bool saveState(ossimKeywordlist& kwl,
107  const char* prefix=0)const;
108 
113  virtual bool loadState(const ossimKeywordlist& kwl,
114  const char* prefix=0);
115 
116 private:
117  //---------------------GEOTRANS-------------------------------
118  mutable double Eqcy_a; /* Semi-major axis of ellipsoid in meters */
119  mutable double Eqcy_f; /* Flattening of ellipsoid */
120  mutable double es2; /* Eccentricity (0.08181919084262188000) squared */
121  mutable double es4; /* es2 * es2 */
122  mutable double es6; /* es4 * es2 */
123  mutable double Ra; /* Spherical Radius */
124 
125 /* Equidistant Cylindrical projection Parameters */
126  mutable double Eqcy_Std_Parallel; /* Latitude of standard parallel in radians */
127  mutable double Cos_Eqcy_Std_Parallel; /* cos(Eqcy_Std_Parallel) */
128  mutable double Eqcy_Origin_Long; /* Longitude of origin in radians */
129  mutable double Eqcy_False_Easting;
130  mutable double Eqcy_False_Northing;
131  mutable double Eqcy_Delta_Northing;
132  mutable double Eqcy_Max_Easting;
133  mutable double Eqcy_Min_Easting;
134  mutable double Ra_Cos_Eqcy_Std_Parallel; /* Ra * Cos_Eqcy_Std_Parallel */
135 
154  long Set_Equidistant_Cyl_Parameters(double a,
155  double f,
156  double Std_Parallel,
157  double Central_Meridian,
158  double False_Easting,
159  double False_Northing);
160 
161 
177  void Get_Equidistant_Cyl_Parameters(double *a,
178  double *f,
179  double *Std_Parallel,
180  double *Central_Meridian,
181  double *False_Easting,
182  double *False_Northing)const;
183 
184 
197  long Convert_Geodetic_To_Equidistant_Cyl (double Latitude,
198  double Longitude,
199  double *Easting,
200  double *Northing)const;
201 
202 
215  long Convert_Equidistant_Cyl_To_Geodetic(double Easting,
216  double Northing,
217  double *Latitude,
218  double *Longitude)const;
219 
220 TYPE_DATA
221 };
222 
223 #endif
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of an object from a keyword list.
virtual ossimObject * dup() const
#define OSSIMDLLEXPORT
Represents serializable keyword/value map.
virtual ossimDpt worldToLineSample(const ossimGpt &worldPoint) const
virtual void setOrigin(const ossimGpt &origin)
Sets theOrigin to origin.
virtual ossimGpt inverse(const ossimDpt &projectedPoint) const =0
Will take a point in meters and convert it to ground.
#define TYPE_DATA
Definition: ossimRtti.h:339
ossimEquDistCylProjection(const ossimEquDistCylProjection &rhs)
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.
virtual ossimDpt forward(const ossimGpt &worldPoint) const =0
All map projections will convert the world coordinate to an easting northing (Meters).
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...