0

I would like to group polygons that (1) are contiguous and (2) when the combined values of field X >= Y. Specifically I am grouping zipcodes that are connected. a group is when 1 or more zipcodes 'population' field equals 100,000.

Can someone suggest an existing ArcGIS function or python method for doing this?


I wrote a python algorithm to group the polygons using their respective neighbors as grouping members until threshold is met. it works nicely.

8
  • When you mean "group" do you mean dissolve the boundaries between them?
    – Hornbydd
    Commented Dec 12, 2013 at 17:32
  • I mean assign neighboring polygons a unique #. They are neighboring and their total population = 50,000. then start over by moving onto the next polygon to build a new group. So the final result will be 100% of shapes (no dissolving) where each polygon belongs to a unique group. I imagine there will be ~300-400 groups for dataset of 1800 polygons.
    – mapmedia
    Commented Dec 12, 2013 at 18:14
  • There is no existing function to do this. That is partly because the problem is under-specified: in addition to the constraints you have imposed, you can optimize some objective function, such as achieving the most compact groups or the smallest number of groups, etc. Such optimization problems can often be solved with "black-box" procedures for nonlinear constrained optimization. They are also susceptible to approximate solution with simulated annealing or genetic algorithms.
    – whuber
    Commented Dec 12, 2013 at 19:36
  • 1
    Can you explain why you want to do this? What higher-level problem does it solve? Grouping polygons until some condition is reached is dependent on their order but how are you sorting them before grouping?
    – Martin F
    Commented Dec 12, 2013 at 22:50
  • 1
    Did you find a solution to your problem? I have the same objective in order to aggregate several municipalities according to their population to determine a higher level group. Cheers, Carlos
    – user26857
    Commented Feb 12, 2014 at 11:41

1 Answer 1

1

Create a field called "GROUP", type short.

Use Calculate Field on the new GROUP field:

Check Advanced

If [POPULATION] = 100000 then   'replace with >= or <= if you'd like to also include larger/smaller values
x = 1
else
x = 0
end if

GROUP = x

Now use the Dissolve tool.

Specify GROUP as the dissolve field.

Do NOT use Multipart Features.

Your result will group touching Zip Codes with values 0 or 1. 1 being areas meeting the criteria, 0 being areas that did not.

4
  • I want to give each group a unique #. so my dataset of 1800 polygons will be grouped into ~300 sets - where the sum of each set's population field >40,000 and <60,000.
    – mapmedia
    Commented Dec 12, 2013 at 18:21
  • 1
    You can use the OBJECTID's as the unique #. The dissolve will output the grouped "sets" as new features. To get >40000 and <60000, change the conditional to if [POPULATION] > 40000 AND [POPULATION] < 60000 then ... You should have stated this in your original post, BTW...
    – evv_gis
    Commented Dec 12, 2013 at 18:28
  • This does not appear to solve the problem of grouping by total population within each group: it only examines populations of individual polygons.
    – whuber
    Commented Dec 12, 2013 at 19:33
  • For total population within groups, the POPULATION field can be added into the statistical fields parameters with a SUM operator when running the Dissolve field. However, the more I reread these comments and original post, the more confused I get on what is ACTUALLY needed.
    – evv_gis
    Commented Dec 12, 2013 at 20:12

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