Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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.2.0rc5

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.2.0rc5
File Size Uploaded Provenance Actions
occpy_ls-0.2.0rc5.tar.gz 166.2 kB Without provenance Details for occpy_ls-0.2.0rc5.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for occpy-ls 0.2.0rc5
File Actions
occpy_ls-0.2.0rc5-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for occpy_ls-0.2.0rc5-cp313-cp313-win_amd64.whl
occpy_ls-0.2.0rc5-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.2.0rc5-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
occpy_ls-0.2.0rc5-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details for occpy_ls-0.2.0rc5-cp313-cp313-macosx_11_0_arm64.whl
occpy_ls-0.2.0rc5-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for occpy_ls-0.2.0rc5-cp312-cp312-win_amd64.whl
occpy_ls-0.2.0rc5-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.24+ x86-64, Linux glibc 2.28+ x86-64 Details for occpy_ls-0.2.0rc5-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
occpy_ls-0.2.0rc5-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details for occpy_ls-0.2.0rc5-cp312-cp312-macosx_11_0_arm64.whl
occpy_ls-0.2.0rc5-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details for occpy_ls-0.2.0rc5-cp311-cp311-win_amd64.whl
occpy_ls-0.2.0rc5-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.24+ x86-64, Linux glibc 2.28+ x86-64 Details for occpy_ls-0.2.0rc5-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
occpy_ls-0.2.0rc5-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details for occpy_ls-0.2.0rc5-cp311-cp311-macosx_11_0_arm64.whl
occpy_ls-0.2.0rc5-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details for occpy_ls-0.2.0rc5-cp310-cp310-win_amd64.whl
occpy_ls-0.2.0rc5-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.24+ x86-64, Linux glibc 2.28+ x86-64 Details for occpy_ls-0.2.0rc5-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
occpy_ls-0.2.0rc5-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details for occpy_ls-0.2.0rc5-cp310-cp310-macosx_11_0_arm64.whl

Total release size: 4.7 MB

Release files / occpy_ls-0.2.0rc5.tar.gz

Download URL occpy_ls-0.2.0rc5.tar.gz
Size 166.2 kB
Tags Source
SHA-256 checksum
How to use checksums
b4b3f98fb8228bae85f6f0fe80c1794dc3602d31e395a890b1c437e7111f331a
BLAKE2b-256 checksum
How to use checksums
e3c7eb2eec6889c9b54b832c8af44dd0bee336b1f5d513dbcda1a704512807f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.14

Release files / occpy_ls-0.2.0rc5-cp313-cp313-win_amd64.whl

Download URL occpy_ls-0.2.0rc5-cp313-cp313-win_amd64.whl
Size 115.7 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
0ac9e5b0f9ffcd28d063757da30832a2c11b795897b53e554f084301f92c2600
BLAKE2b-256 checksum
How to use checksums
8e8fe26bde207c3e66136e099e89b3b0ecad192aa9da3112db96d7a2e5752dbd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.14

Release files / occpy_ls-0.2.0rc5-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL occpy_ls-0.2.0rc5-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 914.2 kB
Tags CPython 3.13 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
1ff4e6195438a858975b1ccbe7ea75bd3ac7c9f013283748b031a36c4c3361c6
BLAKE2b-256 checksum
How to use checksums
f70e08715b7e0afa582c4965dd9d6d5fef38609e61386fff2f25e65320f798c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.14

Release files / occpy_ls-0.2.0rc5-cp313-cp313-macosx_11_0_arm64.whl

Download URL occpy_ls-0.2.0rc5-cp313-cp313-macosx_11_0_arm64.whl
Size 121.3 kB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
13f66f80217ba1da5124a0a86330abc5830cdb53ac5664d42eb0d9bba17bfb55
BLAKE2b-256 checksum
How to use checksums
5dd46966883a35ecccc8368fb7e69a960474b9571c386a900fdc9398fc74a765
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.14

Release files / occpy_ls-0.2.0rc5-cp312-cp312-win_amd64.whl

