[postgis-devel] [PostGIS] #903: [raster] ST_Reclass

PostGIS trac at osgeo.org
Sat Apr 9 14:01:44 PDT 2011


#903: [raster] ST_Reclass
----------------------------+-----------------------------------------------
 Reporter:  dustymugs       |       Owner:  dustymugs            
     Type:  task            |      Status:  new                  
 Priority:  medium          |   Milestone:  PostGIS Raster Future
Component:  postgis raster  |     Version:  trunk                
 Keywords:                  |  
----------------------------+-----------------------------------------------

Comment(by dustymugs):

 1. If we're not concerned about supporting versions of PostgreSQL less
 than 8.4, then the VARIADIC parameter of the reclassarg type would be
 perfect with the ROW() function.

 2. I concur with the addition of RANGEMIN and RANGEMAX keywords.  That
 should help with ensuring that all values of a band are accounted for.
 Thanks for reminding me about setting values to the NULL NODATA value.

 I'm thinking of also adding two additional keywords BANDMIN and BANDMAX as
 placeholders for the min and max values returned from ST_MinMax.  So, for
 the example

 min(covmin, 0)-0:0,0-max(covmax, 0):0-255

 the user doesn't have to store covmin and covmax somewhere (in table
 columns or a user-written function with variables) that needs to be passed
 to ST_Reclass.  Rather,

 min(BANDMIN, 0)-0:0,0-max(BANDMAX, 0):0-255

 would have ST_Reclass internally substitute the min and max values from
 ST_MinMax.

 I hope this makes sense.

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