Geometry.AsText
Contents
[
Hide
]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
- class Geometry
- namespace Aspose.Gis.Geometries
- assembly Aspose.GIS
AsText(WktVariant)
Translates this geometry to its Well-Known Text representation.
public string AsText(WktVariant variant)
| Parameter | Type | Description |
|---|---|---|
| variant | WktVariant | Well-Known Text variant to use. |
Return Value
Well-Known Text representation of this geometry.
Exceptions
| exception | condition |
|---|---|
| NotSupportedException | Geometry can not be represented in requested WKT variant. Currently this happens when HasCurveGeometry of geometry is true and WKT variant is SimpleFeatureAccessOutdated. |
| ArgumentOutOfRangeException | variant is not a valid WktVariant. |
Remarks
The default numeric format is General (with “0” precision).
See Also
- enum WktVariant
- class Geometry
- namespace Aspose.Gis.Geometries
- assembly Aspose.GIS
AsText(WktVariant, NumericFormat)
Translates this geometry to its Well-Known Text representation.
public string AsText(WktVariant variant, NumericFormat format)
| Parameter | Type | Description |
|---|---|---|
| variant | WktVariant | Well-Known Text variant to use. |
| format | NumericFormat | Coordinate format for conversion to string. See the NumericFormat to get it. |
Return Value
Well-Known Text representation of this geometry.
Exceptions
| exception | condition |
|---|---|
| NotSupportedException | Geometry can not be represented in requested WKT variant. Currently this happens when HasCurveGeometry of geometry is true and WKT variant is SimpleFeatureAccessOutdated. |
| ArgumentOutOfRangeException | variant is not a valid WktVariant. |
See Also
- enum WktVariant
- class NumericFormat
- class Geometry
- namespace Aspose.Gis.Geometries
- assembly Aspose.GIS