python bindings for h3ron
Project description
h3ronpy
Python extension for the H3 geospatial indexing system exposing some functionalities of the h3ron*
rust crates to the python language and integrating with the numpy, pandas,
geopandas, rasterio and gdal libraries.
One goal is to not duplicate any functions already implemented by the official H3 python bindings.
This library is in parts parallelized using rayon. The number of threads can be controlled as described in the rayon FAQ
Usage
See the included jupyter notebook documentation.ipynb. The notebook requires these dependencies to run.
Logging
This library uses rusts log
crate together with the env_logger
crate.
This means that logging to stdout
can be controlled via environment variables. Set RUST_LOG
to debug
, error
, info
,
warn
, or trace
for the corresponding log output.
For more fine-grained logging settings, see the documentation of env_logger
.
Installation
So far this library is not available via PyPI.
To build this extension, you will need:
- Rust. Install the latest version using rustup
- A C compiler for the libh3 sources, for example
clang
cmake
, and eventuallymake
- Python 3.x and the corresponding C headers
- The dependencies from the requirements.dev.txt file.
On Ubuntu most system-level dependencies should be available after running rustup and
sudo apt-get install cmake python3-dev build-essential
Build using maturin
There are three main commands:
maturin publish
builds the crate into python packages and publishes them to pypi.maturin build
builds the wheels and stores them in a folder (../target/wheels
by default), but doesn't upload them. It's possible to upload those with twine.maturin develop
builds the crate and installs it as a python module directly in the current virtualenv.
To build the extension just use the maturin build --release
command for an optimized build.
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 Distribution
Hashes for h3ronpy-0.10.0-cp36-abi3-manylinux_2_24_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7854fe109d31041b482440d6477c9061a58bc25b823360dcad059e6dff5b2572 |
|
MD5 | 691cb1b03bdcdcc6079aa0bb99b111b3 |
|
BLAKE2b-256 | 559f1f223b9e3b3fb74f49ab884ec244d5a4c5067cee1393eafa3e1bfe5c4e17 |