Konverter JSON ke GPX

Gunakan pustaka Aspose.GIS untuk .NET untuk mengonversi JSON ke format file GPX.

Contoh Langsung

Aspose.GIS untuk .NET / C# menyajikan aplikasi “Konverter JSON ke GPX” gratis online, di mana Anda dapat menyelidiki fungsionalitas dan kualitas kerjanya.

Aplikasi Konverter JSON ke GPX

Contoh Kode - Konverter JSON ke GPX

Cuplikan kode berikut menunjukkan cara mengimplementasikan Konverter JSON ke GPX. Jika Anda menentukan sistem referensi spasial untuk lapisan GPX tujuan, semua geometri akan dikonversi ke dalamnya.

// 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);

Contoh ini menunjukkan kemungkinan umum. Aspose.GIS untuk .NET memiliki opsi luas untuk mengonversi file. Setiap format berbasis vektor memiliki opsi baca/tulis sendiri yang diwarisi dari kelas DriverOptions.

Platform - .NET / C#

Kami mendukung Framework 4.7 atau lebih baru di bawah Windows, dan .NET Core 2.0 atau lebih baru di bawah Windows atau Linux