Skip to main content

Sylva

PyPI crates.io Documentation

Terrestrial and airborne laser scanning processing for forest ecology and remote sensing. A Rust core (the sylva-rs crate) holds every computation and file format; Python gets a numpy-friendly API (import sylva) and a sylva command over it.

NOTE: This software is still in ALPHA

Module What it does
sylva.io LAS/LAZ (typed extra bytes, CRS from and to the WKT or GeoTIFF records), PLY (incl. raycloudtools ray clouds), XYZ/CSV/PTS, RIEGL .rxp via RiVLib, RiSCAN project parsing
sylva.coords translation, rotation about any axis and point, recentring, reprojection between CRSs (EPSG codes, PROJ strings, WKT; pure Rust, no PROJ install), applying transform files (transforms.json, RiSCAN SOPs) to many scans
sylva.filters voxel / random / Poisson-disk subsampling, box & cylinder crops, statistical & radius outlier removal, PCA normals, planarity, Euclidean clustering, kNN
sylva.ground Cloth Simulation Filter and Progressive Morphological Filter ground classification, DTM (lowest point, or TIN, natural-neighbour or IDW), height normalisation, CHM
sylva.interpolate attributes carried between clouds (nearest, inverse distance, majority vote), grids from points (IDW, TIN, natural neighbour), rasters sampled onto points
sylva.masks point masks and crops by polygons (shapefile, GeoJSON, with holes), rasters, attribute expressions (cloud.where("height > 2 & classification != 2")) and distance to another cloud
sylva.trees RANSAC circle fitting, stem detection & DBH, basal area, taper profiles, graph-based tree segmentation, tree heights, crown metrics, crown shape (stacked-hull volume, asymmetry)
sylva.canopy voxel grids, contact-frequency PAD profiles, zenith-ring gap fraction, hinge/Miller LAI, ray-traced density grids from pulse data, Jupp gap-probability profiles with hinge / linear / weighted PAI, clumping index and canopy height
sylva.voxels AMAPVox-style ray-traced voxels (port of raycloudtools rayvoxel): echo-weighted free / potential path lengths, FPL / PPL / transmittance / Bailey attenuation, analytic or estimated leaf-angle G, PAD / LAD / WAD, occlusion, sub-voxel exploration, QSM wood volume, .vox export, occlusion profiles and per-tree sampling (is the top real?)
sylva.registration Kabsch, point-to-point / point-to-plane (trimmed) ICP, scan merging
sylva.coreg marker-free coregistration of scan positions from the trees: terrain model, stem maps, global stem-map and reflector matching, robust point-to-plane ICP, pose graph with outlier rejection, recovery of stragglers, joint multi-view refinement, stem agreement report; tilted scans levelled with the scanner attitude; scanner .PROJ projects
sylva.qsm cylinder fitting, geodesic skeletonisation, cylinder QSMs with volumes and branch orders, a QSM for every tree of a plot anchored on its measured DBH, buttress meshes, _trees.txt export, tree metrics (branch table, taper, lean, sweep, crown, share of the model fitted to points)
sylva.leaves leaf / wood labels, leaf angle distribution, leaf area density from points or voxels, leaf meshes placed on a QSM
sylva.quality scan quality from stems: range noise with the stem shape removed, per-scan registration offsets, mixed-pixel tails
sylva.change change between two epochs of a plot: epoch alignment on stems and ground, tree matching with increments and their uncertainty, plot summaries (growth, mortality, recruitment), point change (C2C, M3C2, DEM of difference, voxel occupancy with occlusion), QSM change by height and branch, each labelled trusted or not
sylva.als airborne lidar over tiled areas: catalogues and buffered chunks, ground, DTM, CHM, normalisation, filtering, retiling and thinning over whole areas
sylva.als_metrics area-based metrics (the lidR standard set, cover, gap fraction) as rasters or plot tables, or any user function
sylva.als_trees tree tops from local maxima, crowns by watershed, Dalponte 2016 or Li 2012, crown outlines and labelled tiles, each tree once across tiles
sylva.als_canopy ALS and UAV pulses from the flight trajectory (SBET or text, or estimated), gap-fraction and PAD profiles corrected for beam angle, ray-traced voxels
sylva.fusion TLS and ALS together: a plot registered on a survey (canopy and terrain search, robust ICP, residuals and uncertainty), TLS stems linked to ALS trees with the trees under each crown, merged clouds and plant area profiles weighted by sampling, plot values upscaled by regression with leave-one-out checks
sylva.waveform full waveforms: LAS 1.3/1.4 wave packets and PulseWaves read and written, Gaussian decomposition into echoes, waveforms to pulses
sylva.Shots pulse-centric data (origin, direction, CSR echoes) for ray-based metrics, with a compact Parquet file format that stores misses without far points and streams into the voxeliser; pulses that returned nothing rebuilt from the scan pattern or from the returns alone
sylva.synthetic synthetic trees, plots, scans, repeat surveys, airborne flights and waveforms with known answers, for examples and tests

