geos.GEOSSegmentIntersection ⇒ number
⏏
Computes the intersection point of two line segments, if there is one.
Kind: Exported member
Returns: number
- 1 if an intersection point is found, 0 if no intersection point is found, or -1 on error.
Param | Type | Description |
---|---|---|
p0x | number | The x-coordinate of the first endpoint of the first segment. |
p0y | number | The y-coordinate of the first endpoint of the first segment. |
p1x | number | The x-coordinate of the second endpoint of the first segment. |
p1y | number | The y-coordinate of the second endpoint of the first segment. |
q0x | number | The x-coordinate of the first endpoint of the second segment. |
q0y | number | The y-coordinate of the first endpoint of the second segment. |
q1x | number | The x-coordinate of the second endpoint of the second segment. |
q1y | number | The y-coordinate of the second endpoint of the second segment. |
rx | number | A pointer to a double where the x-coordinate of the intersection point will be stored, if any. |
ry | number | A pointer to a double where the y-coordinate of the intersection point will be stored, if any. |
geos.GEOSSegmentIntersection_r ⇒ number
⏏
Computes the intersection point of two line segments, if there is one. This is a reentrant version that takes a GEOS context handle as an argument.
Kind: Exported member
Returns: number
- 1 if an intersection point is found, 0 if no intersection point is found, or -1 on error.
Param | Type | Description |
---|---|---|
handle | number | A pointer to the GEOS context handle. |
p0x | number | The x-coordinate of the first endpoint of the first segment. |
p0y | number | The y-coordinate of the first endpoint of the first segment. |
p1x | number | The x-coordinate of the second endpoint of the first segment. |
p1y | number | The y-coordinate of the second endpoint of the first segment. |
q0x | number | The x-coordinate of the first endpoint of the second segment. |
q0y | number | The y-coordinate of the first endpoint of the second segment. |
q1x | number | The x-coordinate of the second endpoint of the second segment. |
q1y | number | The y-coordinate of the second endpoint of the second segment. |
rx | number | A pointer to a double where the x-coordinate of the intersection point will be stored, if any. |
ry | number | A pointer to a double where the y-coordinate of the intersection point will be stored, if any. |