Fork me on GitHub

# ST_Intersects

### Description

Returns true if `geomA` intersects `geomB`.

Intersects means that `geomA` and `geomB` have at least one point in common.

### Examples

##### Cases where `ST_Intersects` is true
geomA POLYGON geomB POLYGON
POLYGON((1 1, 4 1, 4 5, 1 5, 1 1)) POLYGON((3 2, 6 2, 6 6, 3 6, 3 2))

geomA POLYGON geomB LINESTRING
POLYGON((1 1, 4 1, 4 5, 1 5, 1 1)) LINESTRING(2 4, 7 4)

geomA POLYGON geomB POINT
POLYGON((1 1, 4 1, 4 5, 1 5, 1 1)) POINT(3 3)

geomA LINESTRING geomB LINESTRING
LINESTRING(2 1, 5 3, 2 6) LINESTRING(1 3, 4 6)

geomA LINESTRING geomB POINT
LINESTRING(2 1, 5 3, 2 6) POINT(2 6)

geomA POLYGON geomB MULTIPOLYGON
POLYGON((1 1, 4 1, 4 5, 1 5, 1 1)) MULTIPOLYGON(((4 2, 7 2, 7 6, 4 6, 4 2)), ((0 6, 1 6, 1 7, 0 7, 0 6)))

geomA POLYGON geomB MULTILINESTRING
POLYGON((1 1, 4 1, 4 5, 1 5, 1 1)) MULTILINESTRING((2 5, 7 5), (6 1, 6 4))

geomA POLYGON geomB MULTIPOINT
POLYGON((1 1, 4 1, 4 5, 1 5, 1 1)) MULTIPOINT((4 3), (6 2))

##### Cases where `ST_Intersects` is false
geomA POLYGON geomB POLYGON
POLYGON((1 1, 4 1, 4 5, 1 5, 1 1)) POLYGON((6 3, 7 3, 7 6, 6 6, 6 3))