osmar: OpenStreetMap and R

OpenStreetMap provides freely accessible and editable geographic data. The osmar package smoothly integrates the OpenStreetMap project into the R ecosystem. The osmar package provides infrastructure to access OpenStreetMap data from different sources, to enable working with the OSM data in the familiar R idiom, and to convert the data into objects based on classes provided by existing R packages. This paper explains the package’s concept and shows how to use it. As an application we present a simple navigation device.

Manuel J. A. Eugster , Thomas Schlesinger

CRAN packages used

osmar, osmar, OpenStreetMap, RgoogleMaps, ggmap, sp, igraph, geosphere, Rcpp

CRAN Task Views implied by cited packages

Spatial, WebTechnologies, gR, Graphics, HighPerformanceComputing, NumericalMathematics, Optimization, SpatioTemporal


Text and figures are licensed under Creative Commons Attribution CC BY 4.0. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".


For attribution, please cite this work as

Eugster & Schlesinger, "The R Journal: osmar: OpenStreetMap and R", The R Journal, 2013

BibTeX citation

  author = {Eugster, Manuel J. A. and Schlesinger, Thomas},
  title = {The R Journal: osmar: OpenStreetMap and R},
  journal = {The R Journal},
  year = {2013},
  note = {https://doi.org/10.32614/RJ-2013-005},
  doi = {10.32614/RJ-2013-005},
  volume = {5},
  issue = {1},
  issn = {2073-4859},
  pages = {53-63}