Quantcast
Channel: Forums - Geoprocessing
Viewing all articles
Browse latest Browse all 1952

Con tool error: The truth value of a raster is ambiguous

$
0
0
I'm trying to execute the Con statement below in a Python script and keep getting the error: 'The value of the truth raster is ambiguous'. I've read all the postings on this subject and tried every possible combination of parentheses I can think of but the problem persists.

outGrid = Con(((Raster(pSaltmarsh) > 0) & ((Raster(pLuwet) == 5940) or (Raster(pLuwet) == 5942) or (Raster(pLuwet) == 5943) or (Raster(pLuwet) == 5944) or (Raster(pLuwet) == 5955) or (Raster(pLuwet) == 5947) or (Raster(pLuwet) == 5948) or (Raster(pLuwet) == 5949) or (Raster(pLuwet) == 5950) or (Raster(pLuwet) == 5952) or (Raster(pLuwet) == 5958) or (Raster(pLuwet) == 5959) or (Raster(pLuwet) == 259260) or (Raster(pLuwet) == 894516) or (Raster(pLuwet) == 59400) or (Raster(pLuwet) == 59490) or (Raster(pLuwet) == 59500))),pSaltmarsh,pLuwet)

Any help would be much appreciated!

Viewing all articles
Browse latest Browse all 1952

Trending Articles