- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

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

Go to the documentation of this file.

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