Coordinate Class

Class for handling all location based information. This is the main class of CoordinateSharp. It will contain all coordinate conversions and celestial information once populated. Most everything you need in the library will be contained in the Coordinate class.

Definition

Namespace: CoordinateSharp
Assembly: CoordinateSharp (in CoordinateSharp.dll) Version: 2.24.1.1
XMLNS for XAML: Not mapped to an xmlns.
C#
[SerializableAttribute]
public class Coordinate : INotifyPropertyChanged
Inheritance
Object    Coordinate
Implements
INotifyPropertyChanged

Constructors

Coordinate Creates a Coordinate object with default values.
Coordinate(EagerLoad) Creates an empty Coordinates object with specified eager loading options.
Coordinate(Double, Double) Creates a populated Coordinate based on signed degrees formated latitude and longitude.
Coordinate(Double, Double, EagerLoad) Creates a populated Coordinate object with specified eager loading options.
Coordinate(Double, Double, DateTime) Creates a populated Coordinate object with an assigned GeoDate.
Coordinate(Double, Double, DateTime, EagerLoad) Creates a populated Coordinate object with specified eager load options and an assigned GeoDate.

Properties

Cartesian Cartesian (based on spherical earth).
CelestialInfo Celestial information based on the objects location and geographic UTC date.
Display Bindable formatted coordinate string.
EagerLoadSettings Eagerloading settings.
ECEF Earth Centered Earth Fixed Coordinate. Uses Ellipsoidal height with no geoid model included.

Remarks

GeoHeight at 0 = Mean Sea Level based on the provided Datum.
Equatorial_Radius Equatorial Radius of Earth (Default WGS84)
FormatOptions Coordinate string formatting options.
GeoDate Date at coordinate used to calculate celestial information.
GEOREF GEOREF values.
Inverse_Flattening Inverse Flattening of Earth (Default WGS84)
Latitude Latitudinal Coordinate Part.
Longitude Longitudinal Coordinate Part.
MGRS Military Grid Reference System (NATO UTM) values.
Offset GeoDate UTC Offset. This must be set if working / eager loading in local time.
Parse_Format Used to determine what format the coordinate was parsed from. Will equal "None" if Coordinate was not initialized via a TryParse() method.
UTM Universal Transverse Mercator values.
WebMercator Web Mercator EPSG:3857 values.

Methods

