Skip to main content

reproj

Reproject shapely features

build badge Coverage Status Downloads

Reproj is a minimalistic package designed to do one thing: reproject shapely features with a single call. GeoPandas has a simple to_crs method for GeoDataFrames which we aim to mirror in ease of use for standalone shapely features. To be honest, this isn't difficult to do using pyproj and shapely with a couple of lines of code, but we decided to make it even easier.

Without reproj, you would use the following:

import pyproj
import shapely.ops

new_transformer = pyproj.Transformer.from_crs(4326, 32630)
utm_shape = shapely.ops.transform(new_transformer.transform, wgs84_shape)

With reproj, all you need is:

from reproj import reproj

utm_shape = reproj(wgs84_shape, 4326, 32630)

To see other practical ways of using reproj for your application, check out the examples.

Installation

Using pip

The latest version of reproj is available on PyPi, and can be installed with Pip:

pip install reproj

Using uv

uv add reproj

If you'd like to install the latest development (alpha) release, there may be a newer version on TestPyPi:

pip install -i https://test.pypi.org/simple/ reproj

From source

To install this package from source, first clone this repository, then install with uv:

git clone git@github.com:sgoodm/python-reproj.git
cd python-reproj
uv sync

Or with pip:

pip install .

Contribute

New issues are always welcome, and if you'd like to make a change, fork the repo and submit a pull request.

Testing and Coverage

We use Pytest and Coveralls to run unit tests and track code coverage of tests. If you submit code, please make sure it passes existing tests and adds relevant testing coverage for new features.

You can run tests and coverage checks locally, or you can fork the repository and utilize GitHub actions and Coveralls. To use GitHub actions and Coveralls, you'll need to add your forked repo to your own Coverall accounts and add your Coveralls token to your repository as a GitHub Secret (see below).

To run tests and coverage checks locally using uv:

uv sync --extra test
uv run pytest --cov=reproj

Or with pip:

pip install ".[test]"
pytest --cov=reproj

GitHub Secrets

There are three GitHub Secrets required to enable all of our GitHub Actions:

  1. COVERALLS_REPO_TOKEN - this is the API token for Coveralls, used for publishing code coverage reports
  2. TEST_PYPI_API_TOKEN - this is the API token for TestPyPi, needed for publishing alpha releases
  3. PYPI_API_TOKEN - this is the API token for PyPi, needed for publishing releases

Note: contributors do not need PyPi tokens; if you create a new release in a forked repo it will trigger a GitHub action that will attempt to publish to PyPi and fail.

Release files for reproj 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 reproj 0.2.0
File Size Uploaded
reproj-0.2.0.tar.gz 5.3 kB Details

Built distribution (wheel)

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

Total release size: 9.9 kB

Release files / reproj-0.2.0.tar.gz

Download URL reproj-0.2.0.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
9d03e876318e280af2a92474e2af02a02aa70040307d31ba41e7e2b519884120
BLAKE2b-256 checksum
How to use checksums
7336b4c5ec1cf426ec268dbc8079ed0d7dc1bf024256ddf07e0361a89261d798
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.8

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

Download URL reproj-0.2.0-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b56f763fd8791456c6b0b9eab9cbda05e8db7d000a3d6ddd5951c7217b4affb1
BLAKE2b-256 checksum
How to use checksums
a05edbd8fb402dba15332669ebef8326167683a652d7d4640beeefb95a3b4cb6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.8

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.2

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