Abstract
Measuring similarity is essential for classifying, clustering, retrieving, and matching linear features in geospatial data. However, the complexity of linear features challenges the formalization of characteristics and determination of the weight of each characteristic in similarity measurements. Additionally, traditional methods have limited adaptability to the variety of linear features. To address these challenges, this study proposes a metric learning model that learns similarity metrics directly from linear features. The model’s ability to learn allows no pre-determined characteristics and supports adaptability to different levels of complex linear features. LineStringNet functions as a feature encoder that maps vector lines to embeddings without format conversion or feature engineering. With a Siamese architecture, the learning process minimizes the contrastive loss, which brings similar pairs closer and pushes dissimilar pairs away in the embedding space. Finally, the proposed model calculates the Euclidean distance to measure the similarity between learned embeddings. Experiments on common linear features and building shapes indicated that the learned similarity metrics effectively supported retrieving, matching, and classifying lines and polygons, with higher precision and accuracy than traditional measures. Furthermore, the model ensures desired metric properties, including rotation and starting point invariances, by adjusting labeling strategies or preprocessing input data.
Acknowledgments
We sincerely thank the editors and the anonymous reviewers for their valuable comments and suggestions.
Disclosure statement
No potential conflict of interest was reported by the author(s).
Data and codes availability statement
The data and codes that support the findings of this study are available at https://doi.org/10.6084/m9.figshare.14885214
Additional information
Funding
Notes on contributors
Pengbo Li
Pengbo Li is a Ph.D. candidate at the Faculty of Geomatics, Lanzhou Jiaotong University, Lanzhou, China. His research interests include map generalization, spatial relations and machine learning. He contributed to the idea, methodology, codes, datasets, manuscript writing and revision of the paper.
Haowen Yan
Haowen Yan is a Professor at the Faculty of Geomatics, Lanzhou Jiaotong University, Lanzhou, China. His research interests include automated map generalization, spatial relations, geovisualization, we-maps and spatial data security. He contributed to the idea, methodology, and revision of the paper.
Xiaomin Lu
Xiaomin Lu is an Associate Professor at the Faculty of Geomatics, Lanzhou Jiaotong University, Lanzhou, China. Her research interests include map generalization and spatial relations. She contributed to dataset preparation and reviewed the manuscript.