[postgis-devel] ST_Voronoi signature changes

Daniel Baston dbaston at gmail.com
Sat Feb 13 04:50:06 PST 2016

I'd like to propose some changes to signature for ST_Voronoi, which I'll
implement if there is general agreement.

Currently, the signature closely maps the GEOS CAPI:

ST_Voronoi( g1 geometry , clip geometry , tolerance float8 ,
return_polygons boolean );

I'd replace it with two functions:

ST_Voronoi( g1 geometry , tolerance float8, extend_to geometry );
ST_VoronoiLines( g1 geometry , tolerance float8, extend_to geometry );

The idea here is to:

- reduce the number of parameters.  "return_polygons" effects a complete
change in behavior, which isn't going to change dynamically by the value of
a datum (hard to see a need for "if fsa = K7L return polygons, otherwise
return lines").  Making this a separate function simplifies usage.
- put the tolerance parameter before the clip parameter, on the expectation
that tolerance is the most likely parameter to be changed and not everyone
is familiar with keyword arguments, and passing NULL is ugly
- rename "clip" to "extend_to", since the only effect of supplying a value
here can be to make the diagram's extent larger, not smaller.

Any downsides to this?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20160213/e6ba225a/attachment.html>

More information about the postgis-devel mailing list