Monday, 27 July 2015

Dissolving shapefile but retain attribute fields using ArcGIS Desktop?


Is there any way to dissolve shapefile but keep attributes fields in the same time?


This is how I want to retain fields:



There are two fields I want to conserve in a shapefile. The first column is Net_ID with long type, and the second column is Geology with string type.


I would like to dissolve the shapefile using field NET_ID. Besides, I would like to keep the Geology field, like the below figure.


enter image description here



Answer



You just need to split it into 2 steps:



  1. Dissolve on the NET_ID

  2. Spatial Join the dissolved layer to the original layer. Use the match type of CONTAINS and set the Merge Rule of the Geology field to Join and set the delimiter to a comma. Right click on the field in the field mapping list and select properties to get to the merge rule and delimiter settings


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...