3
/***************************************************************************/
4
/* RSC IDENTIFIER: STEREOGRAPHIC
9
* This component provides conversions between geodetic (latitude and
10
* longitude) coordinates and Stereographic (easting and northing)
15
* This component checks parameters for valid values. If an invalid
16
* value is found the error code is combined with the current error code
17
* using the bitwise or. This combining allows multiple error codes to
18
* be returned. The possible error codes are:
20
* STEREO_NO_ERROR : No errors occurred in function
21
* STEREO_LAT_ERROR : Latitude outside of valid range
23
* STEREO_LON_ERROR : Longitude outside of valid range
24
* (-180 to 360 degrees)
25
* STEREO_ORIGIN_LAT_ERROR : Origin latitude outside of valid range
27
* STEREO_CENT_MER_ERROR : Central meridian outside of valid range
28
* (-180 to 360 degrees)
29
* STEREO_EASTING_ERROR : Easting outside of valid range,
30
* (False_Easting +/- ~1,460,090,226 m,
31
* depending on ellipsoid and projection
33
* STEREO_NORTHING_ERROR : Northing outside of valid range,
34
* (False_Northing +/- ~1,460,090,226 m,
35
* depending on ellipsoid and projection
37
* STEREO_A_ERROR : Semi-major axis less than or equal to zero
38
* STEREO_INV_F_ERROR : Inverse flattening outside of valid range
44
* STEREOGRAPHIC is intended for reuse by any application that
45
* performs a Stereographic projection.
50
* Further information on STEREOGRAPHIC can be found in the
54
* STEREOGRAPHIC originated from :
55
* U.S. Army Topographic Engineering Center
56
* Geospatial Information Division
58
* Alexandria, VA 22310-3864
63
* None apply to this component.
68
* STEREOGRAPHIC has no restrictions.
73
* STEREOGRAPHIC was tested and certified in the following
76
* 1. Solaris 2.5 with GCC, version 2.8.1
77
* 2. Window 95 with MS Visual C++, version 6
84
* 7/26/00 Original Code
88
/**********************************************************************/
93
#define STEREO_NO_ERROR 0x0000
94
#define STEREO_LAT_ERROR 0x0001
95
#define STEREO_LON_ERROR 0x0002
96
#define STEREO_ORIGIN_LAT_ERROR 0x0004
97
#define STEREO_CENT_MER_ERROR 0x0008
98
#define STEREO_EASTING_ERROR 0x0010
99
#define STEREO_NORTHING_ERROR 0x0020
100
#define STEREO_A_ERROR 0x0040
101
#define STEREO_INV_F_ERROR 0x0080
103
/**********************************************************************/
105
* FUNCTION PROTOTYPES
108
/* ensure proper linkage to c++ programs */
113
long Set_Stereographic_Parameters (double a,
115
double Origin_Latitude,
116
double Central_Meridian,
117
double False_Easting,
118
double False_Northing);
120
* The function Set_Stereographic_Parameters receives the ellipsoid
121
* parameters and Stereograpic projection parameters as inputs, and
122
* sets the corresponding state variables. If any errors occur, error
123
* code(s) are returned by the function, otherwise STEREO_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 the center of (input)
129
* Central_Meridian : Longitude, in radians, at the center of (input)
131
* False_Easting : Easting (X) at center of projection, in meters (input)
132
* False_Northing : Northing (Y) at center of projection, in meters (input)
135
void Get_Stereographic_Parameters(double *a,
137
double *Origin_Latitude,
138
double *Central_Meridian,
139
double *False_Easting,
140
double *False_Northing);
142
* The function Get_Stereographic_Parameters returns the current ellipsoid
143
* parameters and Stereographic projection parameters.
145
* a : Semi-major axis of ellipsoid, in meters (output)
146
* f : Flattening of ellipsoid (output)
147
* Origin_Latitude : Latitude, in radians, at the center of (output)
149
* Central_Meridian : Longitude, in radians, at the center of (output)
151
* False_Easting : A coordinate value, in meters, assigned to the
152
* central meridian of the projection. (output)
153
* False_Northing : A coordinate value, in meters, assigned to the
154
* origin latitude of the projection (output)
157
long Convert_Geodetic_To_Stereographic (double Latitude,
162
* The function Convert_Geodetic_To_Stereographic converts geodetic
163
* coordinates (latitude and longitude) to Stereographic coordinates
164
* (easting and northing), according to the current ellipsoid
165
* and Stereographic projection parameters. If any errors occur, error
166
* code(s) are returned by the function, otherwise STEREO_NO_ERROR is returned.
168
* Latitude : Latitude, in radians (input)
169
* Longitude : Longitude, in radians (input)
170
* Easting : Easting (X), in meters (output)
171
* Northing : Northing (Y), in meters (output)
174
long Convert_Stereographic_To_Geodetic(double Easting,
179
* The function Convert_Stereographic_To_Geodetic converts Stereographic projection
180
* (easting and northing) coordinates to geodetic (latitude and longitude)
181
* coordinates, according to the current ellipsoid and Stereographic projection
182
* coordinates. If any errors occur, the error code(s) are returned by the
183
* function, otherwise STEREO_NO_ERROR is returned.
185
* Easting : Easting (X), in meters (input)
186
* Northing : Northing (Y), in meters (input)
187
* Latitude : Latitude (phi), in radians (output)
188
* Longitude : Longitude (lambda), in radians (output)
195
#endif /* STEREOGR_H */