CSVに変換
Aspose.GIS for .NETライブラリを使用して、他の一般的なベクトルベースのgisファイルからCSVファイル形式に変換します。
ライブサンプル
Aspose.GIS for .NET / C#は、機能と品質を調査できる“CSVに変換”アプリケーションをオンラインで無料で提供しています。
コードサンプル - CSVに変換
次のコードスニペットは、CSVへの変換方法を示しています。 宛先CSVレイヤーの空間参照系を指定すると、すべてのジオメトリがそれに変換されます。
// For complete examples and data files, please go to https://github.com/aspose-gis/Aspose.GIS-for-.NET | |
// Specify conversion settings if necessary. It is optional. | |
ConversionOptions options = null; | |
// This options assigns Wgs84 to the destination layer. | |
// Conversion may throw error If destination layer does not support the Wgs84 spatial reference. So need to check. | |
if (Drivers.Shapefile.SupportsSpatialReferenceSystem(SpatialReferenceSystem.Wgs84)) | |
{ | |
options = new ConversionOptions() | |
{ | |
DestinationSpatialReferenceSystem = SpatialReferenceSystem.Wgs84, | |
}; | |
} | |
// Convert file format to CSV. | |
VectorLayer.Convert("source.kml", Drivers.Kml, "destination.csv", Drivers.Csv, options); |
このサンプルは一般的な可能性を示しています。 Aspose.GIS for .NETには、ファイルを変換するための幅広いオプションがあります。 各ベクトルベースの形式には、DriverOptionsクラスから継承された独自の読み取り/書き込みオプションがあります。
プラットフォーム - .NET / C#
WindowsではFramework 4.7以降を、WindowsまたはLinuxでは.NET Core 2.0以降をサポートしています。