Search code examples
rgeolocationopenstreetmappoint-of-interest

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


I have Latitude and Longitude of a given point and I'd like to calculate the distance from this given point and some POIs (Point of Interest). Moreover I'd like to use OSM (OpenStreetMap) and R. Anyone can hel me?

Tnx


Solution

  • Have you looked into using the osmar project (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.

    So, osmar will allow you to access POI data via an API and then you can use any standard R package for handling spatial data to get distances.