pyfor is a Python module intended as a tool to assist in the processing of point cloud data in the context of forest inventory. It offers functions that convert raw point cloud data to usable information about forested landscapes using an object oriented (OOP) framework accessible for advanced and novice users of Python. pyfor aims to provide a cross platform means to interactively process point cloud data, as well as efficient ways to batch process large acquisitions.
The current release is 0.2.0 (this branch). 0.2.0 is adequate for processing single tiles and serves as the foundation for future updates.
An upcoming release, 0.3.0, will focus on processing large acquisitions, and is slated for release on this branch in August 2018. If you would like to track the progress of that release, please see this branch page.
These samples are a work in progress, but demonstrate some of the package capabilities.
For installation I highly recommend looking into setting up miniconda for your system before beginning. pyfor depends on many packages that are otherwise tricky and difficult to install (especially gdal and its bindings), and conda provides a quick and easy way to manage many different Python environments on your system simultaneously.
Note that the following installation procedures will install the rolling release version of pyfor (i.e. this branches' source files). I develop actively on this branch and push commits daily, so beware of intermittent bugs when updating. More stable releases are forthcoming.
The following bash commands will install this branch of pyfor. It requires installation of miniconda (see above). This will install all of the prerequisites in that environment, named pyfor_env
. pyfor depends on a lot of heavy libraries, so expect construction of the environment to take a little time.
git clone https://github.com/brycefrank/pyfor.git
cd pyfor
git checkout pdal-u
conda env create -f environment.yml
# For Linux / macOS:
source activate pyfor_env
# For Windows:
activate pyfor_env
pip install .
Following these commands, pyfor should load in the activated Python shell.
import pyfor
If you see no errors, you are ready to process!
An early collection of samples is located here. These demonstrate some basic tasks.
An early version of the documentation is located here. This provides specific documentation for each class and function.
Below is a list of features planned for the 0.2 stable release. 0.2 is intended to be adequate for processing and visualizing individual point cloud tiles.
- Ground filter
- Normalization
- Rasterization
- Raster input and output
- Interactive 2d & 3d plotting via Jupyter
- Point cloud plotting
- Raster plotting
- Grid metrics extraction
- Watershed segmentation
- Canopy height model
- Median pit filter
- Pit free algorithm (Chen et al. 2017)
- Clipping point clouds
- Area-based approach workflows
And forthcoming in the 0.3 stable release, this release is intended for batch processing of many tiles by providing multiprocessor and cluster support.
- Batch processing
- Multiprocessor support
- Cluster support
- Voxelization methods
- More tree detection methods
- Maintain a purely Python code base
- Maintain compatibility between operating systems via conda
- Support processing for distributed systems and multicore processors
- Implement new
If you would like to contribute, especially those experienced with numba
, numpy
, gdal
, ogr
and pandas
, please contact me at [email protected] For a list of to do items before our first release, please see the Working Prototype page.
I am also willing to implement features on request. Feel free to open an issue with your request or email me at the address above.