-
-
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
lasrangecorrection() and sensor_tracking() Errors #327
Comments
lasrangecorrection()
and sensor_tracking()
Errors
You have the most weirdly invalid file I've ever seen. The good new is that every invalid point is tagged. I don't know how to explain. First look at las = readLAS("u_5370088700_2015.las")
las = lasfilterduplicates(las)
fl236 = lasfilter(las, PointSourceID == 236)
plot(fl236, color = "gpstime") It is a single flightline so the spatial order is the gpstime order. You should have a smooth gradient of color. But you can see some granularity in the gradient. If we keep only the first and last return of multiple return we should have always two point per pulse # Get only the first and last returns of multiple returns
fl236fl <- lasfilter(fl236, (ReturnNumber == NumberOfReturns | ReturnNumber == 1) & NumberOfReturns > 1)
fl236fl <- laspulse(fl236fl)
# Should be 2 for each pulse because we kept only first and last return.
# Sometime it is 1 for some point on the very edge
tab = tabulate(fl236fl$pulseID)
incorrect = which(tab > 2) We can see that after keeping only first and last return (2 points) we still have some pulses with 3 or more points. Let filter these invalid points invalid = lasfilter(fl236fl, pulseID %in% incorrect)
invalid@data[, .(X,Y,Z, gpstime, UserData,pulseID)]
#> X Y Z gpstime UserData pulseID
#> 1: 538486.9 4887087 493.93 115043503 0 11427
#> 2: 538481.9 4887087 478.89 115043503 0 11427
#> 3: 538497.9 4887000 480.84 115043503 1 11427
#> 4: 538485.8 4887089 493.67 115043503 0 11449
#> 5: 538481.0 4887088 478.82 115043503 0 11449
#> ---
#>199608: 538414.4 4888414 531.37 115043522 1 183387
#>199609: 538409.5 4888499 554.51 115043522 0 183391
#>199610: 538407.4 4888499 549.00 115043522 0 183391
#>199611: 538420.6 4888414 547.65 115043522 1 183391
#>199612: 538414.7 4888414 531.45 115043522 1 183391 We can see that las = readLAS("~/Téléchargements/u_5370088700_2015.las")
las = lasfilterduplicates(las)
las = lasfilter(las, UserData == 0)
fl236 = lasfilter(las, PointSourceID == 236)
plot(fl236, color = "gpstime") And the sensor tracking runs well sensor = sensor_tracking(las)
plot(las) %>% add_flightlines3d(sensor) |
sensor_tracking(las)
#> Error : After keeping only first and last returns of multiple returns pulses, 7991 pulses still have more than 2 points. This dataset is corrupted and gpstime is likely to be invalid. I also updated
|
For You must know that the computation is necessarily weaker at the edges of the point cloud because of the lower number of points used to estimate the sensor positionning. Before to compute the range correction check if the positions look good and well aligned especially on the edges. But the good way is to use a large buffer to compute the sensor positions. |
I created a fast version of the gpstime coherence test. Issue closed. |
@Jean-Romain Thank you for investigating this and taking care of it so quickly. This is super helpful. I would like to propose a feature that would help to determine if the intensity values require range-correction. Plotting something like the following (taken from http://www.geogra.uah.es/images/Documentos/emilio/PDF/garcia2010.pdf) would be helpful to diagnose if the intensity values have already been range corrected: I'm going to try and produce this myself with the help of the output |
If you need a function that return the range of each point ask me. This function does not exist because the range is discarded after intensity normalization. But it is few lines of code to change to return the range of each point. Do not try it yourself I already spent a lot of time thinking about special cases (and yet I missed one that was the source of your bug). |
@Jean-Romain Ok - yes it would be very helpful to have a function that computes the range of each point. I'm happy to create a feature request issue if you would like. |
Yes please open a feature request so I can keep tidy logs of what I'm doing. Thanks |
Feature request submitted: #328 |
Initially posted on GIS Stack Exchange: https://gis.stackexchange.com/questions/354527/lidr-range-correction-errors
Description
sensor_tracking()
producing warning messages:lasrangecorrection()
failing due to unrealistic range:Data
lascheck()
yields no immediate redflags:The text was updated successfully, but these errors were encountered: