VectorLayer.Convert

Convert(string, FileDriver, string, FileDriver)

Convert a layer to a different format.

public static void Convert(string sourcePath, FileDriver sourceDriver, string destinationPath, 
    FileDriver destinationDriver)
ParameterTypeDescription
sourcePathStringPath to the layer that will be converted.
sourceDriverFileDriverThe format driver for the source layer.
destinationPathStringPath to the layer that will created as a result of conversion.
destinationDriverFileDriverThe format driver for the destination layer.

Exceptions

exceptioncondition
ArgumentNullExceptionEither of paths is null.

See Also


Convert(AbstractPath, FileDriver, AbstractPath, FileDriver)

Convert a layer to a different format.

public static void Convert(AbstractPath sourcePath, FileDriver sourceDriver, 
    AbstractPath destinationPath, FileDriver destinationDriver)
ParameterTypeDescription
sourcePathAbstractPathPath to the layer that will be converted.
sourceDriverFileDriverThe format driver for the source layer.
destinationPathAbstractPathPath to the layer that will created as a result of conversion.
destinationDriverFileDriverThe format driver for the destination layer.

Exceptions

exceptioncondition
ArgumentNullExceptionEither of paths is null.

See Also


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

Convert a layer to a different format.

public static void Convert(string sourcePath, FileDriver sourceDriver, string destinationPath, 
    FileDriver destinationDriver, ConversionOptions options)
ParameterTypeDescription
sourcePathStringPath to the layer that will be converted.
sourceDriverFileDriverThe format driver for the source layer.
destinationPathStringPath to the layer that will created as a result of conversion.
destinationDriverFileDriverThe format driver for the destination layer.
optionsConversionOptionsOptions for the conversion procedure.

Exceptions

exceptioncondition
ArgumentNullExceptionEither of paths is null.
ArgumentExceptionOptions object has an incorrect type for this driver.
GisExceptionError reading or writing the feature to/from the file.
IOExceptionAn I/O error occurred.
NotSupportedExceptionSpatial reference system specified in options is not supported by destinationDriver.
TransformationExceptionTransformation of features geometry from source spatial reference system to target spatial reference system failed.

See Also


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

Convert a layer to a different format.

public static void Convert(AbstractPath sourcePath, FileDriver sourceDriver, 
    AbstractPath destinationPath, FileDriver destinationDriver, ConversionOptions options)
ParameterTypeDescription
sourcePathAbstractPathPath to the layer that will be converted.
sourceDriverFileDriverThe format driver for the source layer.
destinationPathAbstractPathPath to the layer that will created as a result of conversion.
destinationDriverFileDriverThe format driver for the destination layer.
optionsConversionOptionsOptions for the conversion procedure.

Exceptions

exceptioncondition
ArgumentNullExceptionEither of paths is null.
ArgumentExceptionOptions object has an incorrect type for this driver.
GisExceptionError reading or writing the feature to/from the file.
IOExceptionAn I/O error occurred.
NotSupportedExceptionSpatial reference system specified in options is not supported by destinationDriver.
TransformationExceptionTransformation of features geometry from source spatial reference system to target spatial reference system failed.

See Also