<div dir="auto">Thanks, but per later email, it seems percentage growth in the target srid should cover all such complexities, without the need to know tile extent.<div dir="auto"><br></div><div dir="auto">Calling it margin sounds good to me.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Nov 13, 2019, 13:24  <<a href="mailto:rmrodriguez@carto.com">rmrodriguez@carto.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wed, Nov 13, 2019 at 4:17 PM Yuri Astrakhan <<a href="mailto:yuriastrakhan@gmail.com" target="_blank" rel="noreferrer">yuriastrakhan@gmail.com</a>> wrote:<br>
<br>
> My understanding is that for a complete tiles support one always has to deal with a common set of tile params --  z, x, y, extent, buffer, srid. Those define pretty much everything there is to define about most tiles I have seen. I agree that having two params rather than just one is less ideal, and I haven't seen anyone using non-4096 extent yet, but we already support it in make geom, so extent should be defaulted to 4096 for consistency. Buffer should default to 0 in makeTile, whereas in geometry existing 256 default seems reasonable.<br>
<br>
CARTO uses a configurable extent for MVTs, for example CartoVL uses<br>
2048 but you can pass whatever you want to the map configuration and<br>
it'll deal with it nicely. We aren't using `ST_TileEnvelope` so I<br>
haven't paid much attention to it for now, and use ST_Expand over the<br>
tile bbox. The tricky thing is that the extra size added needs to<br>
depend both on the resolution (zoom level) and the buffersize and I'm<br>
not sure how to expose that without exposing too much about the<br>
implementation. I guess that something like accepting a number N and<br>
the function would expand the tile N * the tile resolution.<br>
<br>
To cover this case, I think it'd be better to have a<br>
`ST_TileResolution(z integer)` and you can do it yourself. Following<br>
your example:<br>
{{{<br>
ST_Expand(ST_TileEnvelope(x,y,z), ST_TileResolution(z) / :extent * :buffer)<br>
}}}<br>
Right?<br>
<br>
-- <br>
Raúl Marín Rodríguez<br>
<a href="http://carto.com" rel="noreferrer noreferrer" target="_blank">carto.com</a><br>
_______________________________________________<br>
postgis-devel mailing list<br>
<a href="mailto:postgis-devel@lists.osgeo.org" target="_blank" rel="noreferrer">postgis-devel@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-devel" rel="noreferrer noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-devel</a></blockquote></div>