Select to view content in your preferred language

Need help with Python Map Algebra

374
0
05-08-2010 04:36 PM
curtvprice
MVP Alum
[INDENT]CatRaster = Int(CreateRandomRaster("#","100","0 0 10000 10000") * 5)
tmpRaster1 = IsNull(CatRaster)
tmpRaster2 = Con(CatRaster == 0,100,0)
tmpRaster3 = Con(tmpRaster1 == 1,0,tmpRaster2)[/INDENT]

Lines 1-3 above work, but the last one fails with the message:

[INDENT]RuntimeError: ERROR 000732: Input Raster: Dataset # does not exist or is not supported[/INDENT]

In desperation, I tried:

[INDENT]tmpRaster3 = Con(Raster(tmpRaster1) == 1,0,Raster(tmpRaster2))[/INDENT]

but, I was disappointed again:

[INDENT]TypeError: expected a raster or layer name[/INDENT]


Any ideas?

ArcGIS Pre-Release 10.0.0.2348
0 Kudos
0 Replies