ropensci / osmextract

Download and import OpenStreetMap data from Geofabrik and other providers
https://docs.ropensci.org/osmextract
GNU General Public License v3.0
170 stars 12 forks source link

Added a more informative error message in oe_download #256

Closed agila5 closed 2 years ago

agila5 commented 2 years ago

Fix #221. I cannot always delete the partially downloaded pbf file (since it's locked on windows), so I decided to include a more informative error message:

> oe_get("Portugal")
#> The input place was matched with: Portugal
#> Downloading the OSM extract:
#> Error: Download operation was aborted. We suggest you to remove the partially downloaded pbf file running the following code (possibly in a new R session):
#> file.remove("C:\Users\gilardi\Documents\osm-data\geofabrik_portugal-latest.osm.pbf")