Konwertuj Współrzędne
Contents
[
Hide
]
Biblioteka lub API Aspose.GIS C# pozwala na obliczanie i parsowanie pozycji w różnych formatach.
Konwertuj w popularnych formatach
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-gis/Aspose.GIS-for-.NET | |
var decimalDegrees = GeoConvert.AsPointText(25.5, 45.5, PointFormats.DecimalDegrees); | |
Console.WriteLine(decimalDegrees); | |
var degreeDecimalMinutes = GeoConvert.AsPointText(25.5, 45.5, PointFormats.DegreeDecimalMinutes); | |
Console.WriteLine(degreeDecimalMinutes); | |
var degreeMinutesSeconds = GeoConvert.AsPointText(25.5, 45.5, PointFormats.DegreeMinutesSeconds); | |
Console.WriteLine(degreeMinutesSeconds); | |
var geoRef = GeoConvert.AsPointText(25.5, 45.5, PointFormats.GeoRef); | |
Console.WriteLine(geoRef); | |
Parsuj pozycję z tekstu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-gis/Aspose.GIS-for-.NET | |
if (GeoConvert.TryParsePointText("25.5°, 45.5°", out var point1)) | |
{ | |
Console.WriteLine("25.5°, 45.5° parsed as" + point1); | |
} | |
if (GeoConvert.TryParsePointText("25°30.00000', 045°30.00000'", out var point2)) | |
{ | |
Console.WriteLine("25°30.00000', 045°30.00000' parsed as" + point2); | |
} | |
if (GeoConvert.TryParsePointText("25°30'00.3000\", 045°30'00.3000\"", out var point3)) | |
{ | |
Console.WriteLine("25°30'00.3000\", 045°30'00.3000\" parsed as" + point3); | |
} | |
if (GeoConvert.TryParsePointText("RHAL30003000", out var point4)) | |
{ | |
Console.WriteLine("RHAL30003000 parsed as" + point4); | |
} |