[postgis-devel] Proposal: Adding buffer parameter to ST_TileEnvelope()

Yuri Astrakhan yuriastrakhan at gmail.com
Tue Nov 12 22:06:20 PST 2019


Would it make sense to add a `buffer` parameter to ST_TileEnvelope(),
similar to ST_AsMVTGeom() ?

To my understanding, ST_TileEnvelope common use case is to create a bbox
filter -- to get just the relevant data before packaging it with
ST_AsMVT().  This works well for the line and polygon geometries, but when
dealing with point data, e.g. city names, one has to increase that bbox by
a significant margin (e.g. half of the tile size) in order to capture
labels from the neighboring tiles and prevent label clipping.

I think this use case is common enough to add buffer parameter to
ST_TileEnvelope - where it would increase the bbox size by the the
given distance in tile coordinate space.

Proposed additional signature:

geometry ST_TileEnvelope(integer tileZoom, integer tileX, integer tileY,
integer buffer=0, geometry bounds=...);

(Would existing method signature without the buffer param conflict if the
buffer is added before the existing bounds param? They are of different
type.)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20191113/f9bf6a64/attachment.html>


More information about the postgis-devel mailing list