Compress / decompress RINEX observation files with Hatanaka compression
Project description
Hatanaka
![PyPI](https://pypi-camo.freetls.fastly.net/89491c89d465e8be2a7522e12095cb9b4b06d103/68747470733a2f2f696d672e736869656c64732e696f2f707970692f762f686174616e616b61)
Hatanaka compression / decompression of RINEX observation files within Python.
Wraps the original RNXCMP tools by Y. Hatanaka of the Geospatial Information Authority of Japan (GSI).
Usage
Usage is simple and straightforward.
from hatanaka import rnx2crx, crx2rnx
with open('observations.crx') as f:
rinex_data = crx2rnx(f)
# or
rinex_data = crx2rnx(f.read())
Alternatively, either function can also be applied directly to a file on disk.
from hatanaka import rnx2crx_file, crx2rnx_file
rinex_path = crx2rnx_file('1lsu0010.21d')
assert rinex_path == '1lsu0010.21o'
Any errors during processing will be raised as a HatanakaException
and any non-critical problems reported as warnings.
In addition to the above, the original rnx2crx
and crx2rnx
tools are made available from the command line as well.
Installation
Binary wheels are available from PyPI for Linux, MacOS and Windows. Python versions 3.6+ are supported.
pip install hatanaka
To ensure that everything is working as expected, it is recommended to also run the included tests.
pip install pytest
pytest --pyargs hatanaka
Building from source
Installing from git source code repo is also an option, in which case the RNXCMP tools will be built in the process.
This assumes a C compiler is available and is usually picked up automatically by Python's setuptools
.
If that is not the case, you can instead provide a path to one by setting the CC
environment variable.
pip install git+https://github.com/valgur/hatanaka
Changes
See CHANGES.md of the original RNXCMP software package.
Attribution
Martin Valgur – this Python library.
RNXCMP software:
Hatanaka, Y. (2008), A Compression Format and Tools for GNSS Observation Data, Bulletin of the Geospatioal Information
Authority of Japan, 55, 21-30.
(available at https://www.gsi.go.jp/ENGLISH/Bulletin55.html)
License
This library is provided under the MIT license. Additional license terms apply from the included RNXCMP software – see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for hatanaka-1.0.0-py3-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5f5009a21c724c06ba7afeb32b4e1633851d49ade43f0d2602d0b635c4a7497 |
|
MD5 | e91243de468629e985dc0cdc91028c7d |
|
BLAKE2b-256 | 9b4dc5f2ff72d831c039b089206bfc781744028fa3f4ac29735986423e95f6f8 |
Hashes for hatanaka-1.0.0-py3-none-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 630b378cd1b4cec93f625f780c0a23c0497874486861cdb9cb5dffd4b0f16db0 |
|
MD5 | 53c8648c31960072ab83d5c2fc9ae4fe |
|
BLAKE2b-256 | 38720a9a37bc74f473926ba7ffbfcf6ea7a9e9af9df13406dbd768419086bc3c |
Hashes for hatanaka-1.0.0-py3-none-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 029b345ae8773dbfc9214f3cd47b58594b1a0c8bec08e943e96ea1a37132d96a |
|
MD5 | cab475750ef020acb134348f6632e046 |
|
BLAKE2b-256 | 6762c8a60b1da030f8be9ee11871a343ffc01c72298acaba1b7550d168084f64 |