4
/***************************************************************************/
5
/* RSC IDENTIFIER: TRANSVERSE CYLINDRICAL EQUAL AREA
9
* This component provides conversions between Geodetic coordinates
10
* (latitude and longitude in radians) and Transverse Cylindrical Equal Area
11
* projection coordinates (easting and northing in meters).
15
* This component checks parameters for valid values. If an invalid value
16
* is found, the error code is combined with the current error code using
17
* the bitwise or. This combining allows multiple error codes to be
18
* returned. The possible error codes are:
20
* TCEA_NO_ERROR : No errors occurred in function
21
* TCEA_LAT_ERROR : Latitude outside of valid range
23
* TCEA_LON_ERROR : Longitude outside of valid range
24
* (-180 to 360 degrees)
25
* TCEA_EASTING_ERROR : Easting outside of valid range
26
* (False_Easting +/- ~6,500,000 m,
27
* depending on ellipsoid parameters
28
* and Origin_Latitude)
29
* TCEA_NORTHING_ERROR : Northing outside of valid range
30
* (False_Northing +/- ~20,000,000 m,
31
* depending on ellipsoid parameters
32
* and Origin_Latitude)
33
* TCEA_ORIGIN_LAT_ERROR : Origin latitude outside of valid range
35
* TCEA_CENT_MER_ERROR : Central meridian outside of valid range
36
* (-180 to 360 degrees)
37
* TCEA_A_ERROR : Semi-major axis less than or equal to zero
38
* TCEA_INV_F_ERROR : Inverse flattening outside of valid range
40
* TCEA_SCALE_FACTOR_ERROR : Scale factor outside of valid
42
* TCEA_LON_WARNING : Distortion will result if longitude is more
43
* than 90 degrees from the Central Meridian
47
* TRANSVERSE CYLINDRICAL EQUAL AREA is intended for reuse by any application that
48
* performs a Transverse Cylindrical Equal Area projection or its inverse.
52
* Further information on TRANSVERSE CYLINDRICAL EQUAL AREA can be found in the Reuse Manual.
54
* TRANSVERSE CYLINDRICAL EQUAL AREA originated from :
55
* U.S. Army Topographic Engineering Center
56
* Geospatial Information Division
58
* Alexandria, VA 22310-3864
62
* None apply to this component.
66
* TRANSVERSE CYLINDRICAL EQUAL AREA has no restrictions.
70
* TRANSVERSE CYLINDRICAL EQUAL AREA was tested and certified in the following environments:
72
* 1. Solaris 2.5 with GCC, version 2.8.1
73
* 2. Windows 95 with MS Visual C++, version 6
79
* 7-15-99 Original Code
84
/***************************************************************************/
89
#define TCEA_NO_ERROR 0x0000
90
#define TCEA_LAT_ERROR 0x0001
91
#define TCEA_LON_ERROR 0x0002
92
#define TCEA_EASTING_ERROR 0x0004
93
#define TCEA_NORTHING_ERROR 0x0008
94
#define TCEA_ORIGIN_LAT_ERROR 0x0010
95
#define TCEA_CENT_MER_ERROR 0x0020
96
#define TCEA_A_ERROR 0x0040
97
#define TCEA_INV_F_ERROR 0x0080
98
#define TCEA_SCALE_FACTOR_ERROR 0x0100
99
#define TCEA_LON_WARNING 0x0200
101
/***************************************************************************/
103
* FUNCTION PROTOTYPES
107
/* ensure proper linkage to c++ programs */
112
long Set_Trans_Cyl_Eq_Area_Parameters(double a,
114
double Origin_Latitude,
115
double Central_Meridian,
116
double False_Easting,
117
double False_Northing,
118
double Scale_Factor);
120
* The function Set_Trans_Cyl_Eq_Area_Parameters receives the ellipsoid parameters and
121
* Transverse Cylindrical Equal Area projcetion parameters as inputs, and sets the corresponding
122
* state variables. If any errors occur, the error code(s) are returned by the function,
123
* otherwise TCEA_NO_ERROR is returned.
125
* a : Semi-major axis of ellipsoid, in meters (input)
126
* f : Flattening of ellipsoid (input)
127
* Origin_Latitude : Latitude in radians at which the (input)
128
* point scale factor is 1.0
129
* Central_Meridian : Longitude in radians at the center of (input)
131
* False_Easting : A coordinate value in meters assigned to the
132
* central meridian of the projection. (input)
133
* False_Northing : A coordinate value in meters assigned to the
134
* origin latitude of the projection (input)
135
* Scale_Factor : Multiplier which reduces distances in the
136
* projection to the actual distance on the
141
void Get_Trans_Cyl_Eq_Area_Parameters(double *a,
143
double *Origin_Latitude,
144
double *Central_Meridian,
145
double *False_Easting,
146
double *False_Northing,
147
double *Scale_Factor);
149
* The function Get_Trans_Cyl_Eq_Area_Parameters returns the current ellipsoid
150
* parameters, Transverse Cylindrical Equal Area projection parameters, and scale factor.
152
* a : Semi-major axis of ellipsoid, in meters (output)
153
* f : Flattening of ellipsoid (output)
154
* Origin_Latitude : Latitude in radians at which the (output)
155
* point scale factor is 1.0
156
* Central_Meridian : Longitude in radians at the center of (output)
158
* False_Easting : A coordinate value in meters assigned to the
159
* central meridian of the projection. (output)
160
* False_Northing : A coordinate value in meters assigned to the
161
* origin latitude of the projection (output)
162
* Scale_Factor : Multiplier which reduces distances in the
163
* projection to the actual distance on the
168
long Convert_Geodetic_To_Trans_Cyl_Eq_Area (double Latitude,
173
* The function Convert_Geodetic_To_Trans_Cyl_Eq_Area converts geodetic (latitude and
174
* longitude) coordinates to Transverse Cylindrical Equal Area projection easting, and northing
175
* coordinates, according to the current ellipsoid and Transverse Cylindrical Equal Area projection
176
* parameters. If any errors occur, the error code(s) are returned by the
177
* function, otherwise TCEA_NO_ERROR is returned.
179
* Latitude : Latitude (phi) in radians (input)
180
* Longitude : Longitude (lambda) in radians (input)
181
* Easting : Easting (X) in meters (output)
182
* Northing : Northing (Y) in meters (output)
186
long Convert_Trans_Cyl_Eq_Area_To_Geodetic(double Easting,
191
* The function Convert_Trans_Cyl_Eq_Area_To_Geodetic converts Transverse Cylindrical Equal Area
192
* projection easting and northing coordinates to geodetic (latitude and longitude) coordinates.
193
* coordinates, according to the current ellipsoid and Transverse Cylindrical Equal Area projection
194
* If any errors occur, the error code(s) are returned by the function, otherwise TCEA_NO_ERROR
197
* Easting : Easting (X) in meters (input)
198
* Northing : Northing (Y) in meters (input)
199
* Latitude : Latitude (phi) in radians (output)
200
* Longitude : Longitude (lambda) in radians (output)
207
#endif /* TRCYLEQA_H */