"Depression Evaluation" Error 010316

3325
6
06-08-2016 08:20 AM
PeterHaas
New Contributor

I am running Depression Evaluation in ArchHydro (AchGIS 10.4) and keep getting the following error:

System.Runtime.InteropServices.COMException (0x80041098):

ERROR 010316: Unable to open the input raster: C:\USERS\PMH\APPDATA\LOCAL\TEMP\ARCF98B\AH2016~4\G_G2432

ERROR 010067: Error in executing grid expression.

ERROR 010218: Could not reference the raster dataset.

   at ESRI.ArcGIS.SpatialAnalyst.RasterConditionalOpClass.Con(IGeoDataset ConditionalRaster, IGeoDataset TrueRaster, Object& FalseRaster)

   at ESRI.APWR.ApHydro.ArcHydroOp.DepressionEvaluation(ApProgworkMgr& apProgMgr, String configNodeName, ApLayers apLayers, Double zUnitFactor, Int32 debug, ITrackCancel& trackcancel, IGPMessages& messages, String& exMessage) in C:\Builds\HydroSolutions\10.4_ArcHydro\Sources\ArcHydroTools\src\ApHydro\ArcHydroOp.vb:line 58174

Failed to execute (DepressionEvaluation).

I have cleared out the TEMP folders, make the directory "AH2016~4" and none of that works.

0 Kudos
6 Replies
DanPatterson_Retired
MVP Emeritus

if the results are grids/rasters, you should be working in folders with no spaces or other unsavory characters, try your inputs and outputs to simple folder structures, when things go wrong with issues such as this.

PeterHaas
New Contributor

Thank you. I did do that, i even got rid of all numbers in the file and folder structure. An since this location is generated within the programs it confuses me that it is looking in a place with the name "AH2016~4". Is there somewhere where I can setup the temp file definition? I am also doing everything on my C: drive (which already is driving me crazy)!

0 Kudos
DanPatterson_Retired
MVP Emeritus

I don't know about the extension setting directly, but you can set your default environments within arcmap directly.  The default folder locations are pretty useless (ie c:\users.....) since invariably they will cause problems with people using rasters.  If you use tools within arctoolbox, they can be set explicitly within the Environments tab of any tool (bottom right of all tools) or try Geoprocessing options.

0 Kudos
TongWu
by
New Contributor

Hi, 

I was wondering if this problem is resolved? I am running into the same problem running the Depression Evaluation tool.

Thanks!

0 Kudos
MarkBoucher
Occasional Contributor III

My first time seeing this topic. Have not used the Depression Evaluation tool.

  • The message "Could not reference the raster dataset." makes me wonder if  the processing extent is covering project area. I once had a tool change the processing extent and not change it back. So everything worked fine until I got past that step, then raster results would get trimmed to the new extent. I've learned to keep and eye on the extent. **  I've seen python code the saves the current processing extents, changes them, does some processing, and then recalls the saved extents.
# Save the extent environment
tempEnvironment = arcpy.env.extent
# Set the extent environment using a keyword.
arcpy.env.extent = "MAXOF"
...
...
# recall extent
arcpy.env.extent = tempEnvironment‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

  • I agree with the naming rules. Seeing the "~"  in the file name in the original post (C:\USERS\PMH\APPDATA\LOCAL\TEMP\ARCF98B\AH2016~4\G_G2432) reminds me of file names that were too long for the old 8 character limits of long ago. I suspect (I don't really know) that some routines still have that limit and I try to keep file names and directory names short (at least those that would go through geoprocessing - rasters especially).

** If someone knows how to display the processing extent on the map (if only temporarily or as graphic) that would be nice. I hate simply resetting the processing extent as a "solution" when I'm not sure if it is the problem. 

GarretDuffy1
New Contributor II

Hi all,

I had this same issue. I followed all the advice above related to file paths, character length and type, etc.  I solved the issue following the advice here.  I exported the raster from being geodatabase-hosted to being stand alone GRID in a separate folder.  I was then able to run the Depression Evaluation tool successfully.

0 Kudos