Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

StackExchange team,

I would like to reclassify polygons, I want to combine smaller polygons into bigger polygons based on their ID (each polygon has a unique ID). I want to regroup ~800 polygons into ~60 polygons. So in the first round I, e.g, want to select polygons with the ID 3,5,7 and dissolve them into one. In the second round I want to select polygons with the ID 34,666, 45,6,77 and dissolve them...until all the polygons are regrouped and dissolved. Then I would like to merge all the dissolved polygons into a new shapefile with only ~60 polygons.

So I thought I can automate this with the model builder, first I tried an approach with

Make Feature Layer then Select by Attributes then Dissolve. But that way I still have to change the SQL statement in the Select Layer By Attribute each time. Also I wouldn't know how to save the dissolved output layer after each run so that it doesn't overwrite it. Is there a function that keeps merging the previous model output with the current output?

While searching for solutions online I came across the Feature Class to Feature Class option as it apparently makes the Make Feature Layer and Select Layer By Attribute steps unnecessary. How could I then use a list variable of SQL statements and a list variable of string names for the different outputs as input?

Any help is appreciated Sandra

share|improve this question

1 Answer 1

up vote 4 down vote accepted

Consider the following workflow:

  1. Add Field to polygon feature class
  2. Calculate field (See attached Code Block)
  3. Dissolve based on your new reclassified field values (i.e. 1 or 2)

Hopefully this simplified approach, or a variation of it, will work for you.

enter image description here

enter image description here

share|improve this answer
Hi Aaron, interesting idea, thanks so much, I love learning new approaches! A problem though is that there are usually more IDs than the ones I used in the example. The code block will get really big if I have to type in every time Oldfield == OR etc.. I was hoping to be able to use something like this: Dim output IF [CSDUID] IN('5917005','5917010','5917015','5917021','5917811') THEN output = 1 IF [CSDUID] IN('5917045','5917013','5917022','5917029','5917800') THEN output = 2 ELSE output = 0 END IF but it gives me an error with the THEN.. what am I doing wrong? Does that not work? –  Sandra Nov 13 '12 at 23:58
Try using syntax that includes groups of values, such as if(OldField > 0 and OldField <= 9): –  Aaron Nov 14 '12 at 0:10
I came up with a new idea, I had all the IDs in an excel sheet, I added a colum and gave each group of IDs a random value. I then joined this excel sheet to the shapefile based on the ID. Then I could use dissolve on that random value. HURRAY. Thanks for giving me that idea! –  Sandra Nov 14 '12 at 1:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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