Skip to main content

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 gdal to 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
shpasprj -a -e 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

  • shpasprj and mvshp automatically create a SHP_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.txt as it cannot be reliably installed via pip on all platforms.

Metadata

Release files for shptools 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for shptools 0.2.0
File Size Uploaded
shptools-0.2.0.tar.gz 9.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for shptools 0.2.0
File Interpreter ABI Platform
shptools-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 21.1 kB

Release files / shptools-0.2.0.tar.gz

Download URL shptools-0.2.0.tar.gz
Size 9.1 kB
Tags Source
SHA-256 checksum
How to use checksums
0b881d0de49a1a4be0177266e285d5e5ea3f88ef299a4eab15a253c984d39dbb
BLAKE2b-256 checksum
How to use checksums
9ac3e3d14235fcb98f7a6f6444bdf4f6503c003e91d00cad0a24c6cf0433967d
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

Release files / shptools-0.2.0-py3-none-any.whl

Download URL shptools-0.2.0-py3-none-any.whl
Size 12.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
94d52211a70c04e5feeeeb17dfc69847b13a88bac6ba447cfac8609bfb97e1d6
BLAKE2b-256 checksum
How to use checksums
e8b9715835c56d140ffcf4f9cb43ebecdb58241b7319b0b2cc7df817aec13a5b
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

Release history Release notifications | RSS feed

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page