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

PostGIS trac at osgeo.org
Tue Apr 19 08:49:06 PDT 2011


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

Comment(by dustymugs):

 The reason I added the nodata parameter is that when the new band is
 created (old band -> reclass -> new band), the attributes hasnodata and
 nodataval of the new rt_band can be assigned.  Without that assignment,
 setting the new band's pixel value to NULL is ambiguous.

 As for your example...

 ST_Reclass(rast, 1, '0-100:1-10, 101-500:11-150,501 - 10000: 151-254, 255:
 NULL', '8BUI')

 I'm assuming that the format for "255:NULL" is different from "0-100:1-10"
 and does not conform to rangefrom:rangeto.  Is this correct?  And that
 "255:NULL" means "The value 255 is the NODATA value for the output band"?
 If so, isn't this a bit confusing?

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