Geometry.FromText

FromText(string)

Creates a geometry from its Well-Known Text representation.

public static IGeometry FromText(string wkt)
ParameterTypeDescription
wktStringWell-Known Text 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 Text.

See Also


FromText(string, SpatialReferenceSystem)

Creates a geometry from its Well-Known Text representation.

public static IGeometry FromText(string wkt, SpatialReferenceSystem spatialReferenceSystem)
ParameterTypeDescription
wktStringWell-Known Text 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 Text.

See Also