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
miller
MillerCylindrical.h
Go to the documentation of this file.
1
// CLASSIFICATION: UNCLASSIFIED
2
3
#ifndef Miller_H
4
#define Miller_H
5
6
/***************************************************************************/
7
/* RSC IDENTIFIER: MILLER
8
*
9
* ABSTRACT
10
*
11
* This component provides conversions between Geodetic coordinates
12
* (latitude and longitude in radians) and Miller Cylindrical projection
13
* coordinates (easting and northing in meters). The Miller Cylindrical
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
* MILL_NO_ERROR : No errors occurred in function
26
* MILL_LAT_ERROR : Latitude outside of valid range
27
* (-90 to 90 degrees)
28
* MILL_LON_ERROR : Longitude outside of valid range
29
* (-180 to 360 degrees)
30
* MILL_EASTING_ERROR : Easting outside of valid range
31
* (False_Easting +/- ~20,000,000 m,
32
* depending on ellipsoid parameters)
33
* MILL_NORTHING_ERROR : Northing outside of valid range
34
* (False_Northing +/- ~14,000,000 m,
35
* depending on ellipsoid parameters)
36
* MILL_CENT_MER_ERROR : Central meridian outside of valid range
37
* (-180 to 360 degrees)
38
* MILL_A_ERROR : Semi-major axis less than or equal to zero
39
* MILL_INV_F_ERROR : Inverse flattening outside of valid range
40
* (250 to 350)
41
*
42
* REUSE NOTES
43
*
44
* MILLER is intended for reuse by any application that performs a
45
* Miller Cylindrical projection or its inverse.
46
*
47
* REFERENCES
48
*
49
* Further information on MILLER can be found in the Reuse Manual.
50
*
51
* MILLER originated from : U.S. Army Topographic Engineering Center
52
* Geospatial Information Division
53
* 7701 Telegraph Road
54
* Alexandria, VA 22310-3864
55
*
56
* LICENSES
57
*
58
* None apply to this component.
59
*
60
* RESTRICTIONS
61
*
62
* MILLER has no restrictions.
63
*
64
* ENVIRONMENT
65
*
66
* MILLER was tested and certified in the following environments:
67
*
68
* 1. Solaris 2.5 with GCC 2.8.1
69
* 2. Windows 95 with MS Visual C++ 6
70
*
71
* MODIFICATIONS
72
*
73
* Date Description
74
* ---- -----------
75
* 04-16-99 Original Code
76
* 03-05-07 Original C++ Code
77
*
78
*/
79
80
81
#include "
CoordinateSystem.h
"
82
83
84
namespace
MSP
85
{
86
namespace
CCS
87
{
88
class
MapProjection3Parameters;
89
class
MapProjectionCoordinates;
90
class
GeodeticCoordinates;
91
92
93
/***************************************************************************/
94
/*
95
* DEFINES
96
*/
97
98
class
MillerCylindrical
:
public
CoordinateSystem
99
{
100
public
:
101
102
/*
103
* The constructor receives the ellipsoid parameters and
104
* Miller Cylindrical projcetion parameters as inputs, and sets the corresponding
105
* state variables. If any errors occur, an exception is thrown with a description
106
* of the error.
107
*
108
* ellipsoidSemiMajorAxis : Semi-major axis of ellipsoid, in meters (input)
109
* ellipsoidFlattening : Flattening of ellipsoid (input)
110
* centralMeridian : Longitude in radians at the center of (input)
111
* the projection
112
* falseEasting : A coordinate value in meters assigned to the
113
* central meridian of the projection. (input)
114
* falseNorthing : A coordinate value in meters assigned to the
115
* origin latitude of the projection (input)
116
*/
117
118
MillerCylindrical
(
double
ellipsoidSemiMajorAxis,
double
ellipsoidFlattening,
double
centralMeridian,
double
falseEasting,
double
falseNorthing );
119
120
121
MillerCylindrical
(
const
MillerCylindrical
&mc );
122
123
124
~MillerCylindrical
(
void
);
125
126
127
MillerCylindrical
&
operator=
(
const
MillerCylindrical
&mc );
128
129
130
/*
131
* The function getParameters returns the current ellipsoid
132
* parameters and Miller Cylindrical projection parameters.
133
*
134
* ellipsoidSemiMajorAxis : Semi-major axis of ellipsoid, in meters (output)
135
* ellipsoidFlattening : Flattening of ellipsoid (output)
136
* centralMeridian : Longitude in radians at the center of (output)
137
* the projection
138
* falseEasting : A coordinate value in meters assigned to the
139
* central meridian of the projection. (output)
140
* falseNorthing : A coordinate value in meters assigned to the
141
* origin latitude of the projection (output)
142
*/
143
144
MapProjection3Parameters
*
getParameters
()
const
;
145
146
147
/*
148
* The function convertFromGeodetic converts geodetic (latitude and
149
* longitude) coordinates to Miller Cylindrical projection (easting and northing)
150
* coordinates, according to the current ellipsoid and Miller Cylindrical projection
151
* parameters. 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 Miller Cylindrical projection
165
* (easting and northing) coordinates to geodetic (latitude and longitude)
166
* coordinates, according to the current ellipsoid and Miller Cylindrical projection
167
* coordinates. If any errors occur, an exception is thrown with a description
168
* of the error.
169
*
170
* easting : Easting (X) in meters (input)
171
* northing : Northing (Y) in meters (input)
172
* longitude : Longitude (lambda) in radians (output)
173
* latitude : Latitude (phi) in radians (output)
174
*/
175
176
MSP::CCS::GeodeticCoordinates
*
convertToGeodetic
(
MSP::CCS::MapProjectionCoordinates
* mapProjectionCoordinates );
177
178
private
:
179
180
/* Ellipsoid Parameters, default to WGS 84 */
181
double
es2;
/* Eccentricity (0.08181919084262188000) squared */
182
double
es4;
/* es2 * es2 */
183
double
es6;
/* es4 * es2 */
184
double
Ra;
/* Spherical Radius */
185
186
/* Miller projection Parameters */
187
double
Mill_Origin_Long;
/* Longitude of origin in radians */
188
double
Mill_False_Easting;
189
double
Mill_False_Northing;
190
double
Mill_Delta_Northing;
191
double
Mill_Max_Easting;
192
double
Mill_Min_Easting;
193
194
};
195
}
196
}
197
198
#endif
199
200
201
// CLASSIFICATION: UNCLASSIFIED
Generated on Tue Feb 16 2016 14:54:02 for GeographicTranslator by doxygen 1.8.2