CoordinateTryParse(String, DateTime, CartesianType, Coordinate) Method

Attempts to parse a string into a Coordinate with specified DateTime and Cartesian system type

Definition

Namespace: CoordinateSharp
Assembly: CoordinateSharp (in CoordinateSharp.dll) Version: 2.21.1.1
XMLNS for XAML: Not mapped to an xmlns.
C#
public static bool TryParse(
	string value,
	DateTime geoDate,
	CartesianType cartesianType,
	out Coordinate coordinate
)

Parameters

value  String
Coordinate string
geoDate  DateTime
GeoDate
cartesianType  CartesianType
Cartesian Type
coordinate  Coordinate
Coordinate

Return Value

Boolean
boolean

Example

The following example parses an ECEF formatted coordinate string, with an included GeoDate. Because this is an ECEF Cartesian type coordinate, we will specify the Cartesian system type.
C#
Coordinate c;
if(Coordinate.TryParse("5242.097 km, 2444.43 km, 2679.074 km", new DateTime(2018,7,7), CartesianType.ECEF, out c))
{
    Console.WriteLine(c); //N 24º 59' 59.987" E 25º 0' 0.001"
}

See Also