1

I am trying to merge together adjacent polygons and have the attributes added together for the merged features.

The layer is of certain census blocks across a state (thousands of features) and I would like to merge the adjacent census blocks and aggregate the population data of the merged features.

When I run the dissolve tool, I can get the adjacent polygons to merge, but the attributes are added for the whole table, rather than just the merged polygons. Is there any way to have the feature attributes added together to make sense with the new geometry?

Another way I tried to do this was to use the dissolved layer and spatially join it to the census block population data. For some reason, this is not accurate as the population totals are not equal.

1
  • Could you edit your question to include the GIS software and version that you are using, please ? – PolyGeo Nov 10 '14 at 20:07
1

Checking the Single Part option does not result in each part's attributes being summarized separately. The tool pays no attention to the geometry when doing summaries and does all summaries before it does any geometry manipulation. Therefore, radouxju's recommendation will not solve the problem.

This is the behavior I expect. The attributes are summarized for either the entire set of polygons or for each unique case value correctly by the tool, since the statistical analysis has to be done first to create each grouping and at that point it cannot make any assumption that parts have any control on the attributes. The Frequency of every part is all the same for the same reason, which would be the result I would expect. What you want would significantly slow down the tool and is not a logical step in the process given the instructions. Attributes and geometry are normally dealt with separately for speed and have to be handled in separate steps to get the results you want. Very few geoprocessing tools handle both attributes and geometry reliably if you expect any complex interaction and even fewer do more than the minimum each step requires so that the finest level of processing can be combined with other fine level steps to get all possible results. Once you accept that these are the rules governing the vast majority of geoprocessing tools, their behavior tends to make much more sense and you begin to see how to combine steps to achieve all possible results.

What I do to get the results you want is a multi-step process. I dissolve the entire polygon set or unique case set without paying attention to the statistics output and create a multipart polygon for each unique polygon grouping. I use the Multipart to Singlepart tool on the result (this is all that unchecking the multipart option does at the end of the dissolve, so using it as a separate step makes that clearer). Then I do a Spatial Join of the original polygons to the new polygons using the One to Many option with the original polygons as the target and the dissolved polygons as the Join. If this was an attribute controlled dissolve I would do a select by attribute at this step to only get the targets and join parts that matched on the controlling attribute. Then I redissolve the joined polygons set and use the JoinFID as the unique case and the TargetFID as the summary field with the First option (singlepart or multipart do not matter now). Now each separate part of the whole polygon set has an original polygon FID that is associated only to the part that contained it and a count for only the part that was created. This way the parts and the attribute set of the parts are respected.

Anyway, it is not a bug. It is doing what that small step requires, and in effect the tool would embed all of the steps I described inside it if it gave you the result you wanted. I have come to expect a minimum of a 4 to 5 step process every time I use geoprocessing to create an interaction between derived attributes and derived geometry.

I intend to look into python da cursors and dictionaries to replace the Dissolve tool. I find that by using these coding techniques I can usually speed up the entire process done by geoprocessing tools by a factor of 5 to 10 times the speed and avoid the need to produce intermediate outputs to get the results I actually am looking for. If I come up with the replacement code I will post it.

0
2

I assume that you use ArcGIS.

You can use the sum statistics for the fields (see dissolve). It will compute the sum of the attribute value for your numeric fields. Make sure that you also select "single_part" to avoid non contiguous parts to merge.

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.