OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimAlbersProjection.h
Go to the documentation of this file.
1 //*******************************************************************
2 // Copyright (C) 2000 ImageLinks Inc.
3 //
4 // License: See top level LICENSE.txt file.
5 //
6 // Author: Garrett Potts
7 //
8 // Description:
9 //
10 // Calls Geotrans Albers projection code.
11 //*******************************************************************
12 // $Id: ossimAlbersProjection.h 17815 2010-08-03 13:23:14Z dburken $
13 
14 #ifndef ossimAlbersProjection_HEADER
15 #define ossimAlbersProjection_HEADER
17 
19 
26 {
27 public:
29  const ossimGpt& origin = ossimGpt());
30 
39  ossimAlbersProjection(const ossimEllipsoid& ellipsoid,
40  const ossimGpt& origin,
41  double stdParallel1,
42  double stdParallel2,
43  double falseEasting,
44  double falseNorthing);
45 
46  ossimObject *dup()const;
47 
48  virtual ossimDpt forward(const ossimGpt &worldPoint) const;
49  virtual ossimGpt inverse(const ossimDpt &projectedPoint)const;
50  virtual void update();
51 
56  void setStandardParallel1(double degree);
57 
62  void setStandardParallel2(double degree);
63 
67  void setStandardParallels(double parallel1Degree,
68  double prallel2Degree);
69 
74  void setFalseEasting(double falseEasting);
75 
80  void setFalseNorthing(double falseNorthing);
81 
87  void setFalseEastingNorthing(double falseEasting, double falseNorthing);
88 
94  void setParameters(double parallel1,
95  double parallel2,
96  double falseEasting,
97  double falseNorthing);
98 
100  virtual double getStandardParallel1() const;
101 
103  virtual double getStandardParallel2() const;
104 
105  void setDefaults();
106 
111  virtual bool saveState(ossimKeywordlist& kwl,
112  const char* prefix=0)const;
113 
118  virtual bool loadState(const ossimKeywordlist& kwl,
119  const char* prefix=0);
120 
122  virtual bool operator==(const ossimProjection& projection) const;
123 
124 protected:
125  virtual ~ossimAlbersProjection();
126 
127 
128  //________________________GEOTRANS__________________________
129  //
130  mutable double Albers_a; /* Semi-major axis of ellipsoid in meters */
131  mutable double Albers_f; /* Flattening of ellipsoid */
132  mutable double es; /* Eccentricity of ellipsoid */
133  mutable double es2; /* Eccentricity squared */
134  mutable double C; /* constant c */
135  mutable double rho0; /* height above ellipsoid */
136  mutable double n; /* ratio between meridians */
137  mutable double Albers_a_OVER_n; /* Albers_a / n */
138  mutable double one_MINUS_es2; /* 1 - es2 */
139  mutable double two_es; /* 2 * es */
140 
141 /* Albers Projection Parameters */
142  mutable double Albers_Origin_Lat; /* Latitude of origin in radians */
143  mutable double Albers_Origin_Long; /* Longitude of origin in radians */
144  mutable double Albers_Std_Parallel_1;
145  mutable double Albers_Std_Parallel_2;
146  mutable double Albers_False_Easting;
147  mutable double Albers_False_Northing;
148 
149  mutable double Albers_Delta_Northing;
150  mutable double Albers_Delta_Easting;
151 
171  long Set_Albers_Parameters(double a,
172  double f,
173  double Origin_Latitude,
174  double Central_Meridian,
175  double Std_Parallel_1,
176  double Std_Parallel_2,
177  double False_Easting,
178  double False_Northing);
179 
180 
198  void Get_Albers_Parameters(double *a,
199  double *f,
200  double *Origin_Latitude,
201  double *Central_Meridian,
202  double *Std_Parallel_1,
203  double *Std_Parallel_2,
204  double *False_Easting,
205  double *False_Northing)const;
206 
207 
208 
221  long Convert_Geodetic_To_Albers (double Latitude,
222  double Longitude,
223  double *Easting,
224  double *Northing)const;
225 
226 
227 
240  long Convert_Albers_To_Geodetic(double Easting,
241  double Northing,
242  double *Latitude,
243  double *Longitude)const;
244 
245 
246 
247 /*
248  * RTTI information defined in data_types/rtti.h
249  */
250 TYPE_DATA
251 };
252 
253 #endif
virtual ossimObject * dup() const =0
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 double getStandardParallel2() const
Derived classes should implement as needed.
virtual ossimGpt inverse(const ossimDpt &projectedPoint) const =0
Will take a point in meters and convert it to ground.
virtual double getStandardParallel1() const
Derived classes should implement as needed.
Albers Equal Area Conic Projection.
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).