Celestial_LocalTime Returns a new Celestial object in local time, based on the Coordinate objects values.
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Get_Distance_From_Coordinate(Coordinate) Returns the distance from a target coordinate using spherical earth calculations. Use overload if ellipsoidal calculations are desired.
Get_Distance_From_Coordinate(Coordinate, Shape) Returns the distance from a target coordinate.
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
LoadCartesianInfo Load Cartesian information (required if eager loading is turned off).
LoadCelestialInfo Load celestial information (required if eager loading is turned off).
LoadECEFInfo Load ECEF information (required if eager loading is turned off).
LoadGEOREFInfo Load GEOREF information (required if eager loading is turned off).
LoadUTM_MGRS_Info Load UTM and MGRS information (required if eager loading is turned off).
LoadWebMercatorInfo Load Web Mercator EPSG:3857 information (required if eager loading is turned off).
Lock_UTM_MGRS_Zone Locks converted UTM and MGRS longitudinal grid zones to the specified zone number. This will allow over-projection and allow users to remain in a single desired zone. This should be used with caution as precision loss will occur.
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Move(Coordinate, Distance, Shape) Move a coordinate a specified distance towards a target coordinate.
Move(Coordinate, Double, Shape) Move a coordinate a specified distance (in meters) towards a target coordinate.
Move(Distance, Double, Shape) Move coordinate based on provided bearing and distance (in meters).
Move(Double, Double, Shape) Move coordinate based on provided bearing and distance (in meters).
NotifyPropertyChanged Notify property changed
Parse(String) Parses a string into a Coordinate.
Parse(String, Allowed_Parse_Format) Parses a string into a Coordinate.
Parse(String, CartesianType) Parses a string into a Coordinate with a specified Cartesian system type.
Parse(String, EagerLoad) Parses a string into a Coordinate with specified eager loading settings.
Parse(String, DateTime) Parses a string into a Coordinate with specified date.
Parse(String, CartesianType, Allowed_Parse_Format) Parses a string into a Coordinate with a specified Cartesian system type.
Parse(String, CartesianType, EagerLoad) Parses a string into a Coordinate with a specified Cartesian system type and eager loading settings.
Parse(String, EagerLoad, Allowed_Parse_Format) Parses a string into a Coordinate with specified eager loading settings.
Parse(String, DateTime, Allowed_Parse_Format) Parses a string into a Coordinate with specified date.
Parse(String, DateTime, CartesianType) Parses a string into a Coordinate with specified DateTime and Cartesian system type.
Parse(String, DateTime, EagerLoad) Parses a string into a Coordinate with a specified date and eager loading settings.
Parse(String, CartesianType, EagerLoad, Allowed_Parse_Format) Parses a string into a Coordinate with a specified Cartesian system type and eager loading settings.
Parse(String, DateTime, CartesianType, Allowed_Parse_Format) Parses a string into a Coordinate with specified DateTime and Cartesian system type.
Parse(String, DateTime, CartesianType, EagerLoad) Parses a string into a Coordinate with a specified date, Cartesian system type and eager loading settings.
Parse(String, DateTime, EagerLoad, Allowed_Parse_Format) Parses a string into a Coordinate with a specified date and eager loading settings.
Parse(String, DateTime, CartesianType, EagerLoad, Allowed_Parse_Format) Parses a string into a Coordinate with a specified date, Cartesian system type and eager loading settings.
Set_Datum(Earth_Ellipsoid_Spec) Set a custom datum for coordinate conversions and distance calculation. Objects must be loaded prior to setting if EagerLoading is turned off or else the items Datum won't be set. Use overload if EagerLoading options are used.
Set_Datum(Double, Double) Set a custom datum for coordinate conversions and distance calculation. Objects must be loaded prior to setting if EagerLoading is turned off or else the items Datum won't be set. Use overload if EagerLoading options are used.
Set_Datum(Earth_Ellipsoid_Spec, Coordinate_Datum) Set a custom datum for coordinate conversions and distance calculation for specified coordinate formats only. Objects must be loaded prior to setting if EagerLoading is turned off.
Set_Datum(Double, Double, Coordinate_Datum) Set a custom datum for coordinate conversions and distance calculation for specified coordinate formats only. Objects must be loaded prior to setting if EagerLoading is turned off.
ToString A string formatted and represented coordinate.
(Overrides ObjectToString)
ToString(CoordinateFormatOptions) A string formatted and represented coordinate.
TryParse(String, Coordinate) Attempts to parse a string into a Coordinate.
TryParse(String, Allowed_Parse_Format, Coordinate) Attempts to parse a string into a Coordinate.
TryParse(String, CartesianType, Coordinate) Attempts to parse a string into a Coordinate with a specified Cartesian system type.
TryParse(String, EagerLoad, Coordinate) Attempts to parse a string into a Coordinate with specified eager loading settings.
TryParse(String, DateTime, Coordinate) Attempts to parse a string into a Coordinate with specified date.
TryParse(String, CartesianType, Allowed_Parse_Format, Coordinate) Attempts to parse a string into a Coordinate with a specified Cartesian system type.
TryParse(String, CartesianType, EagerLoad, Coordinate) Attempts to parse a string into a Coordinate with a specified Cartesian system type and eager loading settings.
TryParse(String, EagerLoad, Allowed_Parse_Format, Coordinate) Attempts to parse a string into a Coordinate with specified eager loading settings.
TryParse(String, DateTime, Allowed_Parse_Format, Coordinate) Attempts to parse a string into a Coordinate with specified date.
TryParse(String, DateTime, CartesianType, Coordinate) Attempts to parse a string into a Coordinate with specified DateTime and Cartesian system type
TryParse(String, DateTime, EagerLoad, Coordinate) Attempts to parse a string into a Coordinate with a specified date and eager loading settings.
TryParse(String, CartesianType, EagerLoad, Allowed_Parse_Format, Coordinate) Attempts to parse a string into a Coordinate with a specified Cartesian system type and eager loading settings.
TryParse(String, DateTime, CartesianType, Allowed_Parse_Format, Coordinate) Attempts to parse a string into a Coordinate with specified DateTime and Cartesian system type
TryParse(String, DateTime, CartesianType, EagerLoad, Coordinate) Attempts to parse a string into a Coordinate with a specified date, Cartesian system type and eager loading settings.
TryParse(String, DateTime, EagerLoad, Allowed_Parse_Format, Coordinate) Attempts to parse a string into a Coordinate with a specified date and eager loading settings.
TryParse(String, DateTime, CartesianType, EagerLoad, Allowed_Parse_Format, Coordinate) Attempts to parse a string into a Coordinate with a specified date, Cartesian system type and eager loading settings.
Unlock_UTM_MGRS_Zone Unlocks converted UTM and MRGS longitudinal grid zones from the specified zone number. This will return UTM and MGRS conversions to normal projection.

Events

CoordinateChanged Event handler that triggers when changes to the Coordinate occur. Can be subscribed to run logic after a Coordinate has "changed" (location, DateTime, UTC offset or datum).
PropertyChanged Property changed event

Extension Methods

GetMagnetic Creates a Magnetic object from a Coordinate. Assumes height is at MSL and a provided data model.
(Defined by MagneticExtensions)
GetMagnetic Creates a Magnetic object from a Coordinate with a specified height above MSL and a provided data model.
(Defined by MagneticExtensions)
GetMagnetic Creates a Magnetic object from a Coordinate with a specified height in meters above MSL and a provided data model.
(Defined by MagneticExtensions)

See Also