Skip to main content

Reproject shapely geometries

Project description

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

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 use pip to install:

git clone git@github.com:sgoodm/python-reproj.git
cd python-reproj
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, you can use the following commands:

pip install pytest coverage
coverage run -m pytest ./
coverage html

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reproj-0.1.2.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

reproj-0.1.2-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file reproj-0.1.2.tar.gz.

File metadata

  • Download URL: reproj-0.1.2.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for reproj-0.1.2.tar.gz
Algorithm Hash digest
SHA256 126cfb50acc43d08b74b2b167299011e75785e7dacc55135b18a2ad300bd158e
MD5 3c9c4e8d75eceb34c3edd2417e7c629d
BLAKE2b-256 917ebc7d69cc91675811a027fe4d1724c905835d1c64ce6b19759c5713ae39f5

See more details on using hashes here.

File details

Details for the file reproj-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: reproj-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for reproj-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a601cbc4932816dbffc8f5309ebefcd41061935425dd63d7568a2c2cf2768bfa
MD5 e25a1149b41db30d6ba992e844aef5fe
BLAKE2b-256 7370cf255713734aab5ab35f297ba059ee2baee94de87066f50030c0f31911f8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page