Public Member Functions | Static Public Member Functions | Public Attributes

CxUtils::Utm Class Reference

Simple Universal Transverse Mercator (UTM) coordinate system data structure. More...

#include <coordinates.h>

List of all members.

Public Member Functions

 Utm ()
 Constructor.
 Utm (const Utm &utm)
 Copy constructor.
 Utm (const Wgs &wgs)
 Initializes from WGS coordinate.
 Utm (const double northing, const double easting, const int zoneNumber, const int zoneLetter)
 Constructor, sets values.
int Set (const double northing, const double easting, const int zoneNumber, const int zoneLetter)
 Sets the values.
int Set (const double northing, const double easting, const int zoneNumber, const int zoneLetter, const double elevation)
 Sets the values.
int Get (double &northing, double &easting, int &zoneNumber, int &zoneLetter) const
 Gets the values.
int Get (double &northing, double &easting, int &zoneNumber, int &zoneLetter, double &elevation) const
 Gets the values.
void Print () const
 Prints out data to console window.
Utmoperator() (const double northing, const double easting, const int zoneNumber, const int zoneLetter, const double elevation=0)
Utmoperator= (const Utm &utm)
 Sets equal to.
Utmoperator<< (const Wgs &wgs)
 Converts the WGS data to UTM, and saves it to internal data members.
Utmoperator<< (const Gcc &gcc)
 Converts the GCC data to UTM, and saves it to internal data members.
void operator>> (Gcc &gcc) const
 Converts to GCC position data.
void operator>> (Wgs &wgs) const
 Converts to Wgs position data.
bool operator== (const Utm &utm) const

Static Public Member Functions

static double Distance (const Utm &utm1, const Utm &utm2)

Public Attributes

int mZoneNumber
 UTM Longitude Zone.
int mZoneLetter
 UTM Latitude Zone.
double mNorthing
 UTM Northing.
double mEasting
 UTM Easting.
double mElevation
 Elevation based on mean-sea level [-10,000, 35,000].

Detailed Description

Simple Universal Transverse Mercator (UTM) coordinate system data structure.

UTM Northing is positive traveling northward, and Easting is positive traveling eastword. There are no negative values in UTM. Units are measured in meters.

Definition at line 119 of file coordinates.h.


Constructor & Destructor Documentation

Utm::Utm (  )

Constructor.

Definition at line 924 of file coordinates.cpp.

Utm::Utm ( const Utm utm )

Copy constructor.

Definition at line 936 of file coordinates.cpp.

Utm::Utm ( const Wgs wgs )

Initializes from WGS coordinate.

Definition at line 951 of file coordinates.cpp.

Utm::Utm ( const double  northing,
const double  easting,
const int  zoneNumber,
const int  zoneLetter 
)

Constructor, sets values.

Parameters:
northingUTM northing.
eastingUTM easting.
zoneNumberThe number of the UTM zone.
zoneLetterThe letter of the UTM zone.

Definition at line 969 of file coordinates.cpp.


Member Function Documentation

double Utm::Distance ( const Utm utm1,
const Utm utm2 
) [static]
Returns:
Distance in meters between two points.

Definition at line 1094 of file coordinates.cpp.

int Utm::Get ( double &  northing,
double &  easting,
int &  zoneNumber,
int &  zoneLetter,
double &  elevation 
) const

Gets the values.

Parameters:
northingUTM northing.
eastingUTM easting.
zoneNumberThe number of the UTM zone.
zoneLetterThe letter of the UTM zone.
elevationElevation around mean-sea level [-10,000,35,000].
Returns:
1 if values retrieved, otherwise 0.

Definition at line 1065 of file coordinates.cpp.

int Utm::Get ( double &  northing,
double &  easting,
int &  zoneNumber,
int &  zoneLetter 
) const

Gets the values.

Parameters:
northingUTM northing.
eastingUTM easting.
zoneNumberThe number of the UTM zone.
zoneLetterThe letter of the UTM zone.
Returns:
1 if values retrieved, otherwise 0.

Definition at line 1041 of file coordinates.cpp.

Utm& CxUtils::Utm::operator() ( const double  northing,
const double  easting,
const int  zoneNumber,
const int  zoneLetter,
const double  elevation = 0 
) [inline]

Definition at line 138 of file coordinates.h.

Utm & Utm::operator<< ( const Wgs wgs )

Converts the WGS data to UTM, and saves it to internal data members.

Definition at line 1139 of file coordinates.cpp.

Utm & Utm::operator<< ( const Gcc gcc )

Converts the GCC data to UTM, and saves it to internal data members.

Definition at line 1152 of file coordinates.cpp.

Utm & Utm::operator= ( const Utm utm )

Sets equal to.

Definition at line 1122 of file coordinates.cpp.

bool Utm::operator== ( const Utm utm ) const
Returns:
True if the values are equal, otherwise false.

Definition at line 1190 of file coordinates.cpp.

void Utm::operator>> ( Wgs wgs ) const

Converts to Wgs position data.

Definition at line 1166 of file coordinates.cpp.

void Utm::operator>> ( Gcc gcc ) const

Converts to GCC position data.

Definition at line 1177 of file coordinates.cpp.

void Utm::Print (  ) const

Prints out data to console window.

Definition at line 1082 of file coordinates.cpp.

int Utm::Set ( const double  northing,
const double  easting,
const int  zoneNumber,
const int  zoneLetter 
)

Sets the values.

Parameters:
northingUTM northing.
eastingUTM easting.
zoneNumberThe number of the UTM zone.
zoneLetterThe letter of the UTM zone.
Returns:
1 if values set, otherwise 0.

Definition at line 991 of file coordinates.cpp.

int Utm::Set ( const double  northing,
const double  easting,
const int  zoneNumber,
const int  zoneLetter,
const double  elevation 
)

Sets the values.

Parameters:
northingUTM northing.
eastingUTM easting.
zoneNumberThe number of the UTM zone.
zoneLetterThe letter of the UTM zone.
elevationElevation around mean-sea level [-10,000,35,000].
Returns:
1 if values set, otherwise 0.

Definition at line 1015 of file coordinates.cpp.


Member Data Documentation

UTM Easting.

Definition at line 155 of file coordinates.h.

Elevation based on mean-sea level [-10,000, 35,000].

Definition at line 156 of file coordinates.h.

UTM Northing.

Definition at line 154 of file coordinates.h.

UTM Latitude Zone.

Definition at line 153 of file coordinates.h.

UTM Longitude Zone.

Definition at line 152 of file coordinates.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines