An efficient algorithm for assigning drainage directions over flat surfaces in digital elevation models