5

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?

2

3 Answers 3

4

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.

1
  • phew, i dont get it :/ my data looks like this: x,y,z 4000.23,5000.33,200.51 ... what do i have to do to get a picture like in your link? which Package did you use (RTriangle?)
    – xb1xbv1
    Commented Nov 18, 2015 at 15:24
3

PDAL can do this with points2grid. See http://www.pdal.io/stages/writers.p2g.html for details on how it works, and see https://github.com/Applied-GeoSolutions/lidar2dems for a processing pipeline solution if you have to do a lot of this.

Note there isn't an ASCII reader for PDAL yet, and it assumes you're using some sort of LiDAR format.

2

So, my workaround was the following: I am using FUSION for triangulation and raster calculation. it puts a *.dtm file out (binary) -> the conversion with the FUSION tools DTM2ASCII is the bottleneck.

So I got my hands on the binary reader of C#, read the entire *.dtm file and wrote my own tif-output with libtiff.net (http://bitmiracle.com/libtiff/).

It is not as fast as LAStools, but for my needs it is okay and works fairly well :).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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