VectorLayer.Convert
Convert(string, FileDriver, string, FileDriver)
将图层转换为不同的格式。
public static void Convert(string sourcePath, FileDriver sourceDriver, string destinationPath,
FileDriver destinationDriver)
| 参数 | 类型 | 描述 |
|---|
| sourcePath | String | 将被转换的图层的路径。 |
| sourceDriver | FileDriver | 源图层的格式驱动程序。 |
| destinationPath | String | 转换后将创建的图层的路径。 |
| destinationDriver | FileDriver | 目标图层的格式驱动程序。 |
异常
| 异常 | 条件 |
|---|
| ArgumentNullException | 任一路径为 null。 |
另见
Convert(AbstractPath, FileDriver, AbstractPath, FileDriver)
将图层转换为不同的格式。
public static void Convert(AbstractPath sourcePath, FileDriver sourceDriver,
AbstractPath destinationPath, FileDriver destinationDriver)
| 参数 | 类型 | 描述 |
|---|
| sourcePath | AbstractPath | 将被转换的图层的路径。 |
| sourceDriver | FileDriver | 源图层的格式驱动程序。 |
| destinationPath | AbstractPath | 转换后将创建的图层的路径。 |
| destinationDriver | FileDriver | 目标图层的格式驱动程序。 |
异常
| 异常 | 条件 |
|---|
| ArgumentNullException | 任一路径为 null。 |
另见
Convert(string, FileDriver, string, FileDriver, ConversionOptions)
将图层转换为不同的格式。
public static void Convert(string sourcePath, FileDriver sourceDriver, string destinationPath,
FileDriver destinationDriver, ConversionOptions options)
| 参数 | 类型 | 描述 |
|---|
| sourcePath | String | 将被转换的图层的路径。 |
| sourceDriver | FileDriver | 源图层的格式驱动程序。 |
| destinationPath | String | 转换后将创建的图层的路径。 |
| destinationDriver | FileDriver | 目标图层的格式驱动程序。 |
| options | ConversionOptions | 转换过程的选项。 |
异常
| 异常 | 条件 |
|---|
| ArgumentNullException | 任一路径为 null。 |
| ArgumentException | Options 对象的类型对该驱动程序不正确。 |
| GisException | 读取或写入要素时出错(从/到文件)。 |
| IOException | 发生 I/O 错误。 |
| NotSupportedException | 在 options 中指定的空间参考系统不受 destinationDriver 支持。 |
| TransformationException | 将要素几何从源空间参考系统转换到目标空间参考系统失败。 |
另见
Convert(AbstractPath, FileDriver, AbstractPath, FileDriver, ConversionOptions)
将图层转换为不同的格式。
public static void Convert(AbstractPath sourcePath, FileDriver sourceDriver,
AbstractPath destinationPath, FileDriver destinationDriver, ConversionOptions options)
| 参数 | 类型 | 描述 |
|---|
| sourcePath | AbstractPath | 将被转换的图层的路径。 |
| sourceDriver | FileDriver | 源图层的格式驱动程序。 |
| destinationPath | AbstractPath | 转换后将创建的图层的路径。 |
| destinationDriver | FileDriver | 目标图层的格式驱动程序。 |
| options | ConversionOptions | 转换过程的选项。 |
异常
| 异常 | 条件 |
|---|
| ArgumentNullException | 任一路径为 null。 |
| ArgumentException | Options 对象的类型对该驱动程序不正确。 |
| GisException | 读取或写入要素时出错(从/到文件)。 |
| IOException | 发生 I/O 错误。 |
| NotSupportedException | 在 options 中指定的空间参考系统不受 destinationDriver 支持。 |
| TransformationException | 将要素几何从源空间参考系统转换到目标空间参考系统失败。 |
另见