Was this helpful?
Intersection
INTERSECTION(g1 Geometry, g2 Geometry)
Alias: ST_INTERSECTION
Returns an object that covers the area shared by both g1 and g2.
Result type: geometry
Example:
SELECT ASTEXT(INTERSECTION(POLYFROMTEXT('POLYGON((0 0,10 0,5 10,0 0))'),POLYFROMTEXT('POLYGON((0 10,5 10,2.5 0,0 10))')));
--------------------------------
col1
--------------------------------
POLYGON ((1.6666666666666667 3.333333333333333, 5 10, 2.5 0, 1.6666666666666667 3.333333333333333))
--------------------------------
Last modified date: 12/14/2023