crosses
Returns true if geometries a and b spatially cross.
Geometry a crosses geometry b if both geometries have some, but not all
interior points in common, and the dimension of their intersection must be
lower than the maximum dimension of either a or b.
Operation is valid for the following situations:
- Point/Line and Line/Point (Point intersection),
- Point/Area and Area/Point (Point intersection),
- Line/Area and Area/Line (Line intersection),
- Line/Line (Point intersection).
Always returns false for Point/Point and Area/Area situations.
warning
Do not use this function with invalid geometries. You will get unexpected results.
Parameters
| Name | Type | Description |
|---|---|---|
a | Geometry | Prepared<Geometry> | First geometry |
b | Geometry | Second geometry |
Returns
boolean
true if geometries a and b spatially cross
Throws
GEOSErroron unsupported geometry types (curved)
See also
prepareimproves performance of repeated calls against a single geometry
Examples
crosses: true
crosses: false