Changing classification given a certain class and a range of LAS values

已查看 488 次
跳至第一个未读帖子

Luiz Rodriguez

未读,
2017年4月16日 23:11:272017/4/16
收件人 LAStools - efficient tools for LiDAR processing
Hi,

   Is there a way to change in one single step the classification value of all LiDAR returns, pertaining to a certain class, based on the interval of values stored in a LAS field?  For instance, let´s say las2las had the following operators:
   
   las2las -i <oldfile>.laz
           -reclass_class_intensity_between_as 3 900 1200 11
      -o <newfile>.laz
  
   las2las -i <oldfile>.laz
           -reclass_class_uservalue_between_as 1 1.00 3.50 3
      -o <newfile>.laz
  
   las2las -i <oldfile>.laz
           -reclass_class_z_between_as 5 100 500 8
      -o <newfile>.laz
  
   las2las -i <oldfile>.laz
           -reclass_class_xy_between_as 1 481020 6403385 481060 6403425 6
      -o <newfile>.laz

   I might have stated the question in a convoluted way, and maybe a simple batch of adequately nested lastools would easily solve it. Or maybe a different approach, using laslayers would also offer a good solution. But, currently I am having a hard time to reclassify vegetation points, based on a very specific range of intensity values, using the least number of steps possible.

   Cheers,

-- 
Luiz Carlos Estraviz Rodriguez
Department of Forest Sciences
University of Sao Paulo - Brazil

Martin Isenburg

未读,
2017年4月17日 11:34:342017/4/17
收件人 LAStools - efficient command line tools for LIDAR processing
Hello Luiz,

good question. I think you are looking for the '-filtered_transform' functionality that is part of all LAStools but in your case probably best used with las2las. And if you want to do all in "one step" the piping may be your best option:

las2las -i old.laz ^
            -keep_class 3 ^
            -keep_intensity 900 1200 ^
            -filtered_transform ^
            -set_classification 11 ^
    -o temp1.laz

las2las -i temp1.laz ^
            -keep_class 1 ^
            -keep_user_data_between 10 35 ^
            -filtered_transform ^
            -set_classification 3 ^
    -o temp2.laz

las2las -i temp2.laz ^
            -keep_class 5 ^
            -keep_z 100 500 ^
            -filtered_transform ^
            -set_classification 8 ^
    -o temp3.laz

las2las -i temp3.laz ^
            -keep_class 1 ^
            -keep_xy 481020 6403385 481060 6403425 ^
            -filtered_transform ^
            -set_classification 6 ^
    -o new.laz

--------------------------------------------
!!! and now as one single pipe !!!
--------------------------------------------

las2las -i old.laz ^
            -keep_class 3 ^
            -keep_intensity 900 1200 ^
            -filtered_transform ^
            -set_classification 11 ^
    -stdout | ^
las2las -stdin ^
            -keep_class 1 ^
            -keep_user_data_between 10 35 ^
            -filtered_transform ^
            -set_classification 3 ^
            -stdout | ^
las2las -stdin ^
            -keep_class 5 ^
            -keep_z 100 500 ^
            -filtered_transform ^
            -set_classification 8 ^
    -stdout | ^
las2las -stdin ^
            -keep_class 1 ^
            -keep_xy 481020 6403385 481060 6403425 ^
            -filtered_transform ^
            -set_classification 6 ^
    -o new.laz

I have not tested it yet but it should would. One more thing: assuming you mean "user data" when you say "uservalue" then it needs to be integers between 0 and 255. The values 1.00 3.50 in your example would be cast to 1 and 3.

Cheers,

Martin @rapidlasso

Luiz Carlos Estraviz Rodriguez

未读,
2017年4月18日 09:36:172017/4/18
收件人 LAStools - efficient command line tools for LIDAR processing
Hi, Martin.
now I get how usefull the 'filtered_transform' operator can be!
... and the piped sequence you suggested ... wow! ... really awesome!
Problem solved!
Thanks,
Luiz
回复全部
回复作者
转发
0 个新帖子