id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc 2251,[raster ] Rescaling raster chooses wrong values,dzwarg,Bborie Park,"Using a test raster with 1 band, 8BUI, rescale uses the wrong scale factor to rescale the raster. The raster with id=1 was created with {{{ select ST_AddBand(ST_MakeEmptyRaster(10,10,0,0,1,-1,0,0,0), '8BUI'::text, 1); }}} Running rescale works on rasters that are not positioned on the origin, but the (0,0) upperleftx, upperlefty raster is scaled by the wrong factor. {{{ raster=# select id,st_metadata(rast), st_metadata(st_rescale(rast, 2, -2, 'NearestNeighbor'::text)) from test order by id; id | st_metadata | st_metadata ----+-----------------------------+--------------------------- 1 | (0,0,10,10,1,-1,0,0,0,1) | (0,0,50,50,1,-1,0,0,0,1) }}} ",defect,closed,critical,PostGIS 2.1.0,raster,master,fixed,,