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

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

Writes the GeoJSON representation of a `Geometry`. The The GeoJSON format is defined here.

## Constructor

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

The `GeoJSONWriter` 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.

##### Parameters:

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

Source:
  - org/locationtech/jts/io/GeoJSONWriter.js, line 21

### Methods

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

Converts a `Geometry` to its GeoJSON representation.

##### Parameters:

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

Source:
  - org/locationtech/jts/io/GeoJSONWriter.js, line 33

##### Returns:

The GeoJSON representation of the Geometry.

Type
  Object