- Replaced R distance calculation function with a C++ implementation for faster computation in fds
- Added semantic segmentation support to the forest inventory function, allowing users to filter points by classification (e.g., stem-only points) for more accurate DBH estimation.
- Flexible tree identification: The
forest_inventory()function now supports custom TreeID column names through thetree_id_colparameter - Added
non_tree_idparameter to specify which values represent non-tree elements (can be a vector)
- Significantly optimized circle fitting algorithm with vectorized distance calculations
- Implemented weighted point sampling based on local point density for better convergence
- Reduced iterations to 500 and added early stopping criteria (30 angular segments)
- Completely rewrote core
forest_inventory()logic to usedata.tableinstead of loops and foreach parallelization - Improved readability with helper functions:
.fit_circle(),.fit_circles(),.spline_predict() - Eliminated parallelization overhead for single-core efficiency
- Improved height normalization: Better handling of Z-coordinates when reference height (
Zref) is available - Enhanced quality control: Added validation checks for unrealistic circle diameters and center positions
- Robust data types: Fixed data.frame structure issues by converting merged results properly
- Better error handling: Added validation for stem segmentation parameters and semantic column existence
- Fixed spline prediction height (now uses 1.3 + 0.5*increment for better accuracy)
- Corrected data.frame structure in inventory output
- Fixed cosmetic issues and improved code formatting
- Resolved issues with NA value handling in RANSAC circle fitting