OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimObliqueMercatorProjection.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: ossimObliqueMercatorProjection.h 17815 2010-08-03 13:23:14Z dburken $
11 
12 #ifndef ossimObliqueMercatorProjection_HEADER
13 #define ossimObliqueMercatorProjection_HEADER
14 
16 
18 {
19 public:
21  const ossimGpt& origin = ossimGpt());
22 
27  const ossimGpt& origin,
28  const ossimGpt& point1,
29  const ossimGpt& point2,
30  double falseEasting,
31  double falseNorthing,
32  double scaleFactor);
33 
35  virtual ossimObject *dup()const
36  {
37  return new ossimObliqueMercatorProjection(*this);
38  }
39 
40  virtual ossimGpt inverse(const ossimDpt &eastingNorthing)const;
41  virtual ossimDpt forward(const ossimGpt &latLon)const;
42  virtual void update();
43 
48  void setFalseEasting(double falseEasting);
49 
54  void setFalseNorthing(double falseNorthing);
55 
56  void setCentralPoint1(const ossimGpt& point);
57  void setCentralPoint2(const ossimGpt& point);
58  void setScaleFactor(double scaleFactor);
59 
60  void setParameters(const ossimGpt& point1,
61  const ossimGpt& point2,
62  double falseEasting,
63  double falseNorthing,
64  double scaleFactor);
70  void setFalseEastingNorthing(double falseEasting, double falseNorthing);
71 
72  void setDefaults();
73 
74  double getFalseEasting()const{return OMerc_False_Easting;}
75  double getFalseNorthing()const{return OMerc_False_Northing;}
76  const ossimGpt& getCentralPoint1()const{return theCentralPoint1;}
77  const ossimGpt& getCentralPoint2()const{return theCentralPoint2;}
78  double getScaleFactor()const{return OMerc_Scale_Factor;}
83  virtual bool saveState(ossimKeywordlist& kwl,
84  const char* prefix=0)const;
85 
90  virtual bool loadState(const ossimKeywordlist& kwl,
91  const char* prefix=0);
92 
94  virtual bool operator==(const ossimProjection& projection) const;
95 
96 protected:
97 
100 
101 //________________________GEOTRANS STUFF_____________________________________
102 
103  mutable double OMerc_a; /* Semi-major axis of ellipsoid, in meters */
104  mutable double OMerc_f; /* Flattening of ellipsoid */
105  mutable double es;
106  mutable double es_OVER_2;
107  mutable double OMerc_A;
108  mutable double OMerc_B;
109  mutable double OMerc_E;
110  mutable double OMerc_gamma;
111  mutable double OMerc_azimuth; /* Azimuth of central line as it crosses origin lat */
112  mutable double OMerc_Origin_Long; /* Longitude at center of projection */
113  mutable double cos_gamma;
114  mutable double sin_gamma;
115  mutable double sin_azimuth;
116  mutable double cos_azimuth;
117  mutable double A_over_B;
118  mutable double B_over_A;
119  mutable double OMerc_u; /* Coordinates for center point (uc , vc), vc = 0 */
120  /* at center lat and lon */
121 /* Oblique Mercator projection Parameters */
122  mutable double OMerc_Origin_Lat;/* Latitude of projection center, in radians */
123  mutable double OMerc_Lat_1; /* Latitude of first point lying on central line */
124  mutable double OMerc_Lon_1; /* Longitude of first point lying on central line */
125  mutable double OMerc_Lat_2; /* Latitude of second point lying on central line */
126  mutable double OMerc_Lon_2; /* Longitude of second point lying on central line */
127  mutable double OMerc_Scale_Factor; /* Scale factor at projection center */
128  mutable double OMerc_False_Northing; /* False northing, in meters, at projection center */
129  mutable double OMerc_False_Easting; /* False easting, in meters, at projection center */
130 
131  mutable double OMerc_Delta_Northing;
132  mutable double OMerc_Delta_Easting;
133 
160  long Set_Oblique_Mercator_Parameters(double a,
161  double f,
162  double Origin_Latitude,
163  double Latitude_1,
164  double Longitude_1,
165  double Latitude_2,
166  double Longitude_2,
167  double False_Easting,
168  double False_Northing,
169  double Scale_Factor);
170 
171 
196  void Get_Oblique_Mercator_Parameters(double *a,
197  double *f,
198  double *Origin_Latitude,
199  double *Latitude_1,
200  double *Longitude_1,
201  double *Latitude_2,
202  double *Longitude_2,
203  double *False_Easting,
204  double *False_Northing,
205  double *Scale_Factor)const;
206 
207 
220  long Convert_Geodetic_To_Oblique_Mercator(double Latitude,
221  double Longitude,
222  double *Easting,
223  double *Northing)const;
224 
225 
238  long Convert_Oblique_Mercator_To_Geodetic(double Easting,
239  double Northing,
240  double *Latitude,
241  double *Longitude)const;
242 
243 TYPE_DATA
244 };
245 
246 #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
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).