Quantcast
Channel: User JRR - Stack Overflow
Browsing latest articles
Browse All 43 View Live

Comment by JRR on lidr LAScatalog manual classification

The filter commands are from LASlib that is used internally to read and write LAS files

View Article



Comment by JRR on How do I calculate rumple index for grid plots (e.g.30x30m)...

It is not possible. You must write your own code. lidR is designed to process point clouds not rasters

View Article

Comment by JRR on How to homogenize points using lidR to reduce streaking...

Your code looks correct. How did you build the density map? I do not understand the density map you produced. I see densities ranging from 0 to 15 which mean that the decimation failed? Please be more...

View Article

Comment by JRR on Is the order of an unordered map always the same for a...

the key is an int in this case

View Article

Comment by JRR on Is the order of an unordered map always the same for a...

Assuming that I'm using my own hash. Would the order be the same for each compiler?

View Article


Comment by JRR on Use outside ground points to inform ground classification...

You have 3 available algorithms from the literature in lidR. They may or may not suit your needs. Maybe you need to tune the parameters. The best way to understand how to tune the parameters is to read...

View Article

Comment by JRR on lidR calculation or Rumple Index from points failing (and...

Does it fails with all dataset or only your dataset? in the first case please make a reproducible example including data.

View Article

Comment by JRR on Manually load large raster to perform lidR::locate_trees()

If you think your raster can fit in memory you can simply multiply by 1. canopy = canopy*1

View Article


Answer by JRR for Compute eigenvalues for large point clouds as quickly as...

The problem of point_metrics() is that it calls user's R code millions of times and this have a cost. Moreover it cannot be safely multithreaded. The function is good for prototyping but for production...

View Article


Image may be NSFW.
Clik here to view.

Answer by JRR for Plot a 2D Canopy Height Model (CHM) line

library(lidR)library(dplyr)library(ggplot2)LASfile <- system.file("extdata", "Megaplot.laz", package="lidR")las = readLAS(LASfile, select = "xyz")p1 <- c(684800, y = 5017800)p2 <- c(684900, y...

View Article

Image may be NSFW.
Clik here to view.

Delaunay from Voronoi with boost: missing triangle with non-integral point...

Following this two resources:Boost basic tutorialSO QuestionI wrote a Delaunay triangulation with boost. It works fine if the points coordinates are integral (I generated several random tests and I did...

View Article

Answer by JRR for Non-zero exit status package installation error on RStudio...

gdal (and friends) are not installedsudo add-apt-repository ppa:ubuntugis/ubuntugis-unstablesudo apt-get updatesudo apt-get install libudunits2-dev libgdal-dev libgeos-dev libproj-dev

View Article

Answer by JRR for How to get a circular subset of a las-dataset with specific...

I can reproduce your issue with example dataLASfile <- system.file("extdata", "Megaplot.laz", package="lidR")las = lidR::readLAS(LASfile)las_ctpt <-...

View Article


Answer by JRR for How to convert lidar format las to data.frame?

If you do not want to play with lidR and want to use bare bone data.frame simply use rlas instead of lidR.library(rlas)read.las("C:/1/078-638.las")

View Article

QNetworkAccessManager does not work on windows with https

I'm trying to download files from a https url with my application using the following code in Qt5. This works perfectly as I want on Linux but with the Windows version content is always empty and...

View Article


Answer by JRR for QNetworkAccessManager does not work on windows with https

It took me literally an entire day to figure out how to make it working. I eventually found the answer here.In Qt maintenance tool select Qt > Developer and Designer Tools > OpenSSL 1.1.x Toolkit...

View Article

Answer by JRR for TIN DSM Algorithm used in LidR package R

lidR triangulates the first returns and interpolates at the location of the centers of the pixels. So if a pixel is at the center of a triangle the value it returns is a linear combination of the...

View Article


Answer by JRR for How to read many lidar files (.las) at once and combine...

No need to loop. rlas already natively support reading multiples filesrlas::read.las(filenames)

View Article

Answer by JRR for How to solve Error at lidR::delineate_crowns?

I tested both with delineate_crown() (deprecated) and crown_metrics(). Both work. delineate_crown() produces warnings but they can be ignored.library(lidR)so_sample_las <-...

View Article

Answer by JRR for Is there a way to plot the ''true'' coordinates on the x...

This is documented in plotclear_artifacts logical. It is a known and documented issue that the 3D visualisation with rgl displays artifacts. The points look aligned and/or regularly spaced in some view...

View Article

Answer by JRR for How to bring las/laz-file to user defined point density...

You want to reach a density expressed in pts/m² by decimating/voxelizing in 3D. It don't think it is even possible. If you want to reach 4 pts/m² use decimate_points() which is designed for such...

View Article


Answer by JRR for R rgl lidR slow rendering on Windows 11 64 bit

rgl has trouble displaying too many points. The plot function in lidR is convenient and allows to produce ready to publish illustrations but cannot replace a real point cloud viewer for big point...

View Article


Answer by JRR for How to fix notes in R package about mispelled words and...

The first note is not a problem and is very unlikely be the reason for submission rejection. The second one however is likely to be a problem. Examples must run fast. You must reduce the amount of data...

View Article

Answer by JRR for Extract data from an object from lidar data in r

You can aggregate the data.tablelas@data[, length(X), by = treeID]

View Article

Answer by JRR for Subscript out of bounds error with custom function in...

You missed to propagate dtm_rasoutput<-catalog_apply(las, raster_metrics, dtm_ras = dtm_ras, grid_size=grid_size, sensitivity=sensitivity, .options=options)You used incorrect package to cropbbox...

View Article


Answer by JRR for Error: Invalid function provided as algorithm while using...

ForestTools::mcws is a function from the package ForestTools and is not designed to be compatible with lidR. lidR cannot accept any function as input and the developers must respect some convention to...

View Article

Answer by JRR for Is there an R function for finding if a .LAZ file is...

Something like that (did not test)library(lidR)library(sf)ctg = readLAScatalog("/path/to/folder")extent = st_read("/path/to/folder/filname.shp")ctg2 = catalog_intersect(ctg, extent)ctg2$filename

View Article

gcc-8 -Wstringop-truncation what is the good practice?

GCC 8 added a -Wstringop-truncation warning. From https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82944 :The -Wstringop-truncation warning added in GCC 8.0 via r254630 for bug 81117 is specifically...

View Article

How to make QTextCursor::WordUnderCursor include more characters or larger words

I'm trying to show a tooltip when the cursor is over a keyword in a text editor using:QTextCursor cursor = cursorForPosition(pos);cursor.select(QTextCursor::WordUnderCursor);This works well but the...

View Article



Answer by JRR for Trouble reading LAZ lidar files in R download from NOAA DAV

lidR uses LASlib/LASzip from LAStools to read and write LAS and LAZ files. Your files are corrupted. Story ends here. You must find non-corrupted files, or you must try to reproduce with LAStools...

View Article

Answer by JRR for Why am I having issues plotting LAS with...

Use lidR::plot(las,size=5,pal=grDevices::terrain.colors, axis=TRUE)

View Article

Answer by JRR for building R packages to use ASAN

This the document I wrote for myself and that I used myself.Download and decrompress R source codeInstall the compiler clang. apt-get install clang should do the jobOpen config.site and add the...

View Article

Answer by JRR for Calculating Point-Based EigenVectors from a LAS file in Lidr R

Use C++The documentation of point_metrics explicitly mention to use C++ code in this case. It gives you an example you can copy and paste changing only the output variableRcpp::sourceCpp(code =...

View Article


Answer by JRR for Disable OpenMP for code coverage of an R package on Github...

I found a third option. I'm running the coverage on macOS instead of Linux because it has no native support of OpenMP.

View Article

Disable OpenMP for code coverage of an R package on Github actions

I have an R package with C++ code and I'm using GitHub actions to run unit tests and code coverage with covr. Everything is working.However, code coverage does not work with parallelized blocks of C++...

View Article

Comment by JRR on Lack of precision when using the lidr package's...

Share your data otherwise there is no way to help you

View Article


Answer by JRR for Lack of precision when using the lidr package's...

The mistake you made was to compute the local maxima from the point cloud and then use these maxima as seed on a raster that was modified with a focal function. The local maxima of the raster no longer...

View Article


Comment by JRR on Segmenting lidar .laz file into four quadrants using lidR...

Your question has been close for no good reason in my opinion. Your question looks legit. Please come to the gis section gis.stackexchange.com/questions/tagged/lidr and please do not share screenshoot...

View Article
Browsing latest articles
Browse All 43 View Live




Latest Images