I have a
.las file and want to show the outline of the big rocks located in this area.
So far I have done the following:
- Obtain a ground model from the
.lasfile including the rocks.
- Calculate the slopes in the ground model.
- Only show slopes greater than 30 degrees.
Step 2 and 3. are fine. My problem is to obtain a reasonable ground model in step 1. (Step 3 unfortunately removes some of the smaller rocks, but this is not very important).
.las file is downloaded from hoydedata.no. It is available here. In the linked map there are two big rocks showing up in the DSM Hillshade layer. One rock next to the road, and one next to a small lake. The rock next to the lake does not show up in the DTM Slope degrees layer.
The points in the
.las files are classified as 1, 2, 7. It is somewhat arbitrary if big rocks are assigned class 1 or 2.
A rock is big if it is greater than 2 meters in at least 2 directions (and usually in all 3 directions). However, a method which can outline smaller rocks as well would be great.
The rocks are typically located in forests, swampland or mountains. There are usually no buildings around. There might be cliffs around, but these I want to show as well. Hence, an alternative could be to identify and remove the vegetation.
Are there any tools to remove vegetation points from
I have tried various tools for step 1:
pdal works when I increase the slope parameter slightly, but I worry that there are some trees showing up:
pdal ground -i /data/in.las -o /data/out.las --slope 0.7 --denoise
lidR has an impressive tree segmentation algorithm which color the rocks correctly, see 2. However, I was unable to extract the rocks or remove the vegetation. It looks like the rocks are classified as trees.
lastools works reasonably well with the following parametres (suggested by the data providers):
lasground.exe -i *.laz -ultra_fine -ignore_class 7 -step 5 -spike 1 -offset 2.5 -odir ground -olaz -cores 5 las2dem.exe -i ground\*.laz -slope -keep_class 2 -step 0.25 -opng -odir dtmslope
Unfortunately I do not have access to a licensed version of
lastools, and I only have limited access to a Windows environment for running
Preferably I would like to use open source tools.
I am completely new to GIS and LiDAR.
How do I tweak the parameters or should I use different tooling for step 1?
For step 2 I currently use
lidR and the following code:
require(lidR) las <- readLAS("out.las", select="xyzc") las <- lasfilter(las, Classification == 2) gnd <- grid_terrain(las, res = 1, tin()) sl <- terrain(gnd, opt="slope") png("tmp.png", width = 1920, height=1080) plot(sl) dev.off()
This produces the picture below from the output of
pdal. In the picture you can see the outline of two rocks at the bottom center next to the road and the small lake.