UNCLASSIFIED

GeographicTranslator
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
MapProjectionCoordinates.cpp
Go to the documentation of this file.
1 // CLASSIFICATION: UNCLASSIFIED
2 
3 #include <stdio.h>
4 #include <string.h>
6 
7 
8 using namespace MSP::CCS;
9 
10 
12 CoordinateTuple( CoordinateType::albersEqualAreaConic ),
13  _easting( 0 ),
14  _northing( 0 )
15 {
16 }
17 
18 
20  CoordinateTuple( _coordinateType ),
21  _easting( 0 ),
22  _northing( 0 )
23 {
24 }
25 
26 
27 MapProjectionCoordinates::MapProjectionCoordinates( CoordinateType::Enum _coordinateType, double __easting, double __northing ) :
28  CoordinateTuple( _coordinateType ),
29  _easting( __easting ),
30  _northing( __northing )
31 {
32 }
33 
34 
35 MapProjectionCoordinates::MapProjectionCoordinates( CoordinateType::Enum _coordinateType, const char* __warningMessage, double __easting, double __northing ) :
36  CoordinateTuple( _coordinateType ),
37  _easting( __easting ),
38  _northing( __northing )
39 {
40  int length = strlen( __warningMessage );
41  strncpy( _warningMessage, __warningMessage, length );
42  _warningMessage[ length ] = '\0';
43 }
44 
45 
47 {
49 
50  _easting = c._easting;
51  _northing = c._northing;
52 
53  int length = strlen( c._warningMessage );
54  strncpy( _warningMessage, c._warningMessage, length );
55  _warningMessage[ length ] = '\0';
56 }
57 
58 
60 {
61  _easting = 0;
62  _northing = 0;
63 }
64 
65 
67 {
68  if( this != &c )
69  {
71 
72  _easting = c._easting;
73  _northing = c._northing;
74 
75  int length = strlen( c._warningMessage );
76  strncpy( _warningMessage, c._warningMessage, length );
77  _warningMessage[ length ] = '\0';
78  }
79 
80  return *this;
81 }
82 
83 
84 void MapProjectionCoordinates::set( double __easting, double __northing )
85 {
86  _easting = __easting;
87  _northing = __northing;
88 }
89 
90 
91 void MapProjectionCoordinates::setEasting( double __easting )
92 {
93  _easting = __easting;
94 }
95 
96 
98 {
99  return _easting;
100 }
101 
102 
103 void MapProjectionCoordinates::setNorthing( double __northing )
104 {
105  _northing = __northing;
106 }
107 
108 
110 {
111  return _northing;
112 }
113 
114 // CLASSIFICATION: UNCLASSIFIED