FillSinks not working properly in Python or command line?

3176
3
10-20-2010 05:49 AM
Labels (1)
SteveDamaia
New Contributor
Hi

I am having issues running the ArcHydro FillSinks tool through a Python script or the command line window.  The process completes, but there is nothing filled in the output grid.  If I run the same data through ArcToolbox or the ArcHydro menu (using FillSinks) the output is correct and sinks are filled as identified by the IsSink field.

I have tried this on other computers in the office with the same result.  I am running ArcGIS 9.3.1 (build 3500), ArcHydro 1.3.  Keep in mind FillSinks is working through ArcToolbox so I???m assuming it is not a problem with my input data and that my Sinkpoly layer is setup correctly.

Has anyone else encountered this?  Is there a solution?

Thanks
Tags (2)
0 Kudos
3 Replies
SteveDamaia
New Contributor
Just as an FYI, I figured it out.  There is a bug with this tool.  If you use the following syntax from the command line (or similar in Python) none of the sinks will be filled:
FillSinks in_dem dem_filled "" SinkPoly ISSINK_YES

However, this will work:
FillSinks gsc_mos_buf5 dem_filled "" SinkPoly 1

Even though the drop-down option and on-line help suggest using �??ISSINK_YES�?� it will not work properly.  You must use �??1�?� or �??0�?�.

Thanks
0 Kudos
PhilipGriffith
New Contributor III
I'm having (sort of) the same problem, though I'm running Arc Hydro 2.1 on ArcMap 10 (build 2800).
Using Fill Sinks from the Arc Hydro toolbar works with no problems, but when I call FillSinks in the ArcHydroTools module:

ArcHydroTools.FillSinks(AgreeDEM, Fil, "", LevelPoly, "ISSINK_YES")

I get the execute error "System.NullReferenceException: Object reference not set to an instance of an object."
Unlike the post above, FillSinks fails to complete.
I've tried using an integer (1), a string ("1"), an expression ('"ISSINK" = 1'), etc. in lieu of using ISSINK_YES, all to no avail.
The command is part of a script that automates a number of other Arc Hydro processes; all work without a hitch, save FillSinks.

Has anyone found the correct way to use the ISSINK field in a script? Am I missing something simple?

Thanks!
0 Kudos
ChristineDartiguenave
Esri Contributor
There was an issue when the filling threshold was not specified (even though it was supposed to be optional). So the problem was not with ISSINK. You can get the latest version for ArcGIS 10.0 from our ftp site with the fix (version 2.1.0.156).

Christine Dartiguenave
Esri Water Resources Team
0 Kudos