Skip to content

r.in.pdal handling the number of returns #3827

@mazingaro

Description

@mazingaro

Zero-indexed values of the return number

r.in.pdal reports zero-indexed values of the return number.
The first return is idexed as return[0], second as return[1] etc.
r.in.pdal -p input=point_cloud.laz

I am appending a pdal info --stats report.

Using PDAL library version '2.7.1 (git-version: Release)'
File: point_cloud.laz
File version = 1.4
File signature: LASF
File source ID: 0
Global encoding: 17
Project UUID: 00000000-0000-0000-0000-000000000000
System ID: AL;
Software ID: TerraScan
Creation DOY: 34
Creation Year: 2024
VLR offset (header size): 375
VLR Count: 2
Point format: 8
Point offset: 729
Point count: 23595745
Point count by return[0]: 11930597
Point count by return[1]: 7817264
Point count by return[2]: 3105005
Point count by return[3]: 660896
Point count by return[4]: 80761
Point count by return[5]: 1200
Point count by return[6]: 22
Point count by return[7]: 0
Point count by return[8]: 0
Point count by return[9]: 0
Point count by return[10]: 0
Point count by return[11]: 0
Point count by return[12]: 0
Point count by return[13]: 0
Point count by return[14]: 0
Scales X/Y/Z: 0.00025/0.00025/0.00025
Offsets X/Y/Z: 500000/-0/-0
Max X/Y/Z: 479000/71000/808.982
Min X/Y/Z: 478000/69999.9/498.449
Ext. VLR offset: 0
Ext. VLR count: 0
Compressed: true
Dimensions: X, Y, Z, Intensity, ReturnNumber, NumberOfReturns, ScanDirectionFlag, EdgeOfFlightLine, Classification, Synthetic, KeyPoint, Withheld, Overlap, ScanAngleRank, UserData, PointSourceId, GpsTime, ScanChannel, Red, Green, Blue, Infrared, Deviation

The code in question seems to be

https://github.com/OSGeo/grass/blob/main/raster/r.in.pdal/info.cpp#L118C1-L118C67

Return numbers have a range from 1 - 5 instead of the full range.

When using r.in.pdal to create a raster of return numbers it imports just the first 5. The produces map is correct but it lacks returns.
r.in.pdal -e -o input=point_cloud.laz output=point_cloud_return_number type=CELL resolution=1 dimension=returns
Majorly we find 5 reurns from LiDAR scanners. Modern RIEGL scanners can have up to 7 returns. PDAL shows 7 return values.

Metadata

Metadata

Assignees

Labels

C++Related code is in C++bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions