3

I'm trying to sample a raster by a point feature layer. I don't want to use the QGIS sample raster tool, since it creates a new layer/file everytime, which adds additional steps and unnecessary intermediate results, when doing this multiple times.

I want add the sampled raster values "in place", i.e. simply adding a column to the existing point feature layer/file. Is that possible?

1 Answer 1

5

This can be achieved via the field calculator and the following expression:

raster_value( 'choose_raster_layer_from_map_layers', 1, $geometry)

This appends a column (output field name) with the sampled raster values.

field calculator with example expression raster value function documentation

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.