From 3459a70bfea0a1e2ccb491aa81d865cfceadfc6d Mon Sep 17 00:00:00 2001 From: Hugo Ledoux Date: Fri, 15 Mar 2024 09:24:05 +0100 Subject: [PATCH] Add more in paper related to the DT comparison --- paper/paper.md | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/paper/paper.md b/paper/paper.md index f5461aa..df5a635 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -67,13 +67,32 @@ More format are possible through the use of other Python libraries, there are a # Comparison with a few alternatives -The table below shows the time it takes to construct the 2D DT, in a batch operation, for different datasets. -The details of the (openly available) datasets are available on the [GitHub repository of startinpy](https://github.com/hugoledoux/startinpy/tree/joss/dt_comparisons), and the Python code to replicate the experiments is available. +The tables below compare a few Python packages to startinpy. -The [Delaunator package](https://github.com/HakanSeven12/Delaunator-Python): pure Python port of a proven fast triangulator [written original in JavaScript](https://github.com/mapbox/delaunator). +The [Delaunator package](https://github.com/HakanSeven12/Delaunator-Python) is pure Python port of a proven fast triangulator [written original in JavaScript](https://github.com/mapbox/delaunator). [SciPy](https://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.Delaunay.html) is `scipy.spatial.Delaunay`, and SciPy-inc is the variation where an incremental algorithm is used. [Triangle](https://pypi.org/project/triangle/) is the Python bindings of the C code. +| | Delaunator | SciPy | SciPy-inc | Triangle | startinpy | +|------------------------|------------|-------|-----------|----------|-----------| +| constrained DT | ❌ | ❌ | ❌ | ✅ | ❌ | +| data structure exposed | ✅ | ❌ | ❌ | ❌ | ✅ | +| efficient searches | ✅ | ✅ | ✅ | ❌ | ✅ | +| elevation/2.5D | ❌ | ❌ | ❌ | ❌ | ✅ | +| extra attributes | ❌ | ❌ | ❌ | ❌ | ✅ | +| fast | ❌ | ❌ | ❌ | 🚀 | ✅ | +| incremental insertion | ❌ | ❌ | ✅ | ❌ | ✅ | +| remove vertices | ❌ | ❌ | ❌ | ❌ | ✅ | +| xy-duplicate handling | ❌ | ❌ | ❌ | ❌ | ✅ | + + +Notice that startinpy is the only offering to store z-values and extra attributes, the others are pure 2D Delaunay triangulator. +The parameter 'efficient searches' is if a point location function is available, to find the closest triangles to a given point. +The parameter 'xy-duplicate handling' refers to the fact that startinpy allows to merge vertices that are close to each others (in the xy-plane, and it can be setup), and that if there are xy-duplicates then the z-value can be determined (lowest or highest, depending on the application). + + +The table below shows the time it takes to construct the 2D DT, in a batch operation, for different datasets. +The details of the (openly available) datasets are available on the [GitHub repository of startinpy](https://github.com/hugoledoux/startinpy/tree/joss/dt_comparisons), and the Python code to replicate the experiments is available. The datasets `random_X` are randomly generated points in unit square, the first one has 10,000 points and the other 50,000 points. The datasets `LAZ_X` are real-world lidar datasets obtained from the Netherlands, the `2M` contains exactly 2,144,049 points, and the `33M` 33,107,889 points. The dataset `dem.tiff` is the GeoTIFF file in `/data/` and the centre of each grid cell is inserted by reading the rows and columns, the total is 277,750 points. @@ -92,19 +111,6 @@ Notice that while startinpy is somewhat slower than Triangle, it is expected sin It is also faster and more stable (no crash or wrong results) than the SciPy. -| | Delaunator | SciPy | SciPy-inc | Triangle | startinpy | -|------------------------|------------|-------|-----------|----------|-----------| -| constrained DT | ❌ | ❌ | ❌ | ✅ | ❌ | -| data structure exposed | ✅ | ✅ | ✅ | ✅ | ✅ | -| efficient searches | ✅ | ✅ | ✅ | ✅ | ✅ | -| elevation/2.5D | ❌ | ❌ | ❌ | ❌ | ✅ | -| extra attributes | ❌ | ❌ | ❌ | ❌ | ✅ | -| incremental insertion | ❌ | ❌ | ✅ | ❌ | ✅ | -| removal | ❌ | ❌ | ❌ | ❌ | ✅ | -| xy-duplicate handling | ❌ | ❌ | ❌ | ✅ | ✅ | - - - # Acknowledgements I acknowledge the help of the students following the course *Digital terrain modelling (GEO1015)* at TUDelft over the last few years, their feedback, questions, and frustrations on preliminary versions of startinpy helped me greatly.