I have a large set of ungridded xyz text files (LiDAR point cloud) and want to export them to any raster format (tiff, asc, gridded xyz...) for further GIS processing.

The source: https://www.opengeodata.nrw.de/produkte/geobasis/dgm/dgm1/



The files are ungridded, unsorted, up to 3GB of size and consists of millions of points each.

I don't want to use LASTools because it's somewhat proprietary. I am looking for a quick Open Source GIS way with QGIS, SAGA, GRASS, GDAL, PDAL.


2 Answers 2


For simplicity (because it was not mentioned in question) I am assuming the XYZ files are ready to be processed (i.e., no classification or filtering is needed) and that the content is suitable for whatever type of raster OP wants (DEM, DSM, etc.).

If one really wants/needs to work with ASCII files, one option to grid them is GDAL gdal_grid:

Creates regular grid from the scattered data.

GRASS also has the r.in.xyz tool for rasterizing ungridded point cloud data in ASCII format:

The r.in.xyz module will load and bin ungridded x,y,z ASCII data into a new raster map. ...
r.in.xyz is designed for processing massive point cloud datasets, for example raw LIDAR

A third option is PDAL points2grid:

Generates Digital Elevation Models (DEM) using a local gridding method.

On the other hand, I'd convert the ASCII files to binary .las (or .laz) which is the standard LiDAR point cloud format, then would proceed processing from there (especially if this is not a one-time only processing and/or other types of processing are due as well).

Because working with .las is faster; better for storage (more compact); and can take more information (see for example, Benefits of *.las vs *.xyz or *.ascii when working with LiDAR in ArcGIS for Desktop?). Besides, it has more and better software options for processing and visualization.

LAStools txt2las converts ASCII files to .las is free and open source:

Converts LIDAR data from a standard ASCII format into the more efficient binary LAS/LAZ/BIN representations.

Another option is PDAL translate (see example 3):

The translate command can be used for simple conversion of files based on their file extensions.

More useful info in PDAL readers.text and reading with PDAL.

Once having point files in LAS format, gridding them (to a DEM or DSM for example) would be straightforward. Some free/open-source options:

My favourites are the top 3..


Since you data are text files (and not LAS files) you do not need to use LASTools.

Add the text files to QGIS using the Add Delimited Text option.

Use the interpolation tools in the Processing toolbox to convert those data to rasters using TIN Interpolation.

Merge the output to one file if you would like.

Here is a tutorial on interpolating point data.

Here is a tutorial on clipping and merging raster data.

Of course, you mention having a lot of files so you will want to figure out batch processing. See this link for help on batch processing.

  • Since the files are up to 3 GB of size, this processing would take weeks.
    – MartinMap
    May 17, 2019 at 17:04

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