Skip to main content

OccPy: a python tool to map occluded area from LiDAR data in 3D using a voxel traversal algorithm.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

occpy_ls-0.2.0rc3.tar.gz (163.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

occpy_ls-0.2.0rc3-cp313-cp313-win_amd64.whl (115.0 kB view details)

Uploaded CPython 3.13Windows x86-64

occpy_ls-0.2.0rc3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (924.5 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

occpy_ls-0.2.0rc3-cp313-cp313-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl (892.1 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.12+ i686manylinux: glibc 2.17+ i686

occpy_ls-0.2.0rc3-cp313-cp313-macosx_11_0_arm64.whl (119.7 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

occpy_ls-0.2.0rc3-cp312-cp312-win_amd64.whl (115.3 kB view details)

Uploaded CPython 3.12Windows x86-64

occpy_ls-0.2.0rc3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (928.8 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

occpy_ls-0.2.0rc3-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl (896.2 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.12+ i686manylinux: glibc 2.17+ i686

occpy_ls-0.2.0rc3-cp312-cp312-macosx_11_0_arm64.whl (120.3 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

occpy_ls-0.2.0rc3-cp311-cp311-win_amd64.whl (114.9 kB view details)

Uploaded CPython 3.11Windows x86-64

occpy_ls-0.2.0rc3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (912.1 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

occpy_ls-0.2.0rc3-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl (879.9 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.12+ i686manylinux: glibc 2.17+ i686

occpy_ls-0.2.0rc3-cp311-cp311-macosx_11_0_arm64.whl (119.9 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

occpy_ls-0.2.0rc3-cp310-cp310-win_amd64.whl (114.7 kB view details)

Uploaded CPython 3.10Windows x86-64

occpy_ls-0.2.0rc3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (899.2 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

occpy_ls-0.2.0rc3-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl (870.7 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.12+ i686manylinux: glibc 2.17+ i686

occpy_ls-0.2.0rc3-cp310-cp310-macosx_11_0_arm64.whl (120.0 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file occpy_ls-0.2.0rc3.tar.gz.

File metadata

  • Download URL: occpy_ls-0.2.0rc3.tar.gz
  • Upload date:
  • Size: 163.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for occpy_ls-0.2.0rc3.tar.gz
Algorithm Hash digest
SHA256 e30c68fbbe0c0e3b14753697730584038b67d2a0158394bfceb228c022081fa8
MD5 fb0f3a6e476af15187f68214560ee9b2
BLAKE2b-256 df23da0e33ac058c6d90c186e17e35fbcb3c7ae70d6f182bb47d862310088b34

See more details on using hashes here.

File details

Details for the file occpy_ls-0.2.0rc3-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: occpy_ls-0.2.0rc3-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 115.0 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for occpy_ls-0.2.0rc3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 af9ffed94b9e8d76b9dbcb23f50a988c6f9cd65a2664e9062bd57c362f9fc76c
MD5 ee7c44960280c3798904fbdbe5df141e
BLAKE2b-256 8ade106fa603bf27fc8622a4ccb4b4fd2d4a0fa1fe53ab9ace6167baee608fd1

See more details on using hashes here.

File details

Details for the file occpy_ls-0.2.0rc3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for occpy_ls-0.2.0rc3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 70625f82d4c27c4859af8f19e316c5e5f30189725c6f948a517a329613b7680c
MD5 0bfc5e8c84d9b08be331d867a7770697
BLAKE2b-256 ec55812427304702836f4f7a448a2635066a434723e867203fccde702bfadc98

See more details on using hashes here.

File details

Details for the file occpy_ls-0.2.0rc3-cp313-cp313-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for occpy_ls-0.2.0rc3-cp313-cp313-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 d70bf4abbff055423f5a7e270d0177b053ed78d6fb7e4a15da6b4fd136e3ba47
MD5 2f4eaad96383e80d4674b77650038db0
BLAKE2b-256 1eb9bc47c33b11d0e77409cf6b72671bc156b1880aa17172997369e33a2f5f1d

See more details on using hashes here.

File details

Details for the file occpy_ls-0.2.0rc3-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for occpy_ls-0.2.0rc3-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7c21fbea31a6fbe05fe9847cd9bae9aac4782716b136c6a026537433b64d30b7
MD5 eccca91b862b5173efec573b9b140709
BLAKE2b-256 d361d0dd13ca881abaedbf25784c3df05a1ce9bb3ec9f01d6633539dcf8000e1

See more details on using hashes here.

File details

Details for the file occpy_ls-0.2.0rc3-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: occpy_ls-0.2.0rc3-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 115.3 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for occpy_ls-0.2.0rc3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 ac1596432927d31e20ea822a4b586606508f189a80cae1d48bba4b2670742c6f
MD5 14cd304813fb0355ec5ecbb6ffb56575
BLAKE2b-256 79e8f659d7b3ddbc6034af42376f1e64d2a002be7f999cd1a312cb2a2584e9d1

See more details on using hashes here.

File details

Details for the file occpy_ls-0.2.0rc3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for occpy_ls-0.2.0rc3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 60d554b4be8232208e35d9cb0958835d383d1328b77b9bfbb301c0b616d047e4
MD5 59655a870b0f4c98e80dba297afc4e0f
BLAKE2b-256 d6123b8f83094885379e4f3ba92571c792a6ee833df12a78cf0d7eb5d16c51b2

See more details on using hashes here.

File details

Details for the file occpy_ls-0.2.0rc3-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for occpy_ls-0.2.0rc3-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 73bb93b84647dfb0e9e9cbd8f119ff563e22d8177fbb1d4e0344a71584bf3b6c
MD5 370c6a5f4e31eb01412ba468adeb741e
BLAKE2b-256 07775af59d68a047557994c87e585ea96f32211e086c09cab5474226701aca40

See more details on using hashes here.

File details

Details for the file occpy_ls-0.2.0rc3-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for occpy_ls-0.2.0rc3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 29bd9ed931c864f4d5804579b32860e21d8c11226d66378cacc7f5c4cc376d86
MD5 4656daef30d75a2ab507d241f4eeb10b
BLAKE2b-256 e9e8fce0ee7e672bc77cf28ae98e5516faf6a1d07ab17a653e51b9f8c300069f

See more details on using hashes here.

File details

Details for the file occpy_ls-0.2.0rc3-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: occpy_ls-0.2.0rc3-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 114.9 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for occpy_ls-0.2.0rc3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 9f03c8e18818b7bc78d9ffc9749fb4932c77aea9ef2d01bf3cc0b0003e2aaa1e
MD5 f30daf4e83939dceaec20714ec8cb2a6
BLAKE2b-256 3137211c2b7764190684311586cb5c17a539fe16a6615552b92ee107e01ef935

See more details on using hashes here.

File details

Details for the file occpy_ls-0.2.0rc3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for occpy_ls-0.2.0rc3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 65ac740a624bc7c458206abc1a5ddb21d9a9aa39e35389cd63e78a257a216616
MD5 62988a4b14f6a3e4f3b4b9619e4c422d
BLAKE2b-256 1c768689e3cc97795bb3cdc543160b18414520c47976b7ad8befe26c9c7aa105

See more details on using hashes here.

File details

Details for the file occpy_ls-0.2.0rc3-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for occpy_ls-0.2.0rc3-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 008954729cefaba6607e02ebadc930fb9495980778c3ad01ad9e5f11819de5ce
MD5 fa447cdbdae8fbbdf20c2ffff1885967
BLAKE2b-256 221b503ab17ba39544df65c2efd54a933d4ccdb25b2f5acaefc76e9a2bbfdbb8

See more details on using hashes here.

File details

Details for the file occpy_ls-0.2.0rc3-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for occpy_ls-0.2.0rc3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 699428156dbb9a9c4aedd8d88fd982cf0b91b47fb3716c8ada3d12b54d387fbd
MD5 f8b669a0719228bc1bd1f3f460e51455
BLAKE2b-256 a7acf18df4586377f3c3eb0576c7ef9a01d085fec2bfbb5a009fcddda65c0fbd

See more details on using hashes here.

File details

Details for the file occpy_ls-0.2.0rc3-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: occpy_ls-0.2.0rc3-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 114.7 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for occpy_ls-0.2.0rc3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 e8e38cd4597dd92ae88feb9d57b9d887661402af6a20ca10946fdc5203795f86
MD5 997951f202c5d3e2d1b0c23bb2ba0632
BLAKE2b-256 db2cec4928392ea08f060058933097ab80fe4bece303ef812579d3c497430952

See more details on using hashes here.

File details

Details for the file occpy_ls-0.2.0rc3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for occpy_ls-0.2.0rc3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 96fd164b1d3e56c2d3604413fc371cff2dedb4ec1e75b75e427da33a103cfbf6
MD5 9cad01be2e75e6473c71af806b37c8c6
BLAKE2b-256 dff6dea1a873a0719ac617d5dbc48ab5fd4ec1d48a58ea3d499968c4fffa66c9

See more details on using hashes here.

File details

Details for the file occpy_ls-0.2.0rc3-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for occpy_ls-0.2.0rc3-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 e733e84fde06a05d17749b612221d94b0da9ba0c31a7daab2ca2d33e8eed8448
MD5 13e3f73ab3234c618fe3595fdec4b1a1
BLAKE2b-256 2007446c4b3fe43d62250bac8764e76d6e298bf09f7dbfa0129a65440c2f634d

See more details on using hashes here.

File details

Details for the file occpy_ls-0.2.0rc3-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for occpy_ls-0.2.0rc3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 832bfd8ff70f2d3e4b93b2d0e9f82fe5e0fa68144eb55e8aa204c233c4f6ba41
MD5 fb5c432fd2cb9a5351c85b843ee20d13
BLAKE2b-256 f5447291c507c6afe6ce8b579a11be3ee367a864e69aa62a34ffb9c6680df8e7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page