Za'atar Digital

eServices for the rest of us

User Tools

Site Tools


gpskit:docs:zdgpskit:geo:coordinate

Coordinate

Type Class
Super class Object
Namespace zdGPSKit.Geo

This class can't be instantiated directly

It's the base class for the zdGPSKit.Geo.Latitude and zdGPSKit.Geo.Longitude classes. It implements all the methods available with these classes.

To avoid redundant calculation, this class caches the string returned by the built-in FormatXXX methods. It means that the string is build only once, the first time you need it. The cache is purged when you set the native value, parse a new string, or call the CleanAllInstancesCache shared method.


Properties


NativeValue

Syntax
NativeValue() As Double

This is the native value as stored internally. Useful to store and restore the value as a Double in a MemoryBlock or a file.

Shared Properties

HemisphereLetterFirst

Syntax
HemisphereLetterFirst() As Boolean

When set to True, the built-in FormatXXX methods return the value preceded by the hemisphere letter. Otherwise, the hemisphere letter is returned after the value.

Setting this property affects all instances of the class at the same time.

Methods


FormatDD

Syntax
FormatDD() As String

Returns the decimal degrees value of this coordinate as a string formatted as d.ddddd° and including the hemisphere letter.

FormatDM

Syntax
FormatDM() As String

Returns the degrees & minutes decimal value as a string with the dd° mm.mmm' and including the hemisphere letter.

FormatDMS

Syntax
FormatDMS() As String

Returns the degrees, minutes & decimal seconds value as a string with the dd° mm' ss.sss“ format and including the hemisphere letter.

FormatWGS84

Syntax
FormatWGS84() As String

Returns the WGS84 value for this coordinate as a string with the ddmm.mmm format without the sign nor the hemisphere letter. Use the HemisphereLetter property to determine the hemisphere the value is related to ( North/South for Latitude and East/West for longitude).

HemisphereLetter

Syntax
HemisphereLetter() As String

The letter representing the hemisphere this coordinate is referencing. The value can be N, S, W, E ( i.e. North, South, West, East ).

ParseFormatDD

Syntax
ParseFormatDD( inString As String ) As Boolean

Parse the passed string assuming it represents a decimal degree notation ( i.e. d.ddd° ) and set the coordinate accordingly. The string can include either a letter representing the hemisphere or a +/- sign.

It returns True if the string was parsed successfully and False otherwise.

ParseFormatDM

Syntax
ParseFormatDM( inString As String ) As Boolean

Parse the passed string assuming it represents a degree & decimal minutes notation ( i.e. dd°mm.mmm') and set the coordinate accordingly. The string can include either a letter representing the hemisphere before or after or or a +/- sign.

It returns True if the string was parsed successfully and False otherwise.

ParseFormatDMS

Syntax
ParseFormatDMS( inString As String ) As Boolean

Parse the passed string assuming it represents a degrees, minutes and decimal seconds notation ( i.e. dd°mm'ss.sss” ) and set the coordinate accordingly. The string can include either a letter representing the hemisphere or a +/- sign.

It returns True if the string was parsed successfully and False if not.

ParseFormatWGS84

Syntax
ParseFormatWGS84( inString As String ) As Boolean

Parse the passed string assuming it represents a WGS84 notation ( i.e. ddmm.mmm ) and set the coordinate accordingly. The string must include a letter representing the hemisphere.

It returns True if the string was parsed successfully and False otherwise.

Shared Methods


CleanAllInstancesCache

Syntax
CleanAllInstancesCache()

Clean the cache of all existing instance of the class.

gpskit/docs/zdgpskit/geo/coordinate.txt · Last modified: 2016/02/10 12:23 (external edit)