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

PostGIS trac at osgeo.org
Fri Nov 4 17:00:11 PDT 2011


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

  * type:  defect => enhancement
  * milestone:  PostGIS 2.0.0 => PostGIS Raster Future


Comment:

 The problem is that specifying the width/height is exclusive to that of
 the X and Y scales.  So, for ST_Resample(raster, reference_raster), should
 the reference raster's scales be used or the dimensions?  The assumption
 that you're making about the resulting raster having the exact same
 parameters as the reference raster is incorrect if the two rasters are
 different (such as where the extent of one is larger than that of the
 other).

 Using the reference raster's scale makes sense for ST_Resample(raster,
 reference_raster) as the default instead of the width and height because
 the resampled raster has the same alignment with the reference raster.
 This permits followup processing using a two raster mapalgebra function.

 I'll add the options of specify a resampled raster's width/height to the
 ST_Resample
 variants.  ST_Resample for a raster and a reference raster may need an
 additional flag indicating whether or not to use scales or width/height.

 So, instead of
 {{{
 CREATE OR REPLACE FUNCTION st_resample(
 rast raster,
 ref raster,
 algorithm text DEFAULT 'NearestNeighbour',
 maxerr double precision DEFAULT 0.125
 )
 }}}

 add

 {{{
 CREATE OR REPLACE FUNCTION st_resample(
 rast raster,
 ref raster,
 algorithm text DEFAULT 'NearestNeighbour',
 usedimensions boolean DEFAULT FALSE,
 maxerr double precision DEFAULT 0.125
 )
 }}}

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