Skip to content

geos.GEOSWKTWriter_create_r ⇒ GEOSWKTWriter

Allocate a new GEOSWKTReader.

Kind: global property of geos
Returns: GEOSWKTWriter - a new reader. Caller must free with GEOSWKTReader_destroy()

ParamTypeDescription
handleGEOSContextHandle_t-

geos.GEOSWKTWriter_destroy ⇒ null

Free the memory associated with a GEOSWKTWriter.

Kind: global property of geos
Returns: null - void

ParamTypeDescription
writerGEOSWKTWriterThe writer to destroy.

geos.GEOSWKTWriter_destroy_r ⇒ null

Free the memory associated with a GEOSWKTWriter.

Kind: global property of geos
Returns: null - void

ParamTypeDescription
handleGEOSContextHandle_t-
writerGEOSWKTWriterThe writer to destroy.

geos.GEOSWKTWriter_getOutputDimension ⇒ number

Reads the current output dimension from a GEOSWKTWriter.

Kind: global property of geos
Returns: number - The current dimension.

ParamTypeDescription
writerGEOSWKTWriterA GEOSWKTWriter.

geos.GEOSWKTWriter_getOutputDimension_r ⇒ number

Reads the current output dimension from a GEOSWKTWriter.

Kind: global property of geos
Returns: number - The current dimension.

ParamTypeDescription
handleGEOSContextHandle_t-
writerGEOSWKTWriterA GEOSWKTWriter.

geos.GEOSWKTWriter_setOld3D ⇒ null

Sets the format for 3D outputs. The "old 3D" format does not include a Z dimension tag, e.g. "POINT (1 2 3)", except for XYM, e.g. "POINT M (1 2 3)". Geometries with XYZM coordinates do not add any dimensionality tags, e.g. "POINT (1 2 3 4)".

Kind: global property of geos
Returns: null - void

ParamTypeDescription
writerGEOSWKTWriterA GEOSWKTWriter.
useOld3DnumberTrue to use the old format, false is the default.

geos.GEOSWKTWriter_setOld3D_r ⇒ null

Sets the format for 3D outputs. The "old 3D" format does not include a Z dimension tag, e.g. "POINT (1 2 3)", except for XYM, e.g. "POINT M (1 2 3)". Geometries with XYZM coordinates do not add any dimensionality tags, e.g. "POINT (1 2 3 4)".

Kind: global property of geos
Returns: null - void

ParamTypeDescription
handleGEOSContextHandle_t-
writerGEOSWKTWriterA GEOSWKTWriter.
useOld3DnumberTrue to use the old format, false is the default.

geos.GEOSWKTWriter_setOutputDimension ⇒ null

Set the output dimensionality of the writer. Either 2, 3, or 4 dimensions. Default since GEOS 3.12 is 4.

Kind: global property of geos
Returns: null - void

ParamTypeDescription
writerGEOSWKTWriterA GEOSWKTWriter.
dimnumberThe dimensionality desired.

geos.GEOSWKTWriter_setOutputDimension_r ⇒ null

Set the output dimensionality of the writer. Either 2, 3, or 4 dimensions. Default since GEOS 3.12 is 4.

Kind: global property of geos
Returns: null - void

ParamTypeDescription
handleGEOSContextHandle_t-
writerGEOSWKTWriterA GEOSWKTWriter.
dimnumberThe dimensionality desired.

geos.GEOSWKTWriter_setRoundingPrecision ⇒ null

Sets the number places after the decimal to output in WKT.

Kind: global property of geos
Returns: null - void

ParamTypeDescription
writerGEOSWKTWriterA GEOSWKTWriter.
precisionnumberThe desired precision, default 16.

geos.GEOSWKTWriter_setRoundingPrecision_r ⇒ null

Sets the number places after the decimal to output in WKT.

Kind: global property of geos
Returns: null - void

ParamTypeDescription
handleGEOSContextHandle_t-
writerGEOSWKTWriterA GEOSWKTWriter.
precisionnumberThe desired precision, default 16.

geos.GEOSWKTWriter_setTrim ⇒ null

Sets the number trimming option on a GEOSWKTWriter. With trim set to 1, the writer will strip trailing 0's from the output coordinates. With 1 (trimming enabled), big and small absolute coordinates will use scientific notation, otherwise positional notation is used; see GEOS_printDouble for details. With 0 (trimming disabled), all coordinates will be padded with 0's out to the rounding precision. Default since GEOS 3.12 is with trim set to 1 for 'on'.

Kind: global property of geos
Returns: null - void

ParamTypeDescription
writerGEOSWKTWriterA GEOSWKTWriter.
trimnumberThe trimming behaviour to set, 1 for 'on', 0 for 'off'

geos.GEOSWKTWriter_setTrim_r ⇒ null

Sets the number trimming option on a GEOSWKTWriter. With trim set to 1, the writer will strip trailing 0's from the output coordinates. With 1 (trimming enabled), big and small absolute coordinates will use scientific notation, otherwise positional notation is used; see GEOS_printDouble for details. With 0 (trimming disabled), all coordinates will be padded with 0's out to the rounding precision. Default since GEOS 3.12 is with trim set to 1 for 'on'.

Kind: global property of geos
Returns: null - void

ParamTypeDescription
handleGEOSContextHandle_t-
writerGEOSWKTWriterA GEOSWKTWriter.
trimnumberThe trimming behaviour to set, 1 for 'on', 0 for 'off'

geos.GEOSWKTWriter_write ⇒ StringPointer

Writes out the well-known text representation of a geometry, using the trim, rounding and dimension settings of the writer.

Kind: global property of geos
Returns: StringPointer - A newly allocated string containing the WKT output or NULL on exception. Caller must free with GEOSFree()

ParamTypeDescription
writerGEOSWKTWriterA GEOSWKTWriter.
gGEOSGeometryInput geometry

geos.GEOSWKTWriter_write_r ⇒ StringPointer

Writes out the well-known text representation of a geometry, using the trim, rounding and dimension settings of the writer.

Kind: global property of geos
Returns: StringPointer - A newly allocated string containing the WKT output or NULL on exception. Caller must free with GEOSFree()

ParamTypeDescription
handleGEOSContextHandle_t-
writerGEOSWKTWriterA GEOSWKTWriter.
gGEOSGeometryInput geometry