Download URL occpy_ls-0.2.0rc5-cp312-cp312-win_amd64.whl
Size 116.3 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
b4ae64d24cd0629dd2934e9add42566c0f53a97da0e41f0cd125b02e5ccc5d16
BLAKE2b-256 checksum
How to use checksums
f89bd0857b4cfc8859d1ca25eb815b1137244e9a235eac1de8dcf167bfc069b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.14

Release files / occpy_ls-0.2.0rc5-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL occpy_ls-0.2.0rc5-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 918.9 kB
Tags CPython 3.12 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
80192a2abf42c2384d17093fde1c056f27951b33226e4d4fd8d63f892674e3e3
BLAKE2b-256 checksum
How to use checksums
a33a3daf767e62c121661fa2b793d83ff31e580d0d97e5cf26b438ef8a56a316
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.14

Release files / occpy_ls-0.2.0rc5-cp312-cp312-macosx_11_0_arm64.whl

Download URL occpy_ls-0.2.0rc5-cp312-cp312-macosx_11_0_arm64.whl
Size 121.8 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
2897782b3e176d0c00590b4b96e64a79ac81adc6f09b64bcb1af33b81e4f72c3
BLAKE2b-256 checksum
How to use checksums
3ed6108f346256e75a1e9fd0eceaa0b2dcde44f151ce7831abe76cf454015eea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.14

Release files / occpy_ls-0.2.0rc5-cp311-cp311-win_amd64.whl

Download URL occpy_ls-0.2.0rc5-cp311-cp311-win_amd64.whl
Size 115.5 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
9f0e86505911a8b4b77573aa57fe2f431dd0ee01527d86fd6ffe55168ce88006
BLAKE2b-256 checksum
How to use checksums
0c797c3b7a2c07530db163a3c4a02a93f4871de42106c2b616ceb0714796c3e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.14

Release files / occpy_ls-0.2.0rc5-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL occpy_ls-0.2.0rc5-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 904.1 kB
Tags CPython 3.11 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
5d1bd39653dbf94667d0474aece37e74b5a5d50683ef2c91fd6091efbcba9599
BLAKE2b-256 checksum
How to use checksums
890ede8ed771521c8d90536c45506c90172df699396113666f6de4c6fc8b73bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.14

Release files / occpy_ls-0.2.0rc5-cp311-cp311-macosx_11_0_arm64.whl

Download URL occpy_ls-0.2.0rc5-cp311-cp311-macosx_11_0_arm64.whl
Size 121.6 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
3abb9a6dbdcd6110cbd5f740d503c010e39af4e144d75fcc94968ef8f0b5cd47
BLAKE2b-256 checksum
How to use checksums
410b489c3fdd919e831522f0009cc4f5ebe9543320fa34fcba7a3e1e382de33d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.14

Release files / occpy_ls-0.2.0rc5-cp310-cp310-win_amd64.whl

Download URL occpy_ls-0.2.0rc5-cp310-cp310-win_amd64.whl
Size 115.3 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
941991c1a86477389b540f6c0c256e60f4fe5d41e886a791426c46a8dfd3ea95
BLAKE2b-256 checksum
How to use checksums
7225a1c2fd58799cfff78c6c98a136c58bf199c637b950a7d9093c9602858915
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.14

Release files / occpy_ls-0.2.0rc5-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL occpy_ls-0.2.0rc5-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 891.8 kB
Tags CPython 3.10 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
84b8620aecaeef5244d94141566467e7295db49ebd88928a55d92b7499394297
BLAKE2b-256 checksum
How to use checksums
6b1b278596ac64771e500b04ff2d2f9c6ec482f5cbcaba52258cebd18e1d3577
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.14

Release files / occpy_ls-0.2.0rc5-cp310-cp310-macosx_11_0_arm64.whl

Download URL occpy_ls-0.2.0rc5-cp310-cp310-macosx_11_0_arm64.whl
Size 121.7 kB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
8c1cc1924f1dde03998314c9e2fda551a5d3cd28f3e09582556d78391165033e
BLAKE2b-256 checksum
How to use checksums
c058afc423bd0e26b628bb648fec037360630cec92169cef6c6bbcbcd62b58d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.14

Security for occpy-ls 0.2.0rc5

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