OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimSinusoidalProjection.h
Go to the documentation of this file.
1 //*******************************************************************
2 //
3 // License: See top level LICENSE.txt file.
4 //
5 // Author: Garrett Potts (gpotts@imagelinks.com)
6 //
7 // Description:
8 //
9 // Calls Geotrans Sinusoidal projection code.
10 //*******************************************************************
11 // $Id: ossimSinusoidalProjection.h 17815 2010-08-03 13:23:14Z dburken $
12 
13 #ifndef ossimSinusoidalProjection_HEADER
14 #define ossimSinusoidalProjection_HEADER
15 
17 
19 {
20 public:
22  const ossimGpt& origin = ossimGpt());
23 
25  const ossimGpt& origin,
26  const double falseEasting,
27  const double falseNorthing);
28 
30 
31  virtual ossimObject *dup()const{return new ossimSinusoidalProjection(*this);}
32 
33 
34  virtual ossimGpt inverse(const ossimDpt &eastingNorthing)const;
35  virtual ossimDpt forward(const ossimGpt &latLon)const;
36  virtual void update();
37 
42  void setFalseEasting(double falseEasting);
43 
48  void setFalseNorthing(double falseNorthing);
49 
55  void setFalseEastingNorthing(double falseEasting, double falseNorthing);
56 
57  void setDefaults();
58 
59  void setCentralMeridian(double centralMeridian);
60 
61  double getFalseEasting()const{return Sinu_False_Easting;}
62  double getFalseNorthing()const{return Sinu_False_Northing;}
63 
68  virtual bool saveState(ossimKeywordlist& kwl,
69  const char* prefix=0)const;
70 
75  virtual bool loadState(const ossimKeywordlist& kwl,
76  const char* prefix=0);
77 
79  virtual bool operator==(const ossimProjection& projection) const;
80 
81 private:
82 
83  //_______________________GEOTRANS________________________
84  mutable double Sinu_a; /* Semi-major axis of ellipsoid in meters */
85  mutable double Sinu_f; /* Flattening of ellipsoid */
86  mutable double es2; /* Eccentricity (0.08181919084262188000) squared */
87  mutable double es4; /* es2 * es2 */
88  mutable double es6; /* es4 * es2 */
89  mutable double c0; /* 1 - es2 / 4.0 - 3.0 * es4 / 64.0 - 5.0 * es6 / 256.0 */
90  mutable double c1; /* 3.0 * es2 / 8.0 + 3.0 * es4 / 32.0 + 45.0 * es6 / 1024.0 */
91  mutable double c2; /* 15.0 * es4 / 256.0 + 45.0 * es6 / 1024.0 */
92  mutable double c3; /* 35.0 * es6 / 3072.0 */
93  mutable double a0; /* 3.0 * e1 / 2.0 - 27.0 * e3 / 32.0 */
94  mutable double a1; /* 21.0 * e2 / 16.0 - 55.0 * e4 / 32.0 */
95  mutable double a2; /* 151.0 * e3 / 96.0 */
96  mutable double a3; /* 1097.0 * e4 / 512.0 */
97 
98 /* Sinusoid projection Parameters */
99  mutable double Sinu_Origin_Long; /* Longitude of origin in radians */
100  mutable double Sinu_False_Northing; /* False northing in meters */
101  mutable double Sinu_False_Easting; /* False easting in meters */
102 
103 /* Maximum variance for easting and northing values for WGS 84.
104  */
105  mutable double Sinu_Max_Easting;
106  mutable double Sinu_Min_Easting;
107  mutable double Sinu_Delta_Northing;
108 
109 
125  long Set_Sinusoidal_Parameters(double a,
126  double f,
127  double Central_Meridian,
128  double False_Easting,
129  double False_Northing);
130 
131 
132 
146  void Get_Sinusoidal_Parameters(double *a,
147  double *f,
148  double *Central_Meridian,
149  double *False_Easting,
150  double *False_Northing)const;
151 
152 
153 
166  long Convert_Geodetic_To_Sinusoidal (double Latitude,
167  double Longitude,
168  double *Easting,
169  double *Northing)const;
170 
171 
184  long Convert_Sinusoidal_To_Geodetic(double Easting,
185  double Northing,
186  double *Latitude,
187  double *Longitude)const;
188 
189 TYPE_DATA
190 };
191 
192 #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
void Get_Sinusoidal_Parameters(double *a, double *f, double *Central_Meridian, double *False_Easting, double *False_Northing)
long Set_Sinusoidal_Parameters(double a, double f, double Central_Meridian, double False_Easting, double False_Northing)
Represents serializable keyword/value map.
virtual ossimObject * dup() const
virtual ossimGpt inverse(const ossimDpt &projectedPoint) const =0
Will take a point in meters and convert it to ground.
virtual bool operator==(const ossimProjection &projection) const
Compares this to arg projection and returns TRUE if the same.
#define TYPE_DATA
Definition: ossimRtti.h:339
long Convert_Sinusoidal_To_Geodetic(double Easting, double Northing, double *Latitude, double *Longitude)
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).
long Convert_Geodetic_To_Sinusoidal(double Latitude, double Longitude, double *Easting, double *Northing)