Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue function in 8.4.2 Fractal dimensions #13

Open
ghost opened this issue May 2, 2023 · 0 comments
Open

issue function in 8.4.2 Fractal dimensions #13

ghost opened this issue May 2, 2023 · 0 comments

Comments

@ghost
Copy link

ghost commented May 2, 2023

When using the fractal dimension function in combination with grid_metrics and small resolutions (e.g. 1), Rdimtools::est.boxcount may throw an error if there are not enough points in the grid cell. To solve this problem, either the grid size needs to be increased or the user defined functions need a check to skip grid cells with insufficient number of points.

The function below is my implementation of such a check. After some testing for minimum number of points, >3 seems to work well. I tested this on my data (drone-based lidar with resolution set to 0.5 or 1).

fd = function(X,Y,Z) {
  M = cbind(X,Y,Z)
  if(nrow(M)>3){
    est.boxcount(M)$estdim
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants