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
stereogr
Stereographic.h
Go to the documentation of this file.
1
// CLASSIFICATION: UNCLASSIFIED
2
3
#ifndef Stereographic_H
4
#define Stereographic_H
5
6
/***************************************************************************/
7
/* RSC IDENTIFIER: STEREOGRAPHIC
8
*
9
*
10
* ABSTRACT
11
*
12
* This component provides conversions between geodetic (latitude and
13
* longitude) coordinates and Stereographic (easting and northing)
14
* coordinates.
15
*
16
* ERROR HANDLING
17
*
18
* This component checks parameters for valid values. If an invalid
19
* value is found the error code is combined with the current error code
20
* using the bitwise or. This combining allows multiple error codes to
21
* be returned. The possible error codes are:
22
*
23
* STEREO_NO_ERROR : No errors occurred in function
24
* STEREO_LAT_ERROR : Latitude outside of valid range
25
* (-90 to 90 degrees)
26
* STEREO_LON_ERROR : Longitude outside of valid range
27
* (-180 to 360 degrees)
28
* STEREO_ORIGIN_LAT_ERROR : Origin latitude outside of valid range
29
* (-90 to 90 degrees)
30
* STEREO_CENT_MER_ERROR : Central meridian outside of valid range
31
* (-180 to 360 degrees)
32
* STEREO_EASTING_ERROR : Easting outside of valid range,
33
* (False_Easting +/- ~1,460,090,226 m,
34
* depending on ellipsoid and projection
35
* parameters)
36
* STEREO_NORTHING_ERROR : Northing outside of valid range,
37
* (False_Northing +/- ~1,460,090,226 m,
38
* depending on ellipsoid and projection
39
* parameters)
40
* STEREO_A_ERROR : Semi-major axis less than or equal to zero
41
* STEREO_INV_F_ERROR : Inverse flattening outside of valid range
42
* (250 to 350)
43
*
44
*
45
* REUSE NOTES
46
*
47
* STEREOGRAPHIC is intended for reuse by any application that
48
* performs a Stereographic projection.
49
*
50
*
51
* REFERENCES
52
*
53
* Further information on STEREOGRAPHIC can be found in the
54
* Reuse Manual.
55
*
56
*
57
* STEREOGRAPHIC originated from :
58
* U.S. Army Topographic Engineering Center
59
* Geospatial Information Division
60
* 7701 Telegraph Road
61
* Alexandria, VA 22310-3864
62
*
63
*
64
* LICENSES
65
*
66
* None apply to this component.
67
*
68
*
69
* RESTRICTIONS
70
*
71
* STEREOGRAPHIC has no restrictions.
72
*
73
*
74
* ENVIRONMENT
75
*
76
* STEREOGRAPHIC was tested and certified in the following
77
* environments:
78
*
79
* 1. Solaris 2.5 with GCC, version 2.8.1
80
* 2. Window 95 with MS Visual C++, version 6
81
*
82
*
83
* MODIFICATIONS
84
*
85
* Date Description
86
* ---- -----------
87
* 3-1-07 Original Code
88
*
89
*/
90
91
92
#include "
CoordinateSystem.h
"
93
94
95
namespace
MSP
96
{
97
namespace
CCS
98
{
99
class
MapProjection4Parameters;
100
class
MapProjectionCoordinates;
101
class
GeodeticCoordinates;
102
103
104
/***************************************************************************/
105
/*
106
* DEFINES
107
*/
108
109
class
Stereographic
:
public
CoordinateSystem
110
{
111
public
:
112
113
/*
114
* The constructor receives the ellipsoid
115
* parameters and Stereograpic projection parameters as inputs, and
116
* sets the corresponding state variables. If any errors occur, an
117
* exception is thrown with a description of the error.
118
*
119
* ellipsoidSemiMajorAxis : Semi-major axis of ellipsoid, in meters (input)
120
* ellipsoidFlattening : Flattening of ellipsoid (input)
121
* centralMeridian : Longitude, in radians, at the center of (input)
122
* the projection
123
* originLatitude : Latitude, in radians, at the center of (input)
124
* the projection
125
* falseEasting : Easting (X) at center of projection, in meters (input)
126
* falseNorthing : Northing (Y) at center of projection, in meters (input)
127
*/
128
129
Stereographic
(
double
ellipsoidSemiMajorAxis,
double
ellipsoidFlattening,
double
centralMeridian,
double
originLatitude,
double
falseEasting,
double
falseNorthing );
130
131
132
Stereographic
(
const
Stereographic
&s );
133
134
135
~Stereographic
(
void
);
136
137
138
Stereographic
&
operator=
(
const
Stereographic
&s );
139
140
141
/*
142
* The function getParameters returns the current ellipsoid
143
* parameters and Stereographic projection parameters.
144
*
145
* ellipsoidSemiMajorAxis : Semi-major axis of ellipsoid, in meters (output)
146
* ellipsoidFlattening : Flattening of ellipsoid (output)
147
* centralMeridian : Longitude, in radians, at the center of (output)
148
* the projection
149
* originLatitude : Latitude, in radians, at the center of (output)
150
* the projection
151
* falseEasting : A coordinate value, in meters, assigned to the
152
* central meridian of the projection. (output)
153
* falseNorthing : A coordinate value, in meters, assigned to the
154
* origin latitude of the projection (output)
155
*/
156
157
MapProjection4Parameters
*
getParameters
()
const
;
158
159
160
/*
161
* The function convertFromGeodetic converts geodetic
162
* coordinates (latitude and longitude) to Stereographic coordinates
163
* (easting and northing), according to the current ellipsoid
164
* and Stereographic projection parameters. If any errors occur, an
165
* exception is thrown with a description of the error.
166
*
167
* longitude : Longitude, in radians (input)
168
* latitude : Latitude, in radians (input)
169
* easting : Easting (X), in meters (output)
170
* northing : Northing (Y), in meters (output)
171
*/
172
173
MSP::CCS::MapProjectionCoordinates
*
convertFromGeodetic
(
MSP::CCS::GeodeticCoordinates
* geodeticCoordinates );
174
175
176
/*
177
* The function convertToGeodetic converts Stereographic projection
178
* (easting and northing) coordinates to geodetic (latitude and longitude)
179
* coordinates, according to the current ellipsoid and Stereographic projection
180
* coordinates. If any errors occur, an exception is thrown with a description
181
* of the error.
182
*
183
* easting : Easting (X), in meters (input)
184
* northing : Northing (Y), in meters (input)
185
* longitude : Longitude (lambda), in radians (output)
186
* latitude : Latitude (phi), in radians (output)
187
*/
188
189
MSP::CCS::GeodeticCoordinates
*
convertToGeodetic
(
MSP::CCS::MapProjectionCoordinates
* mapProjectionCoordinates );
190
191
private
:
192
193
/* Ellipsoid Parameters, default to WGS 84 */
194
double
Stereo_Ra;
/* Spherical Radius */
195
double
Two_Stereo_Ra;
/* 2 * Spherical Radius */
196
long
Stereo_At_Pole;
/* Flag variable */
197
198
/* Stereographic projection Parameters */
199
double
Stereo_Origin_Lat;
/* Latitude of origin, in radians */
200
double
Stereo_Origin_Long;
/* Longitude of origin, in radians */
201
double
Stereo_False_Easting;
/* False easting, in meters */
202
double
Stereo_False_Northing;
/* False northing, in meters */
203
double
Sin_Stereo_Origin_Lat;
/* sin(Stereo_Origin_Lat) */
204
double
Cos_Stereo_Origin_Lat;
/* cos(Stereo_Origin_Lat) */
205
206
/* Maximum variance for easting and northing values for WGS 84. */
207
double
Stereo_Delta_Easting;
208
double
Stereo_Delta_Northing;
209
};
210
}
211
}
212
213
#endif
214
215
216
// CLASSIFICATION: UNCLASSIFIED
Generated on Tue Feb 16 2016 14:54:02 for GeographicTranslator by doxygen 1.8.2