Doubts about the lasgrid -classification

103 views
Skip to first unread message

Guilherme Sanchez

unread,
Jan 12, 2022, 3:40:19 PM1/12/22
to last...@googlegroups.com
  Hello everyone,
I'm evaluating classification's maps generated by lasgrid and I have some doubts.
Because the -classification command does not operate in conjunction with the -highest, -lowest, -average, -stddev, and -range commands, it is unclear how it computes classifications when generating rasters.
Also, there is the -classification_majority command which specifies your method in its own name.
We take an example here.
The image below shows a raster generated by lasgrid -classification together with the polygon of the buildings, generated by lasboundary:
image.png
This image below shows a raster generated by lasgrid -classification_majority together with the polygon of the buildings, generated by lasboundary:
image.png
Evaluating and comparing the two maps, I suggest that the -classification command doesn't compute the classes by some other sort of majority, nor does it compute by the highest or lowest or anything else I can think of right now.
So, what is the method that lasgrid uses to generate maps with the -classification command?
Is it possible to enable the classic -highest and -lowest commands?
For the maps I'm generating right now, it's important that the buildings are always above class 0, 1, 2, 3, 4, 5. In this case, I could use a -classification - highest that would solve my problem.

Follow the command line used:
lasgrid -i *.laz -step 5 -classification -false -change_classification_from_to 8 2 -odir 01_analysis_NP_class -odix "_analysis_NP_class" -opng -cores 4 -cpu64
Version used: 220107

In the next email I can send the laz files used in the example, as I have exceeded the capacity of this email here.

Regards,
Guilherme Sanchez

George S. Mercier

unread,
Jan 13, 2022, 3:09:59 PM1/13/22
to LAStools - efficient tools for LiDAR processing
Not for sure, but do you not need to classify the data using lasground -compute_elevations and then lasclassify before continuing on to lasgrid?
-G.

Guilherme Sanchez

unread,
Jan 13, 2022, 3:10:06 PM1/13/22
to last...@googlegroups.com
Hello,
Just to include a correction in my text.
Evaluating the -classification command better, I realized that it takes the class from the highest point of the cell, am I correct?
So, in my suggestion, this command could be something like -classification_cover, then we would have the following commands:
ALREADY EXISTING
-classification or -classification_cover (containing the class information of the highest point)
-classification_majority (containing predominant class)
-classification_variety (counting class variety per cell)
NEW
-classification_highest (containing class with highest value. Example: In a cell containing classes 1, 3 and 7, the cell would have the value 7)
-classification_lowest (containing class with lowest value. Example: In a cell containing classes 1, 3 and 7, the cell would have the value 1)

Regards,
Guilherme Sanchez

Guilherme Sanchez

unread,
Jan 15, 2022, 3:00:53 PM1/15/22
to last...@googlegroups.com
Hi George,
About the previous sequence (lasground and lasclassify) to run lasgrid, this is not necessary, as lasgrid generates rasters based on the chosen attribute (intensity, elevation, classification, return number...), on the type of count (highest , lowest, average, for example) and the chosen step size.
In the case of classification, lasgrid has 3 ways to generate the raster (-classification, -classification_majority and -classification_variety).
Regardless of the confusion I made in the first email (sorry to everyone, as I was not understanding the way lasgrid generated the raster -classification), I would like, if possible, to include two new ways to generate rasters with the attribute classification (-classification_highest and -classification_lowest).
The highest and lowest here do not refer to the elevation of the point, but to the classification number of the point.

Guilherme Sanchez

--
Download LAStools at
https://rapidlasso.de
Manage your settings at
https://groups.google.com/g/lastools/membership
---
You received this message because you are subscribed to the Google Groups "LAStools - efficient tools for LiDAR processing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lastools+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lastools/ea671bd7-04d3-4d39-be9b-2e1454b59b12n%40googlegroups.com.

George S. Mercier

unread,
Jan 17, 2022, 11:24:37 AM1/17/22
to LAStools - efficient tools for LiDAR processing
No worries and thanks for the clarification. I do not use lasgrid that often and when I do it's a standard thing to look at a hillshade of the data I have classed for a ground check.
Anyway, in the short term I wonder if you could get the result your looking for by pushing each class out to seperate las/laz files and working with them that way???

-G.

Guilherme Sanchez

unread,
Jan 17, 2022, 3:17:21 PM1/17/22
to last...@googlegroups.com
Hi George,
I think that currently the best option to generate a class map in the desired order is the one you said.
1) lasplit by classification 
2) lasgrid by classification for each split file
3) merge maps in the desired order (from highest to lowest value or vice versa) through some GIS software

We can see that it is possible, but a bit complex and takes a lot more processing time.

Best regards,
Guilherme Sanchez

Reply all
Reply to author
Forward
0 new messages