محول JSON إلى GPX

استخدم مكتبة Aspose.GIS for .NET لتحويل JSON إلى تنسيق ملف GPX.

مثال حي

تقدم لك Aspose.GIS for .NET / C# تطبيق “JSON to GPX Converter” مجاني عبر الإنترنت، حيث يمكنك التحقق من الوظائف وجودة العمل.

محول JSON إلى GPX

نموذج التعليمات البرمجية - محول JSON إلى GPX

يوضح مقتطف الشفرة التالي كيفية تنفيذ محول JSON إلى GPX. إذا حددت نظام إسناد مكاني للطبقة GPX الوجهة، فسيتم تحويل جميع الهندسات إليها.

// 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 GPX.
VectorLayer.Convert("source.geojson", Drivers.GeoJson, "destination.gpx", Drivers.Gpx, options);

يعرض هذا المثال الإمكانيات العامة. لدى Aspose.GIS for .NET خيارات واسعة لتحويل الملفات. لكل تنسيق يعتمد على المتجهات خيارات القراءة / الكتابة الخاصة به والتي يتم توريثها من الفئة DriverOptions.

المنصة - .NET / C#

نحن ندعم Framework 4.7 أو أحدث على نظام Windows، و .NET Core 2.0 أو أحدث على نظام Windows أو Linux.