OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimGnomonicProjection.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 //*******************************************************************
10 // $Id: ossimGnomonicProjection.h 17815 2010-08-03 13:23:14Z dburken $
11 #ifndef ossimGnomonicProjection_HEADER
12 #define ossimGnomonicProjection_HEADER
13 
15 
17 {
18 public:
20  const ossimGpt& origin = ossimGpt());
21  ossimGnomonicProjection(const ossimEllipsoid& ellipsoid,
22  const ossimGpt& origin,
23  const double falseEasting,
24  const double falseNorthing);
26  virtual ossimObject *dup()const
27  {
28  return new ossimGnomonicProjection(*this);
29  }
30 
31  virtual ossimGpt inverse(const ossimDpt &eastingNorthing)const;
32  virtual ossimDpt forward(const ossimGpt &latLon)const;
33  virtual void update();
34 
35 
40  void setFalseEasting(double falseEasting);
41 
46  void setFalseNorthing(double falseNorthing);
47 
53  void setFalseEastingNorthing(double falseEasting, double falseNorthing);
54 
55  void setDefaults();
56 
57  double getFalseEasting()const{return Gnom_False_Easting;}
58  double getFalseNorthing()const{return Gnom_False_Northing;}
59 
64  virtual bool saveState(ossimKeywordlist& kwl,
65  const char* prefix=0)const;
66 
71  virtual bool loadState(const ossimKeywordlist& kwl,
72  const char* prefix=0);
73 
74 protected:
75 
76  //__________________________GEOTRANS________________________
77  mutable double Gnom_a; /* Semi-major axis of ellipsoid in meters */
78  mutable double Gnom_f; /* Flattening of ellipsoid */
79  mutable double Ra; /* Spherical Radius */
80  mutable double Sin_Gnom_Origin_Lat;
81  mutable double Cos_Gnom_Origin_Lat;
82 
83 /* Gnomonic projection Parameters */
84  mutable double Gnom_Origin_Lat; /* Latitude of origin in radians */
85  mutable double Gnom_Origin_Long; /* Longitude of origin in radians */
86  mutable double Gnom_False_Northing; /* False northing in meters */
87  mutable double Gnom_False_Easting; /* False easting in meters */
88  mutable double abs_Gnom_Origin_Lat;
89 
90  mutable double Gnom_Delta_Northing;
91  mutable double Gnom_Delta_Easting;
92 
93 /*
94  * The function Set_Gnomonic_Parameters receives the ellipsoid parameters and
95  * projection parameters as inputs, and sets the corresponding state
96  * variables. If any errors occur, the error code(s) are returned by the function,
97  * otherwise GNOM_NO_ERROR is returned.
98  *
99  * a : Semi-major axis of ellipsoid, in meters (input)
100  * f : Flattening of ellipsoid (input)
101  * Origin_Latitude : Latitude in radians at which the (input)
102  * point scale factor is 1.0
103  * Central_Meridian : Longitude in radians at the center of (input)
104  * the projection
105  * False_Easting : A coordinate value in meters assigned to the
106  * central meridian of the projection. (input)
107  * False_Northing : A coordinate value in meters assigned to the
108  * origin latitude of the projection (input)
109  */
110  long Set_Gnomonic_Parameters(double a,
111  double f,
112  double Origin_Latitude,
113  double Central_Meridian,
114  double False_Easting,
115  double False_Northing);
116 
132  void Get_Gnomonic_Parameters(double *a,
133  double *f,
134  double *Origin_Latitude,
135  double *Central_Meridian,
136  double *False_Easting,
137  double *False_Northing)const;
138 
139 
152  long Convert_Geodetic_To_Gnomonic (double Latitude,
153  double Longitude,
154  double *Easting,
155  double *Northing)const;
156 
157 
170  long Convert_Gnomonic_To_Geodetic(double Easting,
171  double Northing,
172  double *Latitude,
173  double *Longitude)const;
174 
175 
176 TYPE_DATA
177 };
178 
179 #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