Fix bandwidth calculation when map unit is not metres, don't calculate pixel buffer more often than required. Fixes #6756, #6691 and #6692
Automatically set the projection on output raster to match input layer