ST_INTERSECTION
返回两个 GEOMETRY 对象的共享部分。
此函数仅支持 GEOMETRY 值。
语法
ST_INTERSECTION(<geometry1>, <geometry2>)
参数
返回类型
GEOMETRY。
示例
SELECT ST_ASWKT(ST_INTERSECTION(TO_GEOMETRY('LINESTRING(0 0, 1 1)'), TO_GEOMETRY('LINESTRING(0 0, 1 1)')));
╭─────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ st_aswkt(st_intersection(to_geometry('LINESTRING(0 0, 1 1)'), to_geometry('LINESTRING(0 0, 1 1)'))) │
├─────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ LINESTRING(0 0,1 1) │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────╯