I have a shape with 113 polygons. (partial catchment in hydrometric station sections). Is there any method, in ArcGIS, to overlap and merge polygons from upstream to downstream, in order to results a shape with 113 polygons not partial (between stations) but total (every partial catchment from downstream to be merged with the one upstream and so on....)

Below I selected a few partial catchments, as an example

partial catchments

  • What other info do you have? Stream network? How do they named?
    – FelixIP
    Jun 30, 2018 at 18:59
  • I put a picture, as an example, in my post. Because they are 113 polygons, I only selected a part of them to be legible and to make you an idea. Black points are hydrometric stations and with blue lines is the main stream network.
    – mobydick
    Jun 30, 2018 at 21:28

3 Answers 3


Yes, here are some general steps:

  1. Add all possible hydrometric station names that you want to merge together into a list object (you could have a list of lists if there are multiple different station names you want to merge together)
  2. Use for loop to loop over hydrometric station name list and within loop use arcpy Select method to select and export out feature(s) to new layer based on sql query composed from the list values.
  • Are you really suggesting to manually create 113 lists? This is tracing network exercise, not doable without automation.
    – FelixIP
    Jun 30, 2018 at 19:06

Ok, I see you have multiple disconnected stream networks. I do have scripts to handle situations like that, but that's too many to post and I am not prepared to do so. This is why I suggest:

  • create geometric network from your streams
  • create relationship class between stream nodes and subcatchments. I hope there is 1:1 related fields, i.e. node name somehow coded in subcatchment name.
  • shuffle through your hydrometric stations (perhaps use data driven pages) and select all incoming streams
  • trace upstream and select nodes that intersect selected streams.
  • open table of records, click related tables
  • dissolve selected to separate feature class

Sorry to tell, but without scripting you'll need to repeat it 113 times, before merging outputs together.

Invest time to scripting ...


Thanks @FelixIP. I see there are enough steps to do and I understand that witout automation it’s a lot of work. Unfortunely, I’m quite new with python, but even so, I’ve use a trace downstream code from an older reply of yours regarding cumulative polygon basin calculation and resulted total surfaces at hydrometric station (BH is partial basin, BH_DS is downstream basin, AREA_BH is partial surface and AREA_TOT is total surface of basin). I guess I could use some parts of this code and add a mergeList = [ ] in which to merge polygons with arcpy.Merge_management and then to dissolve them with arcpy.Dissolve_management and save to disk...but I’m prety stuck.

import arcpy
mxd = arcpy.mapping.MapDocument("CURRENT")
bh = arcpy.mapping.ListLayers(mxd)[0]
table = arcpy.da.TableToNumPyArray("bh", ("BH", "AREA_BH", "BH_DS"))
nod = {}; total = {}
for id, load, dsNode in table:
    nod[id] = [dsNode.rstrip(), load]
    total[id] = load

for id, x in nod.iteritems():
    fromNode = id; load = x[1]
    while True:
       dsNode = nod[fromNode][0]
       if dsNode =="": break
       total[dsNode] += load
       fromNode = dsNode

with arcpy.da.UpdateCursor("bh", ("BH", "AREA_TOT")) as cursor:
    for id, sum in cursor:
        sum = total[id]
        cursor.updateRow((id, sum))
del mxd

enter image description here

Your Answer

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

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