Interface for filter implementations
I wasn't sure if this is appropriate here or a different package, but wanted to start somewhere.
Sometimes when I am filtering a point cloud I don't want the surface yet, but want to identify/update the classification for what points are ground. I think it would be great to have some kind of generic interface like GeoStats/DiffEq/others where I can swap out the algorithm easily.
classify(pc::PointCloud, alg::GroundFilter) or
classify(pc::PointCloud, alg::VegetationFilter)
and then if I don't care about the points and want to go straight to DEM it classifies the point and returns the surface.
filter(pc:PointCloud, alg::GroundFilter)
Does this make sense?
I know there is an update!() functionality in LasIO that will update bounding box. Maybe the classification code lives in LasIO/LazIO and the filtering code lives here?
This absolutely makes sense. Over at https://github.com/FugroRoames/PointClouds.jl there's a pointcloud type already, but a discussion about what it should be as well. I've talked before about PointCloudFiltering.jl with @visr.
In the meantime, for my current work, I'm also looking for a type/interface to:
- Intersect many millions of points with complex shapefiles
- Easily do GeoArray + Pointcloud, adding the raster values to an (z) attribute of intersecting points for each cell
I have this working in a script like manner, but like to generalize, and I'm using other PointClouds than LazIO.jl.
I have seen the PointClouds.jl project before, that looks cool but very dead haha.
I like what you are describing but I have no idea how to get there...
There is probably some overlap with a few JuliaGeometry packages. PointCloudRasterizers probably in there somewhere too.
In the near term, I have been mainly thinking of it in terms of just wrapping the pmf and other future filters in this package so they integrate with LiDAR data pc::LazDataset rather than a higher level generic ::PointCloud. I don't really do much with meshes or CAD data so I am less familiar with what they require.
I can start trying to put something together if there is some guidance as to what it should look like or examples I can follow. At the very least, I can contribute enthusiasm!
Starting with an iterable that produces an object that has fields like :x, :y seems fine to me. I'm actually working on a few pointcloudfilters right now that I can put online soon. Shall we call it PointCloudFilters.jl?
With regards to the filters, I hope they can work (also) like a findall, so you don't make unneeded copies of (often large) pointclouds. Like, https://github.com/evetion/GeoAcceleratedArrays.jl which is a first WIP geo-version of https://github.com/andyferris/AcceleratedArrays.jl
Anothing quick thing, the API of the filter function is the other way around:
filter(pred, a)so filter(alg::GroundFilter, pc::PointCloud)