How the ST_Intersects Geometry Checker works, and what it assumes
ST_Intersects(A, B) is true when the two geometries share at least one point, of any kind: interiors overlapping, a line crossing an area, one geometry inside the other, or two boundaries meeting at a single point. It is the widest of the relationship tests, and the exact opposite of ST_Disjoint. The answer is read from the DE-9IM matrix: it is true when any of the four cells pairing the interiors and boundaries of A and B is not F.
Because it accepts every kind of contact, a true answer often raises the next question: which kind? The table under the verdict lists the other seven relationships for the same pair, so you can see at once whether the geometries touch, cross, overlap or contain one another. To get the shared part itself, use ST_Intersection.
Coordinates are used as written, as PostGIS does for the geometry type, and the two inputs must be in the same coordinate system. The page warns when one input looks like longitude and latitude and the other does not, because an answer across two systems means nothing.
Where this comes up in GIS work
- Checking which features a search box, a buffer or a map viewport should return.
- Testing whether a planned route, cable or pipeline crosses a protected area.
- Finding out why an intersects query returns neighbours that only share a boundary.
- Deciding whether ST_Intersects or a stricter predicate such as ST_Overlaps is the right filter.
A worked example
A line that runs through a square:
A: LINESTRING (-2 3, 6 9)
B: POLYGON ((0 0, 8 0, 8 8, 0 8, 0 0))
ST_Intersects(A, B) = true
DE-9IM matrix: 101FF0212
The line's interior meets the square's interior in a line (the leading 1), so it also crosses the square. Compare POINT (8 8), the square's corner: ST_Intersects is still true, with the matrix F0FFFF212, but only ST_Touches is true alongside it, because the point meets the square's boundary and nothing else.
Using the ST_Intersects Geometry Checker
- Paste the first geometry into Geometry A as WKT, EWKT or GeoJSON, or select Load example.
- Paste the second geometry into Geometry B.
- Select Check ST_Intersects, or press Ctrl + Enter (Cmd + Enter on a Mac).
- Read the verdict, then the list of relationships to see whether they touch, cross, overlap or contain.
- Use ST_Intersection if you need the shared part itself rather than a yes or no.
When the output looks wrong
- Two polygons that only share an edge intersect
- They do, by definition: a shared boundary is a shared point. If neighbours that merely touch should be excluded, add NOT ST_Touches to the condition, or use ST_Overlaps for areas that genuinely overlap.
- The shapes look separate but ST_Intersects is true
- They meet somewhere too small to see at this scale, often a vertex that lands exactly on the other geometry's edge. Move the pointer over the plot to read coordinates, or run ST_Intersection to get the shared part.
- One geometry looks like longitude and latitude and the other does not
- The inputs are almost certainly in two different coordinate systems, so any answer is meaningless. Put both in the same system with ST_Transform before comparing them.
- An empty geometry never intersects anything
- EMPTY has no points, so it cannot share one. ST_Intersects with an empty geometry is false in PostGIS too, and ST_Disjoint is true.
Questions about the ST_Intersects Geometry Checker
What counts as an intersection?
Any shared point at all. Overlapping areas, lines crossing, one geometry inside another and two geometries touching at a single boundary point all intersect. In DE-9IM terms, at least one of the interior and boundary cells shared by A and B is not F.
Is ST_Intersects the opposite of ST_Disjoint?
Yes, exactly. For any two geometries one is true and the other false. PostGIS recommends ST_Intersects in queries because it can use a spatial index, while NOT ST_Intersects (the same as ST_Disjoint) cannot.
Does touching count as intersecting?
Yes. Two parcels that share a boundary, or a point lying on a line, intersect. ST_Touches is the predicate that is true only for that boundary-only case.
Why is ST_Intersects faster in a database than other predicates?
Its first step, comparing bounding boxes, rules out most pairs cheaply, and it can use a GiST index. The exact test only runs for pairs whose boxes overlap. The check here runs on one pair, so speed is not a concern.
Is anything uploaded?
No. Both geometries are processed in your browser.