com.mapinfo.midev.persistence.wkt

## Class WKTUtilities

- java.lang.Object
- - com.mapinfo.midev.persistence.wkt.WKTUtilities

    public final class WKTUtilities
    extends Object

A class used to create and parse a Well Known Text (WKT) representation of a geometry.

### Method Summary

All Methods Static Methods Concrete Methods
`static IFeatureGeometry` `fromWKT(SpatialInfo si, String wkt)` Returns an IFeatureGeometry as parsed from the specified WKT.
`static String` `toWKT(IFeatureGeometry geometry)` Write a Well Known Text (WKT) representation of a geometry.
`static String` `toWKT(IFeatureGeometry geometry, boolean writeZMHint)` Write a Well Known Text (WKT) representation of a geometry.

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### fromWKT

    public static IFeatureGeometry fromWKT(SpatialInfo si,
                                           String wkt)

Returns an IFeatureGeometry as parsed from the specified WKT.

Parameters:
  `si` - the SpatialInfo (coordinate system) of the geometry. WKT does not have a coordinate system specification so it must be provided by the caller.
  `wkt` - the Well Known Text (WKT) representation of a geometry.
Returns:
  an IFeatureGeometry as parsed from the specified WKT.

#### toWKT

    public static String toWKT(IFeatureGeometry geometry)

Write a Well Known Text (WKT) representation of a geometry.

Parameters:
  `geometry` - the IFeatureGeometry instance.
Returns:
  a Well Known Text (WKT) representation of a geometry.

#### toWKT

    public static String toWKT(IFeatureGeometry geometry,
                               boolean writeZMHint)

Write a Well Known Text (WKT) representation of a geometry.

Parameters:
  `geometry` - the IFeatureGeometry instance.
  `writeZMHint` - boolean value to indicate whether to append ZM values or not.
Returns:
  a Well Known Text (WKT) representation of a geometry.