Introduction is an Open Source module for reading and writing Esri-format shapefiles. is interesting both because it is very easy to use and an example of how to read and write binary files with Python.

Getting has become a bit complicated:

  1. If you search for "", you'll probably end up at the GitHub repository for
  2. If you end up on the "Code" page, you can actually copy and paste the code into a file and save it as "".
  3. You can also click on "pyshp" in the "GeospatialPython/pyshp" link and then click on "Clone or download"
  4. If you select "Download ZIP" you'll obtain a zip file that includes "", some documentation, and some samples.
  5. Note that the "pyshp" web page contains the documentation to get started with is much easier to use than the "cursors" provided by ArcGIS but does not provide the ability to filter shapefiles by attributes. There is minimal documentation available for but a good tutorial is available under "Additional Resources" below. 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.

Additional Resources


© Copyright 2018 HSU - All rights reserved.