Skip to content

Commit

Permalink
added las_check()
Browse files Browse the repository at this point in the history
  • Loading branch information
bi0m3trics authored Mar 19, 2021
1 parent e2a1bfa commit 272c16b
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,26 @@ getExampleData("DensePatchA")
LASfile = system.file("extdata", "DensePatchA.laz", package="spanner")
las = readTLSLAS(LASfile, select = "xyzc", "-filter_with_voxel 0.01")
# Don't forget to make sure the las object has a projection
# projection(las) <- sp::CRS("+init=epsg:26912")
# projection(las) = sp::CRS("+init=epsg:26912")

# pre-process the example lidar dataset by classifying the ground points
# using lidR::csf(), normalizing it, and removing outlier points
# using lidR::ivf()
las <- classify_ground(las, csf(sloop_smooth = FALSE,
las = classify_ground(las, csf(sloop_smooth = FALSE,
class_threshold = 0.5,
cloth_resolution = 0.5, rigidness = 1L,
iterations = 500L, time_step = 0.65))
las <- normalize_height(las, tin())
las <- classify_noise(las, ivf(0.25, 3))
las <- filter_poi(las, Classification != LASNOISE)
las = normalize_height(las, tin())
las = classify_noise(las, ivf(0.25, 3))
las = filter_poi(las, Classification != LASNOISE)

# plot the non-ground points, colored by height
plot(filter_poi(las, Classification!=2), color="Z", trim=30)

# perform a deep inspection of the las object. If you see any
# red text, you may have issues!
las_check(las)

# find individual tree locations and attribute data
myTreeLocs = get_raster_eigen_treelocs(las = las, res = 0.05,
pt_spacing = 0.0254,
Expand Down Expand Up @@ -78,5 +82,5 @@ myTreeGraph = segment_graph(las = las, tree.locations = myTreeLocs, k = 50,
output_location = getwd())

# plot it in 3d colored by treeID
plot(myTreeGraph, color="treeID")
plot(myTreeGraph, color = "treeID")
```

0 comments on commit 272c16b

Please sign in to comment.