JSON to GPX Converter

Sử dụng thư viện Aspose.GIS for .NET để chuyển đổi JSON sang định dạng tệp GPX.

Ví dụ trực tiếp

Aspose.GIS for .NET / C# trình bày cho bạn ứng dụng “JSON to GPX Converter” miễn phí trực tuyến, nơi bạn có thể khám phá chức năng và chất lượng hoạt động của nó.

JSON to GPX Converter App

Mẫu mã - JSON to GPX Converter

Đoạn mã sau đây cho bạn thấy cách triển khai JSON to GPX Converter. Nếu bạn chỉ định hệ quy chiếu không gian cho lớp GPX đích, tất cả các hình học sẽ được chuyển đổi sang nó.

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

Mẫu này thể hiện các khả năng tổng quát. Aspose.GIS for .NET có nhiều tùy chọn để chuyển đổi tệp. Mỗi định dạng dựa trên vector có các tùy chọn đọc / ghi riêng, kế thừa từ lớp DriverOptions.

Nền tảng - .NET / C#

Chúng tôi hỗ trợ Framework 4.7 trở lên trên Windows và .NET Core 2.0 trở lên trên Windows hoặc Linux