Skip to content
On this page

geos.GEOSWKTWriter_create ⇒ number

Creates a GEOSWKTWriter object.

Kind: Exported member
Returns: number - The pointer to the GEOSWKTWriter object or null if an error occurred.
See: GEOSWKTWriter_create


geos.GEOSWKTWriter_create_r ⇒ number

Creates a GEOSWKTWriter object.

Kind: Exported member
Returns: number - The pointer to the GEOSWKTWriter object or null if an error occurred.
See: GEOSWKTWriter_create_r

ParamTypeDescription
handlenumberA pointer to the GEOS context handle.

geos.GEOSWKTWriter_destroy ⏏

Destroys a GEOSWKTWriter object.

Kind: Exported member

ParamTypeDescription
writernumberThe pointer to the GEOSWKTWriter object to be destroyed.

geos.GEOSWKTWriter_destroy_r ⏏

Destroys a GEOSWKTWriter object using a context handle.

Kind: Exported member

ParamTypeDescription
handlenumberThe pointer to the GEOSContextHandle_t object.
writernumberThe pointer to the GEOSWKTWriter object to be destroyed.

geos.GEOSWKTWriter_getOutputDimension ⇒ number

Get the output dimension of a GEOSWKTWriter object.

Kind: Exported member
Returns: number - The output dimension, either 2 or 3.
See: https://github.com/libgeos/geos/blob/main/capi/geos_c.h.in

ParamTypeDescription
writernumberA pointer to a GEOSWKTWriter object.

geos.GEOSWKTWriter_getOutputDimension_r ⇒ number

Get the output dimension of a GEOSWKTWriter object (thread-safe version).

Kind: Exported member
Returns: number - The output dimension, either 2 or 3.
See: https://github.com/libgeos/geos/blob/main/capi/geos_c.h.in

ParamTypeDescription
handlenumberA GEOS context handle.
writernumberA pointer to a GEOSWKTWriter object.

geos.GEOSWKTWriter_setOld3D ⏏

Set whether to use the old-style 3D WKT representation (Z inside brackets).

Kind: Exported member
See: https://github.com/libgeos/geos/blob/main/capi/geos_c.h.in

ParamTypeDescription
writernumberA pointer to a GEOSWKTWriter object.
useOld3DnumberA boolean value indicating whether to use the old-style 3D WKT representation.

geos.GEOSWKTWriter_setOld3D_r ⏏

Set whether to use the old-style 3D WKT representation (Z inside brackets) (thread-safe version).

Kind: Exported member
See: https://github.com/libgeos/geos/blob/main/capi/geos_c.h.in

ParamTypeDescription
handlenumberA GEOS context handle.
writernumberA pointer to a GEOSWKTWriter object.
useOld3DnumberA boolean value indicating whether to use the old-style 3D WKT representation.

geos.GEOSWKTWriter_setOutputDimension ⏏

Sets the output dimension on a GEOSWKTWriter. If the specified dimension is 2, any input geometries that have a higher dimension will be flattened to 2D by dropping their z value. If the specified dimension is 3, any input geometries that have a lower dimension will be promoted to 3D by appending a z value of 0.

Kind: Exported member

ParamTypeDescription
writernumberThe GEOSWKTWriter object.
dimnumberThe output dimension (2 or 3).

geos.GEOSWKTWriter_setOutputDimension_r ⏏

Sets the output dimension on a GEOSWKTWriter. If the specified dimension is 2, any input geometries that have a higher dimension will be flattened to 2D by dropping their z value. If the specified dimension is 3, any input geometries that have a lower dimension will be promoted to 3D by appending a z value of 0.

Kind: Exported member

ParamTypeDescription
handlenumberA pointer to the GEOS context handle.
writernumberThe GEOSWKTWriter object.
dimnumberThe output dimension (2 or 3).

geos.GEOSWKTWriter_setRoundingPrecision ⏏

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

Kind: Exported member

ParamTypeDescription
writernumberThe GEOSWKTWriter object.
precisionnumberThe number of decimal places.

geos.GEOSWKTWriter_setRoundingPrecision_r ⏏

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

Kind: Exported member

ParamTypeDescription
handlenumberA pointer to the GEOS context handle.
writernumberThe GEOSWKTWriter object.
precisionnumberThe number of decimal places.

geos.GEOSWKTWriter_setTrim ⏏

Sets whether the output WKT string should be trimmed of unnecessary spaces.

Kind: Exported member

ParamTypeDescription
writernumberThe pointer to the GEOSWKTWriter object.
trimnumberA boolean value indicating whether to trim or not. 1 for true, 0 for false.

geos.GEOSWKTWriter_setTrim_r ⏏

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 0, all coordinates will be padded with 0's out to the rounding precision.

Kind: Exported member

ParamTypeDescription
handlenumberA pointer to the GEOS context handle.
writernumberThe GEOSWKTWriter object.
trimnumberThe trimming option (0 or 1).

geos.GEOSWKTWriter_write ⇒ string

Converts a GEOSGeometry object to a WKT string.

Kind: Exported member
Returns: number - The WKT representation pointer of the geometry, or null on error.

ParamTypeDescription
writernumberThe pointer to the GEOSWKTWriter object.
gnumberThe pointer to the GEOSGeometry object to be converted.

geos.GEOSWKTWriter_write_r ⇒ string

Converts a GEOSGeometry object to a WKT string using a context handle.

Kind: Exported member
Returns: number - The WKT representation pointer of the geometry, or null on error.

ParamTypeDescription
handlenumberThe pointer to the GEOSContextHandle_t object.
writernumberThe pointer to the GEOSWKTWriter object.
gnumberThe pointer to the GEOSGeometry object to be converted.