A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/r-lidar/lidR/issues/614 below:

CRS results in NA · Issue #614 · r-lidar/lidR · GitHub

When using the manual correction on an automatic tree detection, the CRS results in NA. The tree segmentation then results in error.

LASfile <- system.file("extdata", "MixedConifer.laz", package="lidR")
las <- readLAS(LASfile, select = "xyzr", filter = "-drop_z_below 0")

chm <- rasterize_canopy(las, 0.5, pitfree(subcircle = 0.2))
ttops <- locate_trees(las, lmf(ws = 5))
manual_ttops <- locate_trees(las, manual(ttops))

algo <- dalponte2016(chm, manual_ttops)
seg_las <- segment_trees(las, algo)
#> Error in geos_op2_geom("intersection", x, y, ...) : 
#>   st_crs(x) == st_crs(y) n'est pas TRUE
st_crs(manual_ttops)
#> Coordinate Reference System: NA
st_crs(ttops)
#> Coordinate Reference System:
#>  User input: EPSG:26912 

To work around this error, we can assign the st_crs(manual_ttops) <- st_crs(ttops). Then, these lines and the tree segmentation works fine:

algo <- dalponte2016(chm, manual_ttops)
seg_las <- segment_trees(las, algo)

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4