[postgis-devel] [PostGIS] #1293: ST_Resize to resize raster tiles

PostGIS trac at osgeo.org
Mon Nov 14 07:44:23 PST 2011


#1293: ST_Resize to resize raster tiles
----------------------------+-----------------------------------------------
 Reporter:  robe            |       Owner:  pracine              
     Type:  enhancement     |      Status:  new                  
 Priority:  medium          |   Milestone:  PostGIS Raster Future
Component:  postgis raster  |     Version:  trunk                
 Keywords:                  |  
----------------------------+-----------------------------------------------

Comment(by dustymugs):

 ST_Resize would use the same underlying function calls as gdal_translate.
 ST_Rescale (ST_Resample) makes use the of the same underlying function
 call as gdalwarp.  To use ST_Resample, the raster must have a SRID.  I ran
 some basic tests on random pictures I had lying around (no spatial
 reference) using gdalwarp (to test for behavior) and as expected returned
 an error.

 By the looks of it, gdal_translate will resize any image for you
 regardless of spatial reference.

 So for one of my random pictures

 {{{
 gdal_translate -of png outsize 25% 25% 0884Parkfl\ copy.jpg TEST.PNG
 }}}

 gdal_translate works.

 {{{
 gdalwarp -ts 1000 1000 0884Parkfl\ copy.jpg test.tif
 }}}

 gdalwarp doesn't.  Error given is:

 {{{
 ERROR 1: Unable to compute a transformation between pixel/line
 and georeferenced coordinates for 0884Parkfl copy.jpg.
 There is no affine transformation and no GCPs.
 }}}

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1293#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-devel mailing list