1

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?

1 Answer 1

1

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:

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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