--- /dev/null
+Style1;POLYGON((-110 43.3333333333333,-110 270,100.5 270,59.3478260869565 132.826086956522,36.8181818181818 92.2727272727273,-110 43.3333333333333))\r
+Style2;POLYGON((55 -90,-110 -90,-110 43.3333333333333,36.8181818181818 92.2727272727273,55 79.2857142857143,55 -90))\r
+Style3;POLYGON((230 47.5,230 -20.7142857142857,55 79.2857142857143,36.8181818181818 92.2727272727273,59.3478260869565 132.826086956522,230 47.5))\r
+Style4;POLYGON((230 -20.7142857142857,230 -90,55 -90,55 79.2857142857143,230 -20.7142857142857))\r
+Style5;POLYGON((100.5 270,230 270,230 47.5,59.3478260869565 132.826086956522,100.5 270))\r
+Style1-thinline;MULTIPOINT (50 30, 60 30, 100 100,10 150, 110 120)\r
<title>Description</title>
<para>
- ST_Voronoi computes a two-dimensional Voronoi diagram from the vertices of
+ ST_Voronoi computes a two-dimensional <ulink url="https://en.wikipedia.org/wiki/Voronoi_diagram">Voronoi diagram</ulink> from the vertices of
the supplied geometry. By default, the result will be a GeometryCollection of
Polygons that covers an envelope larger than the extent of the input vertices.
</para>
<para>Availability: 2.3.0 - requires GEOS >= 3.5.0.</para>
</refsection>
+
+ <!-- Examples -->
+ <refsection>
+ <title>Examples</title>
+ <informaltable>
+ <tgroup cols="1">
+ <tbody>
+ <row>
+ <entry>
+ <para><informalfigure>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/st_voronoi01.png" />
+ </imageobject>
+ <caption><para>Points overlaid on top of voronoi diagram</para></caption>
+ </mediaobject>
+ </informalfigure>
+ <programlisting>SELECT
+ ST_Voronoi(geom) As geom
+FROM (SELECT 'MULTIPOINT (50 30, 60 30, 100 100,10 150, 110 120)'::geometry As geom ) As g;</programlisting>
+<screen> -- ST_AsText output
+GEOMETRYCOLLECTION(POLYGON((-110 43.3333333333333,-110 270,100.5 270,59.3478260869565 132.826086956522,36.8181818181818 92.2727272727273,-110 43.3333333333333)),
+POLYGON((55 -90,-110 -90,-110 43.3333333333333,36.8181818181818 92.2727272727273,55 79.2857142857143,55 -90)),
+POLYGON((230 47.5,230 -20.7142857142857,55 79.2857142857143,36.8181818181818 92.2727272727273,59.3478260869565 132.826086956522,230 47.5)),POLYGON((230 -20.7142857142857,230 -90,55 -90,55 79.2857142857143,230 -20.7142857142857)),
+POLYGON((100.5 270,230 270,230 47.5,59.3478260869565 132.826086956522,100.5 270)))
+</screen>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry><para><informalfigure>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/st_voronoi02.png" />
+ </imageobject>
+ <caption><para>Voronoi with tolerance of 30 units</para></caption>
+ </mediaobject>
+ </informalfigure>
+ <programlisting>SELECT ST_Voronoi(geom, null,30) As geom
+FROM (SELECT 'MULTIPOINT (50 30, 60 30, 100 100,10 150, 110 120)'::geometry As geom ) As g;</programlisting>
+<screen> -- ST_AsText output
+GEOMETRYCOLLECTION(POLYGON((-110 43.3333333333333,-110 270,100.5 270,59.3478260869565 132.826086956522,36.8181818181818 92.2727272727273,-110 43.3333333333333)),
+POLYGON((230 47.5,230 -45.7142857142858,36.8181818181818 92.2727272727273,59.3478260869565 132.826086956522,230 47.5)),POLYGON((230 -45.7142857142858,230 -90,-110 -90,-110 43.3333333333333,36.8181818181818 92.2727272727273,230 -45.7142857142858)),
+POLYGON((100.5 270,230 270,230 47.5,59.3478260869565 132.826086956522,100.5 270)))
+</screen>
+ </para></entry>
+ </row>
+ <row>
+ <entry><para><informalfigure>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/st_voronoi03.png" />
+ </imageobject>
+ <caption><para>Voronoi with tolerance of 30 units as multilinestring</para></caption>
+ </mediaobject>
+ </informalfigure>
+ <programlisting>SELECT ST_Voronoi(geom, null,30,false) As geom
+FROM (SELECT 'MULTIPOINT (50 30, 60 30, 100 100,10 150, 110 120)'::geometry As geom ) As g</programlisting>
+<screen> -- ST_AsText output
+MULTILINESTRING((135.555555555556 270,36.8181818181818 92.2727272727273),(36.8181818181818 92.2727272727273,-110 43.3333333333333),(230 -45.7142857142858,36.8181818181818 92.2727272727273))
+</screen>
+ </para></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ </refsection>
<!-- Optionally add a "See Also" section -->
<refsection>