Skip to main content

Geographic system transformations with helper functions

Project description

transforms84

PyPI - Version PyPI - Python Version PyPI - Downloads workflow-status

Python library for geographic system transformations with additional helper functions.

This package focuses on:

  1. Performance
  2. Support for different number of inputs:
    • Ideal array shape of (3,1) and (nPoints,3,1) (as well as (3,) and (nPoints,3))
    • Separate input for each axis in the coordinate system of size (nPoints,)
  3. Support for different inputs types:
    • NumPy ndarray
    • Pandas Series
    • List
    • Float/int
  4. 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(
    [
        [[95499.41373564], [111272.00245298], [-1689.19916788]],
        [[95499.41373564], [111272.00245298], [-1689.19916788]],
        [[95499.41373564], [111272.00245298], [-1689.19916788]],
    ]
)

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

>> rrm_local_one_point = DDM2RRM(np.array([[30], [31], [0]], dtype=np.float64))
>> ECEF2ENU(rrm_local_one_point, geodetic2ECEF(rrm_target, WGS84.a, WGS84.b), WGS84.a, WGS84.b)
array(
    [
        [[95499.41373564], [111272.00245298], [-1689.19916788]],
        [[95499.41373564], [111272.00245298], [-1689.19916788]],
        [[95499.41373564], [111272.00245298], [-1689.19916788]],
    ]
)

Again, we can achieve the same result by splitting the arrays over each coordiante system axis:

>> import pandas as pd
>> df = pd.DataFrame(
>>    {
>>        "radLatTarget": rrm_target[:, 0, 0],
>>        "radLonTarget": rrm_target[:, 1, 0],
>>        "mAltTarget": rrm_target[:, 2, 0],
>>    }
>> )
>> df["e"], df["n"], df["u"] = ECEF2ENU(
>>    np.deg2rad(30),
>>    np.deg2rad(31),
>>    0,
>>    *geodetic2ECEF(
>>        df["radLatTarget"],
>>        df["radLonTarget"],
>>        df["mAltTarget"],
>>        WGS84.a,
>>        WGS84.b,
>>    ),
>>    WGS84.a,
>>    WGS84.b,
>> )
>> df[["e", "n", "u"]]
              e              n            u
0  95499.413736  111272.002453 -1689.199168
1  95499.413736  111272.002453 -1689.199168
2  95499.413736  111272.002453 -1689.199168

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].

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

If you're not sure about the file name format, learn more about wheel file names.

transforms84-1.1.0-cp313-cp313-win_amd64.whl (68.3 kB view details)

Uploaded CPython 3.13Windows x86-64

