ABSTRACT
Distance is one of the most important concepts in geography and spatial analysis. Since distance calculation is straightforward for points, measuring distances for non-point objects often involves abstracting them into their representative points. For example, a polygon is often abstracted into its centroid, and the distance from/to the polygon is then measured using the centroid. Despite the wide use of representative points to measure distances of non-point objects, a recent study has shown that such a practice might be problematic and lead to biased coefficient estimates in regression analysis. The study proposed a new polygon-to-point distance metric, along with two computation algorithms. However, the efficiency of these distance calculation algorithms is low. This research provides three new methods, including the random point-based method, polygon partitioning method, and axis-aligned minimum areal bounding box-based (MABB-based) method, to compute the new distance metric. Tests are provided to compare the accuracy and computational efficiency of the new algorithms. The test results show that each of the three new methods has its advantages: the random point-based method is easy to implement, the polygon partitioning method is most accurate, and the MABB-based method is computationally efficient.
Acknowledgements
We sincerely thank Prof. David O’Sullivan and the three anonymous reviewers for their insightful comments and suggestions that have significantly helped strengthen the manuscript. This research is supported by the Fundamental Research Funds for the Central Universities under Grant No. 2021NTST25 and the National Science Foundation under Grant No. 1461390. We would also like to thank the high-performance computing support from the Center for Geodata and Analysis, Faculty of Geographical Science, Beijing Normal University (https://gda.bnu.edu.cn/). Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the funding agencies.
Data and code availability statement
The data and codes that support the findings of this study are available in ‘AverageDistance’ with an identifier (https://doi.org/10.6084/m9.figshare.11868660). The latest code of ‘AverageDistance’ is also available on the Github (https://github.com/muwangshu/AverageDistance)
Disclosure statement
No potential conflict of interest was reported by the author(s).
Notes
1. Tools and functions in each software packages:geos::operation::distance::DistanceOp (GEOS), jts.operation.distance.DistanceOp (JTS), Near (ArcGIS), Distance matrix (QGIS).
2. For a better evaluation of two parallel modes, this test is performed on a desktop computer with an Intel i9-10,900 CPU (10 cores, 20 threads, up to 5.2 GHz) and 40 GB memory, which supports much more concurrent subprocesses than the computer used in the test section.
Additional information
Funding
Notes on contributors
Wangshu Mu
Wangshu Mu is a Lecturer (Assistant Professor) in the State Key Laboratory of Earth Surface Processes and Resource Ecology and the Faculty of Geographical Science, Beijing Normal University. He obtained his Ph.D. in geography from the University of Arizona in 2018, with a minor in management information science. His research interests include spatial optimization, spatial statistics, and GIS software engineering.
Daoqin Tong
Daoqin Tong is an Associate Professor in the School of Geographical Sciences and Urban Planning at Arizona State University. Tong’s research interests are spatial analytical approaches including spatial optimization, GIS, and spatial statistics with applications in urban and regional planning, transportation, public health, food access, and urban agriculture.