Map Algebra Error

4652
6
06-11-2013 06:06 AM
JimMeuse
New Contributor
I have created a grid by combining several smaller grids; there are a few gaps of NoData along the boundaries of some of the adjacent grids.  I want to use the Raster Calculator to fill in the gaps, and tried the following expression:

Con(IsNull("Mosaic"), FocalStatistics("Mosaic", NbrRectangle(3,3,"CELL"), "MEAN"), "Mosaic")

(which is based on an example I found in this forum).  But I am getting error 000539 "error running expression: rcexec()

Is there something I am missing here?
0 Kudos
6 Replies
Luke_Pinner
MVP Regular Contributor
Your expression works fine for me in ArcGIS 10.1.

What is the filepath of your output raster? I can replicate the "ERROR 000539: Error running expression: rcexec()" exception if I try to write out to a grid with non alphanumeric characters in the filepath.

Can you post the full error message, i.e:
ERROR 000539: Error running expression: rcexec() 
Traceback (most recent call last):
  File "<expression>", line 1, in <module>
  File "<string>", line 8, in rcexec
RuntimeError: ERROR 010240: Could not save raster dataset to C:\WorkSpace\test folder\test* with output format GRID.

0 Kudos
JimMeuse
New Contributor
The file path contains only alphanumeric values.  Error is attached as jpeg.

Thanks.
0 Kudos
Luke_Pinner
MVP Regular Contributor
Sorry, I can't get it to fail.  One suggestion is to open a new ArcMap window, add only the "Mosaic" raster to the TOC then run the raster calculator tool again (by entering all the parameters freshly not by rerunning results from previous sessions).

For future reference, instead of screen grabs, you can copy the result messages as text by right clicking the "Message" entry in the result tree and selecting "Copy".
0 Kudos
JimMeuse
New Contributor
Thanks for taking your time to check it out and your suggestion to copy the result message.

Jim
0 Kudos
DanPatterson_Retired
MVP Emeritus
try shortening the grid name and direct it to a folder rather a gdb
0 Kudos
curtvprice
MVP Esteemed Contributor
Jim,

In the results window, if you right-click the Messages tree you can copy the message text (easier to read!)

- I saw that your path includes a folder name that starts with a number. Avoid using folder names that include special characters (space &, etc) or start with number.

- Be sure the scratch and current workspace are set (for best results, use the same location for both).
0 Kudos