Skip to main content
3 of 4
fix tabel formatting
Dave X
  • 1.7k
  • 13
  • 26

If your data is on a regular grid, (even with holes/missing data), sorted by y and x (y primary), as from the python code below, then the data can be imported directly as a raster.

import numpy as np

x = np.array([(y, x, 1.0) for x in range(5328530,5328560,10) for y in range(4390000,4390100,10)])
x[:,2] = np.random.normal(size=x.shape[0])
np.savetxt("/Users/drf/data/foo.csv",fmt="%8.1f %8.1f %8.5f",x,header="x y z",comments='')


x y z
4390000.0 5328530.0   1.69132
4390010.0 5328530.0  -0.96375
4390020.0 5328530.0  -0.96426
4390030.0 5328530.0   1.90196
4390040.0 5328530.0  -0.43301
4390050.0 5328530.0  -0.47332
4390060.0 5328530.0   0.44058
4390070.0 5328530.0   1.24625
4390080.0 5328530.0   0.01709
4390090.0 5328530.0   1.81022
4390000.0 5328540.0   1.48794
4390010.0 5328540.0   1.20569
4390020.0 5328540.0   0.08455
4390030.0 5328540.0  -1.33575
4390040.0 5328540.0   2.41027
4390050.0 5328540.0  -1.15869
4390060.0 5328540.0   0.41672
4390070.0 5328540.0   1.10926
4390080.0 5328540.0   0.22557
4390090.0 5328540.0  -0.65360
4390000.0 5328550.0  -0.49709
4390010.0 5328550.0   0.53986
4390020.0 5328550.0  -0.90243
4390030.0 5328550.0   0.09379
4390040.0 5328550.0   0.16449
4390050.0 5328550.0   0.55429
4390060.0 5328550.0  -0.55609
4390070.0 5328550.0  -0.78839
4390080.0 5328550.0  -1.76425
4390090.0 5328550.0  -1.31797

This data can be read directly from Layer/Add Layer/Add Raster Layer/ Dataset tool.

If your data isn't a regular grid, and you already have the points imported as a layer, with the accurate fields, then the problem might not be with your data import, its with transforming the point data into a raster, as in Interpolation on set of points in QGIS or this QGIS tutoria. You should be able to use one of the interpolation tools Processing /(search 'interp') tools like Processing/Interpolation/IDW Interpolation, Processing/Interpolation/TIN Interpolation, Processing/SAGA/Raster Creation/Interpolate or others.

Dave X
  • 1.7k
  • 13
  • 26