[postgis-users] St_reclass and no data value

Bborie Park bkpark at ucdavis.edu
Fri Jan 11 09:21:09 PST 2013


The problem is that your pixel type 8BUI cannot support a NODATA value
of -9999 as 8BUI only permits a range of 0 - 255.  You could just change
your NODATA value to 255 instead.

-bborie

On 01/11/2013 06:57 AM, Francois Hugues wrote:
> Hello,
> 
> I come from an original rast dem where I want to set pixel to 1/0. I
> think I have to use st_reclass so I tried this :
> 
> select rid, st_reclass(rast, 1, '[0-800):1, [800-10000):0', '8BUI',
> -9999) rast from rasters.dem_aster_fra where rid =10000
> 
> And I don't understand why if I'm looking to st_bandnodatavalue the
> result is 0 (I first tried with 1BB as pixel type and I got the same
> result / st_bandnodatavalue with original table dem_aster_fra throw
> -9999 as result).
> 
> The result for select ST_summarystats(rast) from rasters.dem_aster_fra
> where rid =10000 is :
> "(16384,13049426,796.473754882812,7.65497723237567,774,821)"
> 
> I assume there's something I don't understand with st_reclass... Could
> someone help me please ?
> 
> Hugues.
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
> 

-- 
Bborie Park
Programmer
Center for Vectorborne Diseases
UC Davis
530-752-8380
bkpark at ucdavis.edu


More information about the postgis-users mailing list