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

Uploaded CPython 3.13 Windows x86-64

transforms84-0.3.7-cp313-cp313-musllinux_1_2_x86_64.whl (280.6 kB view details)

Uploaded CPython 3.13 musllinux: musl 1.2+ x86-64

transforms84-0.3.7-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.7-cp312-cp312-win_amd64.whl (47.6 kB view details)

Uploaded CPython 3.12 Windows x86-64

transforms84-0.3.7-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.7-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.7-cp311-cp311-win_amd64.whl (47.5 kB view details)

Uploaded CPython 3.11 Windows x86-64

transforms84-0.3.7-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.7-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.7-cp310-cp310-win_amd64.whl (47.5 kB view details)

Uploaded CPython 3.10 Windows x86-64

transforms84-0.3.7-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.7-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.7-cp39-cp39-win_amd64.whl (47.5 kB view details)

Uploaded CPython 3.9 Windows x86-64

transforms84-0.3.7-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.7-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.7-cp38-cp38-win_amd64.whl (47.1 kB view details)

Uploaded CPython 3.8 Windows x86-64

transforms84-0.3.7-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.7-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.7-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for transforms84-0.3.7-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 c4781a4a6b4312a61358274d1df6d20f0cef26461b0af6218cbb44e15959e0f6
MD5 c8d42e1b284e6f2343ca683b9d566020
BLAKE2b-256 d9d8907b05e9f585b21b0880a88e36a1867e531ba0e843fd8bd1b26e8d8ec0bb

See more details on using hashes here.

Provenance

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

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

Attestations:

File details

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

File metadata

File hashes

Hashes for transforms84-0.3.7-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 67afb1a5b36721ddd64ccfe1c48005c3256a69a6fae634f9724b48a101b3ae57
MD5 55c162456ee74ebbcffb876231a3051f
BLAKE2b-256 498b991993445e3d971dfcde71c40a3028143fc4ff9e3033da7eed0dd1d3d57a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for transforms84-0.3.7-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f140a3ef3c9ec9b5f05318d52161a4923540b6d90715a2155d2c9203fd88da03
MD5 cb7e00a4f5b63d0b0f781dffc158d1fc
BLAKE2b-256 a171ad4c42ab23ea2573cb6a78115bad787daba2fcaffdb464d542cee4b86b19

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for transforms84-0.3.7-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 83c6c68103453917b6a8e7458c100f10640702d4eade22a056fcb5251d5f455c
MD5 807ea9e8afa0098f47ccb69bb0b6c246
BLAKE2b-256 5b06c94cff57b0be9b892ea226e7049f649f812bbaa13d9dabe122172b2c8924

See more details on using hashes here.

Provenance

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

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

Attestations:

File details

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

File metadata

File hashes

Hashes for transforms84-0.3.7-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 3a44613a1a72f938f1ed7abeae991913b99e3a07892ec520d0a08960eb926ff3
MD5 b63dbaca6ea510d18d6c2eb3cc76748c
BLAKE2b-256 cfc92c65ad832c137ba09c852ec8e6c5c834e3288dfc49c5fb783bd8cbac2b2c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for transforms84-0.3.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 26551df268d0b359487e54ef64dd256edd7d37f40eb1238d52a0e703ac885261
MD5 daad90c6c17cd3b14c2c38b1529e4e00
BLAKE2b-256 2dd382ae1e8d1341b64eb2babf60a1cca1edccdcc59081172843d429519acbfa

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for transforms84-0.3.7-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 835d89f564cdea17005d21773d31bbc58850273eae4fdc5eecf1b6c2d414d77b
MD5 ca96ef6169c54db72a7845b7d5f61883
BLAKE2b-256 e6e624da483c9ecfda8f22ab96193d318e4ce83d2c66beb4bcf9c8cbf300ff5b

See more details on using hashes here.

Provenance

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

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

Attestations:

File details

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

File metadata

File hashes

