An integrated method to calculate flow direction and flow accumulation is proposed. This new method is faster than obtaining these two characteristics separately. The method results in a flow accumulation for flats without problematic flow lines. A maze algorithm with the weight considered to find the main flow path