Hatanaka

Effortless compression / decompression of RINEX files in Python and on the command line.
Supports all compression formats allowed by the RINEX 2, 3 and 4 standards:
- Hatanaka compression for Observation Data Files,
- LZW (.Z), gzip (.gz), bzip2 (.bz2) and .zip.
Quick Start
Installation
Wheels are available from PyPI for Linux, MacOS and Windows. Python versions 3.6 and up 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
Python
import hatanaka
from pathlib import Path
# decompression
rinex_data = hatanaka.decompress('1lsu0010.21d.Z')
# or
rinex_data = hatanaka.decompress(Path('1lsu0010.21d.Z').read_bytes())
# or, creates '1lsu0010.21o' directly on disk
hatanaka.decompress_on_disk('1lsu0010.21d.Z')
# compression
Path('1lsu0010.21d.gz').write_bytes(hatanaka.compress(rinex_data))
# or
Path('1lsu0010.21d.gz').write_bytes(hatanaka.compress('1lsu0010.21o'))
# or, creates '1lsu0010.21d.gz' directly on disk
hatanaka.compress_on_disk('1lsu0010.21o')
Any errors during Hatanaka compression/decompression will be raised as a HatanakaException and any non-critical
problems reported as warnings.
These functions are idempotent – already decompressed / compressed data is returned as is.
CLI
The same functionality is also made available from the command line via rinex-decompress and rinex-compress.
Simply provide a list of RINEX files to compress or decompress. stdin-stdout is used if no files are specified.
To remove the original files after conversion, add -d/--delete. The input file is removed only if conversion
succeeds without any errors or warnings.
# creates 1lsu0010.21o
rinex-decompress 1lsu0010.21d.Z
# creates 1lsu0010.21d.gz
rinex-compress 1lsu0010.21o
# stdin-stdout example
rinex-decompress < 1lsu0010.21d.Z | grep 'SYS / # / OBS TYPES'
Additionally, the original rnx2crx and crx2rnx executables are also installed for other tools that might want to make use of them, such as RTKLIB.
Development
Building from source
Installing from source code 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 CHANGELOG.md.
Attribution
Martin Valgur – this Python library.
RNXCMP software for Hatanaka compression support:
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 for the included RNXCMP software – see LICENSE.
Metadata
Release files for hatanaka 2.8.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| hatanaka-2.8.1.tar.gz | 41.2 kB | Without provenance | Details |
Built distributions (wheels)
Total release size: 939.6 kB
Release files / hatanaka-2.8.1.tar.gz
| Download URL | hatanaka-2.8.1.tar.gz |
|---|---|
| Size | 41.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
96c1abdcf7bb3bc010da8314db38b3f458120b254f866652f20ac1c929846907
|
|
BLAKE2b-256 checksum How to use checksums |
21851e4cab748ce31784fdd6fdbd1be103b3a43566162246f77a0a65f5e6be9c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.3
|
Release files / hatanaka-2.8.1-py3-none-win_arm64.whl
| Download URL | hatanaka-2.8.1-py3-none-win_arm64.whl |
|---|---|
| Size | 55.3 kB |
| Tags | Python 3 Windows ARM64 |
|
SHA-256 checksum How to use checksums |
402624db70856e804b6d3438921ae8058b033f8ceb05bb2c228f8d46250d78b1
|
|
BLAKE2b-256 checksum How to use checksums |
50edcdf9c23e48bff43db6892ea4301862a4a69d0ee2ee724a6056f7de33c0b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.3
|
Release files / hatanaka-2.8.1-py3-none-win_amd64.whl
| Download URL | hatanaka-2.8.1-py3-none-win_amd64.whl |
|---|---|
| Size | 55.3 kB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
23e9ade070cdfd1dcb2f4029f8adfed82b5b3fd58317fa91df7ff43f1681b299
|
|
BLAKE2b-256 checksum How to use checksums |
066db160af5d7bb153ae923cc5cba7adbbce3964f60e0f3839d62b3e07baaa6f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.3
|
Release files / hatanaka-2.8.1-py3-none-win32.whl
| Download URL | hatanaka-2.8.1-py3-none-win32.whl |
|---|---|
| Size | 52.3 kB |
| Tags | Python 3 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
7a3628e116241cb51d15d1efada4fcd87c97db30bfd479ec540c024139fa088b
|
|
BLAKE2b-256 checksum How to use checksums |
9d797209ae1dd765bf1604bcdb24a5515f3a8509c4efeabfb30701bd1aa0e29d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.3
|
Release files / hatanaka-2.8.1-py3-none-musllinux_1_1_x86_64.whl
| Download URL | hatanaka-2.8.1-py3-none-musllinux_1_1_x86_64.whl |
|---|---|
| Size | 56.4 kB |
| Tags | Linux musl 1.1+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
d8e406ce6b5d40b83d659ba39640e592e62cdd894b4c5425d0773f6461bb9b4b
|
|
BLAKE2b-256 checksum How to use checksums |
eb943e67994b0628eb9931370c6002dd8652b394e9a06128d0d56179074f3626
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.3
|
Release files / hatanaka-2.8.1-py3-none-musllinux_1_1_s390x.whl
| Download URL | hatanaka-2.8.1-py3-none-musllinux_1_1_s390x.whl |
|---|---|
| Size | 57.3 kB |
| Tags | Linux musl 1.1+ IBM System/390x Python 3 |
|
SHA-256 checksum How to use checksums |
7e8cc8829d4a0bc74b13fba07aecca5e3fcde0ea602a090bf6946931e5c5b108
|
|
BLAKE2b-256 checksum How to use checksums |
41eacb7259499aaf56e4a3081fea75bcec6d1ce16dd686d97a2d64f22050ebd1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.3
|
Release files / hatanaka-2.8.1-py3-none-musllinux_1_1_ppc64le.whl
| Download URL | hatanaka-2.8.1-py3-none-musllinux_1_1_ppc64le.whl |
|---|---|
| Size | 61.5 kB |
| Tags | Linux musl 1.1+ PowerPC 64-le Python 3 |
|
SHA-256 checksum How to use checksums |
d86f2fb9e847a7fe5d4a330f3cbadc487d902b03021c609c5dd750688b712074
|
|
BLAKE2b-256 checksum How to use checksums |
c963108fd543a7c44ddb0660ca0da7dee488d49abafc53f0e6330fef1a3e60b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.3
|
Release files / hatanaka-2.8.1-py3-none-musllinux_1_1_i686.whl
| Download URL | hatanaka-2.8.1-py3-none-musllinux_1_1_i686.whl |
|---|---|
| Size | 57.8 kB |
| Tags | Linux musl 1.1+ x86-32 Python 3 |
|
SHA-256 checksum How to use checksums |
1a7990b900643fa3b0a720cec83e1b7bd544128ae3a11509f27fea4d0ae9d131
|
|
BLAKE2b-256 checksum How to use checksums |
6a165d1ad0ba439fef59297c2291c44588d524a824a9f37e96288af04988e526
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.3
|
Release files / hatanaka-2.8.1-py3-none-musllinux_1_1_aarch64.whl
| Download URL | hatanaka-2.8.1-py3-none-musllinux_1_1_aarch64.whl |
|---|---|
| Size | 57.5 kB |
| Tags | Linux musl 1.1+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
8ea03da8ffa218d7db49239f5225a0cb4f874a04de83b4cbdf2dfe6e312c249c
|
|
BLAKE2b-256 checksum How to use checksums |
a4e7a8fd2c7f6d5c78564b528cc35e754f61fb24669feb240fcd8b556bb27a9b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.3
|
Release files / hatanaka-2.8.1-py3-none-manylinux_2_17_s390x.whl
| Download URL | hatanaka-2.8.1-py3-none-manylinux_2_17_s390x.whl |
|---|---|
| Size | 53.6 kB |
| Tags | Linux glibc 2.17+ IBM System/390x Python 3 |
|
SHA-256 checksum How to use checksums |
085bcf99f0dbf7ad6c05a5e192e222a82173e901fb3255d21eabc41bcca02f23
|
|
BLAKE2b-256 checksum How to use checksums |
1643c556d7be16ee244961e068203ba8ff1453055e60225b9a64e1ac8a6cdd03
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.3
|
Release files / hatanaka-2.8.1-py3-none-manylinux_2_17_ppc64le.whl
| Download URL | hatanaka-2.8.1-py3-none-manylinux_2_17_ppc64le.whl |
|---|---|
| Size | 57.1 kB |
| Tags | Linux glibc 2.17+ PowerPC 64-le Python 3 |
|
SHA-256 checksum How to use checksums |
4a92a3b1cd403d826802f3b9b83d68479a210ed91bffd37efeb9aa2b87dea521
|
|
BLAKE2b-256 checksum How to use checksums |
a05d87b70ac6893bbdac87575dac8a483b4f799f1c0680eedd5ca0376433c480
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.3
|
Release files / hatanaka-2.8.1-py3-none-manylinux_2_17_aarch64.whl
| Download URL | hatanaka-2.8.1-py3-none-manylinux_2_17_aarch64.whl |
|---|---|
| Size | 53.9 kB |
| Tags | Linux glibc 2.17+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
eac8f15d0546a065f43d83e2bb9f1909167c3304e407363fb58c6469ffc8eb11
|
|
BLAKE2b-256 checksum How to use checksums |
033ac4f48358b5e757398d220320bd30df7c9f51c54b1ebe3247ab065aea5222
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.3
|
Release files / hatanaka-2.8.1-py3-none-manylinux_2_5_x86_64.whl
| Download URL | hatanaka-2.8.1-py3-none-manylinux_2_5_x86_64.whl |
|---|---|
| Size | 52.7 kB |
| Tags | Linux glibc 2.5+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
6ae11ee5c489a803a2b34a546ab604b84be12b226e1655bbe7654701e22fe38e
|
|
BLAKE2b-256 checksum How to use checksums |
6e9ba57161a908d914218db26166d0be5416f4327c81236ecc3fb83378dc058e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.3
|
Release files / hatanaka-2.8.1-py3-none-manylinux_2_5_i686.whl
| Download URL | hatanaka-2.8.1-py3-none-manylinux_2_5_i686.whl |
|---|---|
| Size | 52.6 kB |
| Tags | Linux glibc 2.5+ x86-32 Python 3 |
|
SHA-256 checksum How to use checksums |
abb9c216fd37fae932008da1824b9e12842ad468b7bc5a92d21da1867fa32499
|
|
BLAKE2b-256 checksum How to use checksums |
612030e86fb61f5e5cdb978b35171d57d092e77e559b8ee72db950bf202ef1ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.3
|
Release files / hatanaka-2.8.1-py3-none-macosx_11_0_arm64.whl
| Download URL | hatanaka-2.8.1-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 50.7 kB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
e20c9d97483f08890f28745c144f412d57f524289efd7a83a300d98aabdad567
|
|
BLAKE2b-256 checksum How to use checksums |
b5e7da05e0135b7b5837b7abbd17abb8d3469f2f92e316abe06c1f756aa09278
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.3
|
Release files / hatanaka-2.8.1-py3-none-macosx_10_9_x86_64.whl
| Download URL | hatanaka-2.8.1-py3-none-macosx_10_9_x86_64.whl |
|---|---|
| Size | 50.1 kB |
| Tags | Python 3 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
5131cb9160bfe9df3127f8909a2bb47a0e3afc1778e72a49a5866522357e7d76
|
|
BLAKE2b-256 checksum How to use checksums |
b216c34a798c6e943563e2c801e256ecaf5586d4ecb43e25a89e26a8071c3416
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.3
|
Release files / hatanaka-2.8.1-py3-none-macosx_10_9_universal2.whl
| Download URL | hatanaka-2.8.1-py3-none-macosx_10_9_universal2.whl |
|---|---|
| Size | 74.3 kB |
| Tags | Python 3 macOS 10.9+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
eb61234c5f53991433097ba26eaacf05c177df3b8b986d4043acc03da5e11d70
|
|
BLAKE2b-256 checksum How to use checksums |
79efff252a15ce3ceb99463daa8be0cf7f6d534e727e0c187021849493d629d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.3
|
Security for hatanaka 2.8.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.