CSV'den GeoJSON Dönüştürücü
Aspose.GIS for .NET kütüphanesini kullanarak CSV’yi GeoJSON dosya formatına dönüştürün.
Canlı Örnek
Aspose.GIS for .NET / C#, size çevrimiçi ücretsiz “CSV’den GeoJSON Dönüştürücü” uygulamasını sunar ve burada işlevselliği ve kalitesini inceleyebilirsiniz.
Kod örneği - CSV’den GeoJSON Dönüştürücü
Aşağıdaki kod parçacığı, CSV’den GeoJSON Dönüştürücüyü nasıl uygulayacağınızı gösterir. Hedef GeoJSON 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 CSV to GeoJSON. | |
VectorLayer.Convert("source.csv", Drivers.Csv, "destination.geojson", Drivers.GeoJson, 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 yenisini ve Windows veya Linux altında .NET Core 2.0 veya daha yenisini destekliyoruz.