Background: I have topographical datasets with height information as a starting point. The endgame is to create a dataset of triangulations which I can use to import into Parasolid to be used further downstream. The takeaway point is that I need triangles.

More about the data: The data is of the type Large SpatialLinesDataFrame which represents topographical maps. I have some experience with converting this to spatialpoints/interpolating/rasterising etc., so this is not the crux of the problem. I understand the problems that arise (or don't) whether the data is regularly or irregularly spaced and am confident I would be able to coax the data between the two as required, so this is also not the crux of the problem.

The problem: Regardless of what the data format, I can't seem to find a library in R that would be able to calculate Delaunay (or any suitable) triangulations. Yes, there is deldir and RTriangle but both these are limited to datasets in the same plane i.e 2D. Mountains tend to be 3D, so therein lies my problem.

  • Create a 2-d triangulation and then sample the height information at each triangle vertex (eg from a rasterised DEM) to get the height. GIS representations of height fields tend to be "2.5D" (ie xy + height) rather than fully 3d modelled surfaces that can handle things like overhangs. – Spacedman Jun 21 '19 at 15:27
  • 1
    Did you try delaunayn? – Kirk Kuykendall Jun 21 '19 at 18:33
  • @KirkKuykendall "N-dimensions" This looks exactly like what I need. Don't know how I missed that. It's even in the standard c-ran libraries! Library installed and I will have a go at it today. Will promote your suggestion to an answer. Thanks! – Waldo vdM Jun 24 '19 at 7:23
  • @KirkKuykendall It took me a while to get to this. Had to update RStudio, R and RTools just to that I can install the rgl library in order to use plot3d to plot the result of delaunayn. Anyway, can you add your comment as a proper answer, as it did answer my question on point. – Waldo vdM Jul 17 '19 at 13:05

Try using Delaunay Triangulation In N Dimensions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.