- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

# Y:/msp/devkits/temp_geotrans/master/geotrans3.1/CCS/src/dtcc/CoordinateTuples/MapProjectionCoordinates.cpp

Go to the documentation of this file.

    00001 // CLASSIFICATION: UNCLASSIFIED
    00002
    00003 #include <stdio.h>
    00004 #include <string.h>
    00005 #include "MapProjectionCoordinates.h"
    00006
    00007
    00008 using namespace MSP::CCS;
    00009
    00010
    00011 MapProjectionCoordinates::MapProjectionCoordinates() :
    00012 CoordinateTuple( CoordinateType::albersEqualAreaConic ),
    00013   _easting( 0 ),
    00014   _northing( 0 )
    00015 {
    00016 }
    00017
    00018
    00019 MapProjectionCoordinates::MapProjectionCoordinates( CoordinateType::Enum _coordinateType ) :
    00020   CoordinateTuple( _coordinateType ),
    00021   _easting( 0 ),
    00022   _northing( 0 )
    00023 {
    00024 }
    00025
    00026
    00027 MapProjectionCoordinates::MapProjectionCoordinates( CoordinateType::Enum _coordinateType, double __easting, double __northing ) :
    00028   CoordinateTuple( _coordinateType ),
    00029   _easting( __easting ),
    00030   _northing( __northing )
    00031 {
    00032 }
    00033
    00034
    00035 MapProjectionCoordinates::MapProjectionCoordinates( CoordinateType::Enum _coordinateType, const char* __warningMessage, double __easting, double __northing ) :
    00036   CoordinateTuple( _coordinateType ),
    00037   _easting( __easting ),
    00038   _northing( __northing )
    00039 {
    00040   int length = strlen( __warningMessage );
    00041   strncpy( _warningMessage, __warningMessage, length );
    00042   _warningMessage[ length ] = '\0';
    00043 }
    00044
    00045
    00046 MapProjectionCoordinates::MapProjectionCoordinates( const MapProjectionCoordinates &c )
    00047 {
    00048   _coordinateType = c._coordinateType;
    00049
    00050   _easting = c._easting;
    00051   _northing = c._northing;
    00052
    00053   int length = strlen( c._warningMessage );
    00054   strncpy( _warningMessage, c._warningMessage, length );
    00055   _warningMessage[ length ] = '\0';
    00056 }
    00057
    00058
    00059 MapProjectionCoordinates::~MapProjectionCoordinates()
    00060 {
    00061   _easting = 0;
    00062   _northing = 0;
    00063 }
    00064
    00065
    00066 MapProjectionCoordinates& MapProjectionCoordinates::operator=( const MapProjectionCoordinates &c )
    00067 {
    00068   if( this != &c )
    00069   {
    00070     _coordinateType = c._coordinateType;
    00071
    00072     _easting = c._easting;
    00073     _northing = c._northing;
    00074
    00075     int length = strlen( c._warningMessage );
    00076     strncpy( _warningMessage, c._warningMessage, length );
    00077     _warningMessage[ length ] = '\0';
    00078   }
    00079
    00080   return *this;
    00081 }
    00082
    00083
    00084 void MapProjectionCoordinates::set( double __easting, double __northing )
    00085 {
    00086   _easting = __easting;
    00087   _northing = __northing;
    00088 }
    00089
    00090
    00091 void MapProjectionCoordinates::setEasting( double __easting )
    00092 {
    00093   _easting = __easting;
    00094 }
    00095
    00096
    00097 double MapProjectionCoordinates::easting() const
    00098 {
    00099   return _easting;
    00100 }
    00101
    00102
    00103 void MapProjectionCoordinates::setNorthing( double __northing )
    00104 {
    00105   _northing = __northing;
    00106 }
    00107
    00108
    00109 double MapProjectionCoordinates::northing() const
    00110 {
    00111   return _northing;
    00112 }
    00113
    00114 // CLASSIFICATION: UNCLASSIFIED