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
Param | Type | Description |
---|---|---|
handle | number | A pointer to the GEOS context handle. |
geos.GEOSWKTWriter_destroy ⏏
Destroys a GEOSWKTWriter object.
Kind: Exported member
Param | Type | Description |
---|---|---|
writer | number | The pointer to the GEOSWKTWriter object to be destroyed. |
geos.GEOSWKTWriter_destroy_r ⏏
Destroys a GEOSWKTWriter object using a context handle.
Kind: Exported member
Param | Type | Description |
---|---|---|
handle | number | The pointer to the GEOSContextHandle_t object. |
writer | number | The 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
Param | Type | Description |
---|---|---|
writer | number | A 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
Param | Type | Description |
---|---|---|
handle | number | A GEOS context handle. |
writer | number | A 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
Param | Type | Description |
---|---|---|
writer | number | A pointer to a GEOSWKTWriter object. |
useOld3D | number | A 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
Param | Type | Description |
---|---|---|
handle | number | A GEOS context handle. |
writer | number | A pointer to a GEOSWKTWriter object. |
useOld3D | number | A 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
Param | Type | Description |
---|---|---|
writer | number | The GEOSWKTWriter object. |
dim | number | The 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
Param | Type | Description |
---|---|---|
handle | number | A pointer to the GEOS context handle. |
writer | number | The GEOSWKTWriter object. |
dim | number | The output dimension (2 or 3). |
geos.GEOSWKTWriter_setRoundingPrecision ⏏
Sets the number places after the decimal to output in WKT. Default 16.
Kind: Exported member
Param | Type | Description |
---|---|---|
writer | number | The GEOSWKTWriter object. |
precision | number | The number of decimal places. |
geos.GEOSWKTWriter_setRoundingPrecision_r ⏏
Sets the number places after the decimal to output in WKT. Default 16.
Kind: Exported member
Param | Type | Description |
---|---|---|
handle | number | A pointer to the GEOS context handle. |
writer | number | The GEOSWKTWriter object. |
precision | number | The number of decimal places. |
geos.GEOSWKTWriter_setTrim ⏏
Sets whether the output WKT string should be trimmed of unnecessary spaces.
Kind: Exported member
Param | Type | Description |
---|---|---|
writer | number | The pointer to the GEOSWKTWriter object. |
trim | number | A 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
Param | Type | Description |
---|---|---|
handle | number | A pointer to the GEOS context handle. |
writer | number | The GEOSWKTWriter object. |
trim | number | The 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.
Param | Type | Description |
---|---|---|
writer | number | The pointer to the GEOSWKTWriter object. |
g | number | The 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.
Param | Type | Description |
---|---|---|
handle | number | The pointer to the GEOSContextHandle_t object. |
writer | number | The pointer to the GEOSWKTWriter object. |
g | number | The pointer to the GEOSGeometry object to be converted. |