-
-
Notifications
You must be signed in to change notification settings - Fork 135
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
interpret_waveform scale factor is too low #549
Comments
What a surprise to see you back! I'll look at that. I think we should estimate somehow a value instead of hard coding one. The formula is: P$X + P$WDPLocation * P$Xt So we must figure out what is the accuracy of each element. |
It could be a good solution to have an estimate from the range values, but maybe the most straight forward would be using the scale and offset of the input las, no? |
header <- as.list(las@header)
data <- las@data
fwf <- rlas::fwf_interpreter(header, data)
fwf <- data.table::rbindlist(fwf)
fwfheader <- rlas::header_create(fwf)
fwfheader["X scale factor"] |
Well, it will find |
It is not an easy question actually. With a smaller scale the range of storable value is reduced. with storable_coordinate_range(1e-7, 0)
#> min max
#> -214.7484 214.7484 With storable_coordinate_range(1e-8, 0)
#> min max
#> -21.47484 21.47484 |
Or maybe the problem is that your dataset is too large to be stored with the default |
Yes, the problem I had was on a large area (>5000m) around 0,0,0. But from what I understood, the quantization error would also have happened if I had been working with real coordinates in a standard french CRS for example (epsg:2154 has parameters I would say that using the input las scaling would be a good default and intuitive solution, as the waveform is supposed to be around the returns and in most cases not so far away (e.g. maximum a few km starting from the plane). I tried Last, the fixed scale of 1e-6 would mean a precision of |
I think the original scaling is unappropriated. It is often 1 cm accuracy. I think with a nanosecond resolution we need at least a mm resolution. Let do the math.
In the example dataset with one nanosecond resolution and an incidence angle of 5 degrees we have a distance between two points of 3.62 cm. So with a accuracy of 1 mm ( f <- system.file("extdata", "fwf.laz", package="rlas")
head <- rlas::read.lasheader(f)
data <- rlas::read.las(f)
fwf <- rlas::fwf_interpreter(head, data[1,])
X = fwf[[1]]$X
Y = fwf[[1]]$Y
n = nrow(fwf[[1]])
d = sqrt((X[-n] - X[-1])^2+(Y[-n] - Y[-1])^2)
unique(d)
#> [1] 0.03629021 A light-nanosecond is approx 300 millimeters. With an angle of 5 degrees the distance between two consecutive measurments is As a conclusion I'd say that
It estimates (statistically) the accuracy of the numbers in a vectors. But |
I agree with your conclusions, thanks for your fast replies as usual.
Just a correction of this previous comment: offsets are set to the minimum coordinates in |
You can look at the commit. I'm doing the math based on a limit of 1 degree off nadir and based on the temporal spacing. I'm querying the closest reasonable and valid scale factor and I'm dividing by 10 to get extra accuracy. It should return something close to If a dataset has a 10 ps temporal spacing it uses |
Perfect, many thanks! |
Hi Jean-Romain, I am back on lidar projects ;-).
In interpret_waveform, scale factor is fixed at 1e-6, which is quite limiting on coordinates values and led me to a quantization error.
Could it be passed as an argument instead (as well as offset)?
Cheers
The text was updated successfully, but these errors were encountered: