Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

simple Raster Calculator question

$
0
0
hi, I'm completely new to Python and I'm just trying to run a basic Raster Calculator operation, just pulling out cells below a certain elevation. The code appears to run just fine but in my output, all the cells have a zero value, i.e. there are no cells with a value of "1" that satisfy the selection. I know this is not the case. Just trying to figure out what's wrong. Really appreciate any help...here's my code:

Code:

>>> import arcpy
>>> from arcpy import env
>>> from arcpy.sa import *
>>> arcpy.CheckOutExtension("Spatial")
>>> env.workspace = "c:/stuff/SeaLevelRiseAdaptation/10YearStepRasters/Hampton"
>>> env.cellSize = 3.28
>>> env.extent = "MyElevation"
>>> env.mask = "MyElevation"
>>> arcpy.gp.RasterCalculator_sa("MyElevation" < 2.22,"C:/stuff/SeaLevelRiseAdaptation/10YearStepRasters/Hampton/Highest/2052_zone1")
<geoprocessing server result object object at 0x257BFF20>

Thanks much!

Viewing all articles
Browse latest Browse all 2485

Latest Images

Trending Articles



Latest Images