JSON to GPX Converter

ใช้ไลบรารี Aspose.GIS for .NET เพื่อแปลง JSON เป็นรูปแบบไฟล์ GPX

ตัวอย่างสด

Aspose.GIS for .NET / C# นำเสนอแอปพลิเคชัน “JSON to GPX Converter” ฟรีออนไลน์ ที่คุณสามารถตรวจสอบฟังก์ชันการทำงานและคุณภาพได้

JSON to GPX Converter App

ตัวอย่างโค้ด - JSON to GPX Converter

สคริปต์โค้ดต่อไปนี้แสดงวิธีการใช้งาน JSON to GPX Converter หากคุณระบุระบบอ้างอิงเชิงพื้นที่สำหรับเลเยอร์ 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