r-lidar-lab / ALSroads

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

Class assignment and possible enhancement #60

Closed spono closed 10 months ago

spono commented 1 year ago

Ciao JR, personal curiosity: are the classes flexible enough to handle different road widths? I explain myself: in the alpine context [but not only] forest roads are pretty narrow (< 4 meters) for two main reasons: 1) high slope steepness and 2) construction year (most of roads were built one or more centuries ago for animals or small carriages). Some initial tests on my data show that the tool seems to work pretty well even for width estimation but what I'm trying to understand is: according to the paper, Class 1 is assigned to Sufficiently wide road width, Class 2 to Narrower road, but able to facilitate vehicle passage. Is this evaluated on a minimal width (based on your dataset) or as a ratio between the identified drivable width and the road width ? If we're in the first case, then I would suggest to consider a possible enhancement that takes this into account. Right now, the only idea that comes to my mind is exposing a parameter like width.range = c(4,10) where the user can modify the expected minimum & maximum width.

BTW: thanks for another great piece of software!

PS the example reported in the md file is not matching the correct file names, as reported in the als_road example, i.e.:

road <- system.file("extdata", "j5gr_centerline_971487.gpkg", package="ALSroads")
dtm  <- system.file("extdata", "j5gr_dtm.tif", package="ALSroads")
Jean-Romain commented 1 year ago

You can control the activation functions thresholds (figure 7). We are currently writing a user guide by-the-way, but it is far to be ready.

param = alsroads_default_parameters
param$param$state$drivable_width_thresholds = c(4,10)
measure_road(..., param = param)

But the default is c(1,5) which is already much more aggressive than your suggestion. This means that for the metric W a score of 0% is produced for roads measured under 1 m and 100% for roads above 5 m. A 2 m road have a score of 50% which means it may be a road or not. In your case if something below 4 m is likely to be a road you can narrow the range to c(1,4).

spono commented 1 year ago

great: thanks!