Hi,
I've got a digital surface model with several false values below zero. So what I'm trying to do is replace all negative values with zero.
I've tried using the followng raster calculator expression:
Con("myraster" > 0, "myraster", 0)
In theory this should keep all values which are >0 and replace all others with 0. However, all I get is an unspecified error message.
I've also tried using the Con Tool itself but the result is the same. Any ideas what I'm doing wrong?
Solved! Go to Solution.
Can you open the Results window and examine the contents of the messages etc. Look for paths with spaces or other unsavory characters, filenames that are too long contain spaces etc and any general information that you can share. The unspecified nature of the error is usually not one of syntax but one of naming conventions and file locations. Also it is a good practice to ensure that there is a space between grid names, operands and spaces. The access and results window should provide a basis for what has or hasn't worked.
Andre,
Try an additional parenthesis ()
Con(("myraster" > 0), "myraster", 0)
Can you open the Results window and examine the contents of the messages etc. Look for paths with spaces or other unsavory characters, filenames that are too long contain spaces etc and any general information that you can share. The unspecified nature of the error is usually not one of syntax but one of naming conventions and file locations. Also it is a good practice to ensure that there is a space between grid names, operands and spaces. The access and results window should provide a basis for what has or hasn't worked.
Thanks, that helped. I've checked all the paths and found the problem. Now it works.
for closure...what was the problem?
A space in the folder name.
Have you since restarted ArcMap? I've received "Error 99999" many times with correct syntax, only for it to work upon restart. For the record, your original syntax is valid (just tested).