Converter Coordenadas
Contents
[
Hide
]
A biblioteca ou API Aspose.GIS C# permite calcular e analisar uma posição em uma variedade de formatos.
Converter em formatos populares
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); | |
Analisar posição a partir do texto
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); | |
} |