Dissolve & Retain All Attributes

392
3
03-19-2012 10:28 AM
JohanL
by
New Contributor
I've encountered a small problem that I cant seem to resolve wherby i've done a series of analyses on a feature class layer.

These analyses result in a shapefile with attributes include country, region, name, ID etc...

Now for my final process I am intersecting that polygon with a layer that does not have the same spatial resolution causing my original dataset to be cut off.

[ATTACH=CONFIG]12820[/ATTACH]

What I want to be able to do is that those areas that have been cut off are remerged (and dissolved) into the intersected data and take the attribute datasets of the closest polygon.

My current approach has been to erase polygon differences, apply spatial join (closest to intersect data), merge, and dissolve. Now unfotunatley when I dissolve by field "name", all the other attribute data is lost in the final product. Using the statistics field and statistics type "First" or "Last" and/or using another spatial join between the original data and the dissolve gives some weird results.

If anyone would be so kind as to give me their current workflow Id be more than grateful.
0 Kudos
3 Replies
DanLee
by Esri Regular Contributor
Esri Regular Contributor
Could you explain why you are doing this step?
"Now for my final process I am intersecting that polygon with a layer that does not have the same spatial resolution causing my original dataset to be cut off."
Perhaps a different tool, for example the Union tool, might achieve what you need to do without losing or cutting off the polygons.
0 Kudos
JohanL
by
New Contributor
Could you explain why you are doing this step?
"Now for my final process I am intersecting that polygon with a layer that does not have the same spatial resolution causing my original dataset to be cut off."
Perhaps a different tool, for example the Union tool, might achieve what you need to do without losing or cutting off the polygons.


The union feature does not provide the function that I want unless I am missing some hidden feature or procedure. Let me explain further by a better example perhaps.

I have two datasets one at a coarser resolution ('name') and one at a finer resolution('orig').
[ATTACH=CONFIG]12846[/ATTACH] [ATTACH=CONFIG]12847[/ATTACH] [ATTACH=CONFIG]12848[/ATTACH]
My desired outcome is a shapefile with the attributes of my 'orig' dataset where the feature class boundaries of each polygon are defined by 'GRIDCODE' in the 'name' dataset.
[ATTACH=CONFIG]12849[/ATTACH]

Unfortunaltey as shown in the first image the intersect tool will not help as the 'name' dataset does not cover the entire 'orig' dataset. Therefore I've tried a erase - spatial join - merge - dissolve procedure creating that image above however the dissolve function removes all the 'orig' attributes

The union function creates
[ATTACH=CONFIG]12850[/ATTACH]

However the non covered region has a 'GRIDCODE' of 0 which does not give me the result that I had in mind even if I were to intersect that with the original dataset.

Ideally my final output should consit of 3 polygons. The two polygons that share a common boarder should have the same 'Unique ID', 'Region' and 'Area'(i.e. Total Area of that entire polygon) but with a different 'GRIDCODE' (14 & 13).

Any ideas would be appreciated once again.
0 Kudos
DanLee
by Esri Regular Contributor
Esri Regular Contributor
Thanks for the additional details. I think you are on the right track. Once you have separated the Orig features into two sets, one is covered by the Name features, another not, you should be able to use Select Layer By Location to select the Closest (or Share a line segment) Orig_inName by Orig_outName. Then Dissolve them with the appropriate Stat. Fields settings to get the attributes from Orig_inName onto Orig_outName features. That should work.

In a slightly different way, I have tested the following workflow, assuming the following feature class names:
   fc_grdCode (the one with GRIDCODE)
   fc_needAttr (the one that will get attributes from fc_GrdCode)

1. Use Union to union fc_grdCode with fc_needAttr. Let's call it fc_grdCodeUnion.
2. Use Select Layer By Attribute to select fc_grdCodeUnion, where FID_fc_grdCode = -1. These are the polygons not covered by fc_grdCode.
3. Use Delete Features tool to delete the selected features. What's left are the polygons covering fc_needAttr, but some of them have not received the grid code.
4. Use Select Layer By Attribute to select fc_grdCodeUnion by GRIDCODE = 0; these are the polygons outside fc_grdCode.
5. Use Select Layer By Location to select fc_grdCodeUnion by the selected features from step 4 that "share a line segment with the source feature". Now you should have the some polygons in fc_grdCodeUnion selected, the ones that you want to merge and get the desired attributes.
6. Run Dissolve with the FID_fc_needAttr field as the Dissolve Field; specify the desired Stat. Fields, for example for your GRIDCODE, use MEAN or MAX. Do not use FIRST becasue it might grab the one without the grid code value first. Let's say your output is fc_needAttr_dissolved.
7. Since you still have the selection from step 5, run Delete Features to delete them from grdCodeUnion.
8. You can now use Append tool to combine the remaining features in grdCodeUnion with fc_needAttr_dissolved, specifying the desired Field Map. I think the output is what you want.

Depending on your data, if you have disjoint polygons as shown in your image, you can try CLOSEST selection or Spatial Join to get attribes from the above result. I think you know enough to figure that out.

Hope I didn't make mistakes in my typing. Does that make sense or work for you?
0 Kudos