Skip to content
On this page

geos.GEOSCoordSeq_clone ⇒ number | null

Clone a coordinate sequence.

Kind: Exported member
Returns: number | null - A pointer to a new coordinate sequence object or null on exception.

ParamTypeDescription
snumberThe coordinate sequence to clone pointer

geos.GEOSCoordSeq_clone_r ⇒ number

Clone a coordinate sequence.

Kind: Exported member
Returns: number - The pointer to the cloned coordinate sequence, or null on error.
See: https://libgeos.org/doxygen/geos__c_8h.html#a4f2a6b1f8e9a1c0e3f9c6e7d5a3f6b5a

ParamTypeDescription
handlenumberA pointer to the GEOS context handle.
snumberThe pointer to the coordinate sequence to clone.

geos.GEOSCoordSeq_copyFromArrays ⇒ number

Copies the coordinate values from the given arrays to a coordinate sequence.

Kind: Exported member
Returns: number - A pointer to a GEOS coordinate sequence object, or NULL on error.
See: https://libgeos.org/doxygen/geos__c_8h.html#a4f7a1f9d0c2b0c119e6f9e2f60b112a9

ParamTypeDescription
xnumberA pointer to an array of x values.
ynumberA pointer to an array of y values.
znumberA pointer to an array of z values, or NULL if not needed.
mnumberA pointer to an array of m values, or NULL if not needed.
sizenumberThe number of coordinates in the arrays.

geos.GEOSCoordSeq_copyFromArrays_r ⇒ number

Copies the ordinates of a coordinate sequence from arrays of x, y and optionally z values.

Kind: Exported member
Returns: number - A pointer to a GEOS coordinate sequence object, or NULL on error.
See: https://libgeos.org/doxygen/geos__c_8h.html#a9f4c6a5a7f2b9c0b1f6c0e1d0a1e4f5a

ParamTypeDescription
ctxnumberA GEOS context handle.
xnumberA pointer to an array of x values.
ynumberA pointer to an array of y values.
znumberA pointer to an array of z values, or NULL if not needed.
mnumberA pointer to an array of m values, or NULL if not needed.
sizenumberThe number of coordinates in the arrays.

geos.GEOSCoordSeq_copyFromBuffer ⇒ number

Copies a coordinate sequence from a buffer of x,y(,z) values.

Kind: Exported member
Returns: number - A pointer to a GEOS coordinate sequence object, or NULL on error.
See: https://libgeos.org/doxygen/geos__c_8h.html#a6f4b0a3f8e9c7a9b5f3b2c1f0c3a1d6f

ParamTypeDescription
bufnumberA pointer to a buffer of double values, in x, y order.
sizenumberThe number of coordinates in the sequence.
hasZnumberDoes buffer have Z values?
hasMnumberDoes buffer have M values?

geos.GEOSCoordSeq_copyFromBuffer_r ⇒ number

Copies a coordinate sequence from a buffer of x,y(,z) values.

Kind: Exported member
Returns: number - A pointer to a GEOS coordinate sequence object, or NULL on error.
See: https://libgeos.org/doxygen/geos__c_8h.html#a7a9f0b9c5a4f3b8f1d6b2a0c6e8d7c7f

ParamTypeDescription
ctxnumberA GEOS context handle.
bufnumberA pointer to a buffer of double values, in x, y order.
sizenumberThe number of coordinates in the sequence.
hasZnumberDoes buffer have Z values?
hasMnumberDoes buffer have M values?

geos.GEOSCoordSeq_copyToArrays ⇒ number

Copies the coordinates of a coordinate sequence to two arrays.

Kind: Exported member
Returns: number - 1 on success, 0 on failure.
See: https://libgeos.org/doxygen/geos__c_8h.html#a3f7a4b9a6d0e2b7c8f6f9e5b1f6d0a5c

ParamTypeDescription
csnumberA pointer to a GEOS coordinate sequence object.
xnumberA pointer to an array of doubles to store the x-coordinates.
ynumberA pointer to an array of doubles to store the y-coordinates.
znumberA pointer to an array of doubles to store the z-coordinates, or NULL.
mnumberA pointer to an array of doubles to store the m-coordinates, or NULL.

