Geometry.AsText

AsText()

Translates this geometry to its Well-Known Text representation.

public string AsText()

Return Value

Well-Known Text representation of this geometry.

Remarks

Output of this method is in Iso WKT variant. The default numeric format is General (with “0” precision).

See Also


AsText(WktVariant)

Translates this geometry to its Well-Known Text representation.

public string AsText(WktVariant variant)
ParameterTypeDescription
variantWktVariantWell-Known Text variant to use.

Return Value

Well-Known Text representation of this geometry.

Exceptions

exceptioncondition
NotSupportedExceptionGeometry can not be represented in requested WKT variant. Currently this happens when HasCurveGeometry of geometry is true and WKT variant is SimpleFeatureAccessOutdated.
ArgumentOutOfRangeExceptionvariant is not a valid WktVariant.

Remarks

The default numeric format is General (with “0” precision).

See Also


AsText(WktVariant, NumericFormat)

Translates this geometry to its Well-Known Text representation.

public string AsText(WktVariant variant, NumericFormat format)
ParameterTypeDescription
variantWktVariantWell-Known Text variant to use.
formatNumericFormatCoordinate format for conversion to string. See the NumericFormat to get it.

Return Value

Well-Known Text representation of this geometry.

Exceptions

exceptioncondition
NotSupportedExceptionGeometry can not be represented in requested WKT variant. Currently this happens when HasCurveGeometry of geometry is true and WKT variant is SimpleFeatureAccessOutdated.
ArgumentOutOfRangeExceptionvariant is not a valid WktVariant.

See Also