Hashes for transforms84-0.3.7-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 c0be25da187f9bf71f0948b6e2abf50f0f421fe4021cd860ee93f9daad95d8d2
MD5 02289d58c44a52cf927fb1f2666e7e39
BLAKE2b-256 9693d9ceeb44035cead48757513b857e55496cf0e3781450015dfcac63e5e5ce

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for transforms84-0.3.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f6e94cce2a1e5132edb22ac589fd00db06ea862fc1cb3241fb64446333f6bce7
MD5 3765864389889b33eb2e0411da8c8036
BLAKE2b-256 37f289fe45874a0a302f03fc751fb5aeba7fb620cadcd13f357bec3667a8dd5d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for transforms84-0.3.7-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 eabebbf7a5edc17a2c8a316b3c14cab72cc3884429af81babc657848053a2378
MD5 1cf4798fa169a30515ad5a59e11bde9f
BLAKE2b-256 9f8359c586d269c64f30ca9555b1d9eaee28ede8ce660309326e047d7904d357

See more details on using hashes here.

Provenance

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

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

Attestations:

File details

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

File metadata

File hashes

Hashes for transforms84-0.3.7-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 c7dd612ea213987f2296f6db17eaeb6d3c97ed8d3b6c6e6c6c7c685aeca9fd11
MD5 e0c5372a4291cf389eae4550630b1dac
BLAKE2b-256 7b94e0f4be32ff1106fbb5ca77f586794893c32b14b9e89718735a08718d9e62

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for transforms84-0.3.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b48a74f20cb15ba65f1128c268e4a85ccb7dfc596887a17b2f1654b51461dd4f
MD5 6da5b3fb6f9588d6ff687f3ba6182fef
BLAKE2b-256 3c06cc1a47543a8fe9f534df2a28ffcd77301d97755cad9712bee5fe809caed8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for transforms84-0.3.7-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 cf2b16ed1f5073515ac04d051fe15d14ecbcce13e283d71a8c0ed9ce01269e8c
MD5 e73f1e27b8782726e23e4097481276a1
BLAKE2b-256 d82cd7563037092f972d4b9da9533157dcdc22ab7303043b262634fe7cd76c43

See more details on using hashes here.

Provenance

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

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

Attestations:

File details

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

File metadata

File hashes

Hashes for transforms84-0.3.7-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 63de6ac5e2fa4bffc5d02df6bd71c1dc41092c95216d64f5d0a3143266ac7bf2
MD5 0644f661ba90dd138053c2a3830ad7cb
BLAKE2b-256 51830863b17ce98334b4de26e785919d44820784c35cdfd5de31f04863cff004

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for transforms84-0.3.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ff19531f1e50bf6b53aa8835da9500c7c8cbfd5f805cb8ddbffcefff3edc9af2
MD5 7ce871182ad6987285c9ca48cdacf522
BLAKE2b-256 95725c3757b03a0524b3fa2760f463006ca756d219c85aae51c7e7604cc040f9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for transforms84-0.3.7-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 40263692c45e790deb08f2071b41f92e64ea6f5b98eb71cae7d0df8ad26a21f4
MD5 73f19415dad26f0820827d9aa967e9b9
BLAKE2b-256 044fc6599d5d7068c0df68b29d596a040d6773eeff087547ac94431c7360717b

See more details on using hashes here.

Provenance

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

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

Attestations:

File details

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

File metadata

File hashes

Hashes for transforms84-0.3.7-cp38-cp38-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 9e7a42ec545470fd0de6b0b8248588d26a91adc108d6d48866ba6c2c3df12466
MD5 09a12b79a8ccfaa8d4d95e8aa8da62dc
BLAKE2b-256 60cbf1ccc7a4ea8733279e2b26a0124f2042ec85dd4f4ac4703a632ccbbf89e6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for transforms84-0.3.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f0993796d592182a163f4446479fdb004a836450a8218987a732359433479e26
MD5 ebaaf35ac41e585c678815885dbf56bd
BLAKE2b-256 231ba386c2b8d2fcd0b7e24a5fca99ae42764abac4c76d02948ddf56a481eb40

See more details on using hashes here.

Provenance

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