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
eckert4
Eckert4.h
Go to the documentation of this file.
1
// CLASSIFICATION: UNCLASSIFIED
2
3
#ifndef Eckert4_H
4
#define Eckert4_H
5
6
/***************************************************************************/
7
/* RSC IDENTIFIER: ECKERT4
8
*
9
* ABSTRACT
10
*
11
* This component provides conversions between Geodetic coordinates
12
* (latitude and longitude in radians) and Eckert IV projection coordinates
13
* (easting and northing in meters). This projection employs a spherical
14
* Earth model. The spherical radius used is the radius of the sphere
15
* 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
* ECK4_NO_ERROR : No errors occurred in function
25
* ECK4_LAT_ERROR : Latitude outside of valid range
26
* (-90 to 90 degrees)
27
* ECK4_LON_ERROR : Longitude outside of valid range
28
* (-180 to 360 degrees)
29
* ECK4_EASTING_ERROR : Easting outside of valid range
30
* (False_Easting +/- ~17,000,000 m,
31
* depending on ellipsoid parameters)
32
* ECK4_NORTHING_ERROR : Northing outside of valid range
33
* (False_Northing +/- 0 to 8,000,000 m,
34
* depending on ellipsoid parameters)
35
* ECK4_CENT_MER_ERROR : Central_Meridian outside of valid range
36
* (-180 to 360 degrees)
37
* ECK4_A_ERROR : Semi-major axis less than or equal to zero
38
* ECK4_INV_F_ERROR : Inverse flattening outside of valid range
39
* (250 to 350)
40
*
41
* REUSE NOTES
42
*
43
* ECKERT4 is intended for reuse by any application that performs a
44
* Eckert IV projection or its inverse.
45
*
46
* REFERENCES
47
*
48
* Further information on ECKERT4 can be found in the Reuse Manual.
49
*
50
* ECKERT4 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
* ECKERT4 has no restrictions.
62
*
63
* ENVIRONMENT
64
*
65
* ECKERT4 was tested and certified in the following environments:
66
*
67
* 1. Solaris 2.5 with GCC 2.8.1
68
* 2. MS Windows 95 with MS Visual C++ 6
69
*
70
* MODIFICATIONS
71
*
72
* Date Description
73
* ---- -----------
74
* 04-16-99 Original Code
75
* 03-06-07 Original C++ Code
76
*
77
*/
78
79
80
#include "
CoordinateSystem.h
"
81
82
83
namespace
MSP
84
{
85
namespace
CCS
86
{
87
class
MapProjection3Parameters;
88
class
MapProjectionCoordinates;
89
class
GeodeticCoordinates;
90
91
92
/***************************************************************************/
93
/*
94
* DEFINES
95
*/
96
97
class
Eckert4
:
public
CoordinateSystem
98
{
99
public
:
100
101
/*
102
* The constructor receives the ellipsoid parameters and
103
* projection parameters as inputs, and sets the corresponding state
104
* variables. If any errors occur, an exception is thrown with a description
105
* of the error.
106
*
107
* ellipsoidSemiMajorAxis : Semi-major axis of ellipsoid, in meters (input)
108
* ellipsoidFlattening : Flattening of ellipsoid (input)
109
* centralMeridian : Longitude in radians at the center of (input)
110
* the projection
111
* falseEasting : A coordinate value in meters assigned to the
112
* central meridian of the projection. (input)
113
* falseNorthing : A coordinate value in meters assigned to the
114
* origin latitude of the projection (input)
115
*/
116
117
Eckert4
(
double
ellipsoidSemiMajorAxis,
double
ellipsoidFlattening,
double
centralMeridian,
double
falseEasting,
double
falseNorthing );
118
119
120
Eckert4
(
const
Eckert4
&e );
121
122
123
~Eckert4
(
void
);
124
125
126
Eckert4
&
operator=
(
const
Eckert4
&e );
127
128
129
/*
130
* The function getParameters returns the current ellipsoid
131
* parameters and Eckert IV projection parameters.
132
*
133
* ellipsoidSemiMajorAxis : Semi-major axis of ellipsoid, in meters (output)
134
* ellipsoidFlattening : Flattening of ellipsoid (output)
135
* centralMeridian : Longitude in radians at the center of (output)
136
* the projection
137
* falseEasting : A coordinate value in meters assigned to the
138
* central meridian of the projection. (output)
139
* falseNorthing : A coordinate value in meters assigned to the
140
* origin latitude of the projection (output)
141
*/
142
143
MapProjection3Parameters
*
getParameters
()
const
;
144
145
146
/*
147
* The function convertFromGeodetic converts geodetic (latitude and
148
* longitude) coordinates to Eckert IV projection (easting and northing)
149
* coordinates, according to the current ellipsoid, spherical radius and
150
* Eckert IV projection parameters.
151
* If any errors occur, an exception is thrown with a description
152
* of the error.
153
*
154
* longitude : Longitude (lambda) in radians (input)
155
* latitude : Latitude (phi) in radians (input)
156
* easting : Easting (X) in meters (output)
157
* northing : Northing (Y) in meters (output)
158
*/
159
160
MSP::CCS::MapProjectionCoordinates
*
convertFromGeodetic
(
MSP::CCS::GeodeticCoordinates
* geodeticCoordinates );
161
162
163
/*
164
* The function convertToGeodetic converts Eckert IV projection
165
* (easting and northing) coordinates to geodetic (latitude and longitude)
166
* coordinates, according to the current ellipsoid, spherical radius and
167
* Eckert IV projection coordinates.
168
* If any errors occur, an exception is thrown with a description
169
* of the error.
170
*
171
* easting : Easting (X) in meters (input)
172
* northing : Northing (Y) in meters (input)
173
* longitude : Longitude (lambda) in radians (output)
174
* latitude : Latitude (phi) in radians (output)
175
*/
176
177
MSP::CCS::GeodeticCoordinates
*
convertToGeodetic
(
MSP::CCS::MapProjectionCoordinates
* mapProjectionCoordinates );
178
179
private
:
180
181
/* Ellipsoid Parameters, default to WGS 84 */
182
double
es2;
/* Eccentricity (0.08181919084262188000) squared */
183
double
es4;
/* es2 * es2 */
184
double
es6;
/* es4 * es2 */
185
186
double
Ra0;
/* 0.4222382 * Sperical Radius (6371007.1810824) */
187
double
Ra1;
/* 1.3265004 * Sperical Radius (6371007.1810824) */
188
189
/* Eckert4 projection Parameters */
190
double
Eck4_Origin_Long;
/* Longitude of origin in radians */
191
double
Eck4_False_Easting;
192
double
Eck4_False_Northing;
193
double
Eck4_Delta_Northing;
194
double
Eck4_Max_Easting;
195
double
Eck4_Min_Easting;
196
197
};
198
}
199
}
200
201
#endif
202
203
204
// CLASSIFICATION: UNCLASSIFIED
Generated on Tue Feb 16 2016 14:54:01 for GeographicTranslator by doxygen 1.8.2