PDAL / PDAL

PDAL is Point Data Abstraction Library. GDAL for point cloud data.

Home Page:https://pdal.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

filters.litree never terminating

WhiteSte opened this issue · comments

Hello everyone,
Inside details section you can find the pipeline. (Since the file is really dense i suggest you to keep the crop filter to speed up the execution)

 {
                "pipeline": [
                    {
                        "filename": "/Users/steve/Desktop/Lavoro/ArchiMethodSA/spacepix/projects/raw_data/SwissSurface3D/2700-1226.las",
                        "type": "readers.las",
                        "spatialreference": "EPSG:2056"
                    },
                    {
                        "distance": 150,
                        "type": "filters.crop",
                        "point": "POINT(2700774.3 1226782.9 774.0)"
                    },
                    {
                        "type": "filters.range",
                        "limits": "Classification[3:3]"
                    },
                    {
                        "raster": "/Users/steve/Desktop/Lavoro/ArchiMethodSA/spacepix/projects/raw_data/ground/2700-1226.tif",
                        "type": "filters.hag_dem"
                    },
                    {
                        "count": 30000,
                        "decay": 0.9,
                        "type": "filters.relaxationdartthrowing",
                        "radius": 0.9
                    },
                    {
                        "type": "filters.sort",
                        "dimension": "HeightAboveGround",
                        "order": "DESC"
                    },
                    {
                        "min_points": 10,
                        "min_height": 3,
                        "type": "filters.litree",
                        "radius": 5
                    }
                ]
            }

the filter litree there goes into an infinite loop.
The following is the last print

(javapipeline filters.litree Debug)             Max HAG value of 37.2397
(javapipeline filters.litree Debug) Classifying points for tree 242 (|Ui| = 22638)
(javapipeline filters.litree Debug)                     |Pi| = 1, |Ni| = 22638
(javapipeline filters.litree Debug) Minimum cluster size not met; skipping tree.
(javapipeline filters.litree Debug)             Max HAG value of 37.2397
(javapipeline filters.litree Debug) Classifying points for tree 242 (|Ui| = 22638)

As you see it get stuck with 22638 remaining points classyfing for tree 242.

The problem is resolved and terminates correctly if i set for example "radius": 50 in the litree.filter

Idk if it's wise to add a check that if the number of points is not decreasing from the previous step it leaves (or at least if that happens a certain tolerance number of times)

Since the two files are 400mb of size i'm putting the link to download a .zip (this link will expire 10/03/2024)
las+tif.zip

System/installation information:
I'm running pdal 2.6.2 installed through conda. I'm using it inside java env, but i checked and the problem is represented running it from command line

Can you please re-post the LAS/LAZ file so that I can take a look at this. I'm not sure messing with the radius is the right approach. If the pipeline you're using is anything other than LAZ -> litree, it would be nice if you could post that as well.

Sure here: las+tif.zip . This link will expire the 25/4/2024