/** * @module org/locationtech/jts/io/WKTWriter */ import WKTParser from './WKTParser' /** * Writes the Well-Known Text representation of a {@link 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 {@link LinearRing}s.
* Under the spec, rings are output as LINESTRING
s.
*/
export default class WKTWriter {
/**
* @param {GeometryFactory} geometryFactory
*/
constructor(geometryFactory) {
this.parser = new WKTParser(geometryFactory)
}
/**
* Converts a Geometry
to its Well-known Text representation.
*
* @param {Geometry} geometry a Geometry
to process.
* @return {string} a