R – Using lidR to Classify Powerline Features Misclassified as Noise

classificationlidarlidrr

I am using NOAA LiDAR data to experiment with methods in lidR. I want to use the linear segment_shapes() function to locate powerlines, but some of powerlines are already classified as noise. Using lidR (preferably) or unlicensed LAStools &/or QGIS how do I reset the classification of these points.

I have used the classify_noise() function in both the las and catalog format. I can't find a simply way to view classifications.

Otherwise is it possible to tell the function from ch 13 in the lidR textbook to consider all points despite already being classified?

lasfile <- readLAS(here("ch13/central_blvd_palmbeach/91_10/9110/Job648155_26080_91_10.las"))
las_denoise <- classify_noise(lasfile, ivf(5,2))
seg_las <- segment_shapes(las_denoise, shp_line(th = 8, k = 15), "linear")
plot(seg_las, color = "Classification")
writeLAS(seg_las, here("ch13/central_blvd_palmbeach/91_10/9110/seg_las.las"))

I am also having trouble updating the classification based on segment_shapes() algorithm results.

screen shot of LiDAR data from NOAA with powerlines. Yellow represents noise classification which is how the dataset came from NOAA

Best Answer

How do I reset the classification of these points.

You can change the classification manually like in most R object

las$Classification[las$Classification == LASNOISE] <- LASUNCLASSIFIED
# if you prefer a data.table style
las@data[Classification == LASNOISE, Classification := LASUNCLASSIFIED]

I can't find a simply way to view classifications.

You can use plot(las, color = "Classification"), noise point are yellow or you can e.g. filter the noise points filter_poi(las, Classification == LASNOISE).

I am also having trouble updating the classification based on segment_shapes() algorithm results

las <- segment_shapes(las, shp_line(th = 8, k = 15), "linear")
las@data[linear == TRUE, Classification := LASWIRECONDUCTOR]

Otherwise is it possible to tell the function from ch 13 in the lidR textbook to consider all points despite already being classified

It already considers all points, But you can use the filter argument to do not consider all points

I want to use the linear segment_shapes() function to locate powerlines

Looking at your point cloud I hardly believe that you will succeed in segmenting powerline that way. The powerlines are sparse and discontinuous due to low sampling density and thus an eigen decomposition is unlikely to detect linear feature in isolated points.

Related Question