[postgis-devel] ST_Voronoi signature changes
strk at keybit.net
Sat Feb 13 09:51:46 PST 2016
On Sat, Feb 13, 2016 at 07:50:06AM -0500, Daniel Baston wrote:
> 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 );
Why not calling the first ST_VoronoiCells ?
(following your aim at making naming more intuitive)
> 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?
I'm ok with a signature change, since no release went out with the
current signature yet. But make sure upgrades are still smooth from
a development snapshot to the next (fill in the *drop* files).
More information about the postgis-devel