Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ A read_geotiff function for reading GeoTIFF into ndarray (#3)
* ➕ Add tiff TIFF decoding and encoding library in pure Rust! * ➕ Add ndarray An n-dimensional array for general elements and for numerics! * ➕ Add numpy PyO3-based Rust bindings of the NumPy C-API! * ✨ A read_geotiff function for reading GeoTIFF into ndarray Rust-based function for reading GeoTIFF files! Uses the `tiff` crate for the I/O, `ndarray` crate to store the 2D array in Rust, and `numpy` crate to convert to numpy.ndarray in Python. * 🚩 Add pyo3 extension-module feature Needed to prevent `error while loading shared libraries: libpython3.12.so.1.0: cannot open shared object file` error when running `cargo test`. * ➕ Add tempfile A library for managing temporary files and directories! * ♻️ Refactor to allow read_geotiff Rust fn to read from buffer Allow passing anything that implements Read + Seek into the `read_geotiff` function, such as in-memory stream buffer. The `read_geotiff_py` function still accepts an &str reference to a filepath. * ✅ Add unit test for reading a BigTIFF file Not exactly a GeoTIFF file, but at least it's something! * ✅ Add unit test for reading a single-band GeoTIFF file Test reading an actual single-band float32 GeoTIFF file downloaded from the internet. Done in Python. * ➕ Add numpy as a python dependency NumPy is the fundamental package for array computing with Python! Setting minimum pin of 1.23 following SPEC 0. Prevent error like `pyo3_runtime.PanicException: Failed to access NumPy array API capsule: PyErr { type: <class 'ModuleNotFoundError'>, value: ModuleNotFoundError("No module named 'numpy'"), traceback: None }`. * 💚 Install NumPy build requirements Xref https://github.com/numpy/numpy/blob/a53b0b3777a966554add1313e22b625638282192/doc/source/building/index.rst#system-level-dependencies * 💚 Install compilers and build libraries needed for NumPy Manually specifying GCC and other build libraries to install with `apt` instead of using `apt build-dep numpy`, following https://numpy.org/devdocs/building/#system-level-dependencies. * 💚 Install ninja-build Try to get build dependencies to compile ninja and prevent `ERROR: Failed building wheel for ninja`. * 📝 Add more crate and module level docs Add a title/heading for the crate docs, and some extra descriptions on what the crate does. Added the missing_doc lint to warn when docs are missing. Also improved docs on the module level, and made some minor rustfmt fixes.
- Loading branch information