[postgis-tickets] [PostGIS] #2251: [raster ] Rescaling raster	chooses wrong values
    PostGIS 
    trac at osgeo.org
       
    Tue Mar 26 11:30:24 PDT 2013
    
    
  
#2251: [raster ] Rescaling raster chooses wrong values
----------------------+-----------------------------------------------------
 Reporter:  dzwarg    |       Owner:  dustymugs
     Type:  defect    |      Status:  new      
 Priority:  critical  |   Milestone:           
Component:  postgis   |     Version:  2.0.x    
 Keywords:  raster    |  
----------------------+-----------------------------------------------------
 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)
 }}}
-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2251>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
    
    
More information about the postgis-tickets
mailing list