Digital Geography

Attribute Updating using ArcPy

After my first attempt in Python scripting using opensource Geospatial Data Abstraction Library (GDAL), I wanted to use ArcPy  in my second trial. The following code is so simple. You can use it to update the attribute table of a shapefile based on another shapefile/table. Let me break it down using this pseudo-code: Choose the first shapefile (the source). Identify the unique ID field in that shapefile. Write down all the values from the desired field (to replace the old values). Choose the second shapefile (the destination). Search for the unique ID records which meet that unique ID field in (step 2). Update…