A pure Python library for reading and writing ESRI Shapefiles, the popular GIS vector data format.
PyShp is a pure Python library for reading and writing ESRI Shapefiles, the de facto standard vector data format in Geographic Information Systems (GIS). It provides a lightweight, dependency-free way to work with geographic data, handling the shapefile's geometry (.shp), index (.shx), and attribute (.dbf) files. The library solves the problem of accessing and manipulating GIS data directly in Python without requiring external C libraries or proprietary software.
Python developers and data scientists working with geographic data, including GIS professionals, researchers, and anyone needing to process or convert ESRI Shapefiles. It's particularly useful for scripting geospatial workflows, data analysis, and building custom GIS tools.
Developers choose PyShp because it's a pure Python implementation with no external dependencies, making it easy to install and integrate. It offers robust support for the full shapefile specification, including advanced features like 3D geometries and streaming I/O for large datasets, while maintaining a simple and intuitive API.
This library reads and writes ESRI Shapefiles in pure Python.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Pure Python codebase with no external C libraries, ensuring easy installation and portability across environments, as highlighted in the 'Pure Python Implementation' feature.
Handles all shapefile types including 3D geometries and M/Z values, with dedicated methods for MultiPatch and measured shapes, as documented in the '3D and Other Geometry Types' section.
Uses iterators and spatial filtering to process large files with minimal memory usage, ideal for datasets with millions of records, demonstrated in the 'Reading Large Shapefiles' section.
Can load shapefiles from local files, URLs, zip archives, and file-like objects, providing flexibility in data access without manual downloading or extraction, as shown in the 'Reading Shapefiles from URLs' examples.
Only supports ESRI Shapefiles, not contemporary formats like GeoPackage or vector tiles, which may restrict integration with modern GIS tools and workflows.
Focuses solely on I/O operations; lacks functions for spatial analysis (e.g., overlays, distance calculations), requiring additional libraries like Shapely for common GIS tasks.
Requires manual specification of text encoding for non-UTF8 files, and errors can arise if the wrong encoding is used, necessitating extra steps like setting 'encodingErrors' parameters.