针对传统有源淹没的递归、迭代算法占用计算机资源较多,且当算法深度太深时易造成系统堆栈溢出,从而导致程序崩溃等缺点,以数字高程模型为基础,研究了给定水位条件下洪水有源淹没模型和算法,并在此基础上设计实现了种子蔓延算法。通过与原有的递归算法对比,发现该算法在一定程度上提高了计算效率和稳定性,最后在“南昌洪水淹没分析系统”中应用并得到验证。
The recursion and iterative algorithms of source flood submerge area would take too much computer resource, and when the recursion depth is deep, the system would often collapse because of the system stack overflow. To deal with this problem, this paper proposes a source flood submerge model and the related algorithm based on DEM, on the condition of the given water level of the flood. A "seed spreading" algorithm for visiting every node of the stack is developed. First of all, a new empty submerged buffer stack is created, and from the flood source point, it is determined whether the source point's flood level is lower than the given water level. If it is true, the source point is put into the buffer stack and is marked as the submerged grid. Then the surrounding 8 neighborhood raster grids are searched, if a grid meets the condition, we put the grid into the flooded area buffer stack. At the same time, the first element of the stack is popped up. Repeat this operation until the flood buffer stack is empty, and extend this operation to all nodes of the stack, just like the "seed spreading" and eventually complete the inundated area calculation. Compared with the original recursion algorithm, this algorithm has improved the calculation efficiency and stability to a some extent. This algorithm was successfully applied in the "Nanchang flood submerge analysis system".