JSON to GeoJSON Converter

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

ตัวอย่างสด

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

JSON to GeoJSON Converter App

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

สแนปช็อตโค้ดต่อไปนี้แสดงวิธีการใช้งาน JSON to GeoJSON Converter หากคุณระบุระบบอ้างอิงเชิงพื้นที่สำหรับเลเยอร์ GeoJSON ปลายทาง รูปทรงทั้งหมดจะถูกแปลงเป็นระบบนั้น

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

ตัวอย่างนี้แสดงความเป็นไปได้ทั่วไป Aspose.GIS for .NET มีตัวเลือกมากมายในการ แปลงไฟล์ แต่ละรูปแบบที่ใช้เวกเตอร์จะมีตัวเลือกการอ่าน/เขียนของตัวเองซึ่งสืบทอดมาจากคลาส DriverOptions

แพลตฟอร์ม - .NET / C#

เราสนับสนุน Framework 4.7 หรือใหม่กว่าภายใต้ Windows และ .NET Core 2.0 หรือใหม่กว่าภายใต้ Windows หรือ Linux