4

How can I delete duplicate LiDAR points? I incorrectly read the same las twice and saved as a one file resulting in duplicate XY points. How should I delete these duplicate points?

Andre Silva
10.5k12 gold badges57 silver badges109 bronze badges
asked Mar 11, 2015 at 21:01
1
  • 1
    What software and/or tools are you using and what format is your data in (.las for example)? In ArcGIS there's a Delete Identical tool at the Advanced License level... but I don't know if that would work on a LIDAR point cloud. Commented Mar 11, 2015 at 21:12

4 Answers 4

3

You can delete all duplicate points from a las, laz or ascii file using lasduplicate in LAStools.

Finds and removes all duplicate points from a LAS/LAZ/ASCII file. In the default mode those are xy-duplicate points that have identical x and y coordinates. The first point survives, all subsequent duplicates are removed. It is also possible to keep the lowest points amongst all xy-duplicates via ‘-lowest_z’.

It is also possible to remove only xyz-duplicates points that have all x, y and z coordinates identical via ‘-unique_xyz’.

Also, lasfilterduplicates in the lidR package (documentation p. 51):

lasfilterduplicates(las)

Filter points that appear more than once in the point cloud according to their X Y Z coordinates

answered Mar 11, 2015 at 21:10
1

If you consider to remove duplicated points on X, Y coordinates (with different Z), after using lasfilterduplicates function from lidR package, you may use lasfilter function.

las <- lasfilter(las, !duplicated(las@data, by = c("X", "Y")))

I think it will retain the first return points (from that duplicated points).

answered Mar 13, 2019 at 4:37
0

You can also try a tool in WhiteboxTools - LidarRemoveDuplicates. You can run it separately through CMD line or as QGIS 3.4 plugin. Instruction on how to use and install WhiteboxTools in on their webpage

answered Jan 21, 2019 at 10:46
0

As an update on the answers by @wnursal and @Aaron :

The lidR package function lasfilterduplicates() is deprecated. Instead, you can use the maintained version filter_duplicates(). This can be applied to LAS files and LAS catalog objects.

When loading a catalog or a file, you can already set this within the function, and this maybe works also in your case:

# catalog
ctg <- lidR::readLAScatalog("path/to/folder", filter = "-drop_overlap")

More options on filtering the initial data with readLAS(filter = "-help"), not to be confused with later filtering based on Boolean criteria with filter_poi()

answered Oct 25, 2023 at 7:49

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.