محول JSON إلى Shapefile
استخدم مكتبة Aspose.GIS for .NET لتحويل JSON إلى تنسيق ملف Shapefile.
مثال حي
تقدم لك Aspose.GIS for .NET / C# تطبيق “JSON to Shapefile Converter” مجاني عبر الإنترنت، حيث يمكنك استكشاف الوظائف والجودة التي يعمل بها.
نموذج التعليمات البرمجية - محول JSON إلى Shapefile
يوضح مقتطف التعليمات البرمجية التالي كيفية تنفيذ محول 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#
نحن ندعم Framework 4.7 أو أحدث على نظام Windows، و .NET Core 2.0 أو أحدث على نظام Windows أو Linux.