osmextract (development version)
MAJOR CHANGES
- The default directory used to store
.osm.pbfand.gpkgfiles downloaded or created by this package has changed fromtempdir()totools::R_user_dir("osmextract", "data")(#302). - Bump minimum R version to 4.1.0 because that’s a requirement for one of our indirect dependencies (i.e. svglite). This also ensures that we can properly use
tools::R_user_dir()since that function was introduced in R 4.0.0 (#302).
osmextract 0.5.3
CRAN release: 2025-04-09
MAJOR CHANGES
- Added a
versionargument tooe_matchto simplify the download of old extracts from Geofabrik provider (#295)
osmextract 0.5.2
CRAN release: 2024-11-22
MAJOR CHANGES
- Bump minimum R version from 3.5.0 to 3.6.0 since that’s a requirement for one of our indirect dependencies (i.e. evaluate).
- Adjusted the SQL syntax used inside
oe_get_networkso that the queries are compatible with GDAL 3.10 (#298). - The output of
oe_get_networkdoes not drop elements tagged asaccess = 'no'as long as thefoot/bicycle/motor_vehicle(according to the chosen mode of transport) key is equal toyes,permissive, ordesignated(#289).
MINOR CHANGES
- Updated the
osmconf.inifile to be in synch with the GDAL version. - Added
onewaycolumn by default when usingoe_get_network(mode = "driving"), which indicates if a link represents a uni-directional road (#296) - Furthermore,
oe_get_network(mode = "driving")always include themotor_vehiclefield (see #303).
osmextract 0.5.1
CRAN release: 2024-04-30
MINOR CHANGES
- Updated the code in the main vignette to fix a bug in the
ogr2ogroptions detected by GDAL v3.9 (#291). - More informative error message in case of malformed query (#290).
- Updated the Open Street Map providers. In particular:
- The bbbike databse has a new area: Los Angeles
- The geofabrik database has a new area: United Kingdom
- The openstreetmap.fr database has 51 new areas: Asia/Europe/Philippines and its subregions/Turkey and its subregions/Portugal’s subregions/Tuvalu/Chukotka Autonomous Okrug/Fiji/France Metro Dom Com Nc/Kiribati.
osmextract 0.5.0
CRAN release: 2023-08-10
MAJOR CHANGES
- Fixed a bug in
oe_match()that occurred every time the function found an exact match between the inputplaceand a non-default OSM data provider (i.e. everything but Geofabrik). In those cases, the downloaded file was named asgeofabrik_xyz.osm.pbfinstead ofdifferentprovider_xyz.osm.pbf. Reported by @GretaTimaite, thanks. See #246. This is a major bug and, for safety, we suggest you erase all.pbfand.gpkgfiles currently stored in the persistent download directory (see alsooe_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 theextra_tagsargument 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.polyfiles (#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, andshpfromgeofabrik_zones;last_modified,type,base_urlandpoly_urlfrombbbike_zones. - The function
oe_match_pattern()now acceptsnumeric/sfc/bbox/sfinputs, following the same logic asoe_match()(#266).
MINOR CHANGES
- The
boundaryargument can be specified usingbboxobjects. Thebboxobject is converted tosfcobject withsf::st_as_sfc()and preserves the same CRS. - Added a more informative error message when
oe_get()oroe_read()are run with empty or unnamed arguments in...(#234 and #241). - The function
oe_get_keys()gains a new argument nameddownload_directorythat can be used to specify the path of the directory that stores the.osm.pbffiles. - Included a new function named
oe_clean()to remove all.pbfand.gpkgfiles stored in a given directory. Default value isoe_download_directory(). - Added a message to
oe_download()and removed a warning fromoe_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 givenqueryselected a layer different from thelayerargument (#240). - Added two new parameters to
oe_find()namedreturn_pbfandreturn_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.pbffiles should be removed to avoid problems while running other functions (#221). - We are experimenting with the new (i.e. third edition) features of
testthatand 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 thetimeoutoption again. Unfortunately, we forgot to adjust the code when switching fromdownload.filetohttr. - The
oe_vectortranslate()function tries to correct the possible geometrical problem(s) of the inputboundaryusingsf::st_make_valid(). - Updated the
geofabrik_zonesdatabase (#270).
osmextract 0.4.1
CRAN release: 2022-08-26
Help files below man/ have been re-generated, so that they give rise to valid HTML5 (#259).
osmextract 0.4.0
CRAN release: 2021-10-27
MAJOR CHANGES
- Import two new packages:
httrandjsonlite(#231, #232). - Improved the approach adopted to download files from the web. In particular, the functions
oe_download()andoe_search()now take advantage ofhttrfunctionalities. They return informative messages in case of errors (#231, #232). - Vignettes and examples do not require internet connection.
BUG FIXES
- Fixed a bug in
oe_vectortranslate()that occurred when readingmultilinestringsorother_relationslayers with one or more extra tags (#229). - Fixed a bug in
oe_get()/oe_read()that could return a warning message when reading an existing GPKG file with aqueryargument.
MINOR CHANGES
- The duplicated fields in
extra_tagsare now removed before modifying theosmconf.inifile. Duplicated tags means something likeextra_tags = c("A", "A")or even fields that are included by default (i.e.extra_tags = "highway"for thelineslayer). See discussion in #229.
osmextract 0.3.1
CRAN release: 2021-07-27
MAJOR CHANGES
- Added a new (but still experimental) function named
oe_get_network()to import a road network used by a specific mode of transport. For the moment, we support the following modes of transport: cycling (default), walking, and driving. Check?oe_get_networkfor more details and examples (#218).
MINOR CHANGES
- The
layerargument is now converted to lower case before checking if the required layer is admissible. - Adjusted the code behind
oe_get()andoe_vectortranslate()forsfv1.0.2. - Remove the call to
suppressMessages()inoe_match()(#217).
osmextract 0.3.0
CRAN release: 2021-06-10
MAJOR CHANGES
- The
oe_get_keys()function can be used to extract the values associated with all or some keys. We also defined an ad-hoc printing method and fixed several bugs. The examples were improved. Moreover, the function tries to match an inputzonewith one of the OSM extracts previously downloaded (#201 and #196). - If the parameter
placerepresents ansf/sfc/bboxobject with missing CRS, thenoe_match()raises a warning message and setsCRS = 4326. This has relevant consequences on other functions (likeoe_get()) that wrapoe_match(). - Starting from
sf> 0.9.8, the functionoe_vectortranslate()stops with an error when there is a problem in the argumentvectortranslate_optionsandquiet = FALSE(instead of raising a warning or crashing theRsession). See here for more details. - The options
c("-f", "GPKG", "-overwrite", "-oo", "CONFIG_FILE=", path-to-config-file, "-lco", "GEOMETRY_NAME=geometry", layer)are always appended at the end ofvectortranslate_optionsargument unless the user explicitly sets different default parameters for the arguments-f,-ooand-lco(#200). We believe those are sensible defaults and can help users creating less verbose specifications forogr2ogrutility. - We create two new arguments in
oe_vectortranslate()(therefore also inoe_get()andoe_read()) namedboundaryandboundary_type. They can be used to create an ad-hoc spatial filter during the vectortranslate operations (and create even less verbose specifications invectortranslate_optionsargument). See docs and introductory vignette for more details. - The argument
providerwas removed fromoe_match_pattern()since the function automatically checks all available providers (#208).
BUG FIXES
- The parameter
force_vectortranslateis checked before reading the layers of an existinggpkgfile. Ifforce_vectortranslateisTRUE, thenoe_vectortranslate()doesn’t check the existing layers. This is important for user that runoe_vectortranslate()after stopping the vectortranslate process. - The arguments
extra_tagsandosmconf_iniare not ignored whenvectortranslate_optionsis notNULL(#182). - Fix the provider’s data objects for
sfv1.0 (#194).
MINOR IMPROVEMENTS
- The arguments passed to
oe_read()via...are compared with the formals ofst_read.character,st_as_sf.data.frame, andread_sf. - Added a new method to
oe_matchforbboxobjects (#185). - The
oe_get_keys()function can be applied to.osm.pbfobjects (#188).
DOCUMENTATION FIXES
- Improved several examples and fixed a small bug in the documentation of
oe_match(). - Fix several typos in the vignettes and docs.
OTHERS
- Created a new space in the github repo named Discussion to have conversations, ask questions and post answers without opening issues. Link: https://github.com/ropensci/osmextract/discussions.
- Tests that require an internet connection are now skipped on CRAN (#189).
osmextract 0.2.1
CRAN release: 2021-02-15
This is a minor release.
- We modified several examples and tests to fix several errors noticed during CRAN tests (#175).
osmextract 0.2.0
CRAN release: 2021-02-11
Published on CRAN!
NEW FEATURES
- Add a
levelparameter tooe_match(). It is used to choose between multiple hierarchically nested OSM extracts. The default behaviour is to select the smallest administrative unit (#160). - Modify the behaviour of
oe_match(). The function checks all implemented providers in case the inputplaceis not matched with any geographical zone for the chosen provider (#155). - Add a simple interface to Nominatim API that enables
oe_match()to geolocate text strings that cannot be found in the providers (#155).
DOCUMENTATION FIXES
- Simplify several warning messages in case of spatial matching
- Simplify startup message (#156)
- Add more details related to download timeouts (#145)
- Documented values returned by
oe_find()andoe_search()