Skip to content

osmextract 0.5.0

Compare
Choose a tag to compare
@agila5 agila5 released this 11 Aug 07:08

MAJOR CHANGES

  • Fixed a bug in oe_match() that occurred every time the function found an exact match between the input place and a non-default OSM data provider (i.e. everything but Geofabrik). In those cases, the downloaded file was named as geofabrik_xyz.osm.pbf instead of differentprovider_xyz.osm.pbf. Reported by @GretaTimaite, thanks. See #246. This is a major bug and, for safety, we suggest you erase all .pbf and .gpkg files currently stored in the persistent download directory (see also oe_clean()).
  • Fixed a bug in oe_get_keys() that occurred when the value for a given key was either empty or equal to \n (#250).
  • Fixed a bug in oe_vectortranslate() that occurred when the attributes specified in the extra_tags argument included the character :. In fact, the presence of attributes like "lanes:left" always triggered the vectortranslate operations (#260).
  • We implemented a new function named oe_get_boundary() that can be used to obtain administrative geographical boundaries of a given area (#206).
  • Added a new function named read_poly() to read .poly files (#277).
  • All the databases storing the data for the supported providers were updated. For simplicity, some fields were removed from the saved objects. More precisely, we removed the columns pbf.internal, history, taginfo, updates, bz2, and shp from geofabrik_zones; last_modified, type, base_url and poly_url from bbbike_zones.
  • The function oe_match_pattern() now accepts numeric/sfc/bbox/sf inputs, following the same logic as oe_match() (#266).

MINOR CHANGES

  • The boundary argument can be specified using bbox objects. The bbox object is converted to sfc object with sf::st_as_sfc() and preserves the same CRS.
  • Added a more informative error message when oe_get() or oe_read() are run with empty or unnamed arguments in ... (#234 and #241).
  • The function oe_get_keys() gains a new argument named download_directory that can be used to specify the path of the directory that stores the .osm.pbf files.
  • Included a new function named oe_clean() to remove all .pbf and .gpkg files stored in a given directory. Default value is oe_download_directory().
  • Added a message to oe_download() and removed a warning from oe_read(). The message is printed every time a user downloads a new OSM extract from a certain provider, whereas the warning used to be raised when a given query selected a layer different from the layer argument (#240).
  • Added two new parameters to oe_find() named return_pbf and return_gpkg. They can be used to select which file formats should the function return (#253).
  • Added a more informative error message in case oe_download() fails, explaining that partially downloaded .pbf files should be removed to avoid problems while running other functions (#221).
  • We are experimenting with the new (i.e. third edition) features of testthat and we implemented the so-called test-fixtures to run tests in a more isolated environment (#255). This is however still experimental for us.
  • Added more informative error and warning messages to oe_get_keys() (#251).
  • The file path returned by oe_download() is specified using / instead of \\ separator on Windows.
  • oe_download() takes into account the timeout option again. Unfortunately, we forgot to adjust the code when switching from download.file to httr.
  • The oe_vectortranslate() function tries to correct the possible geometrical problem(s) of the input boundary using sf::st_make_valid().
  • Updated the geofabrik_zones database (#270).

DOCUMENTATION FIXES

  • Update description for boundary and boundary_type arguments.
  • The main vignette and all examples save their files in tempdir() (#247).