Click or drag to resize

CoordinateTryParse Method (String, DateTime, CartesianType, EagerLoad, Coordinate)

Attempts to parse a string into a Coordinate with a specified date, Cartesian system type and eager loading settings.

Namespace:  CoordinateSharp
Assembly:  CoordinateSharp (in CoordinateSharp.dll) Version: 2.12.1.1
Syntax
C#
public static bool TryParse(
	string value,
	DateTime geoDate,
	CartesianType cartesianType,
	EagerLoad eagerLoad,
	out Coordinate coordinate
)

Parameters

value
Type: SystemString
Coordinate string
geoDate
Type: SystemDateTime
GeoDate
cartesianType
Type: CoordinateSharpCartesianType
Cartesian Type
eagerLoad
Type: CoordinateSharpEagerLoad
Eager loading options
coordinate
Type: CoordinateSharpCoordinate
Coordinate

Return Value

Type: Boolean
boolean
Examples
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. Eager loading options have been specified for efficiency.
Coordinate c;
EagerLoad el = new EagerLoad(EagerLoadType.Cartesian);
if(Coordinate.TryParse("5242.097 km, 2444.43 km, 2679.074 km", new DateTime(2018,7,7), CartesianType.ECEF, el, out c))
{
    Console.WriteLine(c); //N 24º 59' 59.987" E 25º 0' 0.001"
}
See Also