VectorLayer.Convert

Convert(string, FileDriver, string, FileDriver)

将图层转换为不同的格式。

public static void Convert(string sourcePath, FileDriver sourceDriver, string destinationPath, 
    FileDriver destinationDriver)
参数类型描述
sourcePathString将被转换的图层的路径。
sourceDriverFileDriver源图层的格式驱动程序。
destinationPathString转换后将创建的图层的路径。
destinationDriverFileDriver目标图层的格式驱动程序。

异常

异常条件
ArgumentNullException任一路径为 null

另见


Convert(AbstractPath, FileDriver, AbstractPath, FileDriver)

将图层转换为不同的格式。

public static void Convert(AbstractPath sourcePath, FileDriver sourceDriver, 
    AbstractPath destinationPath, FileDriver destinationDriver)
参数类型描述
sourcePathAbstractPath将被转换的图层的路径。
sourceDriverFileDriver源图层的格式驱动程序。
destinationPathAbstractPath转换后将创建的图层的路径。
destinationDriverFileDriver目标图层的格式驱动程序。

异常

异常条件
ArgumentNullException任一路径为 null

另见


Convert(string, FileDriver, string, FileDriver, ConversionOptions)

将图层转换为不同的格式。

public static void Convert(string sourcePath, FileDriver sourceDriver, string destinationPath, 
    FileDriver destinationDriver, ConversionOptions options)
参数类型描述
sourcePathString将被转换的图层的路径。
sourceDriverFileDriver源图层的格式驱动程序。
destinationPathString转换后将创建的图层的路径。
destinationDriverFileDriver目标图层的格式驱动程序。
optionsConversionOptions转换过程的选项。

异常

异常条件
ArgumentNullException任一路径为 null
ArgumentExceptionOptions 对象的类型对该驱动程序不正确。
GisException读取或写入要素时出错(从/到文件)。
IOException发生 I/O 错误。
NotSupportedExceptionoptions 中指定的空间参考系统不受 destinationDriver 支持。
TransformationException将要素几何从源空间参考系统转换到目标空间参考系统失败。

另见


Convert(AbstractPath, FileDriver, AbstractPath, FileDriver, ConversionOptions)

将图层转换为不同的格式。

public static void Convert(AbstractPath sourcePath, FileDriver sourceDriver, 
    AbstractPath destinationPath, FileDriver destinationDriver, ConversionOptions options)
参数类型描述
sourcePathAbstractPath将被转换的图层的路径。
sourceDriverFileDriver源图层的格式驱动程序。
destinationPathAbstractPath转换后将创建的图层的路径。
destinationDriverFileDriver目标图层的格式驱动程序。
optionsConversionOptions转换过程的选项。

异常

异常条件
ArgumentNullException任一路径为 null
ArgumentExceptionOptions 对象的类型对该驱动程序不正确。
GisException读取或写入要素时出错(从/到文件)。
IOException发生 I/O 错误。
NotSupportedExceptionoptions 中指定的空间参考系统不受 destinationDriver 支持。
TransformationException将要素几何从源空间参考系统转换到目标空间参考系统失败。

另见