

#RASTER IN R HOW TO#
I can't figure out how to write the output of calculations to a separate layer if using the Field Calculator, it just adds a new field/feature to the layer, and for some reason it's not letting me "Save Selected Features As".

You could create a vector point layer from your raster and do you calculations there. To show what I mean, here's a screenshot:

but even after reading the documentation, I can't figure out how to "address" pixel values within it, nevermind latitude values. I'm aware that there is a more flexible Expression dialog to allow you to enter formulae built out of a set of functions (of which, worryingly, it does not appear that there are any particularly linked to integration) and a Python console to produce new functions. For integration, the only way I could think of doing it would be to run the function dozens of times for different values of the variable it is with respect to and then sum up all of the resulting images. I don't really have programs capable of non-laboriously creating QGIS-compatible raster files and I'm not sure how to do de novo image creation of that sort on QGIS. Problem is, this particular formula is dependent on latitude and requires integration, and I see no straightforward way to use the Raster Calculator's very limited instruction set to do either of these.įor latitude dependence, the only way I could think of doing it would be to create a gradient raster layer. In the past, I've used the Raster Calculator to do this. So, I have a raster layer as input and I want to transform its values by a given formula. ( Or How would you modify a raster layer if the function, say, requires integration or is dependent on latitude? Not sure which title is more applicable/makes more sense.)