Contributing

Feedback, issues, and PRs all welcome. For issues please use GitHub issues (not a personal message) so the community can benefit.

Install

Requires Python 3.10 or later. The package is on PyPI: pypi.org/project/sylva-rs.

pip install sylva-rs

The wheels carry the compiled core for Linux (x86-64 and arm64), macOS (Intel and Apple silicon) and Windows. The distribution is called sylva-rs because an unrelated project owns the name sylva on PyPI; the package you import is sylva, and the two cannot be installed in the same environment.

Using a dedicated environment:

conda create -n sylva python=3.12
conda activate sylva
pip install sylva-rs

Optional extras: pip install "sylva-rs[geotiff]" for GeoTIFF export (rasterio), "sylva-rs[examples]" for the notebooks. Reading RIEGL .rxp files needs RIEGL's RiVLib, which is proprietary and loaded at run time; see the install guide.

Rust

The core is on crates.io as sylva-rs, and the sylva command without Python as sylva-cli:

cargo add sylva-rs               # the library: use sylva_rs::...
cargo install sylva-cli          # the sylva command

From source

For development, or to build the extension yourself. A conda environment keeps the Python, the Rust toolchain and the C linker together:

git clone https://github.com/UQ-EORC/Sylva.git
cd Sylva
conda create -n sylva -c conda-forge python=3.12 rust maturin c-compiler
conda activate sylva
maturin develop --release        # builds the Rust core into the environment

c-compiler matters: rustc links through a program called cc, which conda's rust package does not provide, so without it the build stops at error: linker `cc` not found. The repository's environment.yml has the same list plus the test and notebook extras (conda env create -f environment.yml).

