根據提供的Geometry對象的頂點計算二維Voronoi圖,并以MultiLineString形式返回Voronoi圖中單元之間的邊界。

語法

geometry  ST_VoronoiLines(geometry  g1, float  tolerance, geometry  extend_to);

參數

參數名稱 描述
g1 目標Geometry對象。
tolerance 容差,默認為0.0。若兩點間距小于該值,則視為重合點。通過提供非零容差距離可以提高算法的魯棒性。
extend_to 擴展圖形,默認為null,代表以輸入幾何的邊界框在每個方向上擴展了約50%作為擴展圖形。如果設置了該值,Voronoi圖將擴展到覆蓋該值的外包框的范圍,除非提供擴展圖形的外包框小于默認值。

描述

  • 如果輸入幾何為null,則返回null。
  • 如果輸入幾何只包含一個頂點,則返回一個空的GeometryCollection對象。
  • 如果extend_to值的外包框面積為零,則返回一個空的GeometryCollection對象。

示例

默認調用:
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;
1