LASClip, Preserve Point Color and Intensity

120 views
Skip to first unread message

paul.schell.pls

unread,
Apr 18, 2014, 11:32:10 AM4/18/14
to last...@googlegroups.com
Is there a setting that will preserve the Point Color and Intensity values when using LASClip.
I have a Leica .pts file in the Following format:

6473733.174082 1766552.458224 -4.658177 -1011 36 39 32
6473688.585567 1766266.647258 -27.096361 -1533 45 46 37
6473452.050279 1766287.153668 47.119477 -1362 28 30 22
6473430.753397 1766281.092216 32.220561 -1264 20 21 16

I used LASClip using the following script:

lasclip -i Del_Amo_and_Vermont.pts -poly Boundary -o output.pts -verbose

It will clip the file and strip everything after the xyz. How can I keep it from striping everything after the xyz.

Thanks,

Paul Schell

Martin Isenburg

unread,
Apr 18, 2014, 4:54:51 PM4/18/14
to last...@googlegroups.com
Hello.

I creates a small 'sample.pts' file containing your 4 points:
4
6473733.174082 1766552.458224 -4.658177 -1011 36 39 32
6473688.585567 1766266.647258 -27.096361 -1533 45 46 37
6473452.050279 1766287.153668 47.119477 -1362 28 30 22
6473430.753397 1766281.092216 32.220561 -1264 20 21 16

Now let's first create a LAZ file that knows it was a PTS file:
las2las -i sample.pts -iparse xyziRGB -ipts -o sample.laz

For reference, here its lasinfo report (attached).
lasinfo -i sample.laz -odix _info -otxt

Now we delete the lowest point by dropping all z below -20 meter.
las2las -i sample.laz -drop_z_below -20 -o clipped.laz

For reference, here its lasinfo report (also attached).
lasinfo -i clipped.laz -odix _info -otxt

Now we turn the LAZ file back into a PTS file:
las2las -i clipped.laz -oparse xyziRGB -opts -o clipped.pts

Here the resulting 'clipped.pts' file. The default uses centimeter resolution but this can be changed as well.
3
6473733.17 1766552.46 -4.66 -1011 36 39 32
6473452.05 1766287.15 47.12 -1362 28 30 22
6473430.75 1766281.09 32.22 -1264 20 21 16

The '-ipts' and '-opts' flags used during conversion to assure that the intensity is handled properly. Note that similar '-iptx' and '-optx' flags exist and that they do even more (e.g. preserve the matrices). Alternatively - which may be easier because of the nice GUI - you can also use pointzip.exe and pointunzip.exe from http://pointzip.org for the conversion between PTS or PTX to LAS or LAZ and back.

But now let's put it all together in one step:

las2las -i sample.pts -ipts -iparse xyziRGB ^
             -drop_z_below -20 ^
             -oparse xyziRGB -opts -o clipped.pts

Cheers,

Martin @rapidlasso

http://rapidlasso.com - fast tools to convert your LiDARs
sample.pts
sample_info.txt
clipped.pts
clipped_info.txt
Reply all
Reply to author
Forward
0 new messages