تحويل إلى CSV
Contents
[
Hide
]
استخدم مكتبة Aspose.GIS for .NET لتحويل إلى تنسيق ملف CSV من ملفات gis المتجهة الشائعة الأخرى.
مثال حي
تقدم لك Aspose.GIS for .NET / C# تطبيقًا مجانيًا عبر الإنترنت “تحويل إلى CSV”، حيث يمكنك التحقق من الوظائف والجودة التي يعمل بها.
مثال للتعليمات البرمجية - تحويل إلى CSV
يوضح مقتطف التعليمات البرمجية التالي كيفية التحويل إلى CSV. إذا حددت نظام إسناد مكاني للطبقة CSV الوجهة، فسيتم تحويل جميع الهندسات إليه.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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#
نحن ندعم Framework 4.7 أو أحدث على Windows، و .NET Core 2.0 أو أحدث على Windows أو Linux.