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.5-cp313-cp313-win_amd64.whl (47.5 kB view details)

Uploaded CPython 3.13 Windows x86-64

transforms84-0.3.5-cp313-cp313-musllinux_1_2_x86_64.whl (280.2 kB view details)

Uploaded CPython 3.13 musllinux: musl 1.2+ x86-64

transforms84-0.3.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (203.4 kB view details)

Uploaded CPython 3.13 manylinux: glibc 2.17+ x86-64

transforms84-0.3.5-cp312-cp312-win_amd64.whl (47.4 kB view details)

Uploaded CPython 3.12 Windows x86-64

transforms84-0.3.5-cp312-cp312-musllinux_1_2_x86_64.whl (280.1 kB view details)

Uploaded CPython 3.12 musllinux: musl 1.2+ x86-64

transforms84-0.3.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (203.5 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

transforms84-0.3.5-cp311-cp311-win_amd64.whl (47.4 kB view details)

Uploaded CPython 3.11 Windows x86-64

transforms84-0.3.5-cp311-cp311-musllinux_1_2_x86_64.whl (278.4 kB view details)

Uploaded CPython 3.11 musllinux: musl 1.2+ x86-64

transforms84-0.3.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (201.7 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

transforms84-0.3.5-cp310-cp310-win_amd64.whl (47.4 kB view details)

Uploaded CPython 3.10 Windows x86-64

transforms84-0.3.5-cp310-cp310-musllinux_1_2_x86_64.whl (277.7 kB view details)

Uploaded CPython 3.10 musllinux: musl 1.2+ x86-64

transforms84-0.3.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (200.6 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

transforms84-0.3.5-cp39-cp39-win_amd64.whl (47.4 kB view details)

Uploaded CPython 3.9 Windows x86-64

transforms84-0.3.5-cp39-cp39-musllinux_1_2_x86_64.whl (276.4 kB view details)

Uploaded CPython 3.9 musllinux: musl 1.2+ x86-64

transforms84-0.3.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (199.2 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

transforms84-0.3.5-cp38-cp38-win_amd64.whl (47.0 kB view details)

Uploaded CPython 3.8 Windows x86-64

transforms84-0.3.5-cp38-cp38-musllinux_1_2_x86_64.whl (260.4 kB view details)

Uploaded CPython 3.8 musllinux: musl 1.2+ x86-64

transforms84-0.3.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (184.1 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

File details

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

File metadata

File hashes

Hashes for transforms84-0.3.5-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 27ae95d81f0500b25216dd2dee720c62b023a5e66423892bc714d326a3f61d79
MD5 0cf4703bbe9007a41d9bdc008909f2bf
BLAKE2b-256 123e0fb7cfe592bba3ca4e10169e17d69bf0750721bb9b3a66a90fe790fde3f8

See more details on using hashes here.

Provenance

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

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

Attestations:

File details

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

File metadata

File hashes

Hashes for transforms84-0.3.5-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 949f43279debf8cc67193a9081c8eb23290b3e43eed7d7cc342558ce75b26d21
MD5 9025277308793c9fd84d4aaeebe4156c
BLAKE2b-256 8cdaf3723210d2defc34d0563dfa484d7f252316985fa81624edda6c478c2c07

See more details on using hashes here.

Provenance

The following attestation bundles were made for transforms84-0.3.5-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.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for transforms84-0.3.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 46242faa058cd040acdb831da0673828c3c407d12188fed3a6c93e7b9a0c9059
MD5 336e39cecbde77583aace26121ebe018
BLAKE2b-256 92aeea01dd56808e919625c64b8b1839ef22b497e0197b60be3ae18a2e6dbb17

See more details on using hashes here.

Provenance

The following attestation bundles were made for transforms84-0.3.5-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.5-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for transforms84-0.3.5-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 87f461a6b5fdad2fbfb4821edbfd2933474e77ab69e0f808a3825b2006f40680
MD5 a1e65a51f4f57c4177c5cc0736933fb2
BLAKE2b-256 601b6a852f6a4ed3ac14a03b81aa24e630af250ac122538c97e9356978b67e97

See more details on using hashes here.

Provenance

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

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

Attestations:

File details

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

File metadata

File hashes

Hashes for transforms84-0.3.5-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 c93e32ed3557fd9dba84a82cf4ed30941c810e971b74a45c0f5c31f4f0fb1384
MD5 8a2b9f9e4d306b9536c33ffb45e1a0da
BLAKE2b-256 6792bc1aa31e29fd6e9101f4d4cd01aa54462ab508503aeca3a50dcbbc01d9ad

See more details on using hashes here.

Provenance

The following attestation bundles were made for transforms84-0.3.5-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.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for transforms84-0.3.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 49511035ee7220d296a1e1a0fe208fbe2ea759e597f9cb50c34ea5c50053e7fe
MD5 f3d8b8247cf9e1f70ab18a6bbf6dc1b8
BLAKE2b-256 e32f23e15ed5b8e9886337882cc6ed52878df17ea294fbbe732b57c4f9244329

See more details on using hashes here.

Provenance

The following attestation bundles were made for transforms84-0.3.5-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.5-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for transforms84-0.3.5-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 287ac76a056b3724a1ef0937af123b8b273e87deb24eff4791a7c1a49c27c116
MD5 3920f25c49be318ee228397bf64f5362
BLAKE2b-256 04ac61a3d70d1bf77903a63fc29813fc40eb392eda2c0dc85a97c22e54cfabbd

See more details on using hashes here.

Provenance

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

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

Attestations:

File details

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

File metadata

File hashes

Hashes for transforms84-0.3.5-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 98bf8957ec6fbc5d438fc7fd202dab0966db2c99f7bd572fdd4d8eda191165a0
MD5 39c638c930792cc12fa75a93f68df6e7
BLAKE2b-256 ff9c9f5e5256d457a448d54a15e20845ab7d505c59d624541e8811e944777dd4

See more details on using hashes here.

Provenance

The following attestation bundles were made for transforms84-0.3.5-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.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for transforms84-0.3.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 78235a08fb1a0520827356999fcfa044be6317aac9645210b3a6d31c4c8f25f9
MD5 6f31629332b5cb6724b1ecf5f1994393
BLAKE2b-256 2ceadcdadc31753a8446a132db0e6d38e2250ac0566cdd3383cc91e9325d8c11

See more details on using hashes here.

Provenance

The following attestation bundles were made for transforms84-0.3.5-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.5-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for transforms84-0.3.5-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 6f9d0eee53b32f0318cbd2cd16e65a49e644aca9da3c222b7b7c18823657e2a8
MD5 398cd97e0d94a748ba833eb9b1110cbf
BLAKE2b-256 0c5a4a0effea4e40832af0c22e8169422b48ffbd3bc0a36a1a348bfa2171f763

See more details on using hashes here.

Provenance

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

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

Attestations:

File details

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

File metadata

File hashes

Hashes for transforms84-0.3.5-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 07f6c157e5f055e0887ed50780fe7b0bc35c259c8f2434cdf1ad25ca6d79e968
MD5 fd88c16aba2dcdf9fdbdbeb330e8e1df
BLAKE2b-256 a23e254fa34c7d44db06e34f0f3689ebbc3ee922f42a139b850d7f44ba679c16

See more details on using hashes here.

Provenance

The following attestation bundles were made for transforms84-0.3.5-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.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for transforms84-0.3.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e34fe84df62b44c03dac4d15822fc9475aa972ac8e54d56ce414b4242e1f8fcc
MD5 0372f679607a17cc4ee726b8855fb607
BLAKE2b-256 d60f2812dbb08bf3352f9ef55fccfabba7139a6cb6b068ab8ee77647a9d01cff

See more details on using hashes here.

Provenance

The following attestation bundles were made for transforms84-0.3.5-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.5-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for transforms84-0.3.5-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 1205f87d3fbae1a778e9ff95e1134f028196479b00afbdb2ed41eefea3973bf1
MD5 b879b751987dba65f8b0899890bb899f
BLAKE2b-256 bc4fb35d955f6ee3d39342ff53648a214e02bdcb044e1d37a283070a47bc6518

See more details on using hashes here.

Provenance

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

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

Attestations:

File details

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

File metadata

File hashes

Hashes for transforms84-0.3.5-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 dcf4e100a64fbb23b48ca82d09e875f6d14fc7a9d4ba68485aa083ab95b60300
MD5 f964ce9a4b1e8e8c3d32bbe565a40898
BLAKE2b-256 08f806259b7397fdf0bd9114fc9ffc040286b55b71128ecf0a37173330c48456

See more details on using hashes here.

Provenance

The following attestation bundles were made for transforms84-0.3.5-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.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for transforms84-0.3.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8372cf53ccadd3bc54c8195afee8f4756db4ca5bc9e30ce930aa28793cd910ef
MD5 5b7ff5921776a423baf33dded13ad535
BLAKE2b-256 050b23801788f5812d1e3c18172cc59e28a4c9816d1f8678315da912ba7bccc5

See more details on using hashes here.

Provenance

The following attestation bundles were made for transforms84-0.3.5-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.5-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for transforms84-0.3.5-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 f216df2713b5d5078dc12415a16849b7c5ffc36c3bf2111d582144b289469c00
MD5 e15dd02213fb461a563dffb7b669a309
BLAKE2b-256 3100145d442e3bb544a26f9c608b18b7fa9d5a23a4b934844fa2f458be495a97

See more details on using hashes here.

Provenance

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

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

Attestations:

File details

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

File metadata

File hashes

Hashes for transforms84-0.3.5-cp38-cp38-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 438cc3d319094a6e4585b21351ba8b180cc47e39b550918f4b54f977434011dc
MD5 a656c531e97cd7e13fb776bd6716ca33
BLAKE2b-256 61d2b7ccba600c5f9bade465f6a0187383e515b8be3f5f5638db9bca09872c20

See more details on using hashes here.

Provenance

The following attestation bundles were made for transforms84-0.3.5-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.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for transforms84-0.3.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2203c5effc39bacb9f6ba23032fc2acfa887852d1e1801caac7973a7ca655efa
MD5 bcdc7f10b1e8e9ac37c534181255ea83
BLAKE2b-256 2c3982e885730ea4d444c847a037eeafb7c010b7584dbb89927bc6a7fe556fca

See more details on using hashes here.

Provenance

The following attestation bundles were made for transforms84-0.3.5-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