Without conda, any Python >= 3.10 with a Rust toolchain (rustup), a system C compiler (gcc, build-essential, or Xcode's command line tools) and pip install maturin does the same job.

A first look

import sylva
from sylva import ground, trees, voxels

cloud = ground.classify_ground_csf(sylva.read("plot.laz"))
cloud = ground.normalize_height(cloud, ground.make_dtm(cloud, resolution=0.5))
stems = trees.detect_stems(cloud)                        # positions and DBH
labels = trees.segment_trees(cloud, stems)               # tree_id per point

shots = sylva.Shots.load("plot.parquet")                 # pulses, misses included
grid = voxels.ray_voxelize(shots, 0.25, ground_class=2)  # ray-traced plant area density
from sylva import coords, interpolate, masks

cloud = coords.reproject(cloud, "EPSG:7855")                  # to GDA2020 / MGA zone 55
trees_only = cloud.where("height > 1.3 & tree_id >= 0")       # attribute expression
plot = masks.crop_polygons(cloud, masks.read_polygons("plot.shp"))
full = interpolate.transfer_attributes(thinned, full, ["tree_id"], method="majority")
sylva ground plot.laz plot_norm.laz --dtm dtm.asc
sylva trees plot_norm.laz -o trees.csv --segment plot_trees.laz
sylva coreg survey.PROJ -o survey_coreg/ --merged survey.laz
sylva voxel plot.parquet plot.vox --voxel 0.25 --ground-class 2
sylva reproject plot.laz plot_mga55.laz --to EPSG:7855
sylva transform scan.laz scan_project.laz --matrix ScanPos001.DAT
sylva als-ground tiles/ ground/ --method csf                  # airborne tiles
sylva als-metrics ground/ metrics/ --resolution 20 --metrics zq95,zmean,cover
sylva als-trees ground/ trees.csv --crowns crowns.geojson
from sylva import als, change

cat = als.catalog("ground/")                                  # ALS tiles
metrics = als.grid_metrics(cat, 20.0)                          # rasters, one per metric
found = als.find_trees(cat, method="dalponte2016")             # tops and crowns

m = change.match_trees(stems_2019, stems_2024)                 # two epochs of a plot
inc = change.tree_increments(m, cloud_2019, cloud_2024, labels_2019, labels_2024)

Documentation

The documentation is at uq-eorc.github.io/Sylva; its sources are in docs/:

Build the site with pip install -e '.[docs]' && mkdocs serve.

Authors

  • Tim Devereux, The University of Queensland

Citation

If Sylva contributed to your work, please cite it:

Devereux, T. (2026). Sylva: terrestrial and airborne laser scanning processing for forest ecology (version 0.2.0) [Computer software]. The University of Queensland. https://github.com/UQ-EORC/Sylva

@software{sylva,
  author       = {Devereux, Tim},
  title        = {Sylva: terrestrial and airborne laser scanning processing
                  for forest ecology},
  year         = {2026},
  version      = {0.2.0},
  organization = {The University of Queensland},
  url          = {https://github.com/UQ-EORC/Sylva}
}

Licence

GNU General Public License v3.0 or later; see LICENSE. Anything distributed that builds on Sylva carries the same licence.

Metadata

Release files for sylva-rs 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sylva-rs 0.2.0
File Size Uploaded Provenance
sylva_rs-0.2.0.tar.gz 1.0 MB With provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for sylva-rs 0.2.0
File
sylva_rs-0.2.0-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details
sylva_rs-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details
sylva_rs-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details
sylva_rs-0.2.0-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details
sylva_rs-0.2.0-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details

Total release size: 32.9 MB

Release files / sylva_rs-0.2.0.tar.gz

Download URL sylva_rs-0.2.0.tar.gz
Size 1.0 MB
Tags Source
SHA-256 checksum
How to use checksums
6321c81678d631ce8a244c2885c10cde2519c05be83d1a71ce4943f6fd332e0c
BLAKE2b-256 checksum
How to use checksums
729ab12f6791c5ce155fc347e9bc4f2aae21ae00fc3459bf9fe6081d9f062439
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Release files / sylva_rs-0.2.0-cp310-abi3-win_amd64.whl

Download URL sylva_rs-0.2.0-cp310-abi3-win_amd64.whl
Size 6.4 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
42152cd717c193dc122c6c50586c2c24af942c3198742356317e4923da5eef6e
BLAKE2b-256 checksum
How to use checksums
ac1add04fb166b55266241b563fbd8c449b02b4cb626cc4aee6103cec06c9e74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Release files / sylva_rs-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL sylva_rs-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 6.6 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
898f10455e3cb24d61078de0d48f7b3c078cba7bc652827b4a92d5405b17a57e
BLAKE2b-256 checksum
How to use checksums
dcb08368c90eb7c5363a8b2c27ebc0adbc9dae9301b84fa8f645c6013f55ac37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Release files / sylva_rs-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL sylva_rs-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 6.4 MB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
0994833010fbbee23dc8d9e3a4c00ab49cbf76ab01d41cd99fd4ae5b17651f32
BLAKE2b-256 checksum
How to use checksums
80b85be9bc0222a61bac45462f787a6cbd8c2ab9a4274a1911151a5150e5bdbf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Release files / sylva_rs-0.2.0-cp310-abi3-macosx_11_0_arm64.whl

Download URL sylva_rs-0.2.0-cp310-abi3-macosx_11_0_arm64.whl
Size 6.0 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
21534c4e7b699533908adb81492ccfa75f4cfbfa0ef9d5abff4045f493befd7a
BLAKE2b-256 checksum
How to use checksums
71ae2bbe868de0ceb6cac4dc94be555dc2bb9fa7d950b39a6396face8e4c6965
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Release files / sylva_rs-0.2.0-cp310-abi3-macosx_10_12_x86_64.whl

Download URL sylva_rs-0.2.0-cp310-abi3-macosx_10_12_x86_64.whl
Size 6.4 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
7b6adc3b53967d5c657dbe3a305ab5bc46bf558e95f2a4780e64c6a079d2ca1f
BLAKE2b-256 checksum
How to use checksums
6fdf468c1ac8d223b7e651ec2cd211d8e97834b5e4dc83aa4a6503259d05a2ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Security for sylva-rs 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for sylva_rs-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page