Quantcast
Channel: Question and Answer » arcpy
Viewing all articles
Browse latest Browse all 767

Why does Raster Calculator (RasterCalculator_sa) give ERROR 000539 in ArcPy?

$
0
0

I am getting a not executed error for a raster calculator. Here is part of the output:

File “C:projectTempFloodAnalysisfloodxsectionanalysis.py”, line
107, in makeSeemless
arcpy.gp.RasterCalculator_sa(Con(IsNull(rasterIn), FocalStatistics(rasterIn,NbrRectangle(3, 3), “MEAN”), rasterIn),
“{0}yrSeemless.img”.format(increment)) File “C:Program Files
(x86)ArcGISDesktop10.2arcpyarcpygeoprocessing_base.py”, line
498, in
return lambda *args: val(*gp_fixargs(args, True)) arcgisscripting.ExecuteError: ERROR 000539: Parsing error SyntaxError:
invalid syntax (line 5) Failed to execute (RasterCalculator).

This code I have setup to put into this calculator is:

def makeSeemless(outputPath, increment, rasterIn):
    arcpy.gp.RasterCalculator_sa(Con(IsNull(rasterIn), FocalStatistics(rasterIn,NbrRectangle(3, 3), "MEAN"), rasterIn), "{0}yrSeemless.img".format(increment))

Viewing all articles
Browse latest Browse all 767

Trending Articles