Skip to main content

Occpy


OccPy is a python tool to map occluded area from LiDAR data in 3D using a voxel traversal algorithm implemented in C++.

Installation

Via pip:

 pip install occpy-ls

Pre-built wheels are available for Python versions 3.10, 3.11, 3.12, 3.13, on:

  • Linux (x86_64)
  • Windows
  • MacOS A source distribution is also available, which will require a C++ environment with boost libraries installed for a working installation.

Note: Proprietary RIEGL libraries are not packaged, to use RXP and RDBX files, you must build from source.

Build from source

Clone the repository

git clone https://github.com/dkueken/OccPy.git
cd OccPy

Set up the environment

conda env create -f environment.yml
conda activate occPy

Build extensions and install occpy using:

pip install -v .

NOTE: if you want to use RIEGL .rdbx and .rxp files as input, make sure to set the RIVLIB_ROOT and RDBLIB_ROOT environment variables to the root path of the corresponding libraries before installing.

Usage

Head over to the Documentation page and have a look at the various jupyter notebooks to find out how to configure and run OccPy.

TLS examples

There are two ways to run OccPy on a multi-station TLS dataset, where the point cloud of each scan position is stored in a separate LAZ file:

  • passing the input folder and let OccPy handle all files automatically: TLS
  • handling the separate laz files in the input folder individually yourself: TLS individual run. This approach can bring some performance benefits and provides more flexibility on how to treat the individual scans.

Mobile examples

Both MLS and ULS acquisitions can be treated similarly, as shown in these two notebooks:

Visualization

The above stated notebooks provide some inputs on creating 2D visualizations of the occlusion mapping outputs. If you would like to visualize occlusion outputs in 3D, please check out the pyvista and pyvista_interactive notebooks:

Here is an example 3D visualization of an occlusion map for a multi-station TLS campaign as provided by Wout Cherlet and shown at SilviLaser 2025 in Québec City.

Pyvista demo

Support

For questions and support, please contact Daniel Kükenbrink via daniel.kuekenbrink@wsl.ch

Roadmap

Several open issues and improvements are currently worked on or planned for the future:

  • Add support for reading in a DTM file into the voxel traversal, so the algorithm could stop, once the pulse reached the terrain.
  • Substantial performance improvement by using multi core processing
  • Add functionality for PAI/PAD calculation of each voxel (i.e. calculation of path length within voxel for each pulse)

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

Authors and acknowledgment

The algorithm is strongly based on the initial publication of a voxel traversal algorithm as seen in Amanatides & Woo (1987). This algorithm has been used in the publication by Kükenbrink et al. (2017) to map occlusion in ALS data and is openly available as a Matlab code here: https://www.eufar.net/documents/6028 (user account needed). Big motivation for the development of this study came from the interesting paper by Bienert et al. (2010). This implementation is a substantial evolution to the Matlab implementation and should now be able to run for any lidar platform available, when requirements as stated in Requirements section are met. Also performance of this Cython implementation should be largely increased compared to the Matlab implementation.

Development of the initial Matlab implementation was performed during the PhD studies of Daniel Kükenbrink at the University of Zurich within the EUFAR JRA - HYLIGHT project (EUFAR2 contract no. 312609). The initial development of the Cython version has started during the same PhD and was used in the study by Schneider et al. (2019) to map occlusion from TLS and UAVLS acquisitions in a temperate and tropical forest. Substantial improvements and further development has been done at the Swiss Federal Institute WSL since then. The development is still ongoing also in the framework of the 3DForEcoTech COST action (working group 1).

Big thank you go out to all contributing to this code base since the beginning of my PhD, Felix Morsdorf, Fabian Schneider, Meinrad Abegg, Ruedi Bösch, Christian Ginzler as well as to those pushing the code base towards the publication of OccPy as a python package: William Albert, Wout Cherlet, Bernhard Höfle, and Jonas Wenk.

Literature

