Dear folks,
it took me some time to figure out a very anoying error when generating watersheds in ArcGIS 10.5.1.
If the field type of the pour point data is double, and if there is no other integer field in the attribute table, the watershed command will not run and the following error message is displayed:
ERROR 999998: Unexpected Error.
Failed to execute (Watershed).
The same error occurs if you try to convert the point feature class to a raster.
Cheers
You need to provide the important details Carlos... like the projection of the data, the file paths that you are using, the source of the inputs and the destinations of the outputs. A general error like that suggests that it is something with the environments and their settings.
Dear Dan Patterson,
I double checked all files paths, have projected both the raster and the feature class to WGS84_UTM24S and got the same error message.
Finally, I realized what is causing the error:
If the field type of the pour point data used to differentiate watersheds is long integer, and if there is no other short integer field in the attribute table, the watershed command simply will not run at all!:
Bizarre reason for a failure. Why would the tool differentiate between long and short integer. Nice catch
Try disabling Background Processing in Geoprocessing Options (Uncheck "Enable Background Processing"). Foreground and background processing—Help | ArcGIS Desktop
Do you still get the error?
Or just check to see if the tool is capable of using background geoprocessing
You can check the General tab of the tool properties for the Always run in foreground check box to see if a tool is capable of running in the background.
Yes, Jayanta. In fact, this was the first thing I tried. Still got the same error message!
This was the first thing I tried. Still got the same error message!