C# Class MightyLittleGeodesy.Positions.WGS84Position

Inheritance: MightyLittleGeodesy.Classes.Position
Show file Open project: bjornsallarp/MightyLittleGeodesy Class Usage Examples

Public Methods

Method Description
LatitudeToString ( WGS84Format format ) : string

Returns a string representation in the given format

LongitudeToString ( WGS84Format format ) : string

Returns a string representation in the given format

SetLatitudeFromString ( string value, WGS84Format format ) : void

Set the latitude value from a string. The string is parsed based on given format

SetLongitudeFromString ( string value, WGS84Format format ) : void

Set the longitude value from a string. The string is parsed based on given format

ToString ( ) : string
WGS84Position ( ) : System

Create a new WGS84 position with empty coordinates

WGS84Position ( double latitude, double longitude ) : System

Create a new WGS84 position with latitude and longitude

WGS84Position ( string positionString, WGS84Format format ) : System

Create a new WGS84 position from a string containing both latitude and longitude. The string is parsed based on the supplied format.

Private Methods

Method Description
ConvToDmString ( double value, Char positiveValue, Char negativeValue ) : string
ConvToDmsString ( double value, Char positiveValue, Char negativeValue ) : string
ParseValueFromDmString ( string value, char positiveChar ) : double
ParseValueFromDmsString ( string value, char positiveChar ) : double

Method Details

LatitudeToString() public method

Returns a string representation in the given format
public LatitudeToString ( WGS84Format format ) : string
format WGS84Format
return string

LongitudeToString() public method

Returns a string representation in the given format
public LongitudeToString ( WGS84Format format ) : string
format WGS84Format
return string

SetLatitudeFromString() public method

Set the latitude value from a string. The string is parsed based on given format
public SetLatitudeFromString ( string value, WGS84Format format ) : void
value string String represenation of a latitude value
format WGS84Format Coordinate format in the string
return void

SetLongitudeFromString() public method

Set the longitude value from a string. The string is parsed based on given format
public SetLongitudeFromString ( string value, WGS84Format format ) : void
value string String represenation of a longitude value
format WGS84Format Coordinate format in the string
return void

ToString() public method

public ToString ( ) : string
return string

WGS84Position() public method

Create a new WGS84 position with empty coordinates
public WGS84Position ( ) : System
return System

WGS84Position() public method

Create a new WGS84 position with latitude and longitude
public WGS84Position ( double latitude, double longitude ) : System
latitude double
longitude double
return System

WGS84Position() public method

Create a new WGS84 position from a string containing both latitude and longitude. The string is parsed based on the supplied format.
public WGS84Position ( string positionString, WGS84Format format ) : System
positionString string
format WGS84Format
return System