流域编码是以子流域划分进行流域相关研究的重要内容。Pfafstetter流域编码以编码唯一、顾及流域拓扑关系及编码效率高等优点而被广泛采用。本文在流域相关研究的分析范围不断增大、数据精度越来越高的需求背景下,以Pfafstetter编码为基础,对流域编码并行化方法进行研究。首先,分析了Pfafstetter编码不全面和码位不一致的问题,改进了Pfafstetter编码规则;然后,从数据并行的角度,讨论了并行计算环境下的数据划分及并行化策略,进而设计了流域编码并行算法;最后,利用长江中上游流域SRTM数据,在集群系统上对流域编码并行算法的正确性和并行性能进行了测试。实验结果表明,本文设计实现的流域编码并行算法可获取与实际较为一致的计算结果,且提高了编码计算效率,可为基于子流域划分的流域分析并行化提供参考。
The research approach based on sub-watershed partition, which is taken as an indispensable tool of spatial analysis in GIS applications, plays an important role in many research fields of watershed, such as land- form, soil, hydrology and environment. Watershed codification usually is a key step in the research process via the above approach. Compared with some other watershed codification methods, Pfafstetter coding system is widely adopted due to its uniqueness of code, consideration of topological relationship and high efficiency. At present, with the development of spatial data acquisition technology, the quick acquisition of spatial data from large areas and with fine scales becomes a solid reality, which brings a great difficulty to GIS on how to process and analyze these massive datasets quickly and efficiently. Parallel computing brings an opportunity to face this challenge with the development of computer technology. In this paper, a parallel watershed codification algo- rithm was proposed to overcome the computation difficulties in processing the massive grid dataset. Firstly, the Pfafstetter coding rule was modified to compensate the disadvantages in the original algorithm including the in- complete coding and inconsistent code point. Secondly, data partition and parallel strategy were discussed based on the serial Pfafstetter coding algorithm and the requirements of data parallelism. At last, the parallel algorithm for watershed codification was realized and implemented. To evaluate the validity and the efficiency of the pro- posed parallel algorithm, experiments were designed on a cluster system with SRTM dataset covering the middle and upper watershed of Yangtze River. The experiment results showed that the parallel algorithm could generate correct results which were consistent with those in the real world; meanwhile, it possessed a significant improve- ment of computational efficiency. Besides the advantages in improving the computation ability and efficiency for the watershed codification algorith