[postgis-devel] ST_Rescale vs. ST_Resize
Sandro Santilli
strk at keybit.net
Tue Jul 1 09:10:37 PDT 2014
I implemented automatic resizing of raster tiles in a mapnik plugin
for postgis raster that's under development. The initial implementation
has been using ST_Resize() passing as scale arguments the factor between
the raster scale and the target scale.
Ie, for target scales 0.6, the call was:
ST_Resize(r, ST_ScaleX(r)/0.6, ST_ScaleY(r)/0.6)
That works very nicely, but then I found there's an ST_Rescale function
and tried to use it, to save some calls at the SQL level.
Unfortunately the ST_Rescale version:
ST_Rescale(r, 0.6, -0.6)
Results in visible tile boundaries, subtle gaps between a tile and another,
as shown here: http://strk.keybit.net/tmp/pgrast-cdb-prescale-gaps.png
Is that expected or is it a bug ?
Should the two calls above give the same result or not ?
TIA.
--strk;
() ASCII ribbon campaign -- Keep it simple !
/\ http://strk.keybit.net/rants/ascii_mails.txt
More information about the postgis-devel
mailing list