Skip to content

geos.GEOSBuffer ⇒ GEOSGeometry

Buffer a geometry.

Kind: global property of geos
Returns: GEOSGeometry - A GEOSGeometry of the buffered result. NULL on exception. Caller is responsible for freeing with GEOSGeom_destroy().

ParamTypeDescription
gGEOSGeometryThe input geometry to be buffered.
widthnumberThe distance by which to expand the geometry (or contract) if the value is negative.
quadsegsnumberThe number of segments per quadrant to generate. More segments provides a more "precise" buffer at the expense of size.

geos.GEOSBufferParams_create_r ⇒ GEOSBufferParams

Create a default GEOSBufferParams object for controlling the shape of buffered generated by GEOSBuffer.

Kind: global property of geos
Returns: GEOSBufferParams - A newly allocated GEOSBufferParams. NULL on exception. Caller is responsible for freeing with GEOSBufferParams_destroy().

ParamTypeDescription
handleGEOSContextHandle_t-

geos.GEOSBufferParams_destroy ⇒ null

Destroy a GEOSBufferParams and free all associated memory.

Kind: global property of geos
Returns: null - void

ParamTypeDescription
parmsGEOSBufferParamsThe object to destroy.

geos.GEOSBufferParams_destroy_r ⇒ null

Destroy a GEOSBufferParams and free all associated memory.

Kind: global property of geos
Returns: null - void

ParamTypeDescription
handleGEOSContextHandle_t-
parmsGEOSBufferParamsThe object to destroy.

geos.GEOSBufferParams_setEndCapStyle ⇒ number

Set the end cap type of a GEOSBufferParams to the desired style, which must be one enumerated in GEOSBufCapStyles.

Kind: global property of geos
Returns: number - 0 on exception, 1 on success.

ParamTypeDescription
pGEOSBufferParams-
stylenumber-

geos.GEOSBufferParams_setEndCapStyle_r ⇒ number

Set the end cap type of a GEOSBufferParams to the desired style, which must be one enumerated in GEOSBufCapStyles.

Kind: global property of geos
Returns: number - 0 on exception, 1 on success.

ParamTypeDescription
handleGEOSContextHandle_t-
pGEOSBufferParams-
stylenumber-

geos.GEOSBufferParams_setJoinStyle ⇒ number

Set the join type of a GEOSBufferParams to the desired style, which must be one enumerated in GEOSBufJoinStyles.

Kind: global property of geos
Returns: number - 0 on exception, 1 on success.

ParamTypeDescription
pGEOSBufferParams-
joinStylenumber-

geos.GEOSBufferParams_setJoinStyle_r ⇒ number

Set the join type of a GEOSBufferParams to the desired style, which must be one enumerated in GEOSBufJoinStyles.

Kind: global property of geos
Returns: number - 0 on exception, 1 on success.

ParamTypeDescription
handleGEOSContextHandle_t-
pGEOSBufferParams-
joinStylenumber-

geos.GEOSBufferParams_setMitreLimit ⇒ number

Set the mitre limit of a GEOSBufferParams to the desired size. For acute angles, a mitre join can extend very very far from the input geometry, which is probably not desired. The mitre limit places an upper bound on that.

Kind: global property of geos
Returns: number - 0 on exception, 1 on success.

ParamTypeDescription
pGEOSBufferParamsThe GEOSBufferParams to operate on
mitreLimitnumberThe limit to set

geos.GEOSBufferParams_setMitreLimit_r ⇒ number

Set the mitre limit of a GEOSBufferParams to the desired size. For acute angles, a mitre join can extend very very far from the input geometry, which is probably not desired. The mitre limit places an upper bound on that.

Kind: global property of geos
Returns: number - 0 on exception, 1 on success.

ParamTypeDescription
handleGEOSContextHandle_t-
pGEOSBufferParamsThe GEOSBufferParams to operate on
mitreLimitnumberThe limit to set

geos.GEOSBufferParams_setQuadrantSegments ⇒ number

Set the number of segments to use to stroke each quadrant of circular arcs generated by the buffering process. More segments means a smoother output, but with larger size.

Kind: global property of geos
Returns: number - 0 on exception, 1 on success.

