How to automate Scenario Generator Outputs processing in ArcGIS?

Hi, InVEST community! I am using the InVEST Scenario Generator model to forecast the growth of a seagrass meadow for the next 40 years. I want to read the numeric value of each of the 40 raster files generated by the model. However, using my current method, I must process each file in ArcGIS 40 times. Does anyone know how I can automate this process, perhaps using Python?

My current method is as follows: For each file, 1. convert the raster file into a polygon using Raster to Polygon command. 2. Create a new Area field in the attribute table. 3. Calculate the area of each pixel using the Calculate Geometry command. 4. Sum up all values in the Area field.

My hunch is that ArcGIS allows people to replicate this process for all the files I want to process using Python, but I don’t know how to do that. I’d extremely appreciate it if anyone could help me out with it.

Thanks in advance!

nearest_to_edge_2060.tif (124.5 KB)

Hi @Yirui -

While I haven’t used it in a long while, ArcGIS does provide a Python library for accessing Arc tools. Here’s an introductory tutorial for ArcGIS Pro.

Alternately, Arc provides Model Builder, which is more of a GUI tool for stringing together tools, no programming involved. You can learn more about that here.

~ Stacie

Hi Stacie,

Thanks so much! I figured it out using model builder!


1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.