[postgis-tickets] [PostGIS] #2555: [raster]: ST_Reclass Working with negative numbers seems broken

PostGIS trac at osgeo.org
Sun Dec 1 19:54:44 PST 2013


#2555: [raster]: ST_Reclass Working with negative numbers seems broken
--------------------+-------------------------------------------------------
 Reporter:  robe    |       Owner:  dustymugs    
     Type:  defect  |      Status:  new          
 Priority:  medium  |   Milestone:  PostGIS 2.0.5
Component:  raster  |     Version:  2.0.x        
 Keywords:          |  
--------------------+-------------------------------------------------------

Comment(by robe):

 for record I was wrong about it not doing anything with negatives.  The
 below actually does what I expect

 {{{
 SELECT ST_Value(ST_Reclass(rast, 1, '[-1000-9000]:[-100-900]',
 '32BF'),1,1) As new, ST_Value(rast,1,1) As orig
 from ch12.tmean limit 10;


 }}}

 works as expected and gives:


 {{{
         new        | orig
 ------------------+------
  23.3999996185303 |  234
  23.6000003814697 |  236
                24 |  240
  24.1000003814697 |  241
  23.3999996185303 |  234
  21.1000003814697 |  211
  20.7999992370605 |  208
              22.5 |  225
  22.2000007629395 |  222
                23 |  230
 }}}


 so it seems the -9000 is too far out.  I have values in -9999 for no data
 value so not sure why that would be illegal

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2555#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-tickets mailing list