CoordinateParse(String, CartesianType, Allowed_Parse_Format) Method

Parses a string into a Coordinate with a specified 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 Coordinate Parse(
	string value,
	CartesianType cartesianType,
	Allowed_Parse_Format formats
)

Parameters

value  String
Coordinate string
cartesianType  CartesianType
Cartesian Type
formats  Allowed_Parse_Format
Allowable parse formats

Return Value

Coordinate
Coordinate

Example

The following example parses an ECEF formatted coordinate string. Because this is an ECEF Cartesian type coordinate, we will specify the Cartesian system type. Parsable format is restricted to Lat/Long and MGRS.
C#
Allowed_Parse_Format formats = Allowed_Parse_Format.Lat_Long | Allowed_Parse_Format.MGRS;
Coordinate c = Coordinate.Parse("5242.097 km, 2444.43 km, 2679.074 km", CartesianType.Cartesian, formats);

See Also