OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimTransMercatorProjection.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 Transverse Mercator projection code.
10 //*******************************************************************
11 // $Id: ossimTransMercatorProjection.h 17815 2010-08-03 13:23:14Z dburken $
12 
13 #ifndef ossimTransMercatorProjection_HEADER
14 #define ossimTransMercatorProjection_HEADER
15 
17 
19 {
20 public:
21  ossimTransMercatorProjection(const ossimEllipsoid& ellipsoid = ossimEllipsoid(6378137, 6356752.3142),
22  const ossimGpt& origin = ossimGpt());
24  const ossimGpt& origin,
25  double falseEasting,
26  double falseNorthing,
27  double scaleFactor);
29 
30  virtual ossimObject *dup()const{return new ossimTransMercatorProjection(*this);}
31  virtual ossimGpt inverse(const ossimDpt &eastingNorthing)const;
32  virtual ossimDpt forward(const ossimGpt &latLon)const;
33  virtual void update();
34 
39  void setFalseEasting(double falseEasting);
40 
45  void setFalseNorthing(double falseNorthing);
46 
47  /*
48  * Set's scale and then update.
49  */
50  void setScaleFactor(double scaleFactor);
56  void setFalseEastingNorthing(double falseEasting, double falseNorthing);
57 
58  void setParameters(double falseEasting,
59  double falseNorthing,
60  double scaleFactor);
61 
62  void setDefaults();
63 
64  double getFalseEasting()const{return TranMerc_False_Easting;}
65  double getFalseNorthing()const{return TranMerc_False_Northing;}
66  double getScaleFactor()const{return TranMerc_Scale_Factor;}
67 
72  virtual bool saveState(ossimKeywordlist& kwl,
73  const char* prefix=0)const;
74 
79  virtual bool loadState(const ossimKeywordlist& kwl,
80  const char* prefix=0);
81 
85  virtual std::ostream& print(std::ostream& out) const;
86 
88  virtual bool operator==(const ossimProjection& projection) const;
89 
90 protected:
91 
92  //_____________GEOTRANS_______________
93 
94  double TranMerc_a; /* Semi-major axis of ellipsoid i meters */
95  double TranMerc_f; /* Flattening of ellipsoid */
96  double TranMerc_es; /* Eccentricity (0.08181919084262188000) squared */
97  double TranMerc_ebs; /* Second Eccentricity squared */
98 
99 /* Transverse_Mercator projection Parameters */
100  double TranMerc_Origin_Lat; /* Latitude of origin in radians */
101  double TranMerc_Origin_Long; /* Longitude of origin in radians */
102  double TranMerc_False_Northing; /* False northing in meters */
103  double TranMerc_False_Easting; /* False easting in meters */
104  double TranMerc_Scale_Factor; /* Scale factor */
105 
106 /* Isometeric to geodetic latitude parameters, default to WGS 84 */
107  double TranMerc_ap;
108  double TranMerc_bp;
109  double TranMerc_cp;
110  double TranMerc_dp;
111  double TranMerc_ep;
112 
113 /* Maximum variance for easting and northing values for WGS 84. */
116 
134  long Set_Transverse_Mercator_Parameters(double a,
135  double f,
136  double Origin_Latitude,
137  double Central_Meridian,
138  double False_Easting,
139  double False_Northing,
140  double Scale_Factor);
141 
142 
157  void Get_Transverse_Mercator_Parameters(double *a,
158  double *f,
159  double *Origin_Latitude,
160  double *Central_Meridian,
161  double *False_Easting,
162  double *False_Northing,
163  double *Scale_Factor)const;
164 
165 
179  long Convert_Geodetic_To_Transverse_Mercator (double Latitude,
180  double Longitude,
181  double *Easting,
182  double *Northing)const;
183 
184 
185 
199  long Convert_Transverse_Mercator_To_Geodetic (double Easting,
200  double Northing,
201  double *Latitude,
202  double *Longitude)const;
203 
204 
205 
206 TYPE_DATA
207 };
208 
209 #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.
long Set_Transverse_Mercator_Parameters(double a, double f, double Origin_Latitude, double Central_Meridian, double False_Easting, double False_Northing, double Scale_Factor)
#define OSSIMDLLEXPORT
Represents serializable keyword/value map.
void Get_Transverse_Mercator_Parameters(double *a, double *f, double *Origin_Latitude, double *Central_Meridian, double *False_Easting, double *False_Northing, double *Scale_Factor)
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
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_Transverse_Mercator_To_Geodetic(double Easting, double Northing, double *Latitude, double *Longitude)
virtual ossimObject * dup() const
virtual std::ostream & print(std::ostream &out) const
Prints data members to stream.
long Convert_Geodetic_To_Transverse_Mercator(double Latitude, double Longitude, double *Easting, double *Northing)
std::basic_ostream< char > ostream
Base class for char output streams.
Definition: ossimIosFwd.h:23