Con statement renders one coloured square instead of "false" raster.

1190
2
Jump to solution
04-17-2012 01:47 AM
RasmusErlandsson
New Contributor II
I have a layer were some pixel values are wrong and i want to set them to a value close to zero by using a raster mask. I have succesfully used the Con-statement before but this time I only get a single coloured square which does not make sense.

"antireflex" is my binary conditional raster. Where this layer is = 1 i want the value in my output to be set to 0.00001

When this condition is not met, I want the output cell to have the same value as the "false raster".

When I run this, the result is a black square with the value of 0.00001 every where. It seemse like the spatial analyst does not care about the conditional statement at all.

I attach a picture with my input window, and screen shot from the result. The black square is transparent, reveling the circle which is the "false raster". The coral coloured shape is the "antireflex" binary conditional raster.

If some one could please help me and explain why I do not get the output I want, I will be forever gratefull!

/Rasmus
0 Kudos
1 Solution

Accepted Solutions
RasmusErlandsson
New Contributor II
Thank you for your answer! I finally managed to solve the problem though. By cutting my contrast layer to the boundaries of my "false" layer, and ad pixels with the value of 0 to fill out the area, i managed to get it to work.

It does not explain the weird behaviour, but it solved my problem.

View solution in original post

0 Kudos
2 Replies
curtvprice
MVP Esteemed Contributor
I'd check your environment - cell size, mask, extent, snap raster - and avoid any projecting-on-the-fly, which can really cause problems with your raster environment setup.
0 Kudos
RasmusErlandsson
New Contributor II
Thank you for your answer! I finally managed to solve the problem though. By cutting my contrast layer to the boundaries of my "false" layer, and ad pixels with the value of 0 to fill out the area, i managed to get it to work.

It does not explain the weird behaviour, but it solved my problem.
0 Kudos