Description
The ST_Intersection
function is a geometry (point, line, or curve) common
in two geometry objects (such as lines, curves, planes, and surfaces). It returns the
geometry consisting of direct positions that lie in both specified geometries.
Syntax
ST_Intersection(WritableGeometry geometry1, WritableGeometry geometry2)
Parameters
Parameter |
Type |
Description |
geometry1
|
WritableGeometry |
The first instance of a WritableGeometry. |
geometry2
|
WritableGeometry |
The second instance of a WritableGeometry. |
Return Values
Return Type |
Description |
WritableGeometry |
The geometry formed from the direct positions that are common to both input
geometries. |
Examples
SELECT ST_Intersection(ST_GeomFromWKT(t1.geometry,'epsg:4267'), ST_GeomFromWKT(t2.geometry,'epsg:4267'))
FROM table1 t1, table2 t2;