[postgis-users] St_reclass and no data value

Francois Hugues hugues.francois at irstea.fr
Sat Jan 12 05:23:59 PST 2013


 
Thank you very much Bborie !

I am self trained on the job and sometimes I forget some basic basis...

Hugues.


 

-----Message d'origine-----
De : postgis-users-bounces at lists.osgeo.org [mailto:postgis-users-bounces at lists.osgeo.org] De la part de Bborie Park
Envoyé : vendredi 11 janvier 2013 18:21
À : postgis-users at lists.osgeo.org
Objet : Re: [postgis-users] St_reclass and no data value

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
_______________________________________________
postgis-users mailing list
postgis-users at lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users


More information about the postgis-users mailing list