Skip to contents

osmdata (development version)

osmdata 0.3.0

CRAN release: 2025-08-23

Breaking changes

  • Remove magrittr from imports. User code relaying on reexported pipe %>% from osmdata must explicitly load it with library(magrittr). Code examples, tests and vignettes now use the pipe from base (|>) available since R 4.1 (#361)
  • getbb(..., format_out = "polygon") return polygons following [https://www.ogc.org/standards/sfa/]. Polygons are defined by a list of matrices of coordinates. The first ring defines the exterior boundary, and the following rings define holes if present. Also fix getbb(..., format_out = "sf_polygon") returning each (multi)polygon as a row in an sf object. Before, every ring was an independent polygon, even for holes or multipolygons, and for format_out = "sf_polygon", the features were split in a list with polygons in one item and multipolygons in another (#378).

Major changes

  • Implemented c.osmdata_sc method to join osmdata_sc objects (#333)
  • Depends on R >= 4.1 to use the base pipe (|>) in examples and vignettes (#371)
  • Deprecate nodes_only argument in opq(). Superseded by argument osm_types (#370)
  • Deprecate osmdata_sp (#372)
  • Pre-prend class names osmdata_sf and osmdata rather than append; thanks to @agila5 (#373)
  • Add osmadata_data.frame class to osmdata_data_frame() results (#378)
  • Reimplement trim_osmdata() using sf instead of sp. Now, it checks the full geometry instead of just the points to determine if an object is properly contained in the bbox (only for osmdata_sf objects, osdmata_sc still wrong) (#382).

Minor changes

osmdata 0.2.5

CRAN release: 2023-08-14

Major changes

  • v0.2.4 was removed without notice from CRAN because of #329; this is a rapid re-submission

osmdata 0.2.4

CRAN release: 2023-08-11

Minor changes

  • Bug fix to stop getbb call to Nominatim returning 405 error (#328)

osmdata 0.2.3

CRAN release: 2023-06-01

Minor changes

  • Fix failing test due to changes to ‘sp’ moving towards deprecation.

osmdata 0.2.2

CRAN release: 2023-04-24

Major changes:

  • osmdata_data_frame adds columns osm_center_lat and osm_center_lon for out * center; queries (#316, #319).
  • Add parameters from opq to opq_osm_id: out, datetime, datetime2, adiff, timeout and memsize (#320)
  • Fix available_tags() function which no longer worked (#322 thanks to @boiled-data)
  • Implement out:csv queries (#321).

Minor changes

  • Fix queries with !match_case and only one value (#317).
  • Fix queries with multiple features & multiple osm_types (#318).

osmdata 0.2.1

CRAN release: 2023-02-24

Major changes:

  • Very soft deprecation of nodes_only parameter in opq (#308, #312).

Minor changes

  • Couple of minor memory leak bug fixes in osmdata_data_frame C++ code.

osmdata 0.2.0

CRAN release: 2023-02-09

This release welcomes a new package author @jmaspons. The lists of changes here gives an overview of the amazing work he has contributed to this new major version.

Major changes:

  • New osmdata_data_frame() function to return non-spatial data.frame structures directly from overpass; thanks to @jmaspons (#285).
  • Improved add_osm_features so that key-values pairs can be submitted as a list, rather than escape-delimited character strings; thanks to @elipousson (#277, #278).
  • opq() can now utilise overpass ability to filter results by area; thanks to @jmaspons (#286).
  • opq() now has additional “out” parameter to control the kinds of data returned by overpass; thanks to @jmaspons (#288).
  • opq() now has additional “osm_types” parameter to provide finer control of which kinds of data are returned by overpass; thanks to @jmaspons (#295).
  • Fix key modifications for non-valid column names and handle duplicated column names in osmdata_* functions; by @jmaspons (#303)
  • @elipousson is new package contributor, thanks to the above work.
  • @jmaspons is new package author, thanks to #285 (plus most of the above, and a whole lot more!)

Minor changes:

  • Downgraded sp from “Imports” to “Suggests”; thanks to @jmaspons (#302)
  • Improved osm_osm_id() to accept vectors of ids and types; thanks to @jmaspons (#268, #282, #283)
  • “get-osmdata.R” file now split into several smaller and more manageable files (#306, thanks to @jmaspons)

osmdata 0.1.10

CRAN release: 2022-06-09

Major changes:

  • Changed httr dependency for httr2 (#272)
  • Removed two authors of code formerly including for stubbing results; which is now done via httptest2 package.

Minor changes:

  • Moved jsonlite from Imports to Suggests (now only used in tests).

osmdata 0.1.9

CRAN release: 2022-01-26

Major changes:

Minor changes:

  • New dependency on reproj package, so that trim_osmdata() can be applied to re-projected coordinates.

osmdata 0.1.8

CRAN release: 2021-10-17

Minor changes:

  • Fix some failing CRAN checks (no change to functionality)

osmdata 0.1.7

CRAN release: 2021-10-07

Minor changes:

osmdata 0.1.6

CRAN release: 2021-07-28

Major changes:

  • New function add_osm_features to enable OR-combinations of features in single queries.

osmdata 0.1.5

CRAN release: 2021-03-22

Minor changes:

osmdata 0.1.4

CRAN release: 2020-11-03

Major changes:

  • New osm_enclosing() function; thanks to @barryrowlingson via #199
  • opq() now has additional datetime and datetime2 parameters which can be used to extract historical data prior to datetime, or differences between two datetimes by specifying datetime2; thanks to @neogeomat for the idea in issue#179.
  • opq() also has additional nodes_only parameter to return nodes as points only, for efficient extraction of strictly point-based OSM data; thanks to @gdkrmr for the idea in issue#221.

Minor changes:

osmdata 0.1.3

CRAN release: 2020-02-09

Major changes:

  • osmdata_pbf function removed as the overpass server no longer provides the experimental API for pbf-format data.
  • Remove deprecated add_feature() function; entirely replaced by add_osm_feature().
  • get_bb() with polygon output formats now returns ALL polygon and multipolygon objects by default (issue#195)

Minor changes:

  • New Contributors: Andrea Gilardi (@agila5)
  • Bug fix for issue#205

osmdata 0.1.2

CRAN release: 2019-12-14

Major changes:

  • New function unname_osmdata_sf, to remove row names from sf-format geometry objects that may cause issues with some plotting routines such as leaflet.

Minor changes:

  • getbb now allows arbitrary featuretype specification, no longer just those pertaining to settlement forms.
  • available_tags returns tags with underscore precisely as required for add_osm_feature - previous version returned text values with spaces instead of underscore.
  • Fix bug in osmdata_sf for data with no names and/or no key-val pairs
  • Fix bug in trim_osmdata for multi* objects; thanks to @stragu
  • Implement trim_osmdata.sc method
  • retry httr calls to nominatim, which has lately been timing out quite often

osmdata 0.1.1

CRAN release: 2019-05-22

Minor changes:

  • bug fix in trim_osmdata function

osmdata 0.1.0

CRAN release: 2019-04-25

Major changes:

  • New function, osm_elevation to insert elevation data into SC-format data returned by osmdata_sc function.
  • New vignette on osmdata_sc function and elevation data.
  • opq() function now accepts polygonal bounding boxes generated with getbb(..., format_out = "polygon").

osmdata 0.0.10

CRAN release: 2019-03-21

Minor changes:

  • Bug fix for vectorized lists of values in add_osm_feature, so only listed items are returns (see #139; thanks @loreabad6)
  • But fix to ensure all sf data.frame objects have stringsAsFactors = FALSE

osmdata 0.0.9

CRAN release: 2018-12-19

Major changes:

  • New function osmdata_sc to return data in silicate::SC format (see github.com/hypertidy/silicate; this also requires additional dependency on tibble)
  • Structure of osmdata object modified to replace former $timestamp field with $meta field containing a list of $timestamp, $OSM_version (currently 0.6), and $overpass_version.
  • add_osm_feature() now accepts vectors of multiple values (see #139).
  • osmdata_sf() objects default to character vectors, not factors (see #44).

Minor changes:

osmdata 0.0.8

CRAN release: 2018-10-22

  • Fix bug in trim_osmdata so that all sf attributes are reinstated, and also issue message that sf-preload is necessary for this function
  • Fix bug with opq (key_exact = FALSE) so value_exact is always also set to FALSE

osmdata 0.0.7

CRAN release: 2018-05-17

  • Fix bug in c method so it works when sf not loaded
  • Fix bug in overpass query syntax to match new QL requirements

osmdata 0.0.6

CRAN release: 2018-02-22

  • Add new function ‘osm_poly2line()’ to coerce the ‘osmdataodmpolygonsobjectforosmdatasfobjectstolines,andappendtoosmdataodm_polygons' object for 'osmdata_sf' objects to lines, and append to 'osmdataosm_lnes’. This is important for street networks (‘add_osm_objects (key = “highway”)’), which are otherwise separated between these two components.
  • Add new function opq_osm_id to query by OSM identifier alone
  • Add timeout and memsize options to opq() to improve handling large queries.
  • Return useful information from overpass server when it returns neither error nor useful data
  • Make C++ code interruptible so long processing can be cancelled
  • Fix minor yet important C++ code lines that prevented package being used as dependency by other packages on some systems

osmdata 0.0.5

CRAN release: 2017-08-13

  • 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)
  • Add unique_osmdata function which reduces each component of an osmdata object only to unique elements (so $osm_points, for example, only contains points that are not represented in other - line, polygon, whatever - objects).
  • Rename add_feature to add_osm_feature (and deprecate old version)

osmdata 0.0.4

CRAN release: 2017-06-21

osmdata 0.0.3

CRAN release: 2017-06-13

  • Change tests only, no functional difference

osmdata 0.0.2

CRAN release: 2017-06-12

osmdata 0.0.1 (19 May 2017)

CRAN release: 2017-05-19

  • Remove configure and Makevars files
  • Fix tests

osmdata 0.0.0 (18 May 2017)

CRAN release: 2017-05-18

  • Initial CRAN release