Geometry.FromBinary

FromBinary(byte[])

Creates a geometry from its Well-Known Binary representation.

public static IGeometry FromBinary(byte[] wkb)
ParameterTypeDescription
wkbByte[]Well-Known Binary representation of a geometry.

Return Value

A geometry represented by the argument.

Exceptions

exceptioncondition
ArgumentNullExceptionArgument is null.
NotSupportedExceptionArgument represents a geometry of not supported type.
FormatExceptionArgument is not a valid Well-Known Binary.

See Also


FromBinary(byte[], SpatialReferenceSystem)

Creates a geometry from its Well-Known Binary representation.

public static IGeometry FromBinary(byte[] wkb, SpatialReferenceSystem spatialReferenceSystem)
ParameterTypeDescription
wkbByte[]Well-Known Binary representation of a geometry.
spatialReferenceSystemSpatialReferenceSystemSpatial Reference System to be assigned to the geometry.

Return Value

A geometry represented by the argument.

Exceptions

exceptioncondition
ArgumentNullExceptionArgument is null.
NotSupportedExceptionArgument represents a geometry of not supported type.
FormatExceptionArgument is not a valid Well-Known Binary.

Remarks

If there are extra bytes after the geometry a FormatException exception is thrown.

See Also