测绘学报 ›› 2026, Vol. 55 ›› Issue (1): 124-137.doi: 10.11947/j.AGCS.2026.20250262

• 地图学与地理信息 • 上一篇    

一种面向地图综合建筑多边形化简的Transformer模型

刘鹏程1,2(), 成晓强3, 肖天元4, 杨敏4, 艾廷华4   

  1. 1.华中师范大学地理过程分析与模拟湖北省重点实验室,湖北 武汉 430079
    2.华中师范大学城市与环境科学学院,湖北 武汉 430079
    3.湖北大学资源环境学院,湖北 武汉 430062
    4.武汉大学资源与环境科学学院,湖北 武汉 430079
  • 收稿日期:2025-06-30 修回日期:2026-01-05 发布日期:2026-02-13
  • 作者简介:刘鹏程(1968—),男,博士,教授,研究方向为地图综合、空间模式识别和空间智能分析。E-mail:liupc@ccnu.edu.cn
  • 基金资助:
    国家自然科学基金(42471486; 42071455);中央高校基本科研业务费专项资金(CCNU25JC043)

A Transformer model for building polygon simplification in map generalization

Pengcheng LIU1,2(), Xiaoqiang CHENG3, Tianyuan XIAO4, Min YANG4, Tinghua AI4   

  1. 1.Key Laboratory for Geographical Process Analysis & Simulation of Hubei Province, Central China Normal University, Wuhan 430079, China
    2.School of Urban and Environmental Sciences, Central China Normal University, Wuhan 430079, China
    3.Faculty of Resources and Environmental Science, Hubei University, Wuhan 430062, China
    4.School of Resources and Environmental Sciences, Wuhan University, Wuhan 430079, China
  • Received:2025-06-30 Revised:2026-01-05 Published:2026-02-13
  • About author:LIU Pengcheng (1968—), male, PhD, professor, majors in map generalization, spatial pattern recognition and GeoAI. E-mail: liupc@ccnu.edu.cn
  • Supported by:
    The National Natural Science Foundation of China(42471486; 42071455);The Fundamental Research Funds for the Central Universities(CCNU25JC043)

摘要:

针对地图综合中建筑多边形化简方法依赖人工规则、自动化程度低且难以利用已有化简成果的问题,本文提出了一种基于Transformer机制的建筑多边形化简模型。该模型首先把建筑多边形映射至一定范围的网格空间,将建筑多边形的坐标串表达为网格序列,从而获取建筑多边形化简前后的Token序列,构建出建筑多边形化简样本对数据;随后采用Transformer架构建立模型,基于样本数据利用模型的掩码自注意力机制学习点序列之间的依赖关系,最终逐点生成新的简化多边形,从而实现建筑多边形的化简。在训练过程中,模型使用结构化的样本数据,设计了忽略特定索引的交叉熵损失函数以提升化简质量。试验设计包括主试验与泛化验证两部分。主试验基于洛杉矶1∶2000建筑数据集,分别采用0.2、0.3和0.5 mm 3种网格尺寸对多边形进行编码,实现了目标比例尺为1∶5000与1∶10 000的化简。试验结果表明,在0.3 mm的网格尺寸下模型性能最优,验证集上的化简结果与人工标注的一致率超过92.0%,且针对北京部分区域的建筑多边形数据的泛化试验验证了模型的迁移能力;与LSTM模型的对比分析显示,在参数规模相近的条件下,LSTM模型无法形成有效收敛,并生成可用结果。本文证实了Transformer在处理空间几何序列任务中的潜力,且能够有效复用已有化简样本,为智能建筑多边形化简提供了具有工程实用价值的途径。

关键词: 地图综合, 建筑多边形化简, Tokenization, Transformer模型, 上下文工程

Abstract:

Addressing the issues in building polygon simplification within map generalization—such as reliance on manual rules, low automation, and difficulty in reusing existing simplification results—this paper proposes a building polygon simplification model based on the Transformer mechanism. The model begins by mapping building polygons into a grid space of a certain scale, representing coordinate strings of the polygons as grid sequences. This process allows the acquisition of Token sequences before and after simplification, thereby constructing paired datasets of building polygon simplification samples. Utilizing the Transformer architecture, the model learns dependencies between point sequences through its masked self-attention mechanism, ultimately generating new simplified polygons point by point to achieve building polygon simplification. During training, the model employs structured sample data and incorporates a cross-entropy loss function that ignores specific indices to enhance simplification quality. The experimental design consists of two parts: a main experiment and a generalization validation. The main experiment, based on the Los Angeles 1∶2000 building dataset, encodes polygons using three grid sizes—0.2, 0.3, and 0.5 mm—to achieve simplifications at target scales of 1∶5000 and 1∶10 000. Results indicate that the model performs optimally with a grid size of 0.3 mm, achieving a consistency rate exceeding 92.0% with manual annotations on the validation set. A generalization experiment on building polygon data from parts of Beijing further verified the model's transferability. Comparative analysis with an LSTM model, under similar parameter scales, showed that the LSTM model failed to converge effectively and could not produce usable results. This study confirms the potential of Transformer in handling spatial geometric sequence tasks and demonstrates its ability to effectively reuse existing simplification samples. The proposed approach offers a new, engineering-practical pathway for intelligent building polygon simplification.

Key words: map generalization, buildings polygon simplification, Tokenization, Transformer model, context engineering

中图分类号: