Raster – Converting Irregular XYZ Point Data to Raster (TIF) with LASTools Alternatives

deminterpolationlidarrasterxyz

I am trying to convert my irregular spaced point data (xyz) to a DEM and then, to a raster (geotiff). Because of the irregular spacing I need a triangulation first, right (so, no spaces are in the final raster)?

So the way is: XYZ -> Triangulate -> Interpolate To Raster. I have a lot of points (minimum 150.000), my raster size should be 0.25 x 0.25m or smaller. I need a way to do this with open source / free tools!

What I've tried so far:

  • LASTools (las2dem) – works great, is extremely fast <- that would be exactly what I need, but is not free.

  • FUSION (TINSurfaceCreate then DTM2ASCII) – works well, but slows down extremely as the raster size shrinks (1 x 1m and 0.5 x 0.5m is okay, everything below is really slow).

  • SAGA Tools / gdal_grid (via QGIS) -> extremely slow as well.

Any other suggestions I should try?

Best Answer

I think the crux for lidar is whether you need to filter out the non-ground returns - I assume you have this done already.

You don't need triangulation necessarily, there's also kriging, IDW, thin-plate spline and others. See the gstat and raster packages in R for more.

Still, the RTriangle package in R offers extremely fast triangulation (with constraints) and so I would start there. Other packages offer Delaunay triangulation and they would be just as good in this case.

I made a very rough markdown document here: https://github.com/mdsumner/xyztrisurf/blob/master/xyztrisurf.md

To scale this to your data would be possible, but might need some pretty careful handling - I haven't done anything to see how that would be done here.

FWIW, this "interpolate to the grid from triangles" is essentially what Matlab's griddata does by default (afaict), and what Manifold GIS does with the "triangulation" method for creating a surface from points.