JSON to Shapefile Converter

Aspose.GIS for .NETライブラリを使用して、JSONをShapefileファイル形式に変換します。

ライブサンプル

Aspose.GIS for .NET / C#は、“JSON to Shapefile Converter”アプリケーションをオンラインで無料で提供しており、機能性と品質を調査できます。

JSON to Shapefile Converter App

コードサンプル - JSON to Shapefile Converter

次のコードスニペットは、JSONからShapefileコンバーターの実装方法を示しています。 宛先Shapefileレイヤーに空間参照系を指定すると、すべてのジオメトリがそれに変換されます。

// 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 from JSON to Shapefile.
VectorLayer.Convert("source.geojson", Drivers.GeoJson, "destination.shp", Drivers.Shapefile, options);

このサンプルは一般的な可能性を示しています。 Aspose.GIS for .NETには、ファイルを変換するための幅広いオプションがあります。 各ベクトルベースの形式には、DriverOptionsクラスから継承された独自の読み取り/書き込みオプションがあります。

プラットフォーム - .NET / C#

WindowsではFramework 4.7以降を、WindowsまたはLinuxでは.NET Core 2.0以降をサポートしています。