optimization work for raster flood on roads #906

Possible optimization for raster floods on roads.
I have kept both ways for now so that It is easier to compare for validation purposes.