<div dir="ltr">ST_Resize and ST_Rescale may give different answers as they're operating on two different components of the raster. ST_Resize uses the desired output width/height to determine the output scaleX/scaleY. ST_Resample uses the desired scaleX/scaleY to determine the output width/height.<div>

<br></div><div>As for the tile to tile gap, I seem to recall that robe experienced a similar issue several years ago. I'll see if I can test a simple dataset.</div><div><br></div><div>-bborie</div></div><div class="gmail_extra">

<br><br><div class="gmail_quote">On Tue, Jul 1, 2014 at 9:10 AM, Sandro Santilli <span dir="ltr"><<a href="mailto:strk@keybit.net" target="_blank">strk@keybit.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

I implemented automatic resizing of raster tiles in a mapnik plugin<br>
for postgis raster that's under development. The initial implementation<br>
has been using ST_Resize() passing as scale arguments the factor between<br>
the raster scale and the target scale.<br>
<br>
Ie, for target scales 0.6, the call was:<br>
<br>
 ST_Resize(r, ST_ScaleX(r)/0.6, ST_ScaleY(r)/0.6)<br>
<br>
That works very nicely, but then I found there's an ST_Rescale function<br>
and tried to use it, to save some calls at the SQL level.<br>
<br>
Unfortunately the ST_Rescale version:<br>
<br>
 ST_Rescale(r, 0.6, -0.6)<br>
<br>
Results in visible tile boundaries, subtle gaps between a tile and another,<br>
as shown here: <a href="http://strk.keybit.net/tmp/pgrast-cdb-prescale-gaps.png" target="_blank">http://strk.keybit.net/tmp/pgrast-cdb-prescale-gaps.png</a><br>
<br>
Is that expected or is it a bug ?<br>
Should the two calls above give the same result or not ?<br>
<br>
TIA.<br>
<br>
--strk;<br>
<br>
 ()  ASCII ribbon campaign  --  Keep it simple !<br>
 /\  <a href="http://strk.keybit.net/rants/ascii_mails.txt" target="_blank">http://strk.keybit.net/rants/ascii_mails.txt</a><br>
_______________________________________________<br>
postgis-devel mailing list<br>
<a href="mailto:postgis-devel@lists.osgeo.org">postgis-devel@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel</a><br>
</blockquote></div><br></div>