<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Nov 13, 2019, at 8:22 AM, Yuri Astrakhan <<a href="mailto:yuriastrakhan@gmail.com" class="">yuriastrakhan@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Paul, I was thinking of using the same definitions as in ST_AsMVTGeom():<div class=""><br class=""></div><div class="">* buffer is the buffer distance in tile coordinate space to optionally clip geometries.<br class=""></div><div class=""><br class=""></div><div class="">So the buffer would be in the tile's units, and depend on the zoom level.</div><div class="">I suspect we have to add extent parameter too, rather than use default 4096.</div></div></div></blockquote><div><br class=""></div><div>Yeah, that’s what I thought… it gets uglier and uglier, no?</div><div><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><br class=""></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Nov 13, 2019 at 9:14 AM Paul Ramsey <<a href="mailto:pramsey@cleverelephant.ca" class="">pramsey@cleverelephant.ca</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Buffer in what units?<br class="">
Would you really buffer, say, a tile that is a quarter of the earth, by 100 meters? Buffering tiles is to make rendering work better, so the buffers will be relative to the expected widest applied style/marker.<br class="">
If in “pixels”, what would be the expected number of pixels in a tile? In proportion of the tile? 1/10 of a tile? 1/20?<br class="">
P.<br class="">
<br class="">
> On Nov 13, 2019, at 12:06 AM, Yuri Astrakhan <<a href="mailto:yuriastrakhan@gmail.com" target="_blank" class="">yuriastrakhan@gmail.com</a>> wrote:<br class="">
> <br class="">
> Would it make sense to add a `buffer` parameter to ST_TileEnvelope(), similar to ST_AsMVTGeom() ? <br class="">
> <br class="">
> 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.<br class="">
> <br class="">
> 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.<br class="">
> <br class="">
> Proposed additional signature:<br class="">
> <br class="">
> geometry ST_TileEnvelope(integer tileZoom, integer tileX, integer tileY, integer buffer=0, geometry bounds=...);<br class="">
> <br class="">
> (Would existing method signature without the buffer param conflict if the buffer is added before the existing bounds param? They are of different type.)<br class="">
> _______________________________________________<br class="">
> postgis-devel mailing list<br class="">
> <a href="mailto:postgis-devel@lists.osgeo.org" target="_blank" class="">postgis-devel@lists.osgeo.org</a><br class="">
> <a href="https://lists.osgeo.org/mailman/listinfo/postgis-devel" rel="noreferrer" target="_blank" class="">https://lists.osgeo.org/mailman/listinfo/postgis-devel</a><br class="">
<br class="">
_______________________________________________<br class="">
postgis-devel mailing list<br class="">
<a href="mailto:postgis-devel@lists.osgeo.org" target="_blank" class="">postgis-devel@lists.osgeo.org</a><br class="">
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-devel" rel="noreferrer" target="_blank" class="">https://lists.osgeo.org/mailman/listinfo/postgis-devel</a></blockquote></div>
_______________________________________________<br class="">postgis-devel mailing list<br class=""><a href="mailto:postgis-devel@lists.osgeo.org" class="">postgis-devel@lists.osgeo.org</a><br class="">https://lists.osgeo.org/mailman/listinfo/postgis-devel</div></blockquote></div><br class=""></body></html>