# Class: module:org/locationtech/jts/io/WKTWriter

## module:org/locationtech/jts/io/WKTWriter(geometryFactory)

Writes the Well-Known Text representation of a `Geometry`. The Well-Known Text format is defined in the OGC Simple Features Specification for SQL.

The `WKTWriter` outputs coordinates rounded to the precision model. Only the maximum number of decimal places necessary to represent the ordinates to the required precision will be output.

The SFS WKT spec does not define a special tag for `LinearRing`s. Under the spec, rings are output as `LINESTRING`s.

## Constructor

#### new module:org/locationtech/jts/io/WKTWriter(geometryFactory)

##### Parameters:

Name | Type | Description
--- | --- | ---
`geometryFactory` | GeometryFactory |

Source:
  - org/locationtech/jts/io/WKTWriter.js, line 24

### Methods

#### write(geometry) → {string}

Converts a `Geometry` to its Well-known Text representation.

##### Parameters:

Name | Type | Description
--- | --- | ---
`geometry` | Geometry | a `Geometry` to process.

Source:
  - org/locationtech/jts/io/WKTWriter.js, line 36

##### Returns:

a string (see the OpenGIS Simple Features Specification).

Type
  string