UNCLASSIFIED

GeographicTranslator
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
Neys.h
Go to the documentation of this file.
1 // CLASSIFICATION: UNCLASSIFIED
2 
3 #ifndef Neys_H
4 #define Neys_H
5 
6 /***************************************************************************/
7 /* RSC IDENTIFIER: NEYS
8  *
9  * ABSTRACT
10  *
11  * This component provides conversions between Geodetic coordinates
12  * (latitude and longitude in radians) and Ney's (Modified Lambert
13  * Conformal Conic) projection coordinates (easting and northing in meters).
14  *
15  * ERROR HANDLING
16  *
17  * This component checks parameters for valid values. If an invalid value
18  * is found the error code is combined with the current error code using
19  * the bitwise or. This combining allows multiple error codes to be
20  * returned. The possible error codes are:
21  *
22  * NEYS_NO_ERROR : No errors occurred in function
23  * NEYS_LAT_ERROR : Latitude outside of valid range
24  * (-90 to 90 degrees)
25  * NEYS_LON_ERROR : Longitude outside of valid range
26  * (-180 to 360 degrees)
27  * NEYS_EASTING_ERROR : Easting outside of valid range
28  * (depends on ellipsoid and projection
29  * parameters)
30  * NEYS_NORTHING_ERROR : Northing outside of valid range
31  * (depends on ellipsoid and projection
32  * parameters)
33  * NEYS_FIRST_STDP_ERROR : First standard parallel outside of valid
34  * range (71 or 74 degrees)
35  * NEYS_ORIGIN_LAT_ERROR : Origin latitude outside of valid range
36  * (-89 59 59.0 to 89 59 59.0 degrees)
37  * NEYS_CENT_MER_ERROR : Central meridian outside of valid range
38  * (-180 to 360 degrees)
39  * NEYS_A_ERROR : Semi-major axis less than or equal to zero
40  * NEYS_INV_F_ERROR : Inverse flattening outside of valid range
41  * (250 to 350)
42  *
43  *
44  * REUSE NOTES
45  *
46  * NEYS is intended for reuse by any application that performs a Ney's (Modified
47  * Lambert Conformal Conic) projection or its inverse.
48  *
49  * REFERENCES
50  *
51  * Further information on NEYS can be found in the Reuse Manual.
52  *
53  * NEYS originated from:
54  * U.S. Army Topographic Engineering Center
55  * Geospatial Information Division
56  * 7701 Telegraph Road
57  * Alexandria, VA 22310-3864
58  *
59  * LICENSES
60  *
61  * None apply to this component.
62  *
63  * RESTRICTIONS
64  *
65  * NEYS has no restrictions.
66  *
67  * ENVIRONMENT
68  *
69  * NEYS was tested and certified in the following environments:
70  *
71  * 1. Solaris 2.5 with GCC, version 2.8.1
72  * 2. Windows 95 with MS Visual C++, version 6
73  *
74  * MODIFICATIONS
75  *
76  * Date Description
77  * ---- -----------
78  * 8-4-00 Original Code
79  * 3-2-07 Original C++ Code
80  *
81  *
82  *
83  */
84 
85 
86 #include "CoordinateSystem.h"
87 
88 
89 namespace MSP
90 {
91  namespace CCS
92  {
93  class NeysParameters;
94  class LambertConformalConic;
95  class MapProjectionCoordinates;
96  class GeodeticCoordinates;
97 
98 
99  /***************************************************************************/
100  /*
101  * DEFINES
102  */
103 
104  class Neys : public CoordinateSystem
105  {
106  public:
107 
108  /*
109  * The constructor receives the ellipsoid parameters and
110  * Ney's (Modified Lambert Conformal Conic) projection parameters as inputs, and sets the
111  * corresponding state variables. If any errors occur, an exception is thrown with a description
112  * of the error.
113  *
114  * ellipsoidSemiMajorAxis : Semi-major axis of ellipsoid, in meters (input)
115  * ellipsoidFlattening : Flattening of ellipsoid (input)
116  * centralMeridian : Longitude of origin, in radians (input)
117  * originLatitude : Latitude of origin, in radians (input)
118  * standardParallel : First standard parallel, in radians (input)
119  * falseEasting : False easting, in meters (input)
120  * falseNorthing : False northing, in meters (input)
121  */
122 
123  Neys( double ellipsoidSemiMajorAxis, double ellipsoidFlattening, double centralMeridian, double originLatitude, double standardParallel, double falseEasting, double falseNorthing );
124 
125 
126  Neys( const Neys &n );
127 
128 
129  ~Neys( void );
130 
131 
132  Neys& operator=( const Neys &n );
133 
134 
135  /*
136  * The function getParameters returns the current ellipsoid
137  * parameters and Ney's (Modified Lambert Conformal Conic) projection parameters.
138  *
139  * ellipsoidSemiMajorAxis : Semi-major axis of ellipsoid, in meters (output)
140  * ellipsoidFlattening : Flattening of ellipsoid (output)
141  * centralMeridian : Longitude of origin, in radians (output)
142  * originLatitude : Latitude of origin, in radians (output)
143  * standardParallel : First standard parallel, in radians (output)
144  * falseEasting : False easting, in meters (output)
145  * falseNorthing : False northing, in meters (output)
146  */
147 
148  NeysParameters* getParameters() const;
149 
150 
151  /*
152  * The function convertFromGeodetic converts Geodetic (latitude and
153  * longitude) coordinates to Ney's (Modified Lambert Conformal Conic) projection
154  * (easting and northing) coordinates, according to the current ellipsoid and
155  * Ney's (Modified Lambert Conformal Conic) projection parameters. If any errors occur, an exception
156  * is thrown with a description of the error.
157  *
158  * longitude : Longitude, in radians (input)
159  * latitude : Latitude, in radians (input)
160  * easting : Easting (X), in meters (output)
161  * northing : Northing (Y), in meters (output)
162  */
163 
165 
166 
167  /*
168  * The function convertToGeodetic converts Ney's (Modified Lambert Conformal
169  * Conic) projection (easting and northing) coordinates to Geodetic (latitude)
170  * and longitude) coordinates, according to the current ellipsoid and Ney's
171  * (Modified Lambert Conformal Conic) projection parameters. If any errors occur,
172  * an exception is thrown with a description f the error.
173  *
174  * easting : Easting (X), in meters (input)
175  * northing : Northing (Y), in meters (input)
176  * longitude : Longitude, in radians (output)
177  * latitude : Latitude, in radians (output)
178  */
179 
181 
182  private:
183 
184  LambertConformalConic* lambertConformalConic2;
185 
186  /* Ney's projection Parameters */
187  double Neys_Std_Parallel_1; /* Lower std. parallel, in radians */
188  double Neys_Std_Parallel_2; /* Upper std. parallel, in radians */
189  double Neys_Origin_Lat; /* Latitude of origin, in radians */
190  double Neys_Origin_Long; /* Longitude of origin, in radians */
191  double Neys_False_Northing; /* False northing, in meters */
192  double Neys_False_Easting; /* False easting, in meters */
193 
194  /* Maximum variance for easting and northing values for WGS 84. */
195  double Neys_Delta_Easting;
196  double Neys_Delta_Northing;
197  };
198  }
199 }
200 
201 #endif
202 
203 
204 // CLASSIFICATION: UNCLASSIFIED