I have been trying to create a grid, or raster, from point data which has a variety of classes (ie, I am trying to grid a categorical attribute).

Strangely (to me) using Interpolate (SAGA, cubic spline) creates a continuous numerical variable when I use my categorical attribute (no idea how it is converting a string to a float).

'Multilevel b-spline interpolation for categories' (SAGA) seems like the function I want, but it produces an error (Unknown option: SHAPES).

What would be a good way to produce what I want?


Convert your categories to numbers, you can do this with creating new field in attribute table with field calculator. Example expression:

WHEN "classes"='forest' THEN 1 
WHEN "classes"='grassland' THEN 5

Then just Rasterize your point layer, using values from new field. There are few algorithms for rasterizing in Processing Toolbox.

As result you will get raster with values of your categories (numbers) and rest of the pixels will be nodata.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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