[postgis-tickets] [PostGIS] #2911: ST_Rescale changes extent

PostGIS trac at osgeo.org
Thu Aug 28 02:01:44 PDT 2014


#2911: ST_Rescale changes extent
--------------------+-------------------------------------------------------
 Reporter:  strk    |       Owner:  dustymugs    
     Type:  defect  |      Status:  new          
 Priority:  high    |   Milestone:  PostGIS 2.1.4
Component:  raster  |     Version:  2.1.x        
 Keywords:          |  
--------------------+-------------------------------------------------------

Comment(by strk):

 Another view on the matter, showing how origin 0,scaley*height is threated
 specially:
 {{{
 pg21=# select x, y, m.scalex, m.scaley from generate_series(-1, 1) x,
 generate_series(-1, 1) y, ST_AddBand(ST_MakeEmptyRaster(10, 10, x, y, 1,
 -1, 0, 0, 0), 1, '8BUI', 0, 0) r, st_metadata(st_rescale(r,2.0,-2.0)) m;
 NOTICE:  Raster has default geotransform. Adjusting metadata for use of
 GDAL Warp API
 CONTEXT:  SQL function "st_rescale" statement 1
  x  | y  | scalex | scaley
 ----+----+--------+--------
  -1 | -1 |      2 |     -2
   0 | -1 |      2 |     -2
   1 | -1 |      2 |     -2
  -1 |  0 |      2 |     -2
   0 |  0 |      1 |     -1
   1 |  0 |      2 |     -2
  -1 |  1 |      2 |     -2
   0 |  1 |      2 |     -2
   1 |  1 |      2 |     -2
 (9 rows)
 }}}

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2911#comment:2>
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