UNCLASSIFIED

GeographicTranslator
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
UTMCoordinates.cpp
Go to the documentation of this file.
1 // CLASSIFICATION: UNCLASSIFIED
2 
3 #include <string.h>
4 #include "UTMCoordinates.h"
5 
6 
7 using namespace MSP::CCS;
8 
9 
11 CoordinateTuple( CoordinateType::universalTransverseMercator ),
12  _zone( 32 ),
13  _hemisphere( 'N' ),
14  _easting( 0 ),
15  _northing( 0 )
16 {
17 }
18 
19 
21 CoordinateTuple( _coordinateType ),
22  _zone( 32 ),
23  _hemisphere( 'N' ),
24  _easting( 0 ),
25  _northing( 0 )
26 {
27 }
28 
29 
30 UTMCoordinates::UTMCoordinates( CoordinateType::Enum _coordinateType, long __zone, char __hemisphere, double __easting, double __northing ) :
31  CoordinateTuple( _coordinateType ),
32  _zone( __zone ),
33  _hemisphere( __hemisphere ),
34  _easting( __easting ),
35  _northing( __northing )
36 {
37 }
38 
39 
40 UTMCoordinates::UTMCoordinates( CoordinateType::Enum _coordinateType, const char* __warningMessage, long __zone, char __hemisphere, double __easting, double __northing ) :
41  CoordinateTuple( _coordinateType ),
42  _zone( __zone ),
43  _hemisphere( __hemisphere ),
44  _easting( __easting ),
45  _northing( __northing )
46 {
47  int length = strlen( __warningMessage );
48  strncpy( _warningMessage, __warningMessage, length );
49  _warningMessage[ length ] = '\0';
50 }
51 
52 
54 {
56 
57  _zone = c._zone;
58  _hemisphere = c._hemisphere;
59  _easting = c._easting;
60  _northing = c._northing;
61 
62  int length = strlen( c._warningMessage );
63  strncpy( _warningMessage, c._warningMessage, length );
64  _warningMessage[ length ] = '\0';
65 }
66 
67 
69 {
70 }
71 
72 
74 {
75  if( this != &c )
76  {
78 
79  _zone = c._zone;
80  _hemisphere = c._hemisphere;
81  _easting = c._easting;
82  _northing = c._northing;
83 
84  int length = strlen( c._warningMessage );
85  strncpy( _warningMessage, c._warningMessage, length );
86  _warningMessage[ length ] = '\0';
87  }
88 
89  return *this;
90 }
91 
92 
93 void UTMCoordinates::set( long __zone, char __hemisphere, double __easting, double __northing )
94 {
95  _zone = __zone;
96  _hemisphere = __hemisphere;
97  _easting = __easting;
98  _northing = __northing;
99 }
100 
101 
102 void UTMCoordinates::setZone( long __zone )
103 {
104  _zone = __zone;
105 }
106 
107 
109 {
110  return _zone;
111 }
112 
113 
114 void UTMCoordinates::setHemisphere( char __hemisphere )
115 {
116  _hemisphere = __hemisphere;
117 }
118 
119 
121 {
122  return _hemisphere;
123 }
124 
125 
126 void UTMCoordinates::setEasting( double __easting )
127 {
128  _easting = __easting;
129 }
130 
131 
133 {
134  return _easting;
135 }
136 
137 
138 void UTMCoordinates::setNorthing( double __northing )
139 {
140  _northing = __northing;
141 }
142 
143 
145 {
146  return _northing;
147 }
148 
149 // CLASSIFICATION: UNCLASSIFIED