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…

A small tool with Python: the shapefile archiver

Let me introduce to you, guys, my first Python tool: “Shapefile Archiver”. Usually, I face lots of problems in managing my shapefiles. My first problem is backing them up in a decent way, especially, before starting some experimental things on them (That sounds scary!), while the second problem is that Finder/Windows explorer doesn’t tell me about the shapefile more than its name!. Moreover, Finder/Windows explorer shows the shapefile as a bunch of files (*.shp, *.prj, *.shx, *.dbf,…) which makes me feel annoyed especially because I’m too lazy to open QGIS browser or ArcCataloge every time I want to explore my…