ST_VoronoiLines
Updated at:
Computes a two-dimensional Voronoi diagram from the vertices of a geometry object and returns the boundaries between cells as a MultiLineString.
Syntax
geometry ST_VoronoiLines(geometry g1, float tolerance, geometry extend_to);Parameters
| Parameter | Description |
|---|---|
| g1 | The input geometry object. |
| tolerance | (Optional) The distance within which two vertices are treated as coincident. A non-zero value improves algorithm robustness. Default: 0.0. |
| extend_to | (Optional) The envelope to extend the Voronoi diagram to cover. If NULL, the diagram extends to a bounding box expanded by approximately 50% in each direction. If the specified envelope is smaller than the default, the default is used. Default: NULL. |
Description
Returns NULL if the input geometry is NULL. Returns an empty GeometryCollection if the input geometry contains only one vertex, or if the area of the extend_to envelope is zero.
Example
Process a geometry object using default parameter settings.
SELECT ST_VoronoiLines(g), g
FROM (
SELECT ST_Buffer('LINESTRING(0 0,3 0,3 3)'::geometry, 1, 'join=mitre endcap=square') AS g
) AS t;
Is this page helpful?