geos.GEOSCoordSeq_copyToArrays_r ⇒ number

Copies the coordinates of a coordinate sequence to two arrays of doubles.

Kind: Exported member
Returns: number - 1 on success, 0 on failure.
See: https://libgeos.org/doxygen/geos__c_8h.html#a5f7a6d4f3f9a9c5e2b7a0b8f6c4e3d0c

ParamTypeDescription
ctxnumberA GEOS context handle.
seqnumberA pointer to a GEOS coordinate sequence object.
xnumberA pointer to an array of doubles to store the x coordinates.
ynumberA pointer to an array of doubles to store the y coordinates.

geos.GEOSCoordSeq_copyToBuffer ⇒ number

Copies the coordinates of a coordinate sequence to a user-supplied buffer.

Kind: Exported member
Returns: number - 1 on success, 0 on error.
See: https://libgeos.org/doxygen/geos__c_8h.html#a9a6f2c8b0a3f4e4f2c9a7b1d5c2e9b7a

ParamTypeDescription
csnumberA pointer to a GEOS coordinate sequence object.
bufnumberA pointer to a buffer of double values, allocated by the caller.
stridenumberThe number of doubles per coordinate in the buffer.

geos.GEOSCoordSeq_copyToBuffer_r ⇒ number

Copies the coordinates of a coordinate sequence to user-supplied buffers.

Kind: Exported member
Returns: number - 1 on success, 0 on failure.
See: https://libgeos.org/doxygen/geos__c_8h.html#a9f4a9f6b7a5d8a6c0f2b5e7e6a3f0c7d

ParamTypeDescription
ctxnumberA GEOS context handle.
seqnumberA pointer to a GEOS coordinate sequence object.
xnumberA pointer to a buffer for the x coordinates.
ynumberA pointer to a buffer for the y coordinates.
znumberA pointer to a buffer for the z coordinates (optional).

geos.GEOSCoordSeq_create ⇒ number

Create a coordinate sequence of a given size and dimension.

Kind: Exported member
Returns: number - A pointer to the created coordinate sequence or NULL on error.

ParamTypeDescription
sizenumberThe number of coordinates in the sequence.
dimsnumberThe dimension of each coordinate (2 or 3).

geos.GEOSCoordSeq_create_r ⇒ number

Create a coordinate sequence of a given size and dimension in a given context.

Kind: Exported member
Returns: number - A pointer to the created coordinate sequence or NULL on error.

ParamTypeDescription
handlenumberA pointer to the GEOS context handle.
sizenumberThe number of coordinates in the sequence.
dimsnumberThe dimension of each coordinate (2 or 3).

geos.GEOSCoordSeq_destroy ⏏

Destroys a coordinate sequence.

Kind: Exported member

ParamTypeDescription
snumberThe coordinate sequence to destroy.

geos.GEOSCoordSeq_destroy_r ⏏

Destroys a coordinate sequence with a context handle.

Kind: Exported member

ParamTypeDescription
handlenumberA pointer to the GEOS context handle.
snumberThe coordinate sequence to destroy.

geos.GEOSCoordSeq_getDimensions ⇒ number

Get the dimensions of a coordinate sequence.

Kind: Exported member
Returns: number - 1 on success, 0 on exception.

ParamTypeDescription
snumberA pointer to a GEOSCoordSequence object.
dimsnumberA pointer to an unsigned int to store the dimensions.

geos.GEOSCoordSeq_getDimensions_r ⇒ number

Get the dimensions of a coordinate sequence (thread-safe).

Kind: Exported member
Returns: number - 1 on success, 0 on exception.

ParamTypeDescription
handlenumberA GEOS context handle.
snumberA pointer to a GEOSCoordSequence object.
dimsnumberA pointer to an unsigned int to store the dimensions.

geos.GEOSCoordSeq_getOrdinate ⇒ number

Get an ordinate value from a coordinate sequence.

Kind: Exported member
Returns: number - The ordinate value, or NaN on error.
See: https://libgeos.org/doxygen/geos__c_8h.html#a9b7d0e4b5c8f2d7e4a9b0d6c3a9f1a7c

ParamTypeDescription
snumberThe pointer to the coordinate sequence.
idxnumberThe index of the coordinate to get the ordinate from.
dimnumberThe dimension of the ordinate to get (0 for X, 1 for Y, 2 for Z, 3 for M).

geos.GEOSCoordSeq_getOrdinate_r ⇒ number

Get an ordinate value from a coordinate sequence in a thread-safe way.

Kind: Exported member
Returns: number - 1 on success, 0 on error.
See: https://libgeos.org/doxygen/geos__c_8h.html#a4f2a6b1f8e9a1c0e3f9c6e7d5a3f6b5a

ParamTypeDescription
handlenumberA pointer to the GEOS context handle.
snumberThe pointer to the coordinate sequence.
idxnumberThe index of the coordinate to get the ordinate from.
dimnumberThe dimension of the ordinate to get (0 for X, 1 for Y, 2 for Z, 3 for M).
valnumberThe pointer to a double variable to store the ordinate value.

geos.GEOSCoordSeq_getSize ⇒ number

Get the size of a coordinate sequence.

Kind: Exported member
Returns: number - 1 on success, 0 on exception.

ParamTypeDescription
snumberA pointer to a GEOSCoordSequence object.
sizenumberA pointer to an unsigned int to store the size.

geos.GEOSCoordSeq_getSize_r ⇒ number

Get the size of a coordinate sequence (thread-safe).

Kind: Exported member
Returns: number - 1 on success, 0 on exception.

ParamTypeDescription
handlenumberA GEOS context handle.
snumberA pointer to a GEOSCoordSequence object.
sizenumberA pointer to an unsigned int to store the size.

geos.GEOSCoordSeq_getX ⇒ number

Get the X ordinate value from a coordinate sequence.

Kind: Exported member
Returns: number - 1 on success, 0 on error.
See: https://libgeos.org/doxygen/geos__c_8h.html#a9b7d0e4b5c8f2d7e4a9b0d6c3a9f1a7c

ParamTypeDescription
snumberThe pointer to the coordinate sequence.
idxnumberThe index of the coordinate to get the X ordinate from.
xnumberThe pointer to a double variable to store the X ordinate value.

geos.GEOSCoordSeq_getXY ⇒ number

Get the X and Y ordinate values of a coordinate in a sequence.

Kind: Exported member
Returns: number - 1 on success, 0 on exception.

ParamTypeDescription
snumberThe coordinate sequence handle.
idxnumberThe index of the coordinate to get, zero based.
xnumberA pointer to a double where the X ordinate value will be stored.
ynumberA pointer to a double where the Y ordinate value will be stored.

geos.GEOSCoordSeq_getXYZ ⇒ number

Get the X, Y and Z ordinate values of a coordinate in a sequence.

Kind: Exported member
Returns: number - 1 on success, 0 on exception.

ParamTypeDescription
snumberThe coordinate sequence handle.
idxnumberThe index of the coordinate to get, zero based.
xnumberA pointer to a double where the X ordinate value will be stored.
ynumberA pointer to a double where the Y ordinate value will be stored.
znumberA pointer to a double where the Z ordinate value will be stored.

geos.GEOSCoordSeq_getXYZ_r ⇒ number

Get the X, Y and Z ordinate values of a coordinate in a sequence using a context handle.

Kind: Exported member
Returns: number - 1 on success, 0 on exception.

ParamTypeDescription
handlenumberThe context handle.
snumberThe coordinate sequence handle.
idxnumberThe index of the coordinate to get, zero based.
xnumberA pointer to a double where the X ordinate value will be stored.
ynumberA pointer to a double where the Y ordinate value will be stored.
znumberA pointer to a double where the Z ordinate value will be stored.

geos.GEOSCoordSeq_getXY_r ⇒ number

Get the X and Y ordinate values of a coordinate in a sequence using a context handle.

Kind: Exported member
Returns: number - 1 on success, 0 on exception.

ParamTypeDescription
handlenumberThe context handle.
snumberThe coordinate sequence handle.
idxnumberThe index of the coordinate to get, zero based.
xnumberA pointer to a double where the X ordinate value will be stored.
ynumberA pointer to a double where the Y ordinate value will be stored.

geos.GEOSCoordSeq_getX_r ⇒ number

Gets the X ordinate value for a given coordinate in a GEOSCoordSequence.

Kind: Exported member
Returns: number - 1 on success, 0 on exception.

ParamTypeDescription
handlenumberThe GEOS context pointer handle.
snumberA pointer to the GEOSCoordSequence to query.
idxnumberThe coordinate index.
valnumberA pointer to a double to store the X ordinate value.

geos.GEOSCoordSeq_getY ⇒ number

Get the Y ordinate value from a coordinate sequence.

Kind: Exported member
Returns: number - 1 on success, 0 on error.
See: https://libgeos.org/doxygen/geos__c_8h.html#a9b7d0e4b5c8f2d7e4a9b0d6c3a9f1a7c

ParamTypeDescription
snumberThe pointer to the coordinate sequence.
idxnumberThe index of the coordinate to get the Y ordinate from.
ynumberThe pointer to a double variable to store the Y ordinate value.

geos.GEOSCoordSeq_getY_r ⇒ number

Gets the Y ordinate value for a given coordinate in a GEOSCoordSequence.

Kind: Exported member
Returns: number - 1 on success, 0 on exception.

ParamTypeDescription
handlenumberThe GEOS context pointer handle.
snumberA pointer to the GEOSCoordSequence to query.
idxnumberThe coordinate index.
valnumberA pointer to a double to store the Y ordinate value.

geos.GEOSCoordSeq_getZ ⇒ number

Get the Z ordinate value of a coordinate in a sequence.

Kind: Exported member
Returns: number - 1 on success, 0 on exception.

ParamTypeDescription
snumberThe coordinate sequence handle.
idxnumberThe index of the coordinate to get, zero based.
valnumberA pointer to a double where the ordinate value will be stored.

geos.GEOSCoordSeq_getZ_r ⇒ number

Gets the Z ordinate value for a given coordinate in a GEOSCoordSequence. This is equivalent to GEOSCoordSeq_getZ_ with an additional context handle parameter.

Kind: Exported member
Returns: number - 1 on success, 0 on exception.

ParamTypeDescription
handlenumberThe GEOS context pointer handle.
snumberA pointer to the GEOSCoordSequence to query.
idxnumberThe coordinate index.
valnumberA pointer to a double to store the Z ordinate value.

geos.GEOSCoordSeq_isCCW ⇒ number

Check the orientation of a coordinate sequence. Closure of the sequence is assumed. Invalid (collapsed) or short (fewer than 4 points) sequences return false.

Kind: Exported member
Returns: number - 1 on success, 0 on exception.

ParamTypeDescription
snumberA pointer to a GEOSCoordSequence object.
is_ccwnumberA pointer to a char to store the result (1 for counter-clockwise, 0 for clockwise).

geos.GEOSCoordSeq_isCCW_r ⇒ number

Checks whether a coordinate sequence forms a counter-clockwise ring.

Kind: Exported member
Returns: number - 1 on success, 0 on exception.

ParamTypeDescription
handlenumberA pointer to the GEOS context handle.
snumberThe coordinate sequence to check.
is_ccwnumberA pointer to a char variable to store the result (1 if CCW, 0 otherwise).

geos.GEOSCoordSeq_setOrdinate ⇒ number

Set an ordinate value in a coordinate sequence.

Kind: Exported member
Returns: number - 1 on success, 0 on exception.

ParamTypeDescription
snumberThe coordinate sequence handle.
idxnumberThe index of the coordinate to alter, zero based.
dimnumberThe dimension to set (0=X, 1=Y, 2=Z, 3=M).
valnumberThe value to set the ordinate to.

geos.GEOSCoordSeq_setOrdinate_r ⇒ number

Set an ordinate value in a coordinate sequence (thread-safe version).

Kind: Exported member
Returns: number - 1 on success, 0 on exception.

ParamTypeDescription
handlenumberA pointer to the GEOS context handle.
snumberThe coordinate sequence handle.
idxnumberThe index of the coordinate to alter, zero based.
dimnumberThe dimension to set (0=X, 1=Y, 2=Z, 3=M).
valnumberThe value to set the ordinate to.

geos.GEOSCoordSeq_setX ⇒ number

Set X ordinate values in a coordinate sequence.

Kind: Exported member
Returns: number - 1 on success, 0 on exception.

ParamTypeDescription
snumberThe coordinate sequence handle.
idxnumberThe index of the coordinate to alter, zero based.
valnumberThe value to set the ordinate to.

geos.GEOSCoordSeq_setXY ⇒ number

Set X and Y ordinate values in a coordinate sequence.

Kind: Exported member
Returns: number - 0 on exception, 1 otherwise
Since: 2.2

ParamTypeDescription
snumberThe coordinate sequence pointer
idxnumberThe index of the coordinate to alter, zero based
xnumberThe value to set the X ordinate to
ynumberThe value to set the Y ordinate to

geos.GEOSCoordSeq_setXYZ ⇒ number

Set X, Y and Z ordinate values in a coordinate sequence.

Kind: Exported member
Returns: number - 0 on exception, 1 otherwise
Since: 2.2

ParamTypeDescription
snumberThe coordinate sequence pointer
idxnumberThe index of the coordinate to alter, zero based
xnumberThe value to set the X ordinate to
ynumberThe value to set the Y ordinate to
znumberThe value to set the Z ordinate to

geos.GEOSCoordSeq_setXYZ_r ⇒ number

Set X, Y and Z ordinate values in a coordinate sequence (reentrant).

Kind: Exported member
Returns: number - 0 on exception, 1 otherwise
Since: 3.8.0

ParamTypeDescription
handlenumberThe context handle pointer
snumberThe coordinate sequence pointer
idxnumberThe index of the coordinate to alter, zero based
xnumberThe value to set the X ordinate to
ynumberThe value to set the Y ordinate to
znumberThe value to set the Z ordinate to

geos.GEOSCoordSeq_setXY_r ⇒ number

Set X and Y ordinate values in a coordinate sequence (reentrant).

Kind: Exported member
Returns: number - 0 on exception, 1 otherwise
Since: 3.8.0

ParamTypeDescription
handlenumberThe context handle pointer * @param {number} s - The coordinate sequence pointer
idxnumberThe index of the coordinate to alter, zero based
xnumberThe value to set the X ordinate to
ynumberThe value to set the Y ordinate to

geos.GEOSCoordSeq_setX_r ⇒ number

Set the X coordinate of a point in a CoordinateSequence

Kind: Exported member
Returns: number - 1 on success, 0 on exception

ParamTypeDescription
handlenumberThe context returned by GEOS_init_r
snumberThe CoordinateSequence object
idxnumberThe index of the point to set
valnumberThe X coordinate value to set

geos.GEOSCoordSeq_setY ⇒ number

Set Y ordinate values in a coordinate sequence.

Kind: Exported member
Returns: number - 1 on success, 0 on exception.

ParamTypeDescription
snumberThe coordinate sequence handle.
idxnumberThe index of the coordinate to alter, zero based.
valnumberThe value to set the ordinate to.

geos.GEOSCoordSeq_setY_r ⇒ number

Set the Y coordinate of a point in a CoordinateSequence

Kind: Exported member
Returns: number - 1 on success, 0 on exception

ParamTypeDescription
handlenumberThe context returned by GEOS_init_r
snumberThe CoordinateSequence object
idxnumberThe index of the point to set
valnumberThe Y coordinate value to set

geos.GEOSCoordSeq_setZ ⇒ number

Set Z ordinate values in a coordinate sequence.

Kind: Exported member
Returns: number - 1 on success, 0 on exception.

ParamTypeDescription
snumberThe coordinate sequence handle.
idxnumberThe index of the coordinate to alter, zero based.
valnumberThe value to set the ordinate to.

geos.GEOSCoordSeq_setZ_r ⇒ number

Sets the Z ordinate value for a given coordinate in a GEOSCoordSequence.

Kind: Exported member
Returns: number - 1 on success, 0 on exception.

ParamTypeDescription
handlenumberThe GEOS context pointer handle.
snumberA pointer to the GEOSCoordSequence to modify.
idxnumberThe coordinate index.
valnumberThe Z ordinate value to set.