CoordinateTryParse(String, DateTime, EagerLoad, Allowed_Parse_Format, Coordinate) Method
Attempts to parse a string into a Coordinate with a specified date and eager loading settings.
Namespace: CoordinateSharpAssembly: CoordinateSharp (in CoordinateSharp.dll) Version: 3.1.1.1
XMLNS for XAML: Not mapped to an xmlns.
public static bool TryParse(
string value,
DateTime geoDate,
EagerLoad eagerLoad,
Allowed_Parse_Format formats,
out Coordinate coordinate
)
- value String
- Coordinate string
- geoDate DateTime
- GeoDate
- eagerLoad EagerLoad
- Eager loading options
- formats Allowed_Parse_Format
- Allowed parse formats
- coordinate Coordinate
- Coordinate
Booleanboolean
The following example parses a decimal degree formatted geodetic coordinate string, with a provided GeoDate. Parsable format is restricted to Lat/Long and Cartesian/ECEF.
Eager loading is set to load celestial calculations only.
Coordinate c;
EagerLoad el = new EagerLoad(EagerLoadType.Celestial);
Allowed_Parse_Format formats = Allowed_Parse_Format.Lat_Long | Allowed_Parse_Format.Cartesian_ECEF;
if(Coordinate.TryParse("N 32.891º W 64.872º", new DateTime(2018,7,7), el, out c))
{
Console.WriteLine(c); //N 32º 53' 28.212" W 64º 52' 20.914"
}