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
CoordinateTuples
MapProjectionCoordinates.cpp
Go to the documentation of this file.
1
// CLASSIFICATION: UNCLASSIFIED
2
3
#include <stdio.h>
4
#include <string.h>
5
#include "
MapProjectionCoordinates.h
"
6
7
8
using namespace
MSP::CCS;
9
10
11
MapProjectionCoordinates::MapProjectionCoordinates
() :
12
CoordinateTuple
(
CoordinateType
::albersEqualAreaConic ),
13
_easting( 0 ),
14
_northing( 0 )
15
{
16
}
17
18
19
MapProjectionCoordinates::MapProjectionCoordinates
(
CoordinateType::Enum
_coordinateType ) :
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
46
MapProjectionCoordinates::MapProjectionCoordinates
(
const
MapProjectionCoordinates
&c )
47
{
48
_coordinateType
= c.
_coordinateType
;
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
59
MapProjectionCoordinates::~MapProjectionCoordinates
()
60
{
61
_easting = 0;
62
_northing = 0;
63
}
64
65
66
MapProjectionCoordinates
&
MapProjectionCoordinates::operator=
(
const
MapProjectionCoordinates
&c )
67
{
68
if
(
this
!= &c )
69
{
70
_coordinateType
= c.
_coordinateType
;
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
97
double
MapProjectionCoordinates::easting
()
const
98
{
99
return
_easting;
100
}
101
102
103
void
MapProjectionCoordinates::setNorthing
(
double
__northing )
104
{
105
_northing = __northing;
106
}
107
108
109
double
MapProjectionCoordinates::northing
()
const
110
{
111
return
_northing;
112
}
113
114
// CLASSIFICATION: UNCLASSIFIED
Generated on Tue Feb 16 2016 14:54:02 for GeographicTranslator by doxygen 1.8.2