Shapefile.py is an Open Source module for reading and writing Esri-format shapefiles. Shapefile.py is interesting both because it is very easy to use and an example of how to read and write binary files with Python.
Getting Shapefile.py has become a bit complicated:
Shapefile.py is much easier to use than the "cursors" provided by ArcGIS but Shapefile.py does not provide the ability to filter shapefiles by attributes. There is minimal documentation available for Shapefile.py but a good tutorial is available under "Additional Resources" below.
Shapefile.py is also interesting because it is a Python-only, single-file, library. You can just download it and put it in the same folder as your Python scripts to execute it.
© Copyright 2018 HSU - All rights reserved.