MgrsPoint Class Reference

Stores a Military Grid Reference System (MGRS) coordinate. More...

#include <GeoPoint.h>

List of all members.

Public Member Functions

 MgrsPoint (LatLonPoint latLon)
 MgrsPoint (const std::string &mgrsText)
 ~MgrsPoint ()
LocationType getCoordinates () const
LatLonPoint getLatLonCoordinates () const
double getEasting () const
double getNorthing () const
int getZone () const
std::string getText () const
std::string getZoneText () const
std::string getScrCodeText () const


Detailed Description

Stores a Military Grid Reference System (MGRS) coordinate.

This class stores an MGRS coordinate and provides common text formatting when retrieving the value. In addition to the text formatting, the raw component values can also be retrieved.

Definition at line 465 of file GeoPoint.h.


Constructor & Destructor Documentation

MgrsPoint::MgrsPoint ( LatLonPoint  latLon  ) 

Creates an MGRS point based on a given latitude/longitude point.

This constructor automatically converts a latitude/longitude coordinate pair into an MGRS coordinate.

Parameters:
latLon The latitude/longitude coordinate to convert to an MGRS point.

MgrsPoint::MgrsPoint ( const std::string &  mgrsText  ) 

Creates an MGRS point based on its string representation.

Parameters:
mgrsText A string representation of the MGRS point.

MgrsPoint::~MgrsPoint (  ) 

Destroys the MGRS point.


Member Function Documentation

LocationType MgrsPoint::getCoordinates (  )  const

Retrieves the easting and northing components of the MGRS point.

Returns:
The easting and northing component values in a LocationType. The easting value is stored in the LocationType x-coordinate, and the northing value is stored in the y-coordinate.
See also:
getEasting(), getNorthing(), getText()

LatLonPoint MgrsPoint::getLatLonCoordinates (  )  const

Converts the MGRS point to a latitude/longitude point.

Returns:
The MGRS point converted to a latitude/longitude coordinate. The latitude value is stored in the LocationType x-coordinate, and the longitude value is stored in the y-coordinate.
See also:
LatLonPoint, getCoordinates()

double MgrsPoint::getEasting (  )  const

Returns the easting component value.

Returns:
The easting value of the MGRS point.
See also:
getNorthing()

double MgrsPoint::getNorthing (  )  const

Returns the northing component value.

Returns:
The northing value of the MGRS point.
See also:
getEasting()

int MgrsPoint::getZone (  )  const

Returns the zone component value.

Returns:
The zone value of the MGRS point as an integer.

std::string MgrsPoint::getText (  )  const

Returns the text representation of the MGRS point.

Returns:
A formatted string representing the MGRS point, including the easting, northing, zone, and SCR code.

std::string MgrsPoint::getZoneText (  )  const

Returns the zone component value as a formatted string.

Returns:
A string representing the zone value of the MGRS point in the format used in the string representation of the entire coordinate.
See also:
getText()

std::string MgrsPoint::getScrCodeText (  )  const

Returns the MGRS code representing a region in which the point resides.

Returns:
The alphabetic character string representing a 100 km MGRS region in which the MGRS point resides.
See also:
getText()


Software Development Kit - Opticks 4.9.0 Build 16218