Class: GeoJSONWriter

jsts.io.GeoJSONWriter

new GeoJSONWriter()

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

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.

Source:
See:
  • WKTReader

Methods

write(geometry) → {Object}

Converts a Geometry to its GeoJSON representation.
Parameters:
Name Type Description
geometry jsts.geom.Geometry a Geometry to process.
Source:
Returns:
The GeoJSON representation of the Geometry.
Type
Object