GDB 到 KML 转换器

使用 Aspose.GIS for .NET 库将 GDB 转换为 KML 文件格式。

在线示例

Aspose.GIS for .NET / C# 向您免费提供在线 “GDB 到 KML 转换器” 应用程序,您可以调查其功能和质量如何运作。

GDB 到 KML 转换器 App

代码示例 - GDB 到 KML 转换器

以下代码片段向您展示了如何实现 GDB 到 KML 转换器。 如果您为目标 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 GDB to KML.
VectorLayer.Convert("source.gdbtable", Drivers.FileGdb, "destination.kml", Drivers.Kml, options);

此示例显示了常规的可能性。 Aspose.GIS for .NET 具有广泛的选项来 转换文件。 每个基于矢量的格式都有自己的读取/写入选项,这些选项继承自 DriverOptions 类。

平台 - .NET / C#

我们支持 Windows 上的 Framework 4.7 或更高版本以及 Windows 或 Linux 上的 .NET Core 2.0 或更高版本。