Geographic system transformations with helper functions
Project description
transforms84
Python library for geographic system transformations with additional helper functions.
This package focuses on:
- Performance
- Ideal mathematical shapes of (NumPy) matrices:
(3,1)
or(nPoints,3,1)
. Shapes(3,)
and(nPoints,3)
are also supported. - 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:
- geodetic โ ECEF ๐
- ECEF โ geodetic ๐
- ECEF โ ENU ๐
- ENU โ ECEF ๐
- ENU โ AER ๐
- AER โ ENU ๐
- ECEF โ NED ๐ ๐
- NED โ ECEF ๐ ๐
- NED โ AER ๐ ๐
- AER โ NED ๐ ๐
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:
- Haversine ๐
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:
- Geographic coordinate conversion
- Local tangent plane coordinates
- Coordinate systems for navigation
- Fundamental coordinate system concepts
- Coordinate systems for modeling
- Coordinate systems for display
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
Built Distributions
Hashes for transforms84-0.3.4-cp313-cp313-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56e1237d45a91a8bf6fb6ae5b7399b69b27e7237794af96eb04427e19adf89f5 |
|
MD5 | b7d45b8efe93970e15b13bbbdb0b509f |
|
BLAKE2b-256 | cad638eb8fe0f5e37ad4a086de46fd5a9de0da4dc3502e3d2994196d0f9062c1 |
Hashes for transforms84-0.3.4-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4af718effaae46c59ba3a923d2cf151396ebc586a2585a920612c271d0187ca7 |
|
MD5 | b01ec1472a5e362ba793dc8580dd8af2 |
|
BLAKE2b-256 | 95e3377f4a6fd1e0bde1cfc65a456c9f80865e569f1978e09e75e0740d2143e9 |
Hashes for transforms84-0.3.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51e31fd281ea95a122317f4b748df1d2d600cc1aa47cd83b2032f5e452577bb6 |
|
MD5 | 0c766561bc34b0f67eb33977b0adfab9 |
|
BLAKE2b-256 | 236ea2cfec8fc2727692db91645117ec556074c1d941d83f316cb59c34d77e8a |
Hashes for transforms84-0.3.4-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55930be751ee843ed2cce0083d6efab6291061e72e6737ef5137efd7dc0610f7 |
|
MD5 | 758e5c8b704019a431d5d94cde046256 |
|
BLAKE2b-256 | daa56c1a5d113ced8e4f02fd39f549274aef4b5bbda463e4c5e0fb7977237ce8 |
Hashes for transforms84-0.3.4-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 452c00fdf9cb1a06d0e24b52712369465d849268721ce7721950a33c082c0933 |
|
MD5 | 8bdad5b3eb27c75630262f17b9e01e70 |
|
BLAKE2b-256 | b8920135add953733a7ab226d9c55168daa5dd217e9ace6dd449fa5916d9410a |
Hashes for transforms84-0.3.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3660f73cdb26f5e766587e69c26cd726507a03cf106219fb897e5c92a89a2b0a |
|
MD5 | bda22f98cdf066d5ddd899c3b5f4f2fc |
|
BLAKE2b-256 | d39f29a59410ae1ac3b632fd19216e068c18080bef825b33307ed7c3b4c11282 |
Hashes for transforms84-0.3.4-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b292c56d13754eb44e5b1aacb8267d3fd319d7ba101cafbace451e4b9f38e298 |
|
MD5 | 13901fd485233b31c9c99620712874a9 |
|
BLAKE2b-256 | 8ea0acfa34e95baca0ca52c8503325c68a48b9452cb8cc3b7547c6784552463c |
Hashes for transforms84-0.3.4-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b654532f7d16a412eb85262486f5f429cb25db803b50e80b2c587f7128930cb2 |
|
MD5 | 1fb6ebcecca8e003a3d630413abed5f3 |
|
BLAKE2b-256 | 1d337dc8fb02949eb1c80d9c67c38e3fae836e19b3c5b87b13d6ece9ac415050 |
Hashes for transforms84-0.3.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbb582c2dff700a24f535a8f73961a244b58d4785aaed4e84c09cacb87df411c |
|
MD5 | 76dd2f455e40aaba7bd2f3fa0fa9bf32 |
|
BLAKE2b-256 | f35b33e816207c68c023dbf56ac5b8f5cb30acd222615e11692da40794d75df9 |
Hashes for transforms84-0.3.4-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a7790063eb7d4cc8e165060426f138b96cfb385d78967ae0c08acec6b1c0300 |
|
MD5 | 21e30e6b4f4ee987a2543d5b2b7ef657 |
|
BLAKE2b-256 | 667a6cbc31a937d3811ccf2d3985c46b53e183ff00d01f8b0c84d7d57525c63b |
Hashes for transforms84-0.3.4-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88ccaf9890ba1656cf0f2bf3ed0b2bc40187bc44f95cc4cc0c3f5ed55d228f79 |
|
MD5 | 72ad1278a72172579a01c9ed958a6ff6 |
|
BLAKE2b-256 | a8ecb55772c96186afbc1bfa279cfdfce98ed20ed84f17b7d8bdfd97f2143f76 |
Hashes for transforms84-0.3.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d3a490eb5db44a53369dd8a1277e3dff8b41324ce69f5e703fc542492dfb059 |
|
MD5 | 59fefb4c3cc078adc686a364c6de1c57 |
|
BLAKE2b-256 | 975377feeb28e0c364f735974682848cc573caf10b288cb9ea344e99883b0f14 |
Hashes for transforms84-0.3.4-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c4750e1569855263f2d48a003fc23e8d4f005f770695fde076e86bbc011b7b8 |
|
MD5 | 3f386eae9296ad6e1a7aff072bf62a25 |
|
BLAKE2b-256 | 44af93eeab5203a5bd053916618aa168015dc485aa786940d7e0ae8232f047fc |
Hashes for transforms84-0.3.4-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8cf94a1ad1400aba77f24478fbfef8750d2c02b0332cce721b611533fb9a08ac |
|
MD5 | 8154f802f3299423573d33ab5e7184e9 |
|
BLAKE2b-256 | 40911fd088e1dec6ee7b18dd845129543faa618dcf3efc0fd35510d3df868bb2 |
Hashes for transforms84-0.3.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83145aebfb1a313331a185ff718959029af44f480d28785fe995d6d627bbfe71 |
|
MD5 | 7735f578765ea142bde0df9b74eadba6 |
|
BLAKE2b-256 | 98c9e0b351de2e3bbe589b8ad831bb7900ebc02d44ba832c5ec179d216cbf688 |
Hashes for transforms84-0.3.4-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 112c02f8ff33a8e674b15490e624553b1fda77fd398c398333c4a6a61ad3ee24 |
|
MD5 | ebe8340dd736499a7e0c7c762278c040 |
|
BLAKE2b-256 | 07292d3ad82ce010d9c6c20be2444e14c4dad336e0828e1df2298fb597c8fa74 |
Hashes for transforms84-0.3.4-cp38-cp38-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8898a2b0fb95749b854fb31c15633e0cc5eec2112c3647cdc07c03c06492b572 |
|
MD5 | 339bc4170e1612ed9552dc6678f210aa |
|
BLAKE2b-256 | 475b8b946afd1a591cd5e2709137fa73e3a3e6d9ac35d14fa3744129ab4412ce |
Hashes for transforms84-0.3.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08561ddda5fe6fe79e0408349b40eb95a7899b17bb869191aa1210457dec4432 |
|
MD5 | 4ca0f9b0f521a60b366c6135eac508dc |
|
BLAKE2b-256 | bfe1d118c660d7769cae57cfc5ae172545140691031aea5b40bb93c9de0a4b7c |