transforms84-1.1.0-cp313-cp313-musllinux_1_2_x86_64.whl (354.3 kB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

transforms84-1.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (277.9 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

transforms84-1.1.0-cp312-cp312-win_amd64.whl (68.3 kB view details)

Uploaded CPython 3.12Windows x86-64

transforms84-1.1.0-cp312-cp312-musllinux_1_2_x86_64.whl (354.3 kB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

transforms84-1.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (278.0 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

transforms84-1.1.0-cp311-cp311-win_amd64.whl (68.2 kB view details)

Uploaded CPython 3.11Windows x86-64

transforms84-1.1.0-cp311-cp311-musllinux_1_2_x86_64.whl (352.4 kB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

transforms84-1.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (275.8 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

transforms84-1.1.0-cp310-cp310-win_amd64.whl (68.3 kB view details)

Uploaded CPython 3.10Windows x86-64

transforms84-1.1.0-cp310-cp310-musllinux_1_2_x86_64.whl (351.9 kB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

transforms84-1.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (275.2 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

transforms84-1.1.0-cp39-cp39-win_amd64.whl (68.3 kB view details)

Uploaded CPython 3.9Windows x86-64

transforms84-1.1.0-cp39-cp39-musllinux_1_2_x86_64.whl (350.8 kB view details)

Uploaded CPython 3.9musllinux: musl 1.2+ x86-64

transforms84-1.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (274.1 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

File details

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

File metadata

File hashes

Hashes for transforms84-1.1.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 90630dc4efca2264f4113d1e60c39f75776bc020b68d5418a6c2b02d054442cf
MD5 daf30fee7b0d44a6baed22d6f3edf8c7
BLAKE2b-256 9adc2d2af81281044e6fc5f86492bdec4217e28639b0da07567d3bdea1856d16

See more details on using hashes here.

Provenance

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

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for transforms84-1.1.0-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 7683c5331c35e3a2da600f8a75a8ea7144165f242d9bbe04ef71aa6025122294
MD5 3439236a06d89a7c16f6f8f054254e88
BLAKE2b-256 9b96360a0875cdb6ec619c1c3aca99e5d6948525df66a86a83ebedd381fb9fdd

See more details on using hashes here.

Provenance

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

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for transforms84-1.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 58e09c04cf693b41c7fbb88c12b98dbda298f6f51beaebb961c41088ff3451a6
MD5 72e72ad14d968b9c813d6f5bdae6229b
BLAKE2b-256 552f7bf248e94b083c27a0b08117713e22cc787894c60aba8e48018a2f8e5535

See more details on using hashes here.

Provenance

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

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for transforms84-1.1.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 e066e41a158cad02d51c4c6bb4ed310423eff337b08fc93b0f4dd74a165b521f
MD5 dad093ca664056b35f120380837c67de
BLAKE2b-256 592abb9567ab0f08ab0093a3ad9b19393bd973720ff9b9c7acaaaf903468a990

See more details on using hashes here.

Provenance

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

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for transforms84-1.1.0-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 b33efe262436157ded8db374ce86a65ce9ee29a4699cd63e28ffd67219c4eee8
MD5 71b09c7e9feeef33d4bfbe2e3fb3e7ca
BLAKE2b-256 970164c2af44e1a3d2def7164a144bd10987c76b33a5c06fb3a861d5ff3099be

See more details on using hashes here.

Provenance

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

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for transforms84-1.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0645fd14660b9a80b74949548d4d7d64011ce3a760077da9578dd93d02147cd9
MD5 4ec51636904de3dcdfc4439fe813e682
BLAKE2b-256 12d1985692276be40629eddf6123007568c13953f7d40c4f2e0bc15801562627

See more details on using hashes here.

Provenance

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

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for transforms84-1.1.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 78ad63c0b343242d4717db5b3a52bfc5dfe179430e6e43f5dc1e151c258c51f1
MD5 a3e805d3b9fc8f2c2e63348ccef1a6c6
BLAKE2b-256 92626c71b6355282b7393f97a5d48ca4ca1f06a9cb0fe6e4e7d708c2addef538

See more details on using hashes here.

Provenance

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

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for transforms84-1.1.0-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 7f22caf2578c97bc685fcb76504f967522804d3116c7fa694a28a5f3748b2678
MD5 0b6e33f4bbb1afd07eb3817293850f8c
BLAKE2b-256 d3a70e850999b03f60673559b34dcada79f479d63461688e4934539337b9b89c

See more details on using hashes here.

Provenance

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

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for transforms84-1.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 277ab1bf2dc334d996e05977eff2dbcba14ffb77fa37ae5e3019b9fc29e96809
MD5 15331afa7807dbbaee83630edb18c19d
BLAKE2b-256 d36950f089dca95bdb37a7d5ce640baba7b8b2572d2e3519835f8bf83ac1e977

See more details on using hashes here.

Provenance

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

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for transforms84-1.1.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 0c39938fcde605d78f4130072711b0deb87ff8279c62d5787a365f71150003c2
MD5 9f31af3502791843f532daaf0758f871
BLAKE2b-256 b6079a70686aee3ed952b7cf5237f8948d84b2bebd27435ca11e91d239c5f6fb

See more details on using hashes here.

Provenance

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

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for transforms84-1.1.0-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 55507a315b5d43f702c232655a3927428bfccd17e69b18405f043160fdb2ac9a
MD5 a0450111836438a03098407afbeaf9d9
BLAKE2b-256 921e69b803965f16ad223484cfbcdc979de07783ed6d0d44e7da3f2e1cffa669

See more details on using hashes here.

Provenance

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

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for transforms84-1.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 46ac30be35256906123233ad02bb155f0bab1bf6b802bff0790c7adaf0833800
MD5 a1dd680f0af95edc7da34569503a6b78
BLAKE2b-256 5be31b1da0d62351d22fd64565b536a0fb90e4f6c6dea7621462bf22a354f343

See more details on using hashes here.

Provenance

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

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: transforms84-1.1.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 68.3 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for transforms84-1.1.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 d76b6ddc85ceb9afb9074839566bf02b4731ee095db292404b93c324afca3738
MD5 c4899b6c2c84467ba8c40a4643b592b4
BLAKE2b-256 0dbf7e8b29b78ac9221cecdf4f3251ec7efa19e774d2ce5eba9f0465357b1273

See more details on using hashes here.

Provenance

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

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for transforms84-1.1.0-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 e99a1a7962d0bd5dd80246a8c9c64e602b393b127b6b5a722a47e83dda6a857f
MD5 96e3e65c8790a7d615c044f7031441b8
BLAKE2b-256 5132a7254ccef001ba594d723300927df28b43077b9b7f56812dcd7764fd162a

See more details on using hashes here.

Provenance

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

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for transforms84-1.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 82ffa9647a99f044429c52ddf7d7218d8339dfc8d27d1ba25661b9b6d06c69f3
MD5 48866da640c694087234416d6d316571
BLAKE2b-256 7c03a5b928bf343c11f7b686948fd78922132b508b7beb1ec2551f0125b6a856

See more details on using hashes here.

Provenance

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

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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