I have a raster of slopes with one band with decimal data type (32BF- 32 bit float) values from 0-90 degrees. I use ST_Reclass to reclasify the values to 8 categories:

ST_Reclass ( raster, 1, '[0-1):0,[1-3]:1,(3-7]:2,(7-12]:3,(12-17]:4,(17-25]:5,(25-35]:6,(35-90]:7','32BF', 0 )

The first category is always empty, returns zero count whatsoever, so my guess is that it only works with the whole numbers. Is there a way to tell the reclass function that I want it to look at my data as they are decimal numbers?


Actually I found the answer after two days of experimenting with st_mapAlgebra. Never start naming the categories with 0. When I pushed the categories one higher, it works without problem. The new class expression is then:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.