如何使用带有R的OSM计算从某个点到POI的距离

How to calculate distance from a certain point to a POI using OSM with R

我有给定点的纬度和经度,我想计算与这个给定点和一些 POI(兴趣点)的距离。 此外,我想使用 OSM (OpenStreetMap) 和 R。 谁能帮帮我?

Tnx

您是否研究过使用 osmar 项目 (http://osmar.r-forge.r-project.org/) for accessing POI data from OpenStreetMap? Here is a tutorial for using it - https://journal.r-project.org/archive/2013-1/eugster-schlesinger.pdf

因此,osmar 将允许您通过 API 访问 POI 数据,然后您可以使用任何标准 R 包来处理空间数据以获得距离。