Changing point source ID in .laz files using lasindex

99 views
Skip to first unread message

Andrew Goodwin

unread,
Oct 6, 2014, 10:59:13 PM10/6/14
to last...@googlegroups.com
I am trying to process some .laz files and am seeing some unexpected behaviour from lasindex. 

I want to use lasindex to change the point source ID of every point in the file from 0 to another value, and index the file at the same time.

If I run "lasindex -h" part of the output lists these options among many others:


Modify the point source ID.
  -set_point_source 500
  -change_point_source_from_to 1023 1024


The presence of the "-change_point_source_from_to" option in the helpfile suggests that lasindex is capable of modifying the point source ID, so I tried something like this:


lasindex -i filename.laz -change_point_source_from_to 0 1


This command indexes the file, but the point source ID of the points remains unchanged. 

I know I can perform this task in two steps by using las2las first, then lasindex, but I'm trying to avoid two passes through a large dataset.

Any insights or suggestions are welcome.






Martin Isenburg

unread,
Oct 8, 2014, 1:59:20 PM10/8/14
to LAStools - efficient command line tools for LIDAR processing

Hello Andrew,

Happy to hear you are using LAX and LAZ to have fast spatial area of interest queries on compressed LiDAR.

Two things
(1) it is not possible to change LAZ files in-place as they need to be decompressed and recompressed which may result in different file sizes.
(2) lasindex only reads the LAS / LAX points but does not write them. It does change their point_source_ID on read (implemented as a transform) but that is not stored back to file.
(3) the new LASlayers concept of LAStools will be able to do such small LiDAR edits very concisely. Stay tuned for ELMF 2014.

Martin

Reply all
Reply to author
Forward
0 new messages