<div dir="ltr"><p>Hi everyone,</p><p>I’m seeing very slow performance from <code>filters.litree</code> and would appreciate advice on how to improve it or what I might be doing wrong.</p><p><strong>Symptom</strong><br>The pipeline runs for ~45 minutes and is only at the 4th tree. Debug output (abridged):</p><pre style="text-wrap-mode: wrap;"><div><div><div><div></div></div></div><div dir="ltr"><code>(pdal pipeline filters.litree Debug)            Max HAG value of 23.7108
(pdal pipeline filters.litree Debug) Classifying points for tree 1 (|Ui| = 2688904)
(pdal pipeline filters.litree Debug)                    |Pi| = 5029, |Ni| = 2683875
(pdal pipeline filters.litree Debug)            Max HAG value of 23.4901
(pdal pipeline filters.litree Debug) Classifying points for tree 2 (|Ui| = 2683875)
(pdal pipeline filters.litree Debug)                    |Pi| = 1840, |Ni| = 2682035
(pdal pipeline filters.litree Debug)            Max HAG value of 23.3648
(pdal pipeline filters.litree Debug) Classifying points for tree 3 (|Ui| = 2682035)
(pdal pipeline filters.litree Debug)                    |Pi| = 3849, |Ni| = 2678186
(pdal pipeline filters.litree Debug)            Max HAG value of 23.3035
(pdal pipeline filters.litree Debug) Classifying points for tree 4 (|Ui| = 2678186)
</code></div></div></pre><p>So we’re around ~2.7M unclassified points and progressing very slowly.</p><p><strong>Pipeline</strong></p><pre style="text-wrap-mode: wrap;"><div><div><div><div></div></div></div><div dir="ltr"><code>{
  "pipeline": [
    { "type": "readers.las", "filename": "/home/adminis/Downloads/46DN2_12_segmented_cartolite_export_csf_24_9.laz" },
    { "type": "filters.hag_delaunay" },
    { "type": "filters.sort", "dimension": "HeightAboveGround", "order": "DESC" },
    { "type": "filters.litree", "min_points": 10, "min_height": 2.0, "radius": 50.0 },
    { "type": "writers.las", "filename": "/home/adminis/Downloads/46DN2_12_segmented_cartolite_export_csf_24_9_litree.laz", "compression": "true", "minor_version": "1.4", "extra_dims": "all" }
  ]
}
</code></div></div></pre><p><strong>What I’ve read / expectations</strong><br>I saw in this GitHub comment that LiTree can finish “in a couple minutes” on some datasets:<br><a rel="noopener" href="https://github.com/PDAL/PDAL/issues/3518#issuecomment-898709536" target="_blank">https://github.com/PDAL/PDAL/issues/3518#issuecomment-898709536<span aria-hidden="true"></span></a></p><p>In my case, it’s an order of magnitude slower.</p><p><strong>My question</strong><br>Does anyone have suggestions on how to make <code>filters.litree</code> run faster on multi-million-point datasets? Are there best practices around parameters or workflow that significantly affect performance?</p><p><strong>Environment (let me know if more details help):</strong></p><ul><li style="margin-left:15px"><p><strong>PDAL version:</strong> 2.8.4</p></li><li style="margin-left:15px"><p><strong>Install:</strong> conda env</p></li><li style="margin-left:15px"><p><strong>OS:</strong> Ubuntu 24.04</p></li><li style="margin-left:15px"><p><strong>Input:</strong> ~2.7M points, LAZ</p></li></ul><p>Thanks a lot for any tips!<br><br>P.S. you can find the file <a href="https://drive.google.com/file/d/1R-SZ7QdTff9gHOf0bxtuB0GHA3C7MTH_/view?usp=drive_link">here</a>.</p><p>—<br>Antonis</p></div>