Skip to content
πŸŽ‰ SedonaDB 0.4.0 is out now! πŸ—ΊοΈ Python DataFrame API, R dplyr, Geography support & GPU-accelerated spatial joins. Read the release blog β†’

ST_Intersection

Introduction: Return the intersection geometry of A and B

ST_Intersection

Format: ST_Intersection (A:geometry, B:geometry)

Return type: Geometry

Note

If you encounter a TopologyException with the message "found non-noded intersection", this is a known issue with the legacy overlay implementation in JTS. The OverlayNG algorithm resolves this. To enable it, add the following JVM flag:

-Djts.overlay=ng

SQL example:

SELECT ST_Intersection(polygondf.countyshape, polygondf.countyshape)
FROM polygondf