[postgis-users] St_reclass and no data value

Francois Hugues hugues.francois at irstea.fr
Fri Jan 11 06:57:31 PST 2013


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.


More information about the postgis-users mailing list