Closed janchytry closed 4 years ago
("slope@1" > (6.94*0.85+((max("slope@1")-min("slope@1")))/4))*1
@JanChytry please attach sample data.
Confirmed on the same platform and as well on Windows.
Confirmed on Archlinux, I take a look.
Hi @JanChytry,
Actually, the min
and max
functions in the raster calculator need two rasters in parameter, but the dialog window was allowing you to use only one parameter, leading to a segmentation fault.
It has been fixed on master with https://github.com/qgis/QGIS/pull/37273.
But unfortunately, you won't be able to use the ("slope@1" > (6.94*0.85+((max("slope@1")-min("slope@1")))/4))*1
expression.
It has been fixed on master with #37273.
@pblottiere so we should close this, correct?
But unfortunately, you won't be able to use the
("slope@1" > (6.94*0.85+((max("slope@1")-min("slope@1")))/4))*1
expression.
why?
so we should close this, correct?
Yes the segfault is fixed.
why?
Because the min/max functions don't return the minimum/maximum value within a band, but it seems that's what @JanChytry would like to do.
don't return the minimum/maximum value within a band
hummm from a user point of view is a bit counter intuitive, what that functions return then?
hummm from a user point of view is a bit counter intuitive, what that functions return then?
them min or max pixel by pixel between two rasters but not the absolute min or max for a band. Min and Max are (now explicitly) binary operators
Hey, I am on Linux Mint 19.2 Cinnamon using QGIS 3.10 LTR apt package. Every time I use the native raster calculator with an expression, such as the following:
("slope@1" > (6.94*0.85+((max("slope@1")-min("slope@1")))/4))*1
it crashes the whole QGIS without any message.The expression is valid as well as the raster layer I'm using. I suspect there is a problem with min/max functions, however, not sure about it, and not sure which other functions might be involved.
The expression:
("slope@1" > (6.94*0.85))*1
returned a valid result.I reproduced the same issue on the 3.12 version.
I launched QGIS 3.12 through the console and captured this log on the crash: