Skip to content
On this page

geos.GEOSOffsetCurve ⇒ number

Computes an offset curve from a geometry. An offset curve is a linear geometry which is offset a given distance from the input. If the offset distance is positive the curve lies on the left side of the input; if it is negative the curve is on the right side. The curve(s) have the same direction as the input line(s).

Kind: Exported member
Returns: number - A pointer to a new GEOSGeometry object representing the offset curve, or NULL on exception.
See: https://libgeos.org/doxygen/geos__c_8h.html#a06557cad6153f56703b6875d4f21dc18

ParamTypeDescription
geomnumberA pointer to a GEOSGeometry object.
widthnumberThe offset distance.
quadsegsnumberThe number of quadrant segments used to approximate a quarter circle (defaults to 8).
joinStylenumberThe join style for line joins (defaults to BufferParameters::JOIN_STYLE).
mitreLimitnumberThe mitre ratio limit (only applies for mitre join style, defaults to 5.0).

geos.GEOSOffsetCurve_r ⇒ number

Computes an offset curve from a geometry using a handle. An offset curve is a linear geometry which is offset a given distance from the input. If the offset distance is positive the curve lies on the left side of the input; if it is negative the curve is on the right side. The curve(s) have the same direction as the input line(s).

Kind: Exported member
Returns: number - A pointer to a new GEOSGeometry object representing the offset curve, or NULL on exception.
See: https://libgeos.org/doxygen/classgeos_1_1operation_1_1buffer_1_1OffsetCurve.html

ParamTypeDescription
handlenumberA pointer to a GEOSContextHandle_t object.
geomnumberA pointer to a GEOSGeometry object.
widthnumberThe offset distance.
quadsegsnumberThe number of quadrant segments used to approximate a quarter circle (defaults to 8).
joinStylenumberThe join style for line joins (defaults to BufferParameters::JOIN_STYLE).
mitreLimitnumberThe mitre ratio limit (only applies for mitre join style, defaults to 5.0).