PostGIS ST_VoronoiPolygons with a single point

48 Views Asked by At

Working on some geography code in PostGIS, I come across what seems to me to be some odd behaviour for ST_VoronoiPolygons

Returns an empty geometry collection if the input geometry contains only one vertex.

Now in a mathematical sense with an infinite domain, I could see that this makes sense (the tessellation is a single component which is the entire space so has no boundary), but this function has an idea of an "envelope" (which by default is a bit larger than the bounding box of the input vertices, or can be specified by the caller) and the output Voronoi polygons are truncated to this envelope, so are always finite in extent. Given this, I am puzzled as to why a single-vertex input does not return the polygon of the envelope.

I'd imagine there's some historical (or standard based) reason behind this curio, could anyone enlighten me?

1

There are 1 best solutions below

0
jjg On

I think I worked it out: there is an envelope added to the results, but that envelope is "some percentage larger than the bounding box", which in the case of a point would again be just a point.