/ All posts
- Type mismatch using sign()
I want to turn a DEM into an image only consisting of the values 0 and 1, divided by a height H. I.e. values above H should have the value 1 and all others the value 0. The data type of the source image is int32 stored in 128x128 tiles. I thought to do this with a transform with the following expression
sign( [TILE] - H )
followed with a transform lower limit = 0. The "[TILE] - H" part of the expression seems to work fine. When I enter the sign() function into the expression editor I always get a "sign": type mismatch error when trying to leave the editor with OK. This happened for all destination data types that I tried. I would assume that the data type int8 would be appropriate to store the results of the sign() function: +1, -1, or 0. Where is the problem that I don't see?
OK thanks, this hint worked!