how can we create a DEM in QGIS from point data in CSV files? A similar problem was discussed here, using a shp-file. Our CSV's are too big, so that dxf2shp crashes. So we are looking for another way to do this.
[GIS] Creating DEM from point data in CSV files using QGIS
demqgis
Related Solutions
Because these are regular points, you effectively already have a DEM; it's just in a different format than ArcGIS likes. This makes two different strategies available to you:
Convert the data into a format ArcGIS can handle. One way is to set up a raster extent and cellsize that (i) cover your DEM and (ii) situate each point near the middle of its cell. Import your DEM as a point layer and convert that directly, with no interpolation, into a grid format. (Each cell acquires the value of the unique point lying within it.) From now on, interpolation will be automatically performed whenever you resample the DEM, when aggregating, resizing, or reprojecting it. This gives you access to nearest-neighbor (not recommended), bilinear, and cubic convolution methods. You can create three separate grids this way: one for elevation, one for slope, one for aspect. For this to work, though, you must be using exactly the same coordinate system (including the projection) used to create the DEM in the first place, so that the points are truly evenly spaced and parallel to the coordinate axes.
Pretend the points are "irregular" and interpolate only the elevations using any method you can (splines, IDW, kriging, etc). Derive new slope and aspect DEMs from the interpolated elevations. Unless you are using a Topo2DEM approach and have additional information you can supply--such as stream beds, elevation contours, peaks, or such material--then it is likely this method will merely produce meaningless artifacts that reflect the interpolation method as much as they do the original data. It will also require much more computation than the first method (kriging may even be impossible because of this).
If you really want a text-based raster..
whuber is quite right about a text-representation of raster data being inefficient. But at the same time, it can help to "see the data" when it's represented in text, especially while you're cutting your teeth on some concepts
So in the spirit of endorsing text-based-raster for some purposes, you might want to check out the Golden Surfur ASCII Grid (GSAG), which QGIS can export for you (Raster menu > Conversion > Translate).
Furthermore, the format of the GSAG file is described in this document, which you might find useful.
On banding..
If you want to make a two-banded image in QGIS, open Raster menu > Miscellaneous > Merge, and in this dialog you can create a multi-band image, probably alot like I'm doing, below. Note that QGIS implements the Geospatial Data Abstracion Library (GDAL) to accomplish alot of its functionality, so it's often a good idea to become familiar with what GDAL is doing behind the scenes. In this case, here is the documentation for the gdal_merge.py command line utility.
You can't tell in the screen grab, but two different raster files are selected in the Input files field. If you could see all of it, they're comma-separated, like this:
D:/GIS/01_tutorials/geene_dem/slope/slope.tif,D:/GIS/01_tutorials/geene_dem/slope/dem.tif
..and you can just CTRL-click them to do a multi-select in the UI. Also, I believe the bands are index 0-n according to the order that GDAL receives them, so band 1 (index 0) would correspond to the slope values. I hope someone shall correct me there if I am wrong. But the point is, you need to keep track of which band is which value.
Later, once you have the two-band image created, you can check out the Raster Calculator (Raster menu > Raster Calculator) for most any analysis you want to accomplish. In the Raster Calculator, notice how I created a simple expression to evaluate using my bands 1 (slope) and 2 (elevation) to create a new value---a value which I can export into a brand new raster, if I want.
Best Answer
While I can't be certain without seeing your files and knowing the number of lines etc. you should be able to do this using the
gdal_grid
utility.