JSON'dan Shapefile Dönüştürücü

Aspose.GIS for .NET kütüphanesini kullanarak JSON’u Shapefile dosya formatına dönüştürün.

Canlı Örnek

Aspose.GIS for .NET / C#, size “JSON to Shapefile Converter” uygulamasını çevrimiçi olarak ücretsiz sunar ve burada işlevselliği ve kalitesini inceleyebilirsiniz.

JSON’dan Shapefile Dönüştürücü Uygulaması

Kod örneği - JSON’dan Shapefile Dönüştürücü

Aşağıdaki kod parçacığı, JSON’dan Shapefile Dönüştürücüyü nasıl uygulayacağınızı gösterir. Hedef Shapefile katmanı için bir mekansal referans sistemi belirtirseniz, tüm geometriler buna dönüştürülür.

// 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);

Bu örnek genel olasılıkları gösterir. Aspose.GIS for .NET, dosyaları dönüştürmek için geniş seçeneklere sahiptir. Her vektör tabanlı formatın kendi okuma/yazma seçenekleri vardır ve bunlar DriverOptions sınıfından devralır.

Platform - .NET / C#

Windows altında Framework 4.7 veya daha yeni sürümlerini ve Windows veya Linux altında .NET Core 2.0 veya daha yeni sürümlerini destekliyoruz.