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