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