<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>What speaks against ST_Expand(ST_TileEnvelope ... ?
<div> 
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Gesendet:</b> Mittwoch, 13. November 2019 um 07:06 Uhr<br/>
<b>Von:</b> "Yuri Astrakhan" <yuriastrakhan@gmail.com><br/>
<b>An:</b> "PostGIS Development Discussion" <postgis-devel@lists.osgeo.org><br/>
<b>Betreff:</b> [postgis-devel] Proposal: Adding buffer parameter to ST_TileEnvelope()</div>

<div name="quoted-content">
<div>Would it make sense to add a `buffer` parameter to ST_TileEnvelope(), similar to ST_AsMVTGeom() ? 
<div> </div>

<div>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.</div>

<div> </div>

<div>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.
<div> </div>

<div>Proposed additional signature:</div>

<div> </div>

<div>geometry ST_TileEnvelope(integer tileZoom, integer tileX, integer tileY, integer buffer=0, geometry bounds=...);</div>

<div><br/>
(Would existing method signature without the buffer param conflict if the buffer is added before the existing bounds param? They are of different type.)</div>
</div>
</div>
_______________________________________________ postgis-devel mailing list postgis-devel@lists.osgeo.org <a href="https://lists.osgeo.org/mailman/listinfo/postgis-devel" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-devel</a></div>
</div>
</div>
</div></div></body></html>