KML'den Shapefile Dönüştürücü

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

Canlı Örnek

Aspose.GIS for .NET / C#, size çevrimiçi ve ücretsiz “KML’den Shapefile Dönüştürücü” uygulamasını sunar; burada işlevselliği ve kalitesini inceleyebilirsiniz.

KML’den Shapefile Dönüştürücü Uygulaması

Kod örneği - KML’den Shapefile Dönüştürücü

Aşağıdaki kod parçacığı, KML’den 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 KML to Shapefile.
VectorLayer.Convert("source.kml", Drivers.Kml, "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.