I have a shapefile (layer A) containing different polygons - each polygon representing an ecoregion. I have another layer of polygons (layer B) - each polygon representing a watershed boundary. I want to determine the ecoregion (layer A) with the greatest footprint within each watershed (layer B).

The Tabulate Intersection tool allows me to calculate the percent of each ecoregion in layer A in each watershed in layer B, and I can then join this table to layer B - but what if I only want the max value?

Meaning the ecoregion, and the associated percent, that is the largest ecoregion within the watershed. Is there a simple way to direct the Tabulate Intersection tool to only produce a table with the largest ecoregion footprint in each watershed?

I can do this by hand when working with small datasets but would prefer it is automated for larger ones.

  • 1
    similar to gis.stackexchange.com/questions/110459/… – radouxju Jul 1 '15 at 7:21
  • So no, you can't use Tabulate to get only the max value, and a regular join doesn't allow for this either. However as suggested at the question radouxju links to, you can stick a Summary Stats tool in there to run on the Tabulate output. Using watershed as a CASE field and ecoregion area as a stat field with method MAX, you'll get the table you want to join back to your watersheds (though it may require two joins or a key to match the area value with the ecoregion name). – Chris W Jul 3 '15 at 0:25

Assuming you want to use it in Model Builder, I suggest you a "Calculate Value" script as follows:

def LargestEcoregion(tabulate_intersection_result):
    rows=arcpy.SearchCursor(tabulate_intersection_result,sort_fields="PERCENTAGE D")
    arcpy.AddMessage("%s--%s" %(row.getValue("EcoRegion_Field_Name_To_Report"),row.getValue("PERCENTAGE")))

Here you need to specify field name for your bioecoregions (i.e.,EcoRegion_Field_Name_To_Report) and your result will appear in the progress window.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.