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
ups
UPS.h
Go to the documentation of this file.
1
// CLASSIFICATION: UNCLASSIFIED
2
3
#ifndef UPS_H
4
#define UPS_H
5
6
/********************************************************************/
7
/* RSC IDENTIFIER: UPS
8
*
9
*
10
* ABSTRACT
11
*
12
* This component provides conversions between geodetic (latitude
13
* and longitude) coordinates and Universal Polar Stereographic (UPS)
14
* projection (hemisphere, easting, and northing) coordinates.
15
*
16
*
17
* ERROR HANDLING
18
*
19
* This component checks parameters for valid values. If an
20
* invalid value is found the error code is combined with the
21
* current error code using the bitwise or. This combining allows
22
* multiple error codes to be returned. The possible error codes
23
* are:
24
*
25
* UPS_NO_ERROR : No errors occurred in function
26
* UPS_LAT_ERROR : Latitude outside of valid range
27
* (North Pole: 83.5 to 90,
28
* South Pole: -79.5 to -90)
29
* UPS_LON_ERROR : Longitude outside of valid range
30
* (-180 to 360 degrees)
31
* UPS_HEMISPHERE_ERROR : Invalid hemisphere ('N' or 'S')
32
* UPS_EASTING_ERROR : Easting outside of valid range,
33
* (0 to 4,000,000m)
34
* UPS_NORTHING_ERROR : Northing outside of valid range,
35
* (0 to 4,000,000m)
36
* UPS_A_ERROR : Semi-major axis less than or equal to zero
37
* UPS_INV_F_ERROR : Inverse flattening outside of valid range
38
* (250 to 350)
39
*
40
*
41
* REUSE NOTES
42
*
43
* UPS is intended for reuse by any application that performs a Universal
44
* Polar Stereographic (UPS) projection.
45
*
46
*
47
* REFERENCES
48
*
49
* Further information on UPS can be found in the Reuse Manual.
50
*
51
* UPS originated from : U.S. Army Topographic Engineering Center
52
* Geospatial Information Division
53
* 7701 Telegraph Road
54
* Alexandria, VA 22310-3864
55
*
56
*
57
* LICENSES
58
*
59
* None apply to this component.
60
*
61
*
62
* RESTRICTIONS
63
*
64
* UPS has no restrictions.
65
*
66
*
67
* ENVIRONMENT
68
*
69
* UPS was tested and certified in the following environments:
70
*
71
* 1. Solaris 2.5 with GCC version 2.8.1
72
* 2. Windows 95 with MS Visual C++ version 6
73
*
74
*
75
* MODIFICATIONS
76
*
77
* Date Description
78
* ---- -----------
79
* 2-27-07 Original Code
80
*
81
*
82
*/
83
84
85
#include <map>
86
#include "
CoordinateSystem.h
"
87
88
89
namespace
MSP
90
{
91
namespace
CCS
92
{
93
class
PolarStereographic;
94
class
UPSCoordinates;
95
class
GeodeticCoordinates;
96
97
98
/**********************************************************************/
99
/*
100
* DEFINES
101
*/
102
103
class
UPS
:
public
CoordinateSystem
104
{
105
public
:
106
107
/*
108
* The constructor receives the ellipsoid parameters and sets
109
* the corresponding state variables. If any errors occur, an exception
110
* is thrown with a description of the error.
111
*
112
* ellipsoidSemiMajorAxis : Semi-major axis of ellipsoid in meters (input)
113
* ellipsoidFlattening : Flattening of ellipsoid (input)
114
*/
115
116
UPS
(
double
ellipsoidSemiMajorAxis,
double
ellipsoidFlattening );
117
118
119
UPS
(
const
UPS
&u );
120
121
122
~UPS
(
void
);
123
124
125
UPS
&
operator=
(
const
UPS
&u );
126
127
128
/*
129
* The function convertFromGeodetic converts geodetic (latitude and
130
* longitude) coordinates to UPS (hemisphere, easting, and northing)
131
* coordinates, according to the current ellipsoid parameters.
132
* If any errors occur, an exception is thrown with a description of the error.
133
*
134
* latitude : Latitude in radians (input)
135
* longitude : Longitude in radians (input)
136
* hemisphere : Hemisphere either 'N' or 'S' (output)
137
* easting : Easting/X in meters (output)
138
* northing : Northing/Y in meters (output)
139
*/
140
141
MSP::CCS::UPSCoordinates
*
convertFromGeodetic
(
MSP::CCS::GeodeticCoordinates
* geodeticCoordinates );
142
143
144
/*
145
* The function convertToGeodetic converts UPS (hemisphere, easting,
146
* and northing) coordinates to geodetic (latitude and longitude) coordinates
147
* according to the current ellipsoid parameters. If any errors occur,
148
* an exception is thrown with a description of the error.
149
*
150
* hemisphere : Hemisphere either 'N' or 'S' (input)
151
* easting : Easting/X in meters (input)
152
* northing : Northing/Y in meters (input)
153
* latitude : Latitude in radians (output)
154
* longitude : Longitude in radians (output)
155
*/
156
157
MSP::CCS::GeodeticCoordinates
*
convertToGeodetic
(
MSP::CCS::UPSCoordinates
* upsCoordinates );
158
159
private
:
160
161
std::map< char, PolarStereographic* > polarStereographicMap;
162
163
double
UPS_Origin_Latitude;
/*set default = North Hemisphere */
164
};
165
}
166
}
167
168
#endif
169
170
171
// CLASSIFICATION: UNCLASSIFIED
Generated on Tue Feb 16 2016 14:54:02 for GeographicTranslator by doxygen 1.8.2