Skip to content

Commit

Permalink
Add more in paper related to the DT comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
hugoledoux committed Mar 15, 2024
1 parent d12309d commit 3459a70
Showing 1 changed file with 22 additions and 16 deletions.
38 changes: 22 additions & 16 deletions paper/paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down

0 comments on commit 3459a70

Please sign in to comment.