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

PostGIS trac at osgeo.org
Tue Apr 19 10:19:00 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 pracine):

 Replying to [comment:14 dustymugs]:
 > Is the 255 in the context of the old band or the new reclassified band?

 Everthing before the colon is always in the context of the old band.
 Everything after is in the context of the new.

 > So, is the 255 a value in the old band reclassified as NULL in the new


 > Or is the 255 a value in the new band that is considered as NULL/NODATA?


 So you can do '0-200:NULL' to reclassify most of the values to nodata.

 It is true that this syntax does not allow you to specify a new nodata
 value for the new raster but I think this is not the role of ST_Reclass
 since we have ST_SetBandNodataValue for that. We could also add your
 nodataval parameter... But still it is convenient to be able to refer to
 the nodata value by 'NULL'.

 There is still the issue when there was no nodata value set in the old
 band and we do not use your nodataval parameter but still, we set some
 values to 'NULL'. Not supporting 'NULL' would solve that. Back to square
 one... Probably your proposition is better then.

 Just make sure we support 'x-y:a'...

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