> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wherobots.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ST_Intersects

Return true if A intersects B. Polymorphic over input type:

* `(Geometry, Geometry)` — topological intersection via JTS.
* `(Geography, Geography)` — topological intersection via S2.
* `(Box2D, Box2D)` — closed-interval bbox intersection on both axes (PostGIS `&&` on `box2d`); edge- and corner-touching boxes count as intersecting. Throws `IllegalArgumentException` on inverted bounds. See [Box2D optimization](#box2d-optimization) below.
* `(Box3D, Box3D)` — closed-interval bbox intersection on all three axes (PostGIS `&&&` on `box3d`). Throws on inverted bounds on any axis.

<img src="https://mintcdn.com/wherobots/fqh3gPDE0J25Lra_/images/sql-functions/ST_Intersects/ST_Intersects_true.svg?fit=max&auto=format&n=fqh3gPDE0J25Lra_&q=85&s=5ae0bf711aa9abd696283ba0eb868e37" alt="ST_Intersects returning true" width="400" height="300" data-path="images/sql-functions/ST_Intersects/ST_Intersects_true.svg" />

<img src="https://mintcdn.com/wherobots/fqh3gPDE0J25Lra_/images/sql-functions/ST_Intersects/ST_Intersects_false.svg?fit=max&auto=format&n=fqh3gPDE0J25Lra_&q=85&s=046a5c455df732048da7be06f03da409" alt="ST_Intersects returning false" width="400" height="300" data-path="images/sql-functions/ST_Intersects/ST_Intersects_false.svg" />

## Signatures

```sql theme={"system"}
ST_Intersects (A: Geometry, B: Geometry)
```

```sql theme={"system"}
ST_Intersects (A: Geography, B: Geography)
```

```sql theme={"system"}
ST_Intersects (A: Box2D, B: Box2D)
```

```sql theme={"system"}
ST_Intersects (A: Box3D, B: Box3D)
```

## Parameters

<ParamField body="A" type="Geometry | Geography | Box2D | Box3D" required>
  The first input. `Box2D` / `Box3D` inputs use closed-interval semantics.
</ParamField>

<ParamField body="B" type="Geometry | Geography | Box2D | Box3D" required>
  The second input, of the same type family as `A`.
</ParamField>

## Return type

<ResponseField type="Boolean">
  `true` if A intersects B.
</ResponseField>

## Example

```sql theme={"system"}
SELECT ST_Intersects(ST_GeomFromWKT('LINESTRING(-43.23456 72.4567,-43.23456 72.4568)'), ST_GeomFromWKT('POINT(-43.23456 72.4567772)'))
```

```
true
```

Box2D example:

```sql theme={"system"}
SELECT ST_Intersects(
    ST_MakeBox2D(ST_Point(0.0, 0.0), ST_Point(10.0, 10.0)),
    ST_MakeBox2D(ST_Point(5.0, 5.0), ST_Point(15.0, 15.0)))
```

```
true
```

For `Box3D` inputs the test covers all three axes — two boxes whose XY footprints overlap but whose Z ranges are disjoint do **not** intersect:

<img src="https://mintcdn.com/wherobots/XpQVzmvmMISOboEb/images/sql-functions/box3d/st_intersects_box3d_true.svg?fit=max&auto=format&n=XpQVzmvmMISOboEb&q=85&s=b9df126b5857056d3d19d22cc36f5590" alt="Box3D ST_Intersects returning true: boxes overlap on all three axes" width="340" height="285" data-path="images/sql-functions/box3d/st_intersects_box3d_true.svg" />

<img src="https://mintcdn.com/wherobots/XpQVzmvmMISOboEb/images/sql-functions/box3d/st_intersects_box3d_false.svg?fit=max&auto=format&n=XpQVzmvmMISOboEb&q=85&s=88fdec3a5fa7738c7f2528d0c1a13091" alt="Box3D ST_Intersects returning false: XY overlaps but Z is disjoint" width="340" height="285" data-path="images/sql-functions/box3d/st_intersects_box3d_false.svg" />

## Box2D optimization

`ST_Intersects(box_col, lit_box)` over a `Box2D` column and a literal `Box2D` is recognized by Sedona's spatial optimizer:

* **Filter pushdown.** When the column is a `Box2D` stored in GeoParquet, the predicate translates to Parquet row-group inequalities on the `xmin` / `ymin` / `xmax` / `ymax` leaves. See [Box2D filter pushdown](/reference/wherobots-db/geometry-data/optimizer#box2d-filter-pushdown).
* **Spatial join.** `ST_Intersects(a, b)` between two `Box2D` columns is planned as a range or broadcast-index join. See [Box2D spatial join](/reference/wherobots-db/geometry-data/optimizer#box2d-spatial-join).
