Sunday 24 January 2016

Copying attributes of one row to another row in polygon shapefile in ArcGIS?


I have a single polygon shapefile in ArcMap with 25*25m grids, and I want to assign the attribute values of a single grid/polygon to another one close by i.e. copy attributes from a row to another row. Is there a way to do this other than Merge or manually as I want to retain the 25*25m grid size of polygons?


enter image description here


The light red colour square polygon in the middle has to be dark red as it is lying in between a bunch of dark red ones. There are numerous such spots in my data that I have to change so I am looking for an easier and faster way to change the attributes and trying to avoid doing manually. I have to retain the 25*25m polygon size as well. Any solutions?




Answer



You need to be in an edit session and have the Editor Attributes window open (Editor dropdown > More Editing Windows > Attributes). The simplest solution is:



In the Attributes window, right-click the feature you want to copy from and click Copy Attributes. Right-click the feature you want to paste into and click Paste Attributes.



This replaces all attributes rather than doing it one field at a time. Paste will work on multiple selected features at once. You'll also need to be careful with the attributes you're copy/pasting. Since you don't list what they might be, things to watch out for will be area calculations or other such fields that should vary with each feature.


A slight alternative requires that you enter each field one at a time, but only once. Select all features you want to change to the same thing. In the top box you will see a list of all selected features with the most recently selected highlighted. In the bottom box is the list of attributes, showing that feature's values. However, if you click the feature class name at the top of the upper box (which all the features are tree'd under) the attribute values in the lower box will go blank (unless all selected features already share that same value). Any value you type in at this point will be applied to all selected features. In this way you can change only a few fields but on multiple features at once. It's a quicker way of doing a Field Calculate on Selected Records within the attribute table.


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...