@article{Amanatides1987,
    author = {Amanatides, John and Woo, Andrew},
    year = {1987},
    month = {08},
    pages = {},
    title = {A Fast Voxel Traversal Algorithm for Ray Tracing},
    volume = {87},
    journal = {Proceedings of EuroGraphics}
}
@article{Bienert2010,
    author = {Bienert, Anne and Queck, Ronald and A, A. and Maas, Hans-Gerd},
    year = {2010},
    month = {01},
    pages = {92-97},
    title = {Voxel space analysis of terrestrial laser scans in forests for wind field modelling},
    volume = {XXXVIII, Part 5},
    journal = {International Archives of Photogrammetry, Remote Sensing and Spatial Information Sciences}
}
@article{KUKENBRINK2017424,
    title = {Quantification of hidden canopy volume of airborne laser scanning data using a voxel traversal algorithm},
    journal = {Remote Sensing of Environment},
    volume = {194},
    pages = {424-436},
    year = {2017},
    issn = {0034-4257},
    doi = {https://doi.org/10.1016/j.rse.2016.10.023},
    url = {https://www.sciencedirect.com/science/article/pii/S0034425716303959},
    author = {Daniel Kükenbrink and Fabian D. Schneider and Reik Leiterer and Michael E. Schaepman and Felix Morsdorf}
    }
@article{SCHNEIDER2019249,
    title = {Quantifying 3D structure and occlusion in dense tropical and temperate forests using close-range LiDAR},
    journal = {Agricultural and Forest Meteorology},
    volume = {268},
    pages = {249-257},
    year = {2019},
    issn = {0168-1923},
    doi = {https://doi.org/10.1016/j.agrformet.2019.01.033},
    url = {https://www.sciencedirect.com/science/article/pii/S0168192319300267},
    author = {Fabian D. Schneider and Daniel Kükenbrink and Michael E. Schaepman and David S. Schimel and Felix Morsdorf}
    }

How to cite

For now, please cite the following studies

@article{KUKENBRINK2017424,
    title = {Quantification of hidden canopy volume of airborne laser scanning data using a voxel traversal algorithm},
    journal = {Remote Sensing of Environment},
    volume = {194},
    pages = {424-436},
    year = {2017},
    issn = {0034-4257},
    doi = {https://doi.org/10.1016/j.rse.2016.10.023},
    url = {https://www.sciencedirect.com/science/article/pii/S0034425716303959},
    author = {Daniel Kükenbrink and Fabian D. Schneider and Reik Leiterer and Michael E. Schaepman and Felix Morsdorf}
    }
@article{SCHNEIDER2019249,
    title = {Quantifying 3D structure and occlusion in dense tropical and temperate forests using close-range LiDAR},
    journal = {Agricultural and Forest Meteorology},
    volume = {268},
    pages = {249-257},
    year = {2019},
    issn = {0168-1923},
    doi = {https://doi.org/10.1016/j.agrformet.2019.01.033},
    url = {https://www.sciencedirect.com/science/article/pii/S0168192319300267},
    author = {Fabian D. Schneider and Daniel Kükenbrink and Michael E. Schaepman and David S. Schimel and Felix Morsdorf}
    }

License

See LICENSE.

Project status

This tool is still under development and substantial testing with different datasets should be performed.

Metadata

Release files for occpy-ls 0.3.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 occpy-ls 0.3.0
File Size Uploaded Provenance Actions
occpy_ls-0.3.0.tar.gz 184.5 kB Without provenance Details for occpy_ls-0.3.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for occpy-ls 0.3.0
File Actions
occpy_ls-0.3.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for occpy_ls-0.3.0-cp313-cp313-win_amd64.whl
occpy_ls-0.3.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64, Linux glibc 2.24+ x86-64 Details for occpy_ls-0.3.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
occpy_ls-0.3.0-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details for occpy_ls-0.3.0-cp313-cp313-macosx_11_0_arm64.whl
occpy_ls-0.3.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for occpy_ls-0.3.0-cp312-cp312-win_amd64.whl
occpy_ls-0.3.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64, Linux glibc 2.24+ x86-64 Details for occpy_ls-0.3.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
occpy_ls-0.3.0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details for occpy_ls-0.3.0-cp312-cp312-macosx_11_0_arm64.whl
occpy_ls-0.3.0-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details for occpy_ls-0.3.0-cp311-cp311-win_amd64.whl
occpy_ls-0.3.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64, Linux glibc 2.24+ x86-64 Details for occpy_ls-0.3.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
occpy_ls-0.3.0-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details for occpy_ls-0.3.0-cp311-cp311-macosx_11_0_arm64.whl
occpy_ls-0.3.0-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details for occpy_ls-0.3.0-cp310-cp310-win_amd64.whl
occpy_ls-0.3.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64, Linux glibc 2.24+ x86-64 Details for occpy_ls-0.3.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
occpy_ls-0.3.0-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details for occpy_ls-0.3.0-cp310-cp310-macosx_11_0_arm64.whl

Total release size: 4.9 MB

Release files / occpy_ls-0.3.0.tar.gz

Download URL occpy_ls-0.3.0.tar.gz
Size 184.5 kB
Tags Source
SHA-256 checksum
How to use checksums
37c5c6e786c7563540c87c24679f697066dfb1dd8231ecd7b9ea5df9fac921a8
BLAKE2b-256 checksum
How to use checksums
b16738866fc4a5f070c5be05d4c73b9d531cef12ed32a65eb0af0df81e683efc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / occpy_ls-0.3.0-cp313-cp313-win_amd64.whl

Download URL occpy_ls-0.3.0-cp313-cp313-win_amd64.whl
Size 127.6 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
10c3b0be95a0466250be3e93cadb40aa7e2c029d1b9d64e33cc6db534c290b69
BLAKE2b-256 checksum
How to use checksums
58e4756519e2f13acb98d96c3c7df0d23f2c5bfa15679778d5e68f60b644c063
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / occpy_ls-0.3.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL occpy_ls-0.3.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 915.0 kB
Tags CPython 3.13 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
a05631bf00f0ab4dc9ae5caf523cffae1b3d74506aec10e6930c7bca6f23b399
BLAKE2b-256 checksum
How to use checksums
ffbc51dbc0b7058e5068eda7d1a29080facf922c6fd14369ca4db8b68eff4189
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / occpy_ls-0.3.0-cp313-cp313-macosx_11_0_arm64.whl

Download URL occpy_ls-0.3.0-cp313-cp313-macosx_11_0_arm64.whl
Size 133.4 kB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
27424e71f6fee43a952678bb28829e4a3f635c9fced63666d6a6fe17522847ac
BLAKE2b-256 checksum
How to use checksums
95394d88d15081ca4a34858878410f1256ef03367e47203510af55305a9a3e0f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / occpy_ls-0.3.0-cp312-cp312-win_amd64.whl

Download URL occpy_ls-0.3.0-cp312-cp312-win_amd64.whl
Size 128.1 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
4eb62a92e205db0baa1da1a2d5065ca5e310ccd4e12502b3c96f72872f5fdf31
BLAKE2b-256 checksum
How to use checksums
c81d70e51bb692867d3e7a446d49c751487f75130c8cf95875ab9b3c757d39e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / occpy_ls-0.3.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL occpy_ls-0.3.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 920.7 kB
Tags CPython 3.12 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
5715f99a642e26c41e039766f3aa146206b356193bb8280e254835adbb7f0349
BLAKE2b-256 checksum
How to use checksums
c328235fd91ef430093b89574674d3ee9a69ce0a0907d1ad03463ee902b32752
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / occpy_ls-0.3.0-cp312-cp312-macosx_11_0_arm64.whl

Download URL occpy_ls-0.3.0-cp312-cp312-macosx_11_0_arm64.whl
Size 133.5 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
a2e8c2c418ef1e48e1e0872849b02a31af9f85bab0e2243050204a6bed98b856
BLAKE2b-256 checksum
How to use checksums
150057ad8b7e9db02b4d337d74e0fcac91fa134d526185d71cee1eead319683c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / occpy_ls-0.3.0-cp311-cp311-win_amd64.whl

Download URL occpy_ls-0.3.0-cp311-cp311-win_amd64.whl
Size 127.3 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
d5a515b769cddef6f15737c841363f9e1ba414af536342d09185bc934b0895f8
BLAKE2b-256 checksum
How to use checksums
2f10c2a86a2ad2bab2ff65539d2bb14ea286c5f07abdbe2ebcaefd44cbdae900
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / occpy_ls-0.3.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL occpy_ls-0.3.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 905.7 kB
Tags CPython 3.11 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
5c01dddc215b9dbe97b4b774791aed630fe23f6e79a4f039506cebec1d78f88e
BLAKE2b-256 checksum
How to use checksums
b84e578a2ce3a871cfb953e3f920695b2c549e8aad7face849ba21b4d8c06446
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / occpy_ls-0.3.0-cp311-cp311-macosx_11_0_arm64.whl

Download URL occpy_ls-0.3.0-cp311-cp311-macosx_11_0_arm64.whl
Size 133.5 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
01b6b520626658204a2e507c80b903bb5dce1e68be0a91ee2210715bd0a2c828
BLAKE2b-256 checksum
How to use checksums
bb420856628d738ed5de5fadaa87e9bfd4cabb9fa74982c38bc41ee137c2c512
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / occpy_ls-0.3.0-cp310-cp310-win_amd64.whl

Download URL occpy_ls-0.3.0-cp310-cp310-win_amd64.whl
Size 127.6 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
112e7c2251a55c8ebf65f7745d759b479a457447841fc069dd4781b04a5afb83
BLAKE2b-256 checksum
How to use checksums
a0b41064cb610720927b726d01f0d8f37cf77ea856004c93008f65a986bfe64f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / occpy_ls-0.3.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL occpy_ls-0.3.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 896.3 kB
Tags CPython 3.10 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
66a3ed2f5c9285211f1ed5f3c11544904925649761d0db3eb5b5f7617da84bbf
BLAKE2b-256 checksum
How to use checksums
9ddd6392d6f76616233990e5de598b2ecdce1d70745832c6db3f68f734426703
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / occpy_ls-0.3.0-cp310-cp310-macosx_11_0_arm64.whl

Download URL occpy_ls-0.3.0-cp310-cp310-macosx_11_0_arm64.whl
Size 133.9 kB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
dd9c7661bd117eddd08b8a77dc106a30f248c5e1f6ae9d057df7ba1bb2559711
BLAKE2b-256 checksum
How to use checksums
8a8b80633f59f7e09af17a774173f8631a64beafd00b74f7198b989c6b9afe7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for occpy-ls 0.3.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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