Skip to main content

tpt-gis-py

Python bindings for tpt-gis, a pure-Rust planetary-scale GIS engine. Built with pyo3 and maturin.

Status: not yet published to PyPI. Build from source (below).

Scope (v0.1)

  • Geometry — parse and serialise OGC Simple Features geometries as WKT, WKB and GeoJSON. Includes contains_point, geometry_type, bounds, area, length, __geo_interface__, value equality, hashing and pickling.
  • coordinates(geometry) — every vertex as an (n, 2) float64 NumPy array. NumPy is imported only when you call it.
  • Shapefile reading — read_shapefile_geometry (.shp), read_shapefile_attributes (.dbf) and read_zipped_shapefile (a shapefile inside a .zip). The readers release the GIL while they parse.
  • Geodesy — GeoPoint, geodesic_distance, geodesic_inverse and geodesic_destination on the WGS84 and GRS80 ellipsoids (Karney's algorithm).
  • Errors — TptGisError (a ValueError subclass), with GeometryParseError and GeodesyError beneath it.
  • Types — py.typed and .pyi stubs ship with the package.

Not yet exposed to Python: raster and COG, the index crate, GeoPackage, projections, and a prebuilt wheel matrix.

Build and install (development)

Requires Python 3.8+ and a Rust toolchain.

# from the bindings/tpt-gis-py directory
pip install maturin
maturin develop

Usage

import tpt_gis_py as gis

# WKT / WKB / GeoJSON round-trip
geom = gis.Geometry.from_wkt("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))")
assert geom.contains_point(5.0, 5.0)
assert not geom.contains_point(15.0, 5.0)
wkb = geom.to_wkb()
assert gis.Geometry.from_wkb(wkb).to_geojson() == geom.to_geojson()

# Vertices as a NumPy array
gis.coordinates(gis.Geometry.from_wkt("LINESTRING (0 0, 3 4, 6 0)"))

# Geodesy
flinders = gis.GeoPoint(-37.951_033, 144.424_868)
buninyong = gis.GeoPoint(-37.652_821, 143.926_495)
dist = gis.geodesic_distance(flinders, buninyong)  # ~54_972 m on WGS84
result = gis.geodesic_inverse(flinders, buninyong)
print(result.distance_m, result.initial_bearing_deg)

# Shapefile
geoms = gis.read_shapefile_geometry("states.shp")
attrs = gis.read_shapefile_attributes("states.dbf")

See the Python bindings guide for the full API, with worked examples and the error model.

Tests

pip install pytest
pytest tests

License

Dual MIT / Apache-2.0 (same as the rest of tpt-gis). Copyright TPT Solutions.

Metadata

Release files for tpt-gis-py 0.1.0

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

Built distributions (wheels)

Table of built distributions (wheels) for tpt-gis-py 0.1.0
File Actions
tpt_gis_py-0.1.0-cp38-abi3-win_amd64.whl CPython 3.8 abi3 Windows x86-64 Details for tpt_gis_py-0.1.0-cp38-abi3-win_amd64.whl
tpt_gis_py-0.1.0-cp38-abi3-musllinux_1_2_x86_64.whl CPython 3.8 abi3 Linux musl 1.2+ x86-64 Details for tpt_gis_py-0.1.0-cp38-abi3-musllinux_1_2_x86_64.whl
tpt_gis_py-0.1.0-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.8 abi3 Linux glibc 2.17+ x86-64 Details for tpt_gis_py-0.1.0-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
tpt_gis_py-0.1.0-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.8 abi3 Linux glibc 2.17+ ARM64 Details for tpt_gis_py-0.1.0-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
tpt_gis_py-0.1.0-cp38-abi3-macosx_10_12_universal2.macosx_10_12_x86_64.macosx_11_0_arm64.whl CPython 3.8 abi3 macOS 10.12+ x86-64, macOS 11.0+ ARM64, macOS 10.12+ universal2 (ARM64, x86-64) Details for tpt_gis_py-0.1.0-cp38-abi3-macosx_10_12_universal2.macosx_10_12_x86_64.macosx_11_0_arm64.whl

Total release size: 2.6 MB

Release files / tpt_gis_py-0.1.0-cp38-abi3-win_amd64.whl

Download URL tpt_gis_py-0.1.0-cp38-abi3-win_amd64.whl
Size 309.6 kB
Tags CPython 3.8 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
f7d98ec16ee32e5bb2d203ba0e449eede0969a56d60ca77ce4700962af97d313
BLAKE2b-256 checksum
How to use checksums
e06b05f0cf6bea36481c7da7827e409afccc154fee625709584ba4e8aeed2bef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 8, 2026.

Transparency log

Release files / tpt_gis_py-0.1.0-cp38-abi3-musllinux_1_2_x86_64.whl

Download URL tpt_gis_py-0.1.0-cp38-abi3-musllinux_1_2_x86_64.whl
Size 552.1 kB
Tags CPython 3.8 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
02901cffe303930258c086646247897ace730456462a0c443cf3f0001c40d1cf
BLAKE2b-256 checksum
How to use checksums
0ab6664c6c401570f5ed70dcfbe9ec811a4ec6dbba287fe5b0913a09203ae035
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 8, 2026.

Transparency log

Release files / tpt_gis_py-0.1.0-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL tpt_gis_py-0.1.0-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 463.8 kB
Tags CPython 3.8 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
03b0eea217afae4db5560365bc807fb1746e6dbfea39ced49e30272eed663823
BLAKE2b-256 checksum
How to use checksums
42f2fe7b600576d42dd8ef9e06a413fa958232d1e9db8021b4ad76207f454966
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 8, 2026.

Transparency log

Release files / tpt_gis_py-0.1.0-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL tpt_gis_py-0.1.0-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 449.7 kB
Tags CPython 3.8 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
9ab9c50d216f9642469ad1e2b15171eca08056e12b90cf7ead230136b7ca6ab9
BLAKE2b-256 checksum
How to use checksums
fa092e7ff2327881936669dc8d003a18e812fc4c4af5dccee573fe145931259f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 8, 2026.

Transparency log

Release files / tpt_gis_py-0.1.0-cp38-abi3-macosx_10_12_universal2.macosx_10_12_x86_64.macosx_11_0_arm64.whl

Download URL tpt_gis_py-0.1.0-cp38-abi3-macosx_10_12_universal2.macosx_10_12_x86_64.macosx_11_0_arm64.whl
Size 805.7 kB
Tags CPython 3.8 abi3 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
da4229c895bab82ca3be76c474ee4a96caed4b5431e1c85b15a5ecf62e60ee4d
BLAKE2b-256 checksum
How to use checksums
b54fc2fbfc5c28c6249c88a34bf90f045e3e0d87d8ba0866750e1cbc58d770e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 8, 2026.

Transparency log

Security for tpt-gis-py 0.1.0

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.

Full provenance

All 5 files in this release have been uploaded with provenance metadata.

Select from 5 files

Attestation for tpt_gis_py-0.1.0-cp38-abi3-win_amd64.whl

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 Nov 8, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

5 release files Full provenance

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