"Square" function in Raster Calculator of ArcGIS Pro doesn't work if used with a constant value. I used the expression:
SquareRoot(Square(("CostDist_fromGRUMP_bl_degrees" * 0) 0.004167))
instead of
SquareRoot(Square((0.004167))
to by-pass the problem. Has anybody else had the same issue?
Did you try
It works in ArcGIS Desktop, because I used this function in the past (I
don't use ArcGIS desktop anymore). The prob is with ArcGIS pro.
yes, the raster calculator isn't the same in pro.
A work around, which is quite ugly is to use the raster calculator with an expression
CreateConstantRaster(0.1, "FLOAT")
BUT, you have to switch over to the Environments tab and set the extent and cell size to match of an existing raster before hitting Run.
For example, taking a raster "x", multiplying it by the square of 0.1, then taking the square root
SquareRoot("x" * Square(CreateConstantRaster(0.1, "FLOAT")))
I suspect that you will start using "raster functions" or other approaches since the raster calculator has a slightly different purpose than it did.
Interesting. Thanks Dan. Actually, I thought of generating a constant-value
raster, but then I opted for the even uglier solution I mentioned. And of
course it worked, but I wanted to report the prob to the ESRI guys..
I will put the question up on Beta 2.5 to see if anyone has any comments
Great, thanks
Hi Fabio,
Please update your expression to only have 2 open parentheses and let me know if you were then able to execute your expression successfully within the Raster Calculator.
SquareRoot(Square(0.004167))
Also, please make sure you have both your extent and cellsize set.
Thanks,
Liz