OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimBonneProjection.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 Bonne projection code.
10 //*******************************************************************
11 // $Id: ossimBonneProjection.h 17815 2010-08-03 13:23:14Z dburken $
12 #ifndef ossimBonneProjection_HEADER
13 #define ossimBonneProjection_HEADER
14 
16 
18 {
19 public:
20 
22  const ossimGpt& origin = ossimGpt());
23  ossimBonneProjection(const ossimEllipsoid& ellipsoid,
24  const ossimGpt& origin,
25  const double falseEasting,
26  const double falseNorthing);
28  virtual ossimObject *dup()const{return new ossimBonneProjection(*this);}
29 
30  virtual ossimDpt forward(const ossimGpt &worldPoint) const;
31  virtual ossimGpt inverse(const ossimDpt &projectedPoint)const;
32  virtual void update();
33 
38  void setFalseEasting(double falseEasting);
39 
44  void setFalseNorthing(double falseNorthing);
45 
51  void setFalseEastingNorthing(double falseEasting, double falseNorthing);
52 
53  double getFalseEasting()const{return Bonn_False_Easting;}
54  double getFalseNorthing()const{return Bonn_False_Northing;}
55 
60  void setDefaults();
61 
66  virtual bool saveState(ossimKeywordlist& kwl,
67  const char* prefix=0)const;
68 
73  virtual bool loadState(const ossimKeywordlist& kwl,
74  const char* prefix=0);
75 
77  virtual bool operator==(const ossimProjection& projection) const;
78 
79 private:
80 
81 
82  mutable double Bonn_a; /* Semi-major axis of ellipsoid in meters */
83  mutable double Bonn_f; /* Flattening of ellipsoid */
84  mutable double es2; /* Eccentricity (0.08181919084262188000) squared */
85  mutable double es4; /* es2 * es2 */
86  mutable double es6; /* es4 * es2 */
87  mutable double M1; /* Bonn_M(Bonna,c0lat,c1s2lat,c2s4lat,c3s6lat) */
88  mutable double m1; /* Bonn_m(coslat,sinlat,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 
99 /* Bonne projection Parameters */
100  mutable double Bonn_Origin_Lat; /* Latitude of origin in radians */
101  mutable double Bonn_Origin_Long; /* Longitude of origin in radians */
102  mutable double Bonn_False_Northing; /* False northing in meters */
103  mutable double Bonn_False_Easting; /* False easting in meters */
104  mutable double Sin_Bonn_Origin_Lat; /* sin(Bonn_Origin_Lat) */
105  mutable double Bonn_am1sin; /* Bonn_a * m1 / Sin_Bonn_Origin_Lat */
106 
107 /* Maximum variance for easting and northing values for WGS 84.
108  */
109  mutable double Bonn_Max_Easting;
110  mutable double Bonn_Min_Easting;
111  mutable double Bonn_Delta_Northing;
112 
130  long Set_Bonne_Parameters(double a,
131  double f,
132  double Origin_Latitude,
133  double Central_Meridian,
134  double False_Easting,
135  double False_Northing);
136 
137 
153  void Get_Bonne_Parameters(double *a,
154  double *f,
155  double *Origin_Latitude,
156  double *Central_Meridian,
157  double *False_Easting,
158  double *False_Northing)const;
159 
160 
173  long Convert_Geodetic_To_Bonne (double Latitude,
174  double Longitude,
175  double *Easting,
176  double *Northing)const;
177 
178 
191  long Convert_Bonne_To_Geodetic(double Easting,
192  double Northing,
193  double *Latitude,
194  double *Longitude)const;
195 
199 TYPE_DATA
200 };
201 
202 #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.
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
double getFalseEasting() const
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).
double getFalseNorthing() const
virtual ossimObject * dup() const