UNCLASSIFIED
GeographicTranslator
Main Page
Namespaces
Classes
Files
File List
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Friends
Macros
master
geotrans3.7
CCS
src
dtcc
CoordinateSystems
trcyleqa
TransverseCylindricalEqualArea.h
Go to the documentation of this file.
1
// CLASSIFICATION: UNCLASSIFIED
2
3
#ifndef TransverseCylindricalEqualArea_H
4
#define TransverseCylindricalEqualArea_H
5
6
/***************************************************************************/
7
/* RSC IDENTIFIER: TRANSVERSE CYLINDRICAL EQUAL AREA
8
*
9
* ABSTRACT
10
*
11
* This component provides conversions between Geodetic coordinates
12
* (latitude and longitude in radians) and Transverse Cylindrical Equal Area
13
* 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
* TCEA_NO_ERROR : No errors occurred in function
23
* TCEA_LAT_ERROR : Latitude outside of valid range
24
* (-90 to 90 degrees)
25
* TCEA_LON_ERROR : Longitude outside of valid range
26
* (-180 to 360 degrees)
27
* TCEA_EASTING_ERROR : Easting outside of valid range
28
* (False_Easting +/- ~6,500,000 m,
29
* depending on ellipsoid parameters
30
* and Origin_Latitude)
31
* TCEA_NORTHING_ERROR : Northing outside of valid range
32
* (False_Northing +/- ~20,000,000 m,
33
* depending on ellipsoid parameters
34
* and Origin_Latitude)
35
* TCEA_ORIGIN_LAT_ERROR : Origin latitude outside of valid range
36
* (-90 to 90 degrees)
37
* TCEA_CENT_MER_ERROR : Central meridian outside of valid range
38
* (-180 to 360 degrees)
39
* TCEA_A_ERROR : Semi-major axis less than or equal to zero
40
* TCEA_INV_F_ERROR : Inverse flattening outside of valid range
41
* (250 to 350)
42
* TCEA_SCALE_FACTOR_ERROR : Scale factor outside of valid
43
* range (0.3 to 3.0)
44
* TCEA_LON_WARNING : Distortion will result if longitude is more
45
* than 90 degrees from the Central Meridian
46
*
47
* REUSE NOTES
48
*
49
* TRANSVERSE CYLINDRICAL EQUAL AREA is intended for reuse by any application that
50
* performs a Transverse Cylindrical Equal Area projection or its inverse.
51
*
52
* REFERENCES
53
*
54
* Further information on TRANSVERSE CYLINDRICAL EQUAL AREA can be found in the Reuse Manual.
55
*
56
* TRANSVERSE CYLINDRICAL EQUAL AREA originated from :
57
* U.S. Army Topographic Engineering Center
58
* Geospatial Information Division
59
* 7701 Telegraph Road
60
* Alexandria, VA 22310-3864
61
*
62
* LICENSES
63
*
64
* None apply to this component.
65
*
66
* RESTRICTIONS
67
*
68
* TRANSVERSE CYLINDRICAL EQUAL AREA has no restrictions.
69
*
70
* ENVIRONMENT
71
*
72
* TRANSVERSE CYLINDRICAL EQUAL AREA was tested and certified in the following environments:
73
*
74
* 1. Solaris 2.5 with GCC, version 2.8.1
75
* 2. Windows 95 with MS Visual C++, version 6
76
*
77
* MODIFICATIONS
78
*
79
* Date Description
80
* ---- -----------
81
* 3-1-07 Original C++ Code
82
*
83
*/
84
85
86
#include "
CoordinateSystem.h
"
87
88
89
namespace
MSP
90
{
91
namespace
CCS
92
{
93
class
MapProjection5Parameters;
94
class
MapProjectionCoordinates;
95
class
GeodeticCoordinates;
96
97
98
/***************************************************************************/
99
/*
100
* DEFINES
101
*/
102
103
class
TransverseCylindricalEqualArea
:
public
CoordinateSystem
104
{
105
public
:
106
107
/*
108
* The constructor receives the ellipsoid parameters and
109
* Transverse Cylindrical Equal Area projection parameters as inputs, and sets the
110
* corresponding state variables. If any errors occur, an exception is thrown with a description
111
* of the error.
112
*
113
* ellipsoidSemiMajorAxis : Semi-major axis of ellipsoid, in meters (input)
114
* ellipsoidFlattening : Flattening of ellipsoid (input)
115
* centralMeridian : Longitude in radians at the center of (input)
116
* the projection
117
* latitudeOfTrueScale : Latitude in radians at which the (input)
118
* point scale factor is 1.0
119
* falseEasting : A coordinate value in meters assigned to the
120
* central meridian of the projection. (input)
121
* falseNorthing : A coordinate value in meters assigned to the
122
* origin latitude of the projection (input)
123
* scaleFactor : Multiplier which reduces distances in the
124
* projection to the actual distance on the
125
* ellipsoid (input)
126
* errorStatus : Error status (output)
127
*/
128
129
TransverseCylindricalEqualArea
(
double
ellipsoidSemiMajorAxis,
double
ellipsoidFlattening,
double
centralMeridian,
double
latitudeOfTrueScale,
double
falseEasting,
double
falseNorthing,
double
scaleFactor );
130
131
132
TransverseCylindricalEqualArea
(
const
TransverseCylindricalEqualArea
&tcea );
133
134
135
~TransverseCylindricalEqualArea
(
void
);
136
137
138
TransverseCylindricalEqualArea
&
operator=
(
const
TransverseCylindricalEqualArea
&tcea );
139
140
141
/*
142
* The function getParameters returns the current ellipsoid
143
* parameters, Transverse Cylindrical Equal Area projection parameters, and scale factor.
144
*
145
* ellipsoidSemiMajorAxis : Semi-major axis of ellipsoid, in meters (output)
146
* ellipsoidFlattening : Flattening of ellipsoid (output)
147
* centralMeridian : Longitude in radians at the center of (output)
148
* the projection
149
* latitudeOfTrueScale : Latitude in radians at which the (output)
150
* point scale factor is 1.0
151
* falseEasting : A coordinate value in meters assigned to the
152
* central meridian of the projection. (output)
153
* falseNorthing : A coordinate value in meters assigned to the
154
* origin latitude of the projection (output)
155
* scaleFactor : Multiplier which reduces distances in the
156
* projection to the actual distance on the
157
* ellipsoid (output)
158
*/
159
160
MapProjection5Parameters
*
getParameters
()
const
;
161
162
163
/*
164
* The function convertFromGeodetic converts geodetic (latitude and
165
* longitude) coordinates to Transverse Cylindrical Equal Area projection (easting and
166
* northing) coordinates, according to the current ellipsoid and Transverse Cylindrical
167
* Equal Area projection parameters. If any errors occur, an exception is thrown with a
168
* description of the error.
169
*
170
* longitude : Longitude (lambda) in radians (input)
171
* latitude : Latitude (phi) in radians (input)
172
* easting : Easting (X) in meters (output)
173
* northing : Northing (Y) in meters (output)
174
*/
175
176
MSP::CCS::MapProjectionCoordinates
*
convertFromGeodetic
(
MSP::CCS::GeodeticCoordinates
* geodeticCoordinates );
177
178
179
/*
180
* The function convertToGeodetic converts Transverse
181
* Cylindrical Equal Area projection (easting and northing) coordinates
182
* to geodetic (latitude and longitude) coordinates, according to the
183
* current ellipsoid and Transverse Cylindrical Equal Area projection
184
* coordinates. If any errors occur, an exception is thrown with a
185
* description of the error.
186
*
187
* easting : Easting (X) in meters (input)
188
* northing : Northing (Y) in meters (input)
189
* longitude : Longitude (lambda) in radians (output)
190
* latitude : Latitude (phi) in radians (output)
191
*/
192
193
MSP::CCS::GeodeticCoordinates
*
convertToGeodetic
(
MSP::CCS::MapProjectionCoordinates
* mapProjectionCoordinates );
194
195
private
:
196
197
/* Ellipsoid Parameters, default to WGS 84 */
198
double
es2;
/* Eccentricity (0.08181919084262188000) squared */
199
double
es4;
/* es2 * es2 */
200
double
es6;
/* es4 * es2 */
201
double
es;
/* sqrt(es2) */
202
double
M0;
203
double
qp;
204
double
One_MINUS_es2;
/* 1.0 - es2 */
205
double
One_OVER_2es;
/* 1.0 / (2.0 * es) */
206
double
a0;
/* es2 / 3.0 + 31.0 * es4 / 180.0 + 517.0 * es6 / 5040.0 */
207
double
a1;
/* 23.0 * es4 / 360.0 + 251.0 * es6 / 3780.0 */
208
double
a2;
/* 761.0 * es6 / 45360.0 */
209
double
b0;
/* 3.0 * e1 / 2.0 - 27.0 * e3 / 32.0 */
210
double
b1;
/* 21.0 * e2 / 16.0 - 55.0 * e4 / 32.0 */
211
double
b2;
/* 151.0 * e3 / 96.0 */
212
double
b3;
/* 1097.0 * e4 / 512.0 */
213
double
c0;
/* 1.0 - es2 / 4.0 - 3.0 * es4 / 64.0 - 5.0 * es6 / 256.0 */
214
double
c1;
/* 3.0 * es2 / 8.0 + 3.0 * es4 / 32.0 + 45.0 * es6 / 1024.0 */
215
double
c2;
/* 15.0 * es4 / 256.0 + 45.0 * es6 / 1024.0 */
216
double
c3;
/* 35.0 * es6 / 3072.0 */
217
218
/* Transverse Cylindrical Equal Area projection Parameters */
219
double
Tcea_Origin_Lat;
/* Latitude of origin in radians */
220
double
Tcea_Origin_Long;
/* Longitude of origin in radians */
221
double
Tcea_False_Northing;
/* False northing in meters */
222
double
Tcea_False_Easting;
/* False easting in meters */
223
double
Tcea_Scale_Factor;
/* Scale factor */
224
225
/* Maximum variance for easting and northing values for WGS 84.
226
*/
227
double
Tcea_Min_Easting;
228
double
Tcea_Max_Easting;
229
double
Tcea_Min_Northing;
230
double
Tcea_Max_Northing;
231
232
233
double
TCEA_Q(
double
sinlat,
double
x );
234
235
double
TCEA_COEFF_TIMES_SIN(
double
coeff,
double
x,
double
latit );
236
237
double
TCEA_M(
double
c0lat,
double
c1lat,
double
c2lat,
double
c3lat );
238
239
double
TCEA_L(
double
Beta,
double
c0lat,
double
c1lat,
double
c2lat );
240
241
};
242
}
243
}
244
245
#endif
246
247
248
// CLASSIFICATION: UNCLASSIFIED
Generated on Tue Feb 16 2016 14:54:02 for GeographicTranslator by doxygen 1.8.2