Name

ST_Intersects — Returns TRUE if the Geometries "spatially intersect" - (share any portion of space) and FALSE if they don't (they are Disjoint).

Synopsis

boolean ST_Intersects( geometry A , geometry B );

Description

Overlaps, Touches, Within all imply spatial intersection. If any of the aforementioned returns true, then the geometries also spatially intersect. Disjoint implies false for spatial intersection.

[Important]

Do not call with a GEOMETRYCOLLECTION as an argument

Performed by the GEOS module

[Note]

This function call will automatically include a bounding box comparison that will make use of any indexes that are available on the geometries.

[Note]

NOTE: this is the "allowable" version that returns a boolean, not an integer.

This method implements the OpenGIS Simple Features Implementation Specification for SQL OGC SPEC s2.1.1.2 //s2.1.13.3 - ST_Intersects(g1, g2 ) --> Not (ST_Disjoint(g1, g2 ))

This method implements the SQL/MM specification: SQL-MM 3: 5.1.27

Examples

SELECT ST_Intersects('POINT(0 0)'::geometry, 'LINESTRING ( 2 0, 0 2 )'::geometry);
 st_intersects
---------------
 f
(1 row)
SELECT ST_Intersects('POINT(0 0)'::geometry, 'LINESTRING ( 0 0, 0 2 )'::geometry);
 st_intersects
---------------
 t
(1 row)
		

See Also

ST_Disjoint