0

This question is related to Fixing Model with Iterate selected feature?

The answer provided by worked great, but it’s really slow. Any way to make it run faster?

My Points Shapefile contain 6707 features and my Flow direction raster is calculated from the SRTM (250m resolution). My data is in GCS in the WGS84 datum.

5
  • I don't know what it is exactly, but I've found that Arcpy is insanely faster than model builder. If you are able, I'd recommend translating it to Arcpy, and I don't mean using the 'export as python script' function (as it produces the same processes as the model). I once did a model to clip imagery to a shapefile and it took about 6 minutes per image. I wrote up a python script that did the same thing in less than one minute per image.
    – Wes
    Jun 12, 2015 at 18:00
  • I never used Arcpy... got a link to a good tutorial? Thanks
    – Nahas
    Jun 12, 2015 at 18:01
  • I didn't write that as an answer because it does take some familiarity with python to get started and just saying "do it in python" isn't helpful. That said, when I wrote that first script I didn't know any python either and learned it by necessity. I'd just start at the beginning: resources.arcgis.com/en/help/main/10.2/index.html#/…
    – Wes
    Jun 12, 2015 at 18:04
  • You could also get an idea of how python and the arcpy calls work by doing the export as python script from model builder. Look through the .py file with your favorite text editor (ex. Notepad not Word) and get an idea of what is happening behind the scenes. It can be helpful getting your flow down to script form. Get an idea of the python basics first like a loop, function, and how indentation works. You should be able to pick up what's happening by the names of the arcpy.TOOLNAME/TOOLBOX/OTHERINFO` parts.
    – Branco
    Jun 12, 2015 at 18:40
  • Is there a site with templates for Arcpy where I can just fill in the blanks? What I'm trying to do is pretty simple so the code should be too long (I suppose...).
    – Nahas
    Jun 15, 2015 at 12:53

0

Your Answer

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