OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimCassiniProjection.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 Cassini projection code.
10 //*******************************************************************
11 // $Id: ossimCassiniProjection.h 17815 2010-08-03 13:23:14Z dburken $
12 
13 #ifndef ossimCassiniProjection_HEADER
14 #define ossimCassiniProjection_HEADER
15 
17 
19 {
20 public:
22  const ossimGpt& origin = ossimGpt());
23  ossimCassiniProjection(const ossimEllipsoid& ellipsoid,
24  const ossimGpt& origin,
25  const double falseEasting,
26  const double falseNorthing);
28  virtual ossimObject *dup()const{return new ossimCassiniProjection(*this);}
29 
30  virtual ossimDpt forward(const ossimGpt &worldPoint) const;
31  virtual ossimGpt inverse(const ossimDpt &projectedPoint)const;
32  virtual void update();
37  void setFalseEasting(double falseEasting);
38 
43  void setFalseNorthing(double falseNorthing);
44 
50  void setFalseEastingNorthing(double falseEasting, double falseNorthing);
51 
52  double getFalseEasting()const{return Cass_False_Easting;}
53  double getFalseNorthing()const{return Cass_False_Northing;}
54 
59  void setDefaults();
60 
65  virtual bool saveState(ossimKeywordlist& kwl,
66  const char* prefix=0)const;
67 
72  virtual bool loadState(const ossimKeywordlist& kwl,
73  const char* prefix=0);
74 
75 private:
76 
77  //_____________________GETRANS STUFF_____________________
78 
79  mutable double Cass_a; /* Semi-major axis of ellipsoid in meters */
80  mutable double Cass_f; /* Flattening of ellipsoid */
81  mutable double es2; /* Eccentricity (0.08181919084262188000) squared */
82  mutable double es4; /* es2 * es2 */
83  mutable double es6; /* es4 * es2 */
84  mutable double M0;
85  mutable double c0; /* 1 - es2 / 4.0 - 3.0 * es4 / 64.0 - 5.0 * es6 / 256.0 */
86  mutable double c1; /* 3.0 * es2 / 8.0 + 3.0 * es4 / 32.0 + 45.0 * es6 / 1024.0 */
87  mutable double c2; /* 15.0 * es4 / 256.0 + 45.0 * es6 / 1024.0 */
88  mutable double c3; /* 35.0 * es6 / 3072.0 */
89  mutable double One_Minus_es2; /* 1.0 - es2 */
90  mutable double a0; /* 3.0 * e1 / 2.0 - 27.0 * e3 / 32.0 */
91  mutable double a1; /* 21.0 * e2 / 16.0 - 55.0 * e4 / 32.0 */
92  mutable double a2; /* 151.0 * e3 / 96.0 */
93  mutable double a3; /* 1097.0 * e4 /512.0 */
94 
95 /* Cassini projection Parameters */
96  mutable double Cass_Origin_Lat; /* Latitude of origin in radians */
97  mutable double Cass_Origin_Long; /* Longitude of origin in radians */
98  mutable double Cass_False_Northing; /* False northing in meters */
99  mutable double Cass_False_Easting; /* False easting in meters */
100 
101  /* Maximum variance for easting and northing values for WGS 84.
102  */
103  mutable double Cass_Min_Easting;
104  mutable double Cass_Max_Easting;
105  mutable double Cass_Min_Northing;
106  mutable double Cass_Max_Northing;
107 
125  long Set_Cassini_Parameters(double a,
126  double f,
127  double Origin_Latitude,
128  double Central_Meridian,
129  double False_Easting,
130  double False_Northing);
131 
132 
148  void Get_Cassini_Parameters(double *a,
149  double *f,
150  double *Origin_Latitude,
151  double *Central_Meridian,
152  double *False_Easting,
153  double *False_Northing)const;
154 
155 
168  long Convert_Geodetic_To_Cassini (double Latitude,
169  double Longitude,
170  double *Easting,
171  double *Northing)const;
172 
173 
186  long Convert_Cassini_To_Geodetic(double Easting,
187  double Northing,
188  double *Latitude,
189  double *Longitude)const;
190 
191 TYPE_DATA
192 };
193 
194 #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.
#define OSSIMDLLEXPORT
Represents serializable keyword/value map.
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
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 ossimObject * dup() const