vol .. corrected coordinate transformation inside resample and added bounds check...