Simplifying building contours involves reducing data volume while preserving the continuity, accuracy, and essential characteristics of building shapes. This presents significant challenges for sequence representation and generation. Traditional methods often rely on complex rule design, feature engineering, and iterative optimization. To overcome these limitations, this study proposes a Transformer-based Polygon Simplification Model (TPSM) for the end-to-end vector simplification of building contours. TPSM processes ordered vertex coordinate sequences of building contours, leveraging the inherent sequence modeling capabilities of the Transformer architecture to directly generate simplified coordinate sequences. To enhance spatial understanding, positional encoding is embedded within the multihead self-attention mechanism, allowing the TPSM to effectively capture relative vertex positions. Additionally, a self-supervised reconstruction mechanism is introduced, where random perturbations are applied to input sequences, and the model learns to reconstruct the original contours. This mechanism enables TPSM to better understand underlying geometric relationships and implicit simplification rules. Experiments were conducted using a 1:10,000 building dataset from Shenzhen, China, targeting a simplification scale of 1:25,000. The results demonstrate that TPSM outperforms five established simplification algorithms in controlling changes to building area, orientation, and shape fidelity, achieving an average intersection over union (IoU) of 0.901 and a complexity-aware IoU (C-IoU) of 0.735.
High-resolution remote sensing imagery has become the primary data source for obtaining building information. Automatically extracting regularized building outline polygon vectors is crucial for improving vector mapping efficiency and geographic information system applications, but existing deep learning methods struggle to simultaneously achieve accurate detection, high pixel-level coverage, and geometric regularity. This paper proposes a novel two-stage building outline extraction method. In the first stage, the SegFormer model is used to extract image features, effectively capturing global context information. In the second stage, a polygon outline regularization model (PolyReg) based on a Masked Attention Encoder is innovatively introduced. The PolyReg model draws on the sequence generation idea from natural language processing, transforming the outline regularization task into a sequence generation problem. Through a cleverly designed self-attention mask matrix, it achieves an autoregressive output of regularized building outline coordinates, eliminating the need for cumbersome post-processing steps. Experimental results show that on the Inria Aerial Image Labeling Dataset, compared with traditional methods and existing deep learning methods, the proposed method demonstrates significant advantages in metrics such as IoU, C-IoU, and Hausdorff distance. It effectively improves the regularity and geometric accuracy of building outlines while maintaining high pixel-level coverage.