Skip to content
On this page

geos.GEOSMakeValid ⇒ number

Returns a geometry which is valid according to the GEOS validity rules, and preserves as much as possible of the input geometry's extent, dimension, and structure.

The returned geometry may be a copy of the input, or a new geometry with different structure.

The returned geometry will be valid, or null if an exception occurs.

Kind: Exported member
Returns: number - a pointer to a valid Geometry, or null on exception
See: https://libgeos.org/doxygen/geos__c_8h.html#a0f0a7f5c9a3b6d7f9b4d1c8e2a0d4f5a

ParamTypeDescription
gnumbera pointer to an input Geometry

geos.GEOSMakeValidParams_create ⇒ number

Creates a GEOSMakeValidParams object, which can be used to control the behavior of the GEOSMakeValid function.

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


geos.GEOSMakeValidParams_create_r ⇒ number

Creates a GEOSMakeValidParams object, which can be used to control the behaviour of the GEOSMakeValid function.

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

ParamTypeDescription
ctxnumberA pointer to a GEOS context handle.

geos.GEOSMakeValidParams_destroy ⇒ void

Destroys a GEOSMakeValidParams object.

Kind: Exported member
See: 12

ParamTypeDescription
paramsnumberA pointer to a GEOSMakeValidParams object.

geos.GEOSMakeValidParams_destroy_r ⇒ void

Destroys a GEOSMakeValidParams object.

Kind: Exported member
See: https://libgeos.org/doxygen/geos__c_8h.html#a0c9f9a6f5c5e3b1f4b4a0d7f8b7c2a3c

ParamTypeDescription
ctxnumberA pointer to a GEOS context handle.
paramsnumberA pointer to a GEOSMakeValidParams object.

geos.GEOSMakeValidParams_setKeepCollapsed_r ⇒ number

Attempts to make an invalid geometry valid without losing any of the input vertices.

Kind: Exported member
Returns: number - A pointer to a new GEOS geometry object representing the valid geometry, or NULL on error.
See: https://libgeos.org/doxygen/geos__c_8h.html#a4f1a0c3f6f0a7b9b9e2d9c2a6f7b0e8e

ParamTypeDescription
ctxnumberA GEOS context handle.
paramsnumberA pointer to a GEOSMakeValidParams object.
gnumberA pointer to a GEOS geometry object.

geos.GEOSMakeValidParams_setMethod ⇒ number

Sets the method used to make a geometry valid.

Kind: Exported member
Returns: number - A boolean value indicating success or failure.
See: https://libgeos.org/doxygen/geos__c_8h.html#a7a0f4e0c3b6a9f9e1d5c7b9a1d6f0c4e

ParamTypeDescription
paramsnumberA pointer to a GEOSMakeValidParams object.
methodnumberAn integer representing the method, such as 1 for MAKE_VALID_STRUCTURE_PRESERVING, 2 for MAKE_VALID_BUFFERED, etc.

geos.GEOSMakeValidParams_setMethod_r ⇒ number

Sets the method to use for making a geometry valid.

Kind: Exported member
Returns: number - A boolean value indicating success or failure.
See: https://libgeos.org/doxygen/geos__c_8h.html#a9b0f7a7a3c5f0f8e1d4b6a9c3c3f1e9b

ParamTypeDescription
ctxnumberA pointer to a GEOS context handle.
paramsnumberA pointer to a GEOSMakeValidParams object.
methodnumberAn integer representing the method, such as 1 for MAKE_VALID_STRUCTURE_PRESERVING, 2 for MAKE_VALID_BUFFERED, etc.

geos.GEOSMakeValidWithParams ⇒ number

Attempts to make an invalid geometry valid without losing any of the input vertices.

Kind: Exported member
Returns: number - A pointer to a new GEOS geometry object representing the valid geometry, or NULL on error.
See: https://libgeos.org/doxygen/geos__c_8h.html#a3a1c0b9f6a5f7a4e0b7c9e9b1f3d8f7c

ParamTypeDescription
gnumberA pointer to a GEOS geometry object.
paramsnumberA pointer to a GEOSMakeValidParams object that specifies the options for the operation.

geos.GEOSMakeValidWithParams_r ⇒ number

Attempts to make an invalid geometry valid without losing any of the input vertices.

Kind: Exported member
Returns: number - A pointer to a new GEOS geometry object representing the valid geometry, or NULL on error.
See: https://libgeos.org/doxygen/geos__c_8h.html#a6f0e9a3b8f2c5b1b4a0d3c7a7f6f5a9d

ParamTypeDescription
ctxnumberA GEOS context handle.
paramsnumberA pointer to a GEOSMakeValidParams object.
gnumberA pointer to a GEOS geometry object.

geos.GEOSMakeValid_r ⇒ number

Returns a geometry that is valid according to the GEOS library.

Kind: Exported member
Returns: number - A pointer to a valid geometry, or NULL on exception.
See: https://libgeos.org/doxygen/classgeos_1_1operation_1_1valid_1_1MakeValidOp.html

ParamTypeDescription
handlenumberThe GEOS context pointer handle.
gnumberThe input geometry pointer.