Skip to content

geos.GEOSSegmentIntersection ⇒ number

Computes the coordinate where two line segments intersect, if any

Kind: global property of geos
Returns: number - 0 on error, 1 on success, -1 if segments do not intersect

ParamTypeDescription
ax0numberx-coordinate of 1st point in 1st segment
ay0numbery-coordinate of 1st point in 1st segment
ax1numberx-coordinate of 2nd point in 1st segment
ay1numbery-coordinate of 2nd point in 1st segment
bx0numberx-coordinate of 1st point in 2nd segment
by0numbery-coordinate of 1st point in 2nd segment
bx1numberx-coordinate of 2nd point in 2nd segment
by1numbery-coordinate of 2nd point in 2nd segment
cxNumberPointerx-coordinate of intersection point
cyNumberPointery-coordinate of intersection point

geos.GEOSSegmentIntersection_r ⇒ number

Computes the coordinate where two line segments intersect, if any

Kind: global property of geos
Returns: number - 0 on error, 1 on success, -1 if segments do not intersect

ParamTypeDescription
extHandleGEOSContextHandle_t-
ax0numberx-coordinate of 1st point in 1st segment
ay0numbery-coordinate of 1st point in 1st segment
ax1numberx-coordinate of 2nd point in 1st segment
ay1numbery-coordinate of 2nd point in 1st segment
bx0numberx-coordinate of 1st point in 2nd segment
by0numbery-coordinate of 1st point in 2nd segment
bx1numberx-coordinate of 2nd point in 2nd segment
by1numbery-coordinate of 2nd point in 2nd segment
cxNumberPointerx-coordinate of intersection point
cyNumberPointery-coordinate of intersection point