geos.GEOSBuffer ⇒ number
⏏
Computes a buffer area around this geometry having the given width and with a specified accuracy of approximation for circular arcs.
Kind: Exported member
Returns: number
- A pointer to the resulting geometry, or NULL if an exception was thrown.
Param | Type | Description |
---|---|---|
g | number | A pointer to the input geometry. |
width | number | The width of the buffer area around this geometry. Negative values create a buffer inside this geometry. |
quadsegs | number | The number of segments used to approximate a quarter circle (defaults to 8). |
geos.GEOSBufferParams_create ⇒ number
⏏
Create a new GEOSBufferParams object
Kind: Exported member
Returns: number
- A pointer to the newly allocated GEOSBufferParams object
geos.GEOSBufferParams_create_r ⇒ number
⏏
Create a new GEOSBufferParams object with a context handle
Kind: Exported member
Returns: number
- A pointer to the newly allocated GEOSBufferParams object
Param | Type | Description |
---|---|---|
handle | number | The context handle |
geos.GEOSBufferParams_destroy ⏏
Destroy a GEOSBufferParams object
Kind: Exported member
Param | Type | Description |
---|---|---|
params | number | A pointer to the GEOSBufferParams object to destroy |
geos.GEOSBufferParams_destroy_r ⏏
Destroy a GEOSBufferParams object with a context handle
Kind: Exported member
Param | Type | Description |
---|---|---|
handle | number | The context handle |
params | number | A pointer to the GEOSBufferParams object to destroy |
geos.GEOSBufferParams_setEndCapStyle ⇒ number
⏏
Set the end cap style for a GEOSBufferParams object
Kind: Exported member
Returns: number
- 1 on success, 0 on failure
Param | Type | Description |
---|---|---|
params | number | A pointer to the GEOSBufferParams object to modify |
style | number | The end cap style, one of GEOSBUF_CAP_ROUND, GEOSBUF_CAP_FLAT, or GEOSBUF_CAP_SQUARE |
geos.GEOSBufferParams_setEndCapStyle_r ⇒ null
⏏
Sets the end cap style of the buffer parameters.
Kind: Exported member
Param | Type | Description |
---|---|---|
handle | number | A pointer to the GEOS context handle. |
p | number | The pointer to the buffer parameters object. |
style | number | The end cap style code. Possible values are: - 1: round - 2: flat - 3: square |
geos.GEOSBufferParams_setJoinStyle ⇒ null
⏏
Sets the join style of the buffer parameters.
Kind: Exported member
Param | Type | Description |
---|---|---|
p | number | The pointer to the buffer parameters object. |
joinStyle | number | The join style code. Possible values are: - 1: round - 2: mitre - 3: bevel |
geos.GEOSBufferParams_setJoinStyle_r ⇒ null
⏏
Sets the join style of the buffer parameters.
Kind: Exported member
Param | Type | Description |
---|---|---|
handle | number | A pointer to the GEOS context handle. |
p | number | The pointer to the buffer parameters object. |
joinStyle | number | The join style code. Possible values are: - 1: round - 2: mitre - 3: bevel |
geos.GEOSBufferParams_setMitreLimit ⇒ null
⏏
Sets the mitre limit of the buffer parameters.
Kind: Exported member
Param | Type | Description |
---|---|---|
p | number | The pointer to the buffer parameters object. |
mitreLimit | number | The mitre limit value. This is used for very sharp corners. The mitre limit is the ratio of the distance from the corner to the end of the mitred offset corner. When two line segments meet at a sharp angle, a miter join will extend the original geometry. To prevent unreasonable geometry, the mitre limit allows controlling how far the miter join can extend from the original geometry. If the limit is exceeded, the join will be beveled. |
geos.GEOSBufferParams_setMitreLimit_r ⇒ null
⏏
Sets the mitre limit of the buffer parameters.
Kind: Exported member
Param | Type | Description |
---|---|---|
handle | number | A pointer to the GEOS context handle. |
p | number | The pointer to the buffer parameters object. |
mitreLimit | number | The mitre limit value. This is used for very sharp corners. The mitre limit is the ratio of the distance from the corner to the end of the mitred offset corner. When two line segments meet at a sharp angle, a miter join will extend the original geometry. To prevent unreasonable geometry, the mitre limit allows controlling how far the miter join can extend from the original geometry. If the limit is exceeded, the join will be beveled. |
geos.GEOSBufferParams_setQuadrantSegments ⇒ null
⏏
Sets the number of line segments used to approximate an angle fillet.
Kind: Exported member
Returns: null
- - No return value.
Param | Type | Description |
---|---|---|
p | number | A pointer to a GEOSBufferParams object. |
quadSegs | number | The number of segments in a fillet for a quadrant, must be >= 1. |
geos.GEOSBufferParams_setQuadrantSegments_r ⇒ null
⏏
Sets the number of line segments used to approximate an angle fillet, with a context handle.
Kind: Exported member
Returns: null
- - No return value.
Param | Type | Description |
---|---|---|
handle | number | A pointer to a GEOSContextHandle object. |
p | number | A pointer to a GEOSBufferParams object. |
quadSegs | number | The number of segments in a fillet for a quadrant, must be >= 1. |
geos.GEOSBufferParams_setSingleSided ⇒ null
⏏
Sets whether the computed buffer should be single-sided. A single-sided buffer is constructed on only one side of each input line. The side is determined by the sign of the buffer distance:
- A positive distance indicates the left-hand side
- A negative distance indicates the right-hand side The single-sided buffer of point geometries is the same as the regular buffer. The End Cap Style for single-sided buffers is always ignored, and forced to the equivalent of CAP_FLAT.
Kind: Exported member
Returns: null
- - No return value.
Param | Type | Description |
---|---|---|
p | number | A pointer to a GEOSBufferParams object. |
singleSided | number | A boolean value indicating whether the buffer is single-sided or not. |
geos.GEOSBufferParams_setSingleSided_r ⇒ null
⏏
Sets whether the computed buffer should be single-sided, with a context handle. A single-sided buffer is constructed on only one side of each input line. The side is determined by the sign of the buffer distance:
- A positive distance indicates the left-hand side
- A negative distance indicates the right-hand side The single-sided buffer of point geometries is the same as the regular buffer. The End Cap Style for single-sided buffers is always ignored, and forced to the equivalent of CAP_FLAT.
Kind: Exported member
Returns: null
- - No return value.
Param | Type | Description |
---|---|---|
handle | number | A pointer to a GEOSContextHandle object. |
p | number | A pointer to a GEOSBufferParams object. |
singleSided | number | A boolean value indicating whether the buffer is single-sided or not. |
geos.GEOSBufferWithParams ⇒ number
⏏
Returns the buffer computed for a geometry for a given buffer distance and parameters.
Kind: Exported member
Returns: number
- - A pointer to a GEOSGeometry object representing the output geometry, or NULL if an exception occurred.
Param | Type | Description |
---|---|---|
g | number | A pointer to a GEOSGeometry object representing the input geometry. |
p | number | A pointer to a GEOSBufferParams object containing the buffer parameters. |
width | number | The buffer distance. |
geos.GEOSBufferWithParams_r ⇒ number
⏏
Creates a buffer area around this geometry having the given width and with a specified accuracy of approximation for circular arcs.
Kind: Exported member
Returns: number
- A pointer to the geometry representing the buffer area. Returns NULL on exception.
Param | Type | Description |
---|---|---|
handle | number | The GEOS context pointer handle. |
g | number | The geometry pointer to buffer. |
p | number | A pointer to the buffer parameters. |
width | number | The width of the buffer area. |
geos.GEOSBufferWithStyle ⇒ number
⏏
Creates a buffer around a geometry with a specified width, number of segments per quadrant, end cap style, join style and mitre limit.
Kind: Exported member
Returns: number
- The buffered geometry pointer or NULL if an exception occurred.
Param | Type | Description |
---|---|---|
g | number | The input geometry pointer. |
width | number | The buffer width. |
quadsegs | number | The number of segments per quadrant. |
endCapStyle | number | The end cap style. One of GEOSBUF_CAP_ROUND, GEOSBUF_CAP_FLAT or GEOSBUF_CAP_SQUARE. |
joinStyle | number | The join style. One of GEOSBUF_JOIN_ROUND, GEOSBUF_JOIN_MITRE or GEOSBUF_JOIN_BEVEL. |
geos.GEOSBufferWithStyle_r ⇒ number
⏏
Creates a buffer around a geometry with a specified width, number of segments per quadrant, end cap style, join style and mitre limit using a given context handle.
Kind: Exported member
Returns: number
- The buffered geometry pointer or NULL if an exception occurred.
Param | Type | Description |
---|---|---|
handle | number | A pointer to the GEOS context handle. |
g | number | The input geometry pointer. |
width | number | The buffer width. |
quadsegs | number | The number of segments per quadrant. |
endCapStyle | number | The end cap style. One of GEOSBUF_CAP_ROUND, GEOSBUF_CAP_FLAT or GEOSBUF_CAP_SQUARE. |
joinStyle | number | The join style. One of GEOSBUF_JOIN_ROUND, GEOSBUF_JOIN_MITRE or GEOSBUF_JOIN_BEVEL. |
mitreLimit | number | The mitre limit. A positive number or zero. |
geos.GEOSBuffer_r ⇒ number
⏏
Creates a buffer around a geometry with a specified width, number of segments per quadrant, end cap style, join style and mitre limit.
Kind: Exported member
Returns: number
- The buffered geometry pointer or NULL if an exception occurred.
Param | Type | Description |
---|---|---|
handle | number | A pointer to the GEOS context handle. |
g | number | The input geometry pointer. |
width | number | The buffer width. |
quadsegs | number | The number of segments per quadrant. |
endCapStyle | number | The end cap style. One of GEOSBUF_CAP_ROUND, GEOSBUF_CAP_FLAT or GEOSBUF_CAP_SQUARE. |
joinStyle | number | The join style. One of GEOSBUF_JOIN_ROUND, GEOSBUF_JOIN_MITRE or GEOSBUF_JOIN_BEVEL. |
mitreLimit | number | The mitre limit. A positive number or zero. |