4
/***************************************************************************/
5
/* RSC IDENTIFIER: GEOREF
9
* This component provides conversions from Geodetic coordinates (latitude
10
* and longitude in radians) to a GEOREF coordinate string.
14
* This component checks parameters for valid values. If an invalid value
15
* is found, the error code is combined with the current error code using
16
* the bitwise or. This combining allows multiple error codes to be
17
* returned. The possible error codes are:
19
* GEOREF_NO_ERROR : No errors occurred in function
20
* GEOREF_LAT_ERROR : Latitude outside of valid range
22
* GEOREF_LON_ERROR : Longitude outside of valid range
23
* (-180 to 360 degrees)
24
* GEOREF_STR_ERROR : A GEOREF string error: string too long,
25
* string too short, or string length
27
* GEOREF_STR_LAT_ERROR : The latitude part of the GEOREF string
28
* (second or fourth character) is invalid.
29
* GEOREF_STR_LON_ERROR : The longitude part of the GEOREF string
30
* (first or third character) is invalid.
31
* GEOREF_STR_LAT_MIN_ERROR : The latitude minute part of the GEOREF
32
* string is greater than 60.
33
* GEOREF_STR_LON_MIN_ERROR : The longitude minute part of the GEOREF
34
* string is greater than 60.
35
* GEOREF_PRECISION_ERROR : The precision must be between 0 and 5
40
* GEOREF is intended for reuse by any application that performs a
41
* conversion between Geodetic and GEOREF coordinates.
45
* Further information on GEOREF can be found in the Reuse Manual.
47
* GEOREF originated from : U.S. Army Topographic Engineering Center
48
* Geospatial Information Division
50
* Alexandria, VA 22310-3864
54
* None apply to this component.
58
* GEOREF has no restrictions.
62
* GEOREF was tested and certified in the following environments:
64
* 1. Solaris 2.5 with GCC version 2.8.1
65
* 2. Windows 95 with MS Visual C++ version 6
71
* 20-02-97 Original Code
75
/***************************************************************************/
79
#define GEOREF_NO_ERROR 0x0000
80
#define GEOREF_LAT_ERROR 0x0001
81
#define GEOREF_LON_ERROR 0x0002
82
#define GEOREF_STR_ERROR 0x0004
83
#define GEOREF_STR_LAT_ERROR 0x0008
84
#define GEOREF_STR_LON_ERROR 0x0010
85
#define GEOREF_STR_LAT_MIN_ERROR 0x0020
86
#define GEOREF_STR_LON_MIN_ERROR 0x0040
87
#define GEOREF_PRECISION_ERROR 0x0080
90
/***************************************************************************/
96
/* ensure proper linkage to c++ programs */
102
long Convert_Geodetic_To_GEOREF (double Latitude,
107
* This function converts Geodetic (latitude and longitude in radians)
108
* coordinates to a GEOREF coordinate string. Precision specifies the
109
* number of digits in the GEOREF string for latitude and longitude:
110
* 0 for nearest degree
111
* 1 for nearest 10 minutes
112
* 2 for nearest minute
113
* 3 for nearest tenth of a minute
114
* 4 for nearest hundredth of a minute
115
* 5 for nearest thousandth of a minute
117
* Latitude : Latitude in radians (input)
118
* Longitude : Longitude in radians (input)
119
* Precision : level of precision specified by the user (input)
120
* Georef : GEOREF coordinate string (output)
124
long Convert_GEOREF_To_Geodetic (char *Georef,
128
* This function converts a GEOREF coordinate string to Geodetic (latitude
129
* and longitude in radians) coordinates.
131
* Georef : GEOREF coordinate string (input)
132
* Latitude : Latitude in radians (output)
133
* Longitude : Longitude in radians (output)
141
#endif /* GEOREF_H */