JSON to KML Converter

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

ตัวอย่างสด

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

JSON to KML Converter App

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

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

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

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

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

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