SHPTOOLS
A collection of Python tools for working with shapefile (ESRI Shapefile) vector files.
GDAL Installation: GDAL is required for this package. For conda environments, use
conda install gdalto install GDAL. For non-conda environments, download the appropriate wheel file from https://github.com/cgohlke/geospatial-wheels/releases to install GDAL.
Installation
pip install -e .
Features
- shpinfo: Check shapefile properties (geometry, projection, extent, fields)
- shpasprj: Assign a projection to shapefiles without modifying geometry
- mvshp: Relocate shapefiles by setting a new upper-left coordinate
Usage
Command-line
# List all available commands
shptools-info
# Check properties of all SHP files in the current directory
shpinfo -a
# Check a single file
shpinfo -i parcels.shp
# Assign a projection to all SHP files (metadata only, no geometry change)
shpasprj -a --epsg 3826
# Relocate a shapefile to a new upper-left coordinate
mvshp -i parcels.shp -x 500000 -y 2500000
Python API
from shptools import shpinfo, shpasprj, mvshp
# Report shapefile properties
shpinfo.check_shp_info("parcels.shp")
# Assign projection metadata without touching geometry
shpasprj.assign_projection("parcels.shp", epsg=3826)
# Relocate a shapefile's geometry to a new upper-left coordinate
mvshp.relocate_shapefile("parcels.shp", x=500000, y=2500000)
Notes
shpasprjandmvshpautomatically create aSHP_BAK/directory with backup copies before modifying files.- GDAL must be installed separately via conda or a pre-built wheel; it is not listed in
requirements.txtas it cannot be reliably installed via pip on all platforms.
Metadata
Release files for shptools 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| shptools-0.1.0.tar.gz | 9.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| shptools-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.1 kB
Release files / shptools-0.1.0.tar.gz
| Download URL | shptools-0.1.0.tar.gz |
|---|---|
| Size | 9.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
06d7267d833a6c956441fd688748434376c159e953893854c32046f827f12008
|
|
BLAKE2b-256 checksum How to use checksums |
2431a0ef7192b7862d5fb7da431e247fb8d1c7369557538a8570948f1e2d874e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.
Transparency logRelease files / shptools-0.1.0-py3-none-any.whl
| Download URL | shptools-0.1.0-py3-none-any.whl |
|---|---|
| Size | 12.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4253574c50904f5779d6647612320eb03b9ba359c036553b367e6e8bb9a82cf9
|
|
BLAKE2b-256 checksum How to use checksums |
73c83d1657dfa4c38ccde623338fb87b5ac39de27689ce3eb98cf0c9cd49942c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.
Transparency log