r-lidar-lab / ALSroads

Road corrections and measurements from ALS data
19 stars 4 forks source link

Splitted roads aren't always merged correctly and show straight line #63

Closed jfbourdon closed 1 year ago

jfbourdon commented 1 year ago

When a road is splitted in chunks because it is too long to be processed in only one, the corrected road sometime show a straight line between both ends of the line. The computed metrics doesn't seem to be affected by this line that can cross any terrain. I'm under the impression that fixing #62 will also fix this issue.

Data: https://transfert.mffp.gouv.qc.ca/?ShareToken=6E322A3282A5DB898B3BE3431290D6E0F313A2F7 Tested with ALSroads d39fc2c

library(ALSroads)
library(lidR)
library(raster)

ctg <- readLAScatalog("point_cloud.laz")
dtm <- raster("dtm.tif")
road <- sf::st_read("line.gpkg")

corrected_road <- measure_road(road, ctg = ctg, dtm = dtm)

plot(road$geom, col="red", lwd=4)
plot(corrected_road$geom, add=T, col="blue", lwd=2)

image

Jean-Romain commented 1 year ago

Je crois que ce problème est le même que l'autre. Les sous-parties sont inversées et c'est pour ça que ça semble se reconnecter