LiDAR point cloud projects?

I wanted to start a discussion to find others that are using Julia for LiDAR point cloud analysis and what the current state of packages is.

To summarize my findings so far:
LasIO and LazIO seem to be the most current reader libraries since LibLAS was deprecated. I have tried LasIO and it worked without any issues

I found this port of a watershed algorithm.
Other than that, I have not come across any other existing projects.

Anyone working with point clouds in Julia?

2 Likes

I used to work on this kind of stuff a lot. For visualizing laz, I wrote “displaz” and the julia binding https://github.com/c42f/Displaz.jl which might be helpful if you want to visualize large point clouds. (The design goal was to gracefully handle point clouds up to the size of available RAM.) The project is a little abandoned now that I’ve moved on to other things, but I did release a julia 1.0 compatible version.

https://github.com/KristofferC/NearestNeighbors.jl is invaluable for spatial search.

There’s also several basic but useful geometric utilities at https://github.com/FugroRoames which I was peripherally involved in for example https://github.com/FugroRoames/Rotations.jl and https://github.com/FugroRoames/CoordinateTransformations.jl, and beginnings of a julia-native geodesy library at https://github.com/JuliaGeo/Geodesy.jl

JuliaGeo has a bunch of cool stuff including various wrappers for highly respected open source geo libraries, etc.

All this is just my personal (and somewhat out of date) perspective. I’m sure there’s plenty of great tools I’ve left out.

2 Likes

My package Grassmann.jl is intended to serve as a unified mathematical foundation for various geometric algebras and rotational algebras, although it is still a work in progress.

1 Like

Not that I work with LIDAR but there was a time were I played a bit with it and wrote this LASZIP.jl package that never got registered.

Perhaps two more links that could be of interest: RoamesGeometry.jl and PointCloudRasterizers.jl (latter still very early).

So in short, yes, people are working with point clouds in Julia :slight_smile:

It’s not surprising that when searching for LiDAR packages you mainly find packages for point cloud specific file formats like LAS. Most other tools, like the ones Chris mentioned, are very useful, but not neccesarily made with LiDAR in mind. It is a nice example of how composable julia packages are.

Nevertheless it’s good to have a list of packages that are useful for working with point clouds. If you mention specifically what you want to do with point clouds, perhaps we can give more specific tips.

1 Like

And there will be a time where I’ll want to process/display swath bathymetry data in Julia wrapping the MB-system tool package.

Wow, thanks for all the replies! I have seen some of the JuliaGeo Projects before but not the other ones. After some more thought, I would imagine Images might be useful in some context, although not sure if the raster libraries already have some connection there?

For context, I work in forestry and the gold standard is typically the lidR package.

Functionality wise, I was looking to see if there is existing functionality that I could load a .las file and generate first/ last returns to make digital elevation models and canopy height models as a proof of concept.

A second, much more philosophical question I have is what do/should custom types look like for this type of work? I don’t know enough to really imagine what the JuMP/DiffEq of LiDAR analysis would look like.

?<:Voxel<:PointCloud<:?

I’m not aware of a sofware suite like lidR which has pre-baked tools for lidar analysis in julia.

As Martijn mentioned, julia libraries tend to be extremely composable though so it’s relatively easy to build your own once you know which libraries to look for. For example, you can use LasIO to extract points as efficient short position vectors (for example, encoded as StaticArrays.SVector{3,Float64}), along with some other per point data like return number. You can then encode all that into an efficient tabular data structure like TypedTables.Table with a spatial index built on AcceleratedArrays and NearestNeighbours (in principle… this is the kind of composability we were working toward, though it wasn’t fully realized in my time working on this kind of data). On the other hand, if you don’t want the spatial index or want a different kind (eg, a grid index), no problems; just leave it out or change it.

In a tabular structure (think data.frame like thing if you know the R tools), filtering points for last or first return is extremely natural and exactly the thing you do all the time for statistical tabular data. Julia’s type system makes this kind of abstraction practical to use for huge numbers of points like in a point cloud.

In terms of constructing terrain, you’ve got tools like https://github.com/JuliaGeometry/VoronoiDelaunay.jl to draw on for Delaunay triangulation of arbitrary point sets. However, selecting points for a correct ground layer is a difficult problem in general and I’m not aware of any julia tools for this. For forestry applications there’s generally not giant voids in the ground layer (at least in contrast to urban areas) so I think you would probably get away with simple heuristics for selecting ground points based on a 2D neighbourhood of the point of interest, provided the canopy isn’t too dense.

[Edit:] Having said all that, there’s certainly room for a bunch of pre-configured lidar processing pipeline tools in the julia ecosystem. I’m just not aware of any right now. Primarily such a library would simply compose the best of the libraries mentioned above with a few lidar-specific algorithms to provide processing pipelines which work out of the box.

Hi,
I’m interested in visualizing point clouds and wonder if there are better alternatives than JuliaPCL? That looks capable, but no commits after march 2017 makes me a bit hesitant to go for that if it is abandoned. Any thoughts or alternatives?
Primary use case is sanity check / initial analysis / registration check of clouds.

Have you tried out Displaz, which Chris linked above? It’s also not in active development, but it is fast and a pleasure to work with.

1 Like

Yeah displaz is fairly dormant but I’m glad to hear it hasn’t bit rotted too badly yet!

My original use cases were exactly for sanity checking/quick browsing/registration QC so it’ll probably fit your use case quite well @hacklint.

BTW I do still accept PRs for those repos and do small fixes, I just don’t have time (or honestly, a good reason) to do any heavy development on them. One thing which would be cool would be a displaz_jll build… I should try that out sometime :slight_smile:

I have now tried it out (after @visr pointed it out, should have seen that myself :wink:
I had some minor bumps (Qt and dynamic linking paths) before I got it built and runnable,
but now it’s happily displaying 14M points in a cloud
So nice job there @chris!
Next steps are likely to be figuring out getting some colour coding on points and possibly
adding polygons to the point cloud(s) - if anyone has a good example in that way I’d be interested.

Makie should have no problems with point clouds of 14 mio points! Polygons are also easy to add :wink:

1 Like

Very interesting discussion, I am new to Julia and LiDAR data. However, I need to classify a cloud of points in a given area, the classification I believe is something simple, being it: classify trees, rivers, relief, pasture area, erosion and “grotto”. Finally, generate the DEM, DSM and DTM. Does anyone know what packages and tools I can use? I use Linux and most of the software I’ve seen is compatible with Windows. Can anyone help me?