座標変換
Contents
[
Hide
]
Aspose.GIS C# Library または API を使用すると、さまざまな形式の位置を計算および解析できます。
一般的な形式に変換
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); | |
テキストから位置を解析
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); | |
} |