Hello,
I tried Timothy Hales' algorithm in ArcGIS 10.1 for fillind NoData holes in my DEM, but I get the following error message:
Executing: RasterCalculator Con(IsNull("Tecbaco_DEM.tif"), FocalStatistics(Raster, NbrCircle(10, "CELL"), "MEAN"), "Tecbaco_DEM.tif") "C:\Users\HOME\Copy\- WWF\- TECBACO\DEM v.2\Tecbaco_DEM_Fill.tif"
Start Time: Mon Feb 02 19:36:05 2015
Con(IsNull(Raster(r"Tecbaco_DEM.tif")), FocalStatistics(Raster, NbrCircle(10, "CELL"), "MEAN"), Raster(r"Tecbaco_DEM.tif"))
ERROR 000539: Error running expression: rcexec()
Traceback (most recent call last):
File "<expression>", line 1, in <module>
File "<string>", line 5, in rcexec
File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\sa\Functions.py", line 4830, in FocalStatistics
ignore_nodata)
File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\sa\Utils.py", line 47, in swapper
result = wrapper(*args, **kwargs)
File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\sa\Functions.py", line 4824, in wrapper
ignore_nodata)
File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\geoprocessing\_base.py", line 484, in <lambda>
return lambda *args: val(*gp_fixargs(args, True))
RuntimeError: Object: Error in executing tool
Failed to execute (RasterCalculator).
Failed at Mon Feb 02 19:36:05 2015 (Elapsed Time: 0.00 seconds)
I used the following algorithm:
Con(IsNull("Tecbaco_DEM.tif"), FocalStatistics(Raster, NbrCircle(10, "CELL"), "MEAN"), "Tecbaco_DEM.tif")
Do you have any idea why this might be happening?
You should replace "Raster" by your TIFF:
Con(IsNull("Tecbaco_DEM.tif"), FocalStatistics("Tecbaco_DEM.tif", NbrCircle(10, "CELL"), "MEAN"), "Tecbaco_DEM.tif")
Thanks for the quick response. I'm sorry, I did not notice the second "raster" instance. I will try once again and let you know how it goes.
Yep, it worker wonderfully. Thanks for your help!
You're welcome. Glad it worked!
You will have better results if you convert to an Esri grid for both the inputs and the outputs in a folder with no spaces and a shorter file name. In theory you should be able to use any raster, but I notice many of the issues revolve around 'image' rasters which may be multiband and may not play nicely with many of the SA functions
Thanks for the advice. Will do.