Skip to main content

Compress / decompress RINEX observation files with Hatanaka compression

Project description

Hatanaka Build PyPI

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hatanaka-1.0.0.tar.gz (29.5 kB view hashes)

Uploaded Source

Built Distributions

hatanaka-1.0.0-py3-none-win_amd64.whl (210.2 kB view hashes)

Uploaded Python 3 Windows x86-64

hatanaka-1.0.0-py3-none-manylinux1_x86_64.whl (862.3 kB view hashes)

Uploaded Python 3

hatanaka-1.0.0-py3-none-macosx_10_14_x86_64.whl (34.8 kB view hashes)

Uploaded Python 3 macOS 10.14+ x86-64

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