作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2021, Vol. 47 ›› Issue (5): 308-315. doi: 10.19678/j.issn.1000-3428.0056768

• 开发研究与工程应用 • 上一篇    下一篇

基于PostGIS的线要素空间聚合方法

梅新1, 王文荟1, 钟少波2, 宋敦江3, 梅白帆4   

  1. 1. 湖北大学 资源环境学院, 武汉 430062;
    2. 北京城市系统工程研究中心, 北京 100102;
    3. 中国科学院科技战略咨询研究院, 北京 100190;
    4. 江苏电力信息科技有限公司, 南京 210000
  • 收稿日期:2019-12-02 修回日期:2020-03-27 发布日期:2020-04-29
  • 作者简介:梅新(1973-),男,副教授、博士,主研方向为生态和农业遥感、地理信息系统;王文荟,博士研究生;钟少波,副研究员;宋敦江(通信作者),副研究员、博士;梅白帆,工程师。
  • 基金资助:
    国家自然科学基金(41471338);北京市科技计划课题(Z191100001419002);中国科学院科技战略咨询研究院项目“大数据环境下的可视化宏观决策支持平台”。

Polyline Spatial Aggregation Method Based on PostGIS

MEI Xin1, WANG Wenhui1, ZHONG Shaobo2, SONG Dunjiang3, MEI Baifan4   

  1. 1. Faculty of Resources and Environmental Science, Hubei University, Wuhan 430062, China;
    2. Beijing Urban System Engineering Research Center, Beijing 100102, China;
    3. Institutes of Science and Development, Chinese Academy of Sciences, Beijing 100190, China;
    4. Jiangsu Electric Power Information Technology Co., Ltd., Nanjing 210000, China
  • Received:2019-12-02 Revised:2020-03-27 Published:2020-04-29

摘要: 针对当前常规方法线空间流量数据聚合效率低的问题,提出基于PostGIS的流空间线要素聚合方法。通过离散化所有的线为点集,建立点集的空间索引,计算点集的唯一点集,对唯一点集上的每个点累加所有与该点重叠的属性值并进行更新,根据点的序列号和上一步更新的属性值,重新连接该条线上所有的点,在属性值变化处进行打断形成新的线要素。在此基础上,去除空间重叠的线要素和图形为空的线要素得到最后的线聚合结果。实验结果表明,该方法以矢量数据形式输出的线聚合结果正确,提取速度显著提升,有效地解决了大量矢量线数据融合时常规方法效率低下的问题。

关键词: 线要素, 空间流量, 空间聚合, 聚合效率, PostGIS平台

Abstract: To address the low efficiency of the existing methods for polyline spatial flow data aggregation, this paper proposes a method for polyline aggregation based on PostGIS. All polylines are discretized into a point set, for which a spatial index is established and the unique point set is calculated. For each point on the unique point set, all the attribute values of the points that overlap with the point are accumulated and updated. According to the sequence number of the point and the updated attribute value, all points on the line are reconnected. The line breaks where the attribute value changes to form a new polyline feature. Finally, all the spatially overlapping polyline features and the line features with empty graphics are removed to obtain the ultimate polyline aggregation result. The experimental results show that the polyline aggregation result output by this method in the form of vector data is correct, and the extraction speed is significantly improved, which effectively solves the low efficiency of the conventional methods for massive vector line data fusion.

Key words: polyline, spatial flow, spatial aggregation, aggregation efficiency, PostGIS platform

中图分类号: