LiDAR processing from start to classification for canopy

497 views
Skip to first unread message

JP

unread,
Oct 7, 2016, 10:26:15 AM10/7/16
to LAStools - efficient tools for LiDAR processing
I don't have experience with LiDAR and I've only started using LAStools last week. I am trying to produce a canopy model. I have looked at the tutorials under the Support page and have watched a few of the youtube videos. If I understand correctly, I should take the starting tile, run it in lasground_new to produce a surface. Then I can take the surface output and produce a terrain model? I would also take the lasground_new output and run it in lascanopy and then I'd have a canopy model?

lasground_new -i <tile.path> -wilderness -replace_z -odir <out.dir> -o <filename>'ground.las'

las2dem -i <tile.patha> -elevation -utm 14N -nad83 -odir <out.dir> -odix "dem" -oasc'

When I look at the original tile in lasview, before putting it into any tools, and change the render from ALL to FIRST to LAST, there is barely any change. It all looks like a 3D landscape, with shrubs and trees and whatever. Then if I render GROUND, that looks featureless, like I would expect. I would also expect LAST to look that way, since that's where the ground is supposed to come from, if I'm not mistaken.

When I run lasground_new with the tile, the output in lasview looks like it did when I first viewed the original tile. It does not look like featureless surface. I was expecting lasground_new to just give me the ground, but now that I've thought on that, I think the docs say that it classifies ground and then everything else as "unclassified". I take that tileground output, run it in las2dem and the dem also looks like there are trees in it. Should las2dem have features, i.e. trees and objects above the ground?

If I take the groundtile and run it in lasclassify, my output still seems unchanged.

lasclassify -i <tile.patha> -odir <out.dir> -o <tileclassify.las>

Most importantly, the stuff that looks like trees if I color by elevation doesn't get classified as vegetation. I select VEGETATION in "render only" and nothing gets rendered, indicating to me that there are no data classified as vegetation. Since I just ran the groundtile through lasclassify, I am expecting there to be a "vegetation" (trees) classification now, along with ground and any buildings that may be in the tile.

I guess I also need to run lascanopy, but it seems like I don't need to, based on one of the notes in the lasground_new doc, that -replace_z skips that step.

Do my commands make sense? Should my tile appear the same in lasview, whether it's been processed in lasclassify or not?

I tried to use lasinfo to print the details of the file I am working with, but it only prints the output to the cmd window that opens, which has only the last few of many, many lines of output, it doesn't make a separate file that I can open and copy to this forum. Here is what I could get from the cmd window:

  record ID            302
  length after header  24
  description          'Merrick Index'
variable length header record 274 of 318:
  reserved             43707
  user ID              'Merrick'
  record ID            302
  length after header  24
  description          'Merrick Index'
...
  description          'Merrick Index'
variable length header record 318 of 318:
  reserved             43707
  user ID              'Merrick'
  record ID            302
  length after header  24
  description          'Merrick Index'
the header is followed by 131078 user-defined bytes
reporting minimum and maximum for all LAS point record entries ...
  X             3098153    3391061
  Y             5805639    6159062
  Z               19528      74144
  intensity           0        255
  return_number       1          4
  number_of_returns   1          4
  edge_of_flight_line 0          1
  scan_direction_flag 0          1
  classification      1          2
  scan_angle_rank   -21         20
  user_data           0          0
  point_source_ID     1          3
  gps_time 417041.511319 418241.419347
number of first returns:        5913623
number of intermediate returns: 21105
number of last returns:         5912232
number of single returns:       5531947
covered area in square meters/kilometers: 8369596/8.37
point density: all returns 0.75 last only 0.71 (per square meter)
      spacing: all returns 1.15 last only 1.19 (in meters)
overview over number of returns of given pulse: 5531947 718844 63708 514 0 0 0
histogram of classification of points:
          765498  unclassified (1)
         5549515  ground (2)

Martin Isenburg

unread,
Oct 23, 2016, 10:31:08 AM10/23/16
to LAStools - efficient command line tools for LIDAR processing
Hello JP,

wow ... that is a long question without a simple answer. Hence the late response.

I am trying to produce a canopy model. [...] If I understand correctly, I should take the starting tile, run it in lasground_new to produce a surface. Then I can take the surface output and produce a terrain model? I would also take the lasground_new output and run it in lascanopy and then I'd have a canopy model?

Yes. Once your have tiled your input with lastile into small enough tiles (with buffer) you should use lasground (you only need lasground_new for complex terrain with buildings nearby) followed by lasheight with the '-replace_z' option. 

lastile -i input\*.laz ^
          -utm 14N -nad83 ^
          -tile_size 500 -buffer 25 ^
::        -faf ^                    :: only if your input files are flightlines
          -odir tiles_raw -olaz

lasground -i tiles_raw\*.laz ^
                 -wilderness ^
                 -odir tiles_ground -olaz ^
                 -cores 4

lasheight -i tiles_ground\*.laz ^
                -replace_z ^
                -odir tiles_norm -olaz ^
                -cores 4 

Then you can either use lasgrid to make a CHM of the heighest returns per cell or las2dem to make a CHM from a first return interpolation. But both have problems. Better is to create a pit-free CHM as described here:


Or use the new spike-free algorithm to create a CHM as described here:


Then if I render GROUND, that looks featureless, like I would expect. I would also expect LAST to look that way, since that's where the ground is supposed to come from, if I'm not mistaken.

This is a HUGE miss-conception that is unfortunately often taught wrong. Last returns are *NOT* ground returns. I repeat. Last returns are *NOT* ground returns. And I repeat it one more time. Last returns are *NOT* ground returns.

The ground returns tends to be a small subset of the last returns ... especially for very densely forested terrain where few laser beams manage to penetrate all the way to the forest floor to generate their last return.

Should las2dem have features, i.e. trees and objects above the ground?

You need to filter the ground returns by adding '-keep_class 2' to generate a DTM that describes the ground surface:

las2dem -i tiles_ground\*.laz ^
               -step 0.5 -use_tile_bb ^
               -odir tiles_dtm -obil ^
               -cores 4
 
If I take the groundtile and run it in lasclassify, my output still seems unchanged.

lasclassify -i <tile.patha> -odir <out.dir> -o <tileclassify.las>

Most importantly, the stuff that looks like trees if I color by elevation doesn't get classified as vegetation. I select VEGETATION in "render only" and nothing gets rendered, indicating to me that there are no data classified as vegetation.

That is because you did not run lasheight before running lasclassify as stated in the README.

I tried to use lasinfo to print the details of the file I am working with, but it only prints the output to the cmd window that opens, which has only the last few of many, many lines of output, it doesn't make a separate file that I can open and copy to this forum. 

For this either omit the thousands of VLRs that MARS Merrick has added to your header with '-nv' or print the output directly to a text file on disk by adding '-odix _info -otxt' to the command line.

Regards,

Martin @rapidlasso
Reply all
Reply to author
Forward
0 new messages