2

I am currently using ArcGIS ArcHydro tools to perform 'Catchment Polygon Processing'.

However, it is proving time consuming to perform this for multiple rasters. How might a write a python script to import ArcHydro tools?

asked Apr 5, 2016 at 15:34
1
  • 1
    Are you just looking for: arcpy.CatchmentPolyProcessing_archydro()? What versions are you using? Do you have the script started? See if the python automation slides here answer any of your questions. Commented Apr 5, 2016 at 17:27

3 Answers 3

2

I've discovered there is an ArcHydro Tools Python toolbox which is installed in the ArcHydro Set-up. C:\Program Files (x86)\ArcGIS\Desktop10.2\ArcToolbox\Toolboxes

This covers most ArcHydro tools contained in the main interface.

answered Apr 6, 2016 at 10:21
1

You can import Archydro like any other module

import ArcHydroTools

Then you can access functions like

ArcHydroTools.CatchmentPolyProcessing(...)
answered Apr 6, 2016 at 13:19
1
  • 1
    Note that for standalone scripts one has to add C:\Program Files (x86)\ESRI\WaterUtils\ArcHydro\bin to PYTHONPATH besides everything else. Commented Dec 1, 2017 at 18:01
0

Like Richard G suggested, the toolbox is the way to go. I had nothing but trouble trying to import functions via:

import ArcHydroTools

An example:

import arcpy
toolbox = ('C:/Program Files (x86)/ArcGIS/Desktop10.3/ArcToolbox'
 '/Toolboxes/Arc Hydro Tools Python')
arcpy.ImportToolbox(toolbox)
arcpy.LevelDEM_archydropy(Input_Raw_DEM_Raster="demfixed",
 Input_Lake_Feature_Class="watbody.shp",
 Output_Level_DEM_Raster="D:/leveldem")
answered Feb 11, 2017 at 20:46
1
  • "nothing but trouble" is not a good description of a problem. You don't need to import toolbox nor ArcHydroTools. If you'd like to use arcpy style calls, you'd want arcpy.gp.DEMReconditioning_archydro (tested with ArcGIS 10.5). P.S. I believe Richard suggested archydropy instead of archydro. Commented Dec 1, 2017 at 18:29

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.