Phytospatial is a Python toolkit designed to streamline the processing of remote sensing data for forestry and vegetation analysis. It provides tools for handling large hyperspectral rasters, validating vector geometries, and extracting spectral statistics from tree crowns. It also allows for passive-active raster-level fusion via its image processing module.
- Memory-Safe Processing: Process massive rasters using windowed reading (via
rasterio) without overloading RAM. - Forestry Focused: Specialized tools for tree crown validation and species labeling.
- Dual-Licensed: Available under both MIT and Apache 2.0 licenses for maximum flexibility.
To get up and running quickly with pip:
git clone https://github.com/Louis-Gm/phytospatial.git
cd phytospatial
pip install -e .New to Python? Check out our detailed Installation Guide for Conda and Virtual Environment setup.
Here is a simple example of extracting spectral data from tree crowns:
from phytospatial import extract, loaders
# Load tree crowns
crowns = loaders.load_crowns("data/crowns.shp")
# Initialize extractor
extractor = extract.BlockExtractor("data/image.tif")
# Process
results = []
for stats in extractor.process_crowns(crowns):
results.append(stats)For a complete workflow, see the Introduction Pipeline Tutorial.
As an open-source project, we encourage and welcome contributions of students, researchers, or professional developers.
Want to help? Please read our CONTRIBUTING section for a detailed explanation of how to submit pull requests. Please also make sure to read the project's CODE OF CONDUCT.
Not sure how to implement your idea, but want to contribute?
Feel free to leave a feature request here.
If you use this project in your research, please cite it as:
Grand'Maison, L.-V. (2026). Phytospatial: a python package that processes lidar and imagery data in forestry (0.3.2) [software]. Zenodo. https://doi.org/10.5281/zenodo.18112045
The project is currently being maintained by Louis-Vincent Grand'Maison.
Feel free to contact me by email or linkedin:
Email - lvgra@ulaval.ca
Linkedin - grandmaison-lv
This software is developed by Louis-Vincent Grand'Maison as part of a PhD project. The maintenance and development of this project is supported by several research scholarships:
- Fonds de recherche du Québec – Nature et technologies (FRQNT) (Scholarship 2024-2025)
- Natural Sciences and Engineering Research Council of Canada (NSERC) (Scholarship 2025-present)
- Université Laval (Scholarship 2024-present)
phytospatial is distributed under the Apache License, Version 2.0.
See the LICENSE file for the full text. This license includes a permanent, world-wide, non-exclusive, no-charge, royalty-free, irrevocable patent license for all users.
See LICENSE for more information on licensing and copyright.