LiDAR point cloud projects?

#1

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?

0 Likes

#2

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

#3

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

#4

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.

0 Likes

#5

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

#6

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

0 Likes

#7

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<:?

0 Likes

#8

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.

0 Likes