Skip to main content
Given two shapes A and B, ST_Overlaps(A, B) returns true if the following criteria are met:
  • The shapes share any of the same space — that is, if any point in the set that comprises A is also a member of the set of points that make up B.
  • Neither of the shapes is contained by the other, in the sense.
In other words, ST_Overlaps returns true if the shapes intersect (in the sense), but neither is contained within the other. ST_Overlaps works on the following spatial data types:
ST_Overlaps will attempt to use any available to speed up its operation. Use the prefixed variant _ST_Overlaps if you do not want any spatial indexes to be used.

Examples

The screenshots in these examples were generated using geojson.io, but they are designed to showcase the shapes, not the map. Representing GEOMETRY data in GeoJSON can lead to unexpected results if using geometries with other than 4326 (as shown below).

True

In this example, ST_Overlaps returns true because:
  • There is a Point in the set that comprises Polygon A that is also a member of the set of Points that make up Polygon B.
  • Neither of the shapes is contained by the other, in the sense.
ST_Overlaps - true

False

In this example, ST_Overlaps returns false because:
    • There is not any Point in the set that comprises Polygon A that is also a member of the set of Points that make up Polygon B.
ST_Overlaps - false

See also