[postgis-devel] [PostGIS] #1267: [raster] Add manual height/weight support to ST_Resample

PostGIS trac at osgeo.org
Mon Nov 7 12:24:34 PST 2011


#1267: [raster] Add manual height/weight support to ST_Resample
----------------------------+-----------------------------------------------
 Reporter:  serveralex      |       Owner:  dustymugs            
     Type:  enhancement     |      Status:  assigned             
 Priority:  medium          |   Milestone:  PostGIS Raster Future
Component:  postgis raster  |     Version:  trunk                
 Keywords:                  |  
----------------------------+-----------------------------------------------

Comment(by pracine):

 Replying to [comment:5 bnordgren]:
 > Replying to [comment:2 pracine]:
 > > You might want to align a raster to another one in which case you need
 to borrow its scales, its skew and its upperleft corner to determine the
 new grid on which to align the new resampled raster. We offer the
 possibility to borrow them from another raster because they are generally
 cumbersome to write by hand. You may also want to explicitly pass those
 parameters.
 >
 > I agree. The unit of borrowing should be the entire grid definition
 (width, height, and the affine transform to the geopoint). Note that this
 also requires that the target raster "borrow" the SRID, as the affine
 transform is tied to a particular geospatial CRS.

 I don't see the point of providing the width and the height at the same
 time as the affine transform... You are then stretching the raster to the
 footprint of the other one which is not a resampling operation but more
 like a wrapping operation. We decided (long ago) that wrapping would be a
 different function (ST_Wrap) yet to be designed...

 Again the same argument about on-the-fly reprojection... We should not
 reproject on the fly to a new SRID before PostGIS do it itself.
 ST_Resample(raster, ref_raster) should fail with a warning if both SRID
 are different.

 > However, I don't see why it should be necessary to alter the signature
 in order to do this. The user can construct a raster with no bands,
 configure its grid definition to their heart's content, then require that
 the resampling operation respect the grid definition specified in the
 "ref" raster. If they want to resample many sources to a common grid, they
 just keep specifying the same "ref" raster over and over again.

 Sure but this is tedious. We provide functions variants to make the life
 of our users easy so they choose our software!

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