ParamTypeDescription
pGEOSBufferParamsThe GEOSBufferParams to operate on
quadSegsnumberNumber of segments per quadrant

geos.GEOSBufferParams_setQuadrantSegments_r ⇒ number

Set the number of segments to use to stroke each quadrant of circular arcs generated by the buffering process. More segments means a smoother output, but with larger size.

Kind: global property of geos
Returns: number - 0 on exception, 1 on success.

ParamTypeDescription
handleGEOSContextHandle_t-
pGEOSBufferParamsThe GEOSBufferParams to operate on
quadSegsnumberNumber of segments per quadrant

geos.GEOSBufferParams_setSingleSided ⇒ number

Sets whether the computed buffer should be single-sided. A single-sided buffer is constructed on only one side of each input line.

Kind: global property of geos
Returns: number - 0 on exception, 1 on success.

ParamTypeDescription
pGEOSBufferParamsThe GEOSBufferParams to operate on
singleSidednumberSet to 1 for single-sided output 0 otherwise

geos.GEOSBufferParams_setSingleSided_r ⇒ number

Sets whether the computed buffer should be single-sided. A single-sided buffer is constructed on only one side of each input line.

Kind: global property of geos
Returns: number - 0 on exception, 1 on success.

ParamTypeDescription
handleGEOSContextHandle_t-
pGEOSBufferParamsThe GEOSBufferParams to operate on
singleSidednumberSet to 1 for single-sided output 0 otherwise

geos.GEOSBufferWithParams ⇒ GEOSGeometry

Generates a buffer using the special parameters in the GEOSBufferParams

Kind: global property of geos
Returns: GEOSGeometry - The buffered geometry, or NULL on exception. Caller is responsible for freeing with GEOSGeom_destroy().

ParamTypeDescription
gGEOSGeometryThe geometry to buffer
pGEOSBufferParamsThe parameters to apply to the buffer process
widthnumberThe buffer distance

geos.GEOSBufferWithParams_r ⇒ GEOSGeometry

Generates a buffer using the special parameters in the GEOSBufferParams

Kind: global property of geos
Returns: GEOSGeometry - The buffered geometry, or NULL on exception. Caller is responsible for freeing with GEOSGeom_destroy().

ParamTypeDescription
handleGEOSContextHandle_t-
gGEOSGeometryThe geometry to buffer
pGEOSBufferParamsThe parameters to apply to the buffer process
widthnumberThe buffer distance

geos.GEOSBufferWithStyle ⇒ GEOSGeometry

Generate a buffer using the provided style parameters.

Kind: global property of geos
Returns: GEOSGeometry - The buffered geometry, or NULL on exception. Caller is responsible for freeing with GEOSGeom_destroy().

ParamTypeDescription
gGEOSGeometryThe geometry to buffer
widthnumberWidth of the buffer
quadsegsnumberNumber of segments per quadrant
endCapStylenumberSee GEOSBufCapStyles
joinStylenumberSee GEOSBufJoinStyles
mitreLimitnumberSee GEOSBufferParams_setMitreLimit

geos.GEOSBufferWithStyle_r ⇒ GEOSGeometry

Generate a buffer using the provided style parameters.

Kind: global property of geos
Returns: GEOSGeometry - The buffered geometry, or NULL on exception. Caller is responsible for freeing with GEOSGeom_destroy().

ParamTypeDescription
handleGEOSContextHandle_t-
gGEOSGeometryThe geometry to buffer
widthnumberWidth of the buffer
quadsegsnumberNumber of segments per quadrant
endCapStylenumberSee GEOSBufCapStyles
joinStylenumberSee GEOSBufJoinStyles
mitreLimitnumberSee GEOSBufferParams_setMitreLimit

geos.GEOSBuffer_r ⇒ GEOSGeometry

Buffer a geometry.

Kind: global property of geos
Returns: GEOSGeometry - A GEOSGeometry of the buffered result. NULL on exception. Caller is responsible for freeing with GEOSGeom_destroy().

ParamTypeDescription
handleGEOSContextHandle_t-
gGEOSGeometryThe input geometry to be buffered.
widthnumberThe distance by which to expand the geometry (or contract) if the value is negative.
quadsegsnumberThe number of segments per quadrant to generate. More segments provides a more "precise" buffer at the expense of size.