Skip to main content

Geographic system transformations with helper functions

Project description

transforms84

PyPI - Version PyPI - Python Version Codecov PyPI - License

Python library for geographic system transformations with additional helper functions.

This package focuses on:

  1. Performance
  2. Ideal mathematical shapes of (NumPy) matrices: (3,1) or (nPoints,3,1). Shapes (3,) and (nPoints,3) are also supported.
  3. Functions that adapt to differing input matrices shapes: one-to-one, many-to-many and one-to-many points. See below for an example.

Installation

pip install transforms84

Operations

Coordinate Transformations

The following coordinate transformations have been implemented:

Velocity Transformations

The following velocity transformations have been implemented:

  • ECEF โ†’ NED
  • NED โ†’ ECEF
  • ENU โ†’ ECEF
  • ECEF โ†’ ENU

Distances

The following distance formulae have been implemented:

Additional Functions

The following functions have been implemented:

  • Angular difference (smallest and largest)
  • [rad, rad, X] โ†’ [deg, deg, X]
  • [deg, deg, X] โ†’ [rad, rad, X]

Examples

See the Jupyter notebooks in examples to see how to use the transform84. Run pip install transforms84[examples] to run the examples locally.

Many-to-many & one-to-many

The transforms.ECEF2ENU transformation accepts same and differing matrix shape sizes. Below showcases the many-to-many method where three target points, rrm_target, in the geodetic coordinate system are transformed to the local ENU coordinate system about the point rrm_local, where both matrices are of shape (3, 3, 1):

>> import numpy as np
>> from transforms84.systems import WGS84
>> from transforms84.helpers import DDM2RRM
>> from transforms84.transforms import ECEF2ENU, geodetic2ECEF
>>
>> rrm_local = DDM2RRM(
>>     np.array(
>>         [[[30], [31], [0]], [[30], [31], [0]], [[30], [31], [0]]], dtype=np.float64
>>     )
>> )  # convert each point from [deg, deg, X] to [rad, rad, X]
>> rrm_target = DDM2RRM(
>>     np.array(
>>         [[[31], [32], [0]], [[31], [32], [0]], [[31], [32], [0]]], dtype=np.float64
>>     )
>> )
>> ECEF2ENU(
>>     rrm_local, geodetic2ECEF(rrm_target, WGS84.a, WGS84.b), WGS84.a, WGS84.b
>> )  # geodetic2ECEF -> ECEF2ENU
array(
    [
        [[4.06379074e01], [-6.60007585e-01], [1.46643956e05]],
        [[4.06379074e01], [-6.60007585e-01], [1.46643956e05]],
        [[4.06379074e01], [-6.60007585e-01], [1.46643956e05]],
    ]
)

We can achieve the same result using the one-to-many method with a single local point of shape (3, 1):

>> rrm_local = DDM2RRM(np.array([[30], [31], [0]], dtype=np.float64))
>> ECEF2ENU(rrm_local, geodetic2ECEF(rrm_target, WGS84.a, WGS84.b), WGS84.a, WGS84.b)
array(
    [
        [[4.06379074e01], [-6.60007585e-01], [1.46643956e05]],
        [[4.06379074e01], [-6.60007585e-01], [1.46643956e05]],
        [[4.06379074e01], [-6.60007585e-01], [1.46643956e05]],
    ]
)

World Geodetic Systems Standards

transforms84.systems includes the WGS84 class, which is the WGS 84 version of the standard. Other standards can be created:

>> from transforms84.systems import WGS, WGS72
>> WGS72 == WGS(6378135.0, 6356750.520016094)
True

Helpful Resources

...in no particular order:

Contributing

PRs are always welcome and appreciated!

After forking the repo install the dev requirements: pip install -e .[dev].

Pre-commit hooks may be installed: pre-commit install --hook-type pre-commit --hook-type pre-push. This isn't required as pull requests are checked with tox and apply lint automatically.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

transforms84-0.3.6-cp313-cp313-win_amd64.whl (47.6 kB view details)

Uploaded CPython 3.13 Windows x86-64

transforms84-0.3.6-cp313-cp313-musllinux_1_2_x86_64.whl (280.5 kB view details)

Uploaded CPython 3.13 musllinux: musl 1.2+ x86-64

transforms84-0.3.6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (203.8 kB view details)

Uploaded CPython 3.13 manylinux: glibc 2.17+ x86-64

transforms84-0.3.6-cp312-cp312-win_amd64.whl (47.6 kB view details)

Uploaded CPython 3.12 Windows x86-64

transforms84-0.3.6-cp312-cp312-musllinux_1_2_x86_64.whl (280.5 kB view details)

Uploaded CPython 3.12 musllinux: musl 1.2+ x86-64

transforms84-0.3.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (203.9 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

transforms84-0.3.6-cp311-cp311-win_amd64.whl (47.5 kB view details)

Uploaded CPython 3.11 Windows x86-64

transforms84-0.3.6-cp311-cp311-musllinux_1_2_x86_64.whl (278.8 kB view details)

Uploaded CPython 3.11 musllinux: musl 1.2+ x86-64

transforms84-0.3.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (202.1 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

transforms84-0.3.6-cp310-cp310-win_amd64.whl (47.5 kB view details)

Uploaded CPython 3.10 Windows x86-64

transforms84-0.3.6-cp310-cp310-musllinux_1_2_x86_64.whl (278.1 kB view details)

Uploaded CPython 3.10 musllinux: musl 1.2+ x86-64

transforms84-0.3.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (201.0 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

transforms84-0.3.6-cp39-cp39-win_amd64.whl (47.5 kB view details)

Uploaded CPython 3.9 Windows x86-64

transforms84-0.3.6-cp39-cp39-musllinux_1_2_x86_64.whl (276.8 kB view details)

Uploaded CPython 3.9 musllinux: musl 1.2+ x86-64

transforms84-0.3.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (199.6 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

transforms84-0.3.6-cp38-cp38-win_amd64.whl (47.1 kB view details)

Uploaded CPython 3.8 Windows x86-64

transforms84-0.3.6-cp38-cp38-musllinux_1_2_x86_64.whl (260.7 kB view details)

Uploaded CPython 3.8 musllinux: musl 1.2+ x86-64

transforms84-0.3.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (184.4 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

File details

Details for the file transforms84-0.3.6-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for transforms84-0.3.6-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 7eeff0a37a0fde63dba6616fd4eb8b516e9b475eaf1c024e62e56d3977994eaf
MD5 de33d6eebff6a23f3c865263133c3710
BLAKE2b-256 ff433d7b0cc11c95bedc675b145b5ea14f19e73b9b5d0eb2c6b70afbd24c541d

See more details on using hashes here.

Provenance

The following attestation bundles were made for transforms84-0.3.6-cp313-cp313-win_amd64.whl:

Publisher: publish-to-pypi.yml on Stoops-ML/transforms84

Attestations:

File details

Details for the file transforms84-0.3.6-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for transforms84-0.3.6-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 97ed538bb06e057b67ed9601b98714b06439ab1d192dc1c7757f5d0df9bfc0af
MD5 ba4d4be826b2f84326ea44b3d2abe32e
BLAKE2b-256 92ec17ef81159a7e5481b95f8fa60bd217a188336278f571ce19c6b4169a698f

See more details on using hashes here.

Provenance

The following attestation bundles were made for transforms84-0.3.6-cp313-cp313-musllinux_1_2_x86_64.whl:

Publisher: publish-to-pypi.yml on Stoops-ML/transforms84

Attestations:

File details

Details for the file transforms84-0.3.6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for transforms84-0.3.6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5634e7c767cc78d1215caf0a33ec5e699456f51e708221fc8dbbf7407325773b
MD5 4000665a6bdfadbd0055eb402b89f0cc
BLAKE2b-256 7c3f509c9ae7487bcc81c98f5b761843073ecb8fddbd8d7f5c34669ca9dd3fa9

See more details on using hashes here.

Provenance

The following attestation bundles were made for transforms84-0.3.6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish-to-pypi.yml on Stoops-ML/transforms84

Attestations:

File details

Details for the file transforms84-0.3.6-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for transforms84-0.3.6-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 c55bc433fcf88c2a8836d6bd1d5debf486087e974b5da0a8a1488237dc19689d
MD5 30b9bb3fb3f5889971df906017ebfe34
BLAKE2b-256 c44fee4452674ab94d38740d65cb66f803f6e92bda9e57a01d60bbaf423d1bfd

See more details on using hashes here.

Provenance

The following attestation bundles were made for transforms84-0.3.6-cp312-cp312-win_amd64.whl:

Publisher: publish-to-pypi.yml on Stoops-ML/transforms84

Attestations:

File details

Details for the file transforms84-0.3.6-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for transforms84-0.3.6-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 070c41b745d5bae95fb55999a8522dc4715056e1c56edcdd42b168e150a06b9f
MD5 8f33369d972e330ebb2bb5ee341718da
BLAKE2b-256 68daddf81d1dc1049ce1e796206657c9467f51b63411a7a39c68c6472d97a668

See more details on using hashes here.

Provenance

The following attestation bundles were made for transforms84-0.3.6-cp312-cp312-musllinux_1_2_x86_64.whl:

Publisher: publish-to-pypi.yml on Stoops-ML/transforms84

Attestations:

File details

Details for the file transforms84-0.3.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for transforms84-0.3.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 270c1f33a843b00e5d6ea3aaf6539992c90b8b8dbaec78eb05c63573463e08eb
MD5 231aff91758ab85fe558affb2d2770ae
BLAKE2b-256 dfe38dfd9a7502fd2011ee75eed43382c21cb959df2d1d22326ea5d59efa2f28

See more details on using hashes here.

Provenance

The following attestation bundles were made for transforms84-0.3.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish-to-pypi.yml on Stoops-ML/transforms84

Attestations:

File details

Details for the file transforms84-0.3.6-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for transforms84-0.3.6-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 63339659dc29b57805b1d8a3dee1218705d5f836497bed97d05b917a73c4db75
MD5 00076e30d936f23ca99d3ee1629368ca
BLAKE2b-256 1151718ad7eeac214a51eeedfc493968521e4d994b1dc880f11b1548853a9836

See more details on using hashes here.

Provenance

The following attestation bundles were made for transforms84-0.3.6-cp311-cp311-win_amd64.whl:

Publisher: publish-to-pypi.yml on Stoops-ML/transforms84

Attestations:

File details

Details for the file transforms84-0.3.6-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for transforms84-0.3.6-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 c8198e1d69251a21b8a432f7098461bac45caf96ed93860bdd0dcd61fcf8f24e
MD5 f7b68aa243f1651ee7a874b7a3da2063
BLAKE2b-256 c88917cf67e70deaa4fbea5ac935d13a39f54a7a762fd0e59aa0f88eeb78ec80

See more details on using hashes here.

Provenance

The following attestation bundles were made for transforms84-0.3.6-cp311-cp311-musllinux_1_2_x86_64.whl:

Publisher: publish-to-pypi.yml on Stoops-ML/transforms84

Attestations:

File details

Details for the file transforms84-0.3.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for transforms84-0.3.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9e84cd2763aac3f89b11f3a2ee535ee94a256c6a1638180a3dc80da29d25ec3c
MD5 5a87d76dbb00e5a054cbca5ffbd02c50
BLAKE2b-256 7f9333ddb02325d8f48754f8a475e688fad3ae8f0e042949f3b37668358e7e47

See more details on using hashes here.

Provenance

The following attestation bundles were made for transforms84-0.3.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish-to-pypi.yml on Stoops-ML/transforms84

Attestations:

File details

Details for the file transforms84-0.3.6-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for transforms84-0.3.6-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 91a3a4300e5795e8d5efe27b8aff8eb34350aba957243ddb49f0125b2f858a71
MD5 1c56acbe92143cc8696eb00307c8ee29
BLAKE2b-256 14eb49f588e31084540f4c856df31ad057790898b66274af095adb4d11934a9f

See more details on using hashes here.

Provenance

The following attestation bundles were made for transforms84-0.3.6-cp310-cp310-win_amd64.whl:

Publisher: publish-to-pypi.yml on Stoops-ML/transforms84

Attestations:

File details

Details for the file transforms84-0.3.6-cp310-cp310-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for transforms84-0.3.6-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 84a2740acfdef4c7270632684884fa2ee87d3e22f97619713e78d87ff45aedce
MD5 981a3e595edf0e53eb1cc575a09027bb
BLAKE2b-256 d448e1da16b4a5a081674f0b4fd2f63c887fc88feb3a25008a1a09565c2d9a13

See more details on using hashes here.

Provenance

The following attestation bundles were made for transforms84-0.3.6-cp310-cp310-musllinux_1_2_x86_64.whl:

Publisher: publish-to-pypi.yml on Stoops-ML/transforms84

Attestations:

File details

Details for the file transforms84-0.3.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for transforms84-0.3.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 daa39973d6e0d2d59c1ed9d62c7a3ba1247569327df0d86c86741bd7896a622f
MD5 99d85cee6b2eaf585c7296df5ad17f45
BLAKE2b-256 55946739d3637b1f8ccdbc88dc621d6e32896442e4b50074014705b651eb310b

See more details on using hashes here.

Provenance

The following attestation bundles were made for transforms84-0.3.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish-to-pypi.yml on Stoops-ML/transforms84

Attestations:

File details

Details for the file transforms84-0.3.6-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for transforms84-0.3.6-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 13cb191e6f8c13f4597058e9080aa8b9f1553c45ca334b5cfca30677bdf3b89a
MD5 b12bda794961d3cc7f503dfe28029724
BLAKE2b-256 610c3a9d941b1a2a308356349d16deb6df3143899ad5ac7f79ae9e2e79fcb6cd

See more details on using hashes here.

Provenance

The following attestation bundles were made for transforms84-0.3.6-cp39-cp39-win_amd64.whl:

Publisher: publish-to-pypi.yml on Stoops-ML/transforms84

Attestations:

File details

Details for the file transforms84-0.3.6-cp39-cp39-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for transforms84-0.3.6-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d254bdec512dc97b44a504ebde813c195dcb95074fcdd86032ed0badadaa2278
MD5 2924b6b67bb5990626b02fc80f3ca169
BLAKE2b-256 1874cae6280fd481983df56ab918b7c50f676752160a2991081de99407ef3d37

See more details on using hashes here.

Provenance

The following attestation bundles were made for transforms84-0.3.6-cp39-cp39-musllinux_1_2_x86_64.whl:

Publisher: publish-to-pypi.yml on Stoops-ML/transforms84

Attestations:

File details

Details for the file transforms84-0.3.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for transforms84-0.3.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 51f6cef9ab693bac9f60ec3421f35b5a119490e4edd039d16b3ab6c742b22916
MD5 bb3df32f071ccdbaecef7dd5bc03e266
BLAKE2b-256 638fe92ba21cccea700b6baec718e0280fec3e615fe7f555e491f0633b32ea0b

See more details on using hashes here.

Provenance

The following attestation bundles were made for transforms84-0.3.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish-to-pypi.yml on Stoops-ML/transforms84

Attestations:

File details

Details for the file transforms84-0.3.6-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for transforms84-0.3.6-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 cd320527d9a3f7fa597da79939f724a4a8ff10ea4d9b4b00f0c724491433334a
MD5 d00455937a184e1c1a495c4d40846739
BLAKE2b-256 178dc47b66f07e0a5a37391b3ff952ade373df353ef176d4f11d36f5c869583d

See more details on using hashes here.

Provenance

The following attestation bundles were made for transforms84-0.3.6-cp38-cp38-win_amd64.whl:

Publisher: publish-to-pypi.yml on Stoops-ML/transforms84

Attestations:

File details

Details for the file transforms84-0.3.6-cp38-cp38-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for transforms84-0.3.6-cp38-cp38-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 4b8bd7ad1f74adf06fe9a80dd614ad6f25b076a11e1e535706319efc08c97491
MD5 ed614e9f062dca404d0c796c11d11462
BLAKE2b-256 c88395a4a7ab5b84c688dd8535984ee7aa7e26f82a4c9123ee729c1436ae5255

See more details on using hashes here.

Provenance

The following attestation bundles were made for transforms84-0.3.6-cp38-cp38-musllinux_1_2_x86_64.whl:

Publisher: publish-to-pypi.yml on Stoops-ML/transforms84

Attestations:

File details

Details for the file transforms84-0.3.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for transforms84-0.3.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 92ceb00775da2a2fe21aa777415d170a5071dd1b70d68f8fdee6c0fd35e78a28
MD5 589702368f828811a9c6839353191db3
BLAKE2b-256 1a041cfd76da1372b692e0b3ec09ce612eecc893d5867742787b7777e87a75f2

See more details on using hashes here.

Provenance

The following attestation bundles were made for transforms84-0.3.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish-to-pypi.yml on Stoops-ML/transforms84

Attestations:

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