lasthin in large files

154 views
Skip to first unread message

Mikael Sejersen

unread,
Oct 28, 2018, 7:05:20 AM10/28/18
to LAStools - efficient tools for LiDAR processing
Hi, 

I have a larger corridor (road) project and would like to extract GCPs from an other execisting dataset. The plan is to cut the execisting dataset to a narrow corridor (25-50 cm) along the road using lascut and then extract only one point for every 100 meter using lasthin.

How to thin a large project to one point pr. 100 meter? 
I guess I will run into problems if just tiling the project as usual. I could of course tile to large tiles (as I do not have many points left in a 25-50cm corridor), but I guess that will not result in evenly destitute points. 

A related question: In the readme file it is suggested to use  the "-sparse" parameter for "sparse grids such as, for example, a single but very long diagonal flight line". I am not sure what is ment by "sparse grids". but should the "-sparse" be used for at corridor project not consisting of one longe line, but more looking like a spiderweb?

/Mikael     
    

Martin Isenburg

unread,
Oct 29, 2018, 7:15:05 AM10/29/18
to last...@googlegroups.com
Hello,

with the addition of the 64 bit tools the '-sparse' option is less important than before. Just use lastile or lasthin with '-cpu64' or directly call lastile64 or lasthin64. The '-sparse' option should also be a reasonable option for spiderweb like scenarios. Instead of expecting a fully populated area (that is best spatially indexed via a contiguous block of values that x and y are mapped into) it will use a hash map to do the mapping from x and y coordinates to thinning cells.

Regards.

Martin @rapidlasso

Mikael Sejersen

unread,
Oct 30, 2018, 7:46:09 PM10/30/18
to LAStools - efficient tools for LiDAR processing
Hi Martin, 

Thank you. 
I have managed to narrow down the existing point cloud down a bit having only the points in the GCPTest.las 

When trying to thin it with:

lasthin64 -i I:\GCP_TEST.las -step 200 -central -o I:\GCP_TEST_Thined_4.las

I do not get the expected result. It does get thinned (GCP_TEST_Thined_4.las), but the points are very random placed. Simtimes very close (<20 meter), but also longer apart. I was expecting more regular spaced points. 

Something I have misunderstood?     

GCP_TEST.las and GCP_TEST_Thined_4.las can be found here:


/Mikael 

Martin Isenburg

unread,
Nov 4, 2018, 7:25:01 AM11/4/18
to last...@googlegroups.com
Hello,

indeed, you found a bug for larger step sizes. I've never used the '-central' option with such large step sizes. Turns out that for sizes higher than 60 there is an integer overflow bug. This is fixed now and you can download a preliminary version here if you cannot wait until the next release:


Thanks for noticing. Below - just for the record - the sequence of LAStools calls that I used in my experiments to notice that things were not quite right.

===========

To get a closer look at what happened I had done the following. First I decided to look at only a subset of your input to be able to tell whether the algorithm picks one point per 200  by 200 meter cell that is the closest to the center of each 200 by 200 cell (hence, closest to the x/y coordinate pair that has a remainder of 100 when divided by 200).

las2las -i GCP_TEST.las ^
            -inside_tile 484000 6129000 2000 ^
            -odix _sub -olaz

lasthin64 -i GCP_TEST_sub.laz ^
            -step 200 -central ^
            -odix _central200 -olaz

lastile -i GCP_TEST_sub_central200.laz ^
          -i GCP_TEST_sub.laz ^
          -files_are_flightlines ^
          -tile_size 200 ^
          -o GCP_TEST_200.laz

lasview -i GCP_TEST_200*.laz -gui
lasview -i GCP_TEST_200_484400_6130400.laz -color_by_flightline
lasview -i GCP_TEST_200_485200_6130200.laz -color_by_flightline
lasview -i GCP_TEST_200_485000_6130200.laz -color_by_flightline
lasview -i GCP_TEST_200_484800_6130400.laz -color_by_flightline
lasview -i GCP_TEST_200_484000_6129600.laz -color_by_flightline
lasview -i GCP_TEST_200_484000_6129400.laz -color_by_flightline

Attached a before and after image for GCP_TEST_200_484400_6130400.laz with the green point that is selected being the most central one.

lasthin_GCP_TEST_200_484400_6130400_broken.png
lasthin_GCP_TEST_200_484400_6130400_fixed.png

Mikael Sejersen

unread,
Nov 5, 2018, 7:57:38 AM11/5/18
to LAStools - efficient tools for LiDAR processing
Hi Martin, 

Thank you. 
It looks a lot better, but there are still some points closer together than what I expect. Perhaps it is my understanding, but if you look at the attached screen shot, I have marked (with yellow, two points that I would consider unnecessary:

Udklip.PNG


The other points are spaced nicely with about 200 meter. 

Best regards 
Mikael 

Martin Isenburg

unread,
Nov 5, 2018, 2:21:53 PM11/5/18
to last...@googlegroups.com
Hello,

with lasthin and the '-central' option it picks *one point per cell* that is closest to the center of the cell. Depending on how your points fall into cells that can result in points being very close to each other. There is no direct mechanism in lasthin to assure that points are step size from each other. It all is very dependent on which sets of points fall into which cell and - especially for sparse point sets such as yours - this gridding has a fairly large impact on the final result. But there are other workflows. 


Try lasduplicate with the '-nearby 100' or '-nearby 120' option or a combination of lasthin and lasduplicate.

lasduplicate -i GCP_TEST.las -nearby 100 -o GCP_TEST_d100.laz

or

lasduplicate -i GCP_TEST.las -nearby 120 -o GCP_TEST_d120.laz

or  

lasthin -i GCP_TEST.las -step 100 -central -o GCP_TEST_t100.laz
lasduplicate -i GCP_TEST_t100.laz -nearby 120 -o GCP_TEST_t100_d120.laz  

Playing with the right parameters for step and nearby should give you the results you want.

Regards,

Martin @rapidlasso

Mikael Sejersen

unread,
Nov 19, 2018, 8:03:43 AM11/19/18
to LAStools - efficient tools for LiDAR processing
Hi, 

Thank you, works fine (no need for lasthin in this case) 
I do know lasduplicate, but I did not see this use for it, nice ;o)

/Mikael 
Reply all
Reply to author
Forward
0 new messages