Splits a geometry object and returns the result as a GeometryCollection.
Syntax
geometry ST_Split(geometry input, geometry blade)Parameters
| Parameter | Description |
|---|---|
| input | The geometry object to split. |
| blade | The geometry object used to split input. |
Description
Splits a line object using a MultiPoint, MultiLine, or MultiPolygon object.
Splits a MultiPolygon object using a line object.
Always returns a GeometryCollection.
When
bladeis a MultiPolygon, the function splitsinputalong the boundaries of the MultiPolygon.Theoretically, applying ST_Union to the result of ST_Split returns the original
inputgeometry.
Examples
The following example splits a Polygon using a LineString:
SELECT blade,
ST_Split(input,blade)
from (select ST_MakeEnvelope(0,0,2,2) as input,'LINESTRING(1 -1,1 3)'::geometry as blade) as t;
该文章对您有帮助吗?