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
georef
GEOREF.h
Go to the documentation of this file.
1
// CLASSIFICATION: UNCLASSIFIED
2
3
#ifndef GEOREF_H
4
#define GEOREF_H
5
6
/***************************************************************************/
7
/* RSC IDENTIFIER: GEOREF
8
*
9
* ABSTRACT
10
*
11
* This component provides conversions from Geodetic coordinates (latitude
12
* and longitude in radians) to a GEOREF coordinate string.
13
*
14
* ERROR HANDLING
15
*
16
* This component checks parameters for valid values. If an invalid value
17
* is found, the error code is combined with the current error code using
18
* the bitwise or. This combining allows multiple error codes to be
19
* returned. The possible error codes are:
20
*
21
* GEOREF_NO_ERROR : No errors occurred in function
22
* GEOREF_LAT_ERROR : Latitude outside of valid range
23
* (-90 to 90 degrees)
24
* GEOREF_LON_ERROR : Longitude outside of valid range
25
* (-180 to 360 degrees)
26
* GEOREF_STR_ERROR : A GEOREF string error: string too long,
27
* string too short, or string length
28
* not even.
29
* GEOREF_STR_LAT_ERROR : The latitude part of the GEOREF string
30
* (second or fourth character) is invalid.
31
* GEOREF_STR_LON_ERROR : The longitude part of the GEOREF string
32
* (first or third character) is invalid.
33
* GEOREF_STR_LAT_MIN_ERROR : The latitude minute part of the GEOREF
34
* string is greater than 60.
35
* GEOREF_STR_LON_MIN_ERROR : The longitude minute part of the GEOREF
36
* string is greater than 60.
37
* GEOREF_PRECISION_ERROR : The precision must be between 0 and 5
38
* inclusive.
39
*
40
*
41
* REUSE NOTES
42
*
43
* GEOREF is intended for reuse by any application that performs a
44
* conversion between Geodetic and GEOREF coordinates.
45
*
46
* REFERENCES
47
*
48
* Further information on GEOREF can be found in the Reuse Manual.
49
*
50
* GEOREF originated from : U.S. Army Topographic Engineering Center
51
* Geospatial Information Division
52
* 7701 Telegraph Road
53
* Alexandria, VA 22310-3864
54
*
55
* LICENSES
56
*
57
* None apply to this component.
58
*
59
* RESTRICTIONS
60
*
61
* GEOREF has no restrictions.
62
*
63
* ENVIRONMENT
64
*
65
* GEOREF was tested and certified in the following environments:
66
*
67
* 1. Solaris 2.5 with GCC version 2.8.1
68
* 2. Windows 95 with MS Visual C++ version 6
69
*
70
* MODIFICATIONS
71
*
72
* Date Description
73
* ---- -----------
74
* 02-20-97 Original Code
75
* 03-02-07 Original C++ Code
76
*/
77
78
79
#include "
CoordinateSystem.h
"
80
81
82
namespace
MSP
83
{
84
namespace
CCS
85
{
86
class
GEOREFCoordinates;
87
class
GeodeticCoordinates;
88
89
90
/***************************************************************************/
91
/*
92
* DEFINES
93
*/
94
95
const
long
GEOREF_STR_LAT_MIN_ERROR
= 0x0020;
96
const
long
GEOREF_STR_LON_MIN_ERROR
= 0x0040;
97
98
99
class
GEOREF
:
public
CoordinateSystem
100
{
101
public
:
102
103
GEOREF
();
104
105
106
GEOREF
(
const
GEOREF
&g );
107
108
109
~GEOREF
(
void
);
110
111
112
GEOREF
&
operator=
(
const
GEOREF
&g );
113
114
115
/*
116
* The function convertFromGeodetic converts Geodetic (latitude and longitude in radians)
117
* coordinates to a GEOREF coordinate string. Precision specifies the
118
* number of digits in the GEOREF string for latitude and longitude:
119
* 0 for nearest degree
120
* 1 for nearest ten minutes
121
* 2 for nearest minute
122
* 3 for nearest tenth of a minute
123
* 4 for nearest hundredth of a minute
124
* 5 for nearest thousandth of a minute
125
*
126
* longitude : Longitude in radians. (input)
127
* latitude : Latitude in radians. (input)
128
* precision : Precision specified by the user. (input)
129
* GEOREFString : GEOREF coordinate string. (output)
130
*
131
*/
132
133
MSP::CCS::GEOREFCoordinates
*
convertFromGeodetic
(
MSP::CCS::GeodeticCoordinates
* geodeticCoordinates,
long
precision );
134
135
136
/*
137
* The function convertToGeodetic converts a GEOREF coordinate string to Geodetic (latitude
138
* and longitude in radians) coordinates.
139
*
140
* GEOREFString : GEOREF coordinate string. (input)
141
* longitude : Longitude in radians. (output)
142
* latitude : Latitude in radians. (output)
143
*
144
*/
145
146
MSP::CCS::GeodeticCoordinates
*
convertToGeodetic
(
MSP::CCS::GEOREFCoordinates
* GEOREFString );
147
148
private
:
149
150
};
151
}
152
}
153
154
#endif
155
156
157
// CLASSIFICATION: UNCLASSIFIED
Generated on Tue Feb 16 2016 14:54:02 for GeographicTranslator by doxygen 1.8.2