[postgis-devel] [PostGIS] #595: [raster] Add a series of ST_SetValues functions

PostGIS trac at osgeo.org
Tue Sep 4 11:22:14 PDT 2012


#595: [raster] Add a series of ST_SetValues functions
---------------------+------------------------------------------------------
 Reporter:  pracine  |       Owner:  pracine      
     Type:  task     |      Status:  new          
 Priority:  medium   |   Milestone:  PostGIS 2.1.0
Component:  raster   |     Version:  trunk        
 Keywords:  history  |  
---------------------+------------------------------------------------------

Comment(by pracine):

 Why not? I agree that when the pixel size of the second raster is
 significantly smaller than the pixel size of the first, the copied value
 is not really representative and that the main goal of this function is to
 provide a fast way to copy raster to raster (avoiding the complexity of
 determining aggregated value for one pixel) and to be used by
 ST_MapAlgebra which does not work on unaligned rasters...

 Taking the centroid does not change the result when the rasters are
 aligned and it make the function more flexible for other use cases. I
 would just document the fact that using ST_SetValues with raster of
 different pixel size can results in not so representative pixel values.

 If you want to threat the pixel as a polygon, use ST_MapAlgebraFct with a
 special function converting the shape of the pixel to a polygon,
 intersecting with the second raster and offering a series of methods to
 select the pixel value: COUNT, DISTINCT_COUNT, COUNT_MOST_FREQUENT,
 COUNT_LEAST_FREQUENT, MOST_FREQUENT_VALUE, LEAST_FREQUENT_VALUE, MAXIMUM,
 MINIMUM, RANGE, SUM, MEAN, STDDEV, etc... See Objective FV.27 in the
 specs.

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/595#comment:18>
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