4
/***************************************************************************/
5
/* RSC IDENTIFIER: CYLINDRICAL EQUAL AREA
9
* This component provides conversions between Geodetic coordinates
10
* (latitude and longitude in radians) and Cylindrical Equal Area projection
11
* 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
* CYEQ_NO_ERROR : No errors occurred in function
21
* CYEQ_LAT_ERROR : Latitude outside of valid range
23
* CYEQ_LON_ERROR : Longitude outside of valid range
24
* (-180 to 360 degrees)
25
* CYEQ_EASTING_ERROR : Easting outside of valid range
26
* (False_Easting +/- ~20,000,000 m,
27
* depending on ellipsoid parameters
28
* and Origin_Latitude)
29
* CYEQ_NORTHING_ERROR : Northing outside of valid range
30
* (False_Northing +/- ~6,000,000 m,
31
* depending on ellipsoid parameters
32
* and Origin_Latitude)
33
* CYEQ_ORIGIN_LAT_ERROR : Origin latitude outside of valid range
35
* CYEQ_CENT_MER_ERROR : Central meridian outside of valid range
36
* (-180 to 360 degrees)
37
* CYEQ_A_ERROR : Semi-major axis less than or equal to zero
38
* CYEQ_INV_F_ERROR : Inverse flattening outside of valid range
43
* CYLINDRICAL EQUAL AREA is intended for reuse by any application that performs a
44
* Cylindrical Equal Area projection or its inverse.
48
* Further information on CYLINDRICAL EQUAL AREA can be found in the Reuse Manual.
50
* CYLINDRICAL EQUAL AREA originated from :
51
* U.S. Army Topographic Engineering Center
52
* Geospatial Information Division
54
* Alexandria, VA 22310-3864
58
* None apply to this component.
62
* CYLINDRICAL EQUAL AREA has no restrictions.
66
* CYLINDRICAL EQUAL AREA was tested and certified in the following environments:
68
* 1. Solaris 2.5 with GCC 2.8.1
69
* 2. MS Windows 95 with MS Visual C++ 6
75
* 4/16/99 Original Code
80
/***************************************************************************/
85
#define CYEQ_NO_ERROR 0x0000
86
#define CYEQ_LAT_ERROR 0x0001
87
#define CYEQ_LON_ERROR 0x0002
88
#define CYEQ_EASTING_ERROR 0x0004
89
#define CYEQ_NORTHING_ERROR 0x0008
90
#define CYEQ_ORIGIN_LAT_ERROR 0x0010
91
#define CYEQ_CENT_MER_ERROR 0x0020
92
#define CYEQ_A_ERROR 0x0040
93
#define CYEQ_INV_F_ERROR 0x0080
96
/***************************************************************************/
102
/* ensure proper linkage to c++ programs */
107
long Set_Cyl_Eq_Area_Parameters(double a,
109
double Origin_Latitude,
110
double Central_Meridian,
111
double False_Easting,
112
double False_Northing);
114
* The function Set_Cyl_Eq_Area_Parameters receives the ellipsoid parameters and
115
* Cylindrical Equal Area projcetion parameters as inputs, and sets the corresponding
116
* state variables. If any errors occur, the error code(s) are returned by the
117
* function, otherwise CYEQ_NO_ERROR is returned.
119
* a : Semi-major axis of ellipsoid, in meters (input)
120
* f : Flattening of ellipsoid (input)
121
* Origin_Latitude : Latitude in radians at which the (input)
122
* point scale factor is 1.0
123
* Central_Meridian : Longitude in radians at the center of (input)
125
* False_Easting : A coordinate value in meters assigned to the
126
* central meridian of the projection. (input)
127
* False_Northing : A coordinate value in meters assigned to the
128
* origin latitude of the projection (input)
132
void Get_Cyl_Eq_Area_Parameters(double *a,
134
double *Origin_Latitude,
135
double *Central_Meridian,
136
double *False_Easting,
137
double *False_Northing);
139
* The function Get_Cyl_Eq_Area_Parameters returns the current ellipsoid
140
* parameters and Cylindrical Equal Area projection parameters.
142
* a : Semi-major axis of ellipsoid, in meters (output)
143
* f : Flattening of ellipsoid (output)
144
* Origin_Latitude : Latitude in radians at which the (output)
145
* point scale factor is 1.0
146
* Central_Meridian : Longitude in radians at the center of (output)
148
* False_Easting : A coordinate value in meters assigned to the
149
* central meridian of the projection. (output)
150
* False_Northing : A coordinate value in meters assigned to the
151
* origin latitude of the projection (output)
155
long Convert_Geodetic_To_Cyl_Eq_Area (double Latitude,
160
* The function Convert_Geodetic_To_Cyl_Eq_Area converts geodetic (latitude and
161
* longitude) coordinates to Cylindrical Equal Area projection easting, and northing
162
* coordinates, according to the current ellipsoid and Cylindrical Equal Area projection
163
* parameters. If any errors occur, the error code(s) are returned by the
164
* function, otherwise CYEQ_NO_ERROR is returned.
166
* Latitude : Latitude (phi) in radians (input)
167
* Longitude : Longitude (lambda) in radians (input)
168
* Easting : Easting (X) in meters (output)
169
* Northing : Northing (Y) in meters (output)
173
long Convert_Cyl_Eq_Area_To_Geodetic(double Easting,
178
* The function Convert_Cyl_Eq_Area_To_Geodetic converts Cylindrical Equal Area projection
179
* easting and northing coordinates to geodetic (latitude and longitude)
180
* coordinates, according to the current ellipsoid and Cylindrical Equal Area projection
181
* coordinates. If any errors occur, the error code(s) are returned by the
182
* function, otherwise CYEQ_NO_ERROR is returned.
184
* Easting : Easting (X) in meters (input)
185
* Northing : Northing (Y) in meters (input)
186
* Latitude : Latitude (phi) in radians (output)
187
* Longitude : Longitude (lambda) in radians (output)
194
#endif /* CYLEQA_H */