[postgis-devel] ST_Rescale issues again
Sandro Santilli
strk at keybit.net
Thu Aug 28 00:57:21 PDT 2014
On Thu, Aug 28, 2014 at 09:56:20AM +0200, Sandro Santilli wrote:
> On Thu, Aug 28, 2014 at 09:53:46AM +0200, Sandro Santilli wrote:
> > I keep getting suprised by ST_Rescale/ST_Resample/etc outputs.
> > What do you think about this.
> >
> >
> > Original table tiles are fully aligned: 10x10 sized, all with scale 1,-1:
> >
> > =# select distinct st_scalex(r), st_scaley(r), st_width(r), st_height(r)
> > => from ( select r from res1 ) f;
> > st_scalex | st_scaley | st_width | st_height
> > -----------+-----------+----------+-----------
> > 1 | -1 | 10 | 10
> > (1 row)
> >
> > Passing each of them through ST_Rescale with values 2.0, -2.0 result in
> > some tiles getting the new scale requested and some not:
> >
> > =# select distinct st_scalex(r), st_scaley(r), st_width(r), st_height(r)
> > => from ( select ST_Rescale(r,2.0,-2.0) r from res1 ) f;
> > st_scalex | st_scaley | st_width | st_height
> > -----------+-----------+----------+-----------
> > 2 | -2 | 5 | 5
> > 1 | -1 | 5 | 5
> > (2 rows)
> >
> > Why is that ?
>
> I shall add that I get this warning 4 times:
>
> NOTICE: Raster has default geotransform. Adjusting metadata for use of GDAL Warp API
> CONTEXT: SQL function "st_rescale" statement 1
>
> And that the deviant tile is a single one over a total of 648 tiles:
>
> count | st_scalex | st_scaley | st_width | st_height
> -------+-----------+-----------+----------+-----------
> 647 | 2 | -2 | 5 | 5
> 1 | 1 | -1 | 5 | 5
> (2 rows)
>
> Should I file a ticket ?
Also, GDAL is "GDAL 1.11.0, released 2014/04/16"
--strk;
() ASCII ribbon campaign -- Keep it simple !
/\ http://strk.keybit.net/rants/ascii_mails.txt
More information about the postgis-devel
mailing list