Import 'OpenStreetMap' Data as Simple Features or Spatial Objects

Download and import of 'OpenStreetMap' ('OSM') data as 'sf' or 'sp' objects. 'OSM' data are extracted from the 'Overpass' web server and processed with very fast 'C++' routines for return to 'R'.



  • Add extraction of bounding polygons with getbb (..., format_out = "polygon")
  • Add trim_osmdata function to trim an osmdata object to within a bounding polygon (thanks @sytpp)
  • Rename add_feature to add_osm_feature (and deprecate old version)


  • Enable alternative overpass API services through get_overpass_url() and set_overpass_url() functions
  • Extend and improve vignette


  • Change tests only, no functional difference


  • Rename function opq_to_string() to opq_string()

0.0.1 (19 May 2017)

  • Remove configure and Makevars files
  • Fix tests

0.0.0 (18 May 2017)

  • Initial CRAN release

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.0.8 by Mark Padgham, a day ago

Report a bug at

Browse source code at

Authors: Mark Padgham [aut, cre] , Bob Rudis [aut] , Robin Lovelace [aut] , Maƫlle Salmon [aut] , Andrew Smith [ctb] , Marcin Kalicinski [ctb, cph] (Author of included RapidXML code) , Finkelstein Noam [ctb, cph] (Author of included stub.R code) , Bartnik Lukasz [ctb, cph] (Author of included stub.R code)

Documentation:   PDF Manual  

GPL-3 license

Imports curl, httr, lubridate, magrittr, methods, Rcpp, rvest, jsonlite, sp, utils, xml2

Suggests devtools, knitr, rmarkdown, roxygen2, sf, testthat

Linking to Rcpp

System requirements: C++11

Imported by dodgr, osmplotr.

Suggested by tmap, tmaptools.

See at CRAN