Learn R Programming

geofabrik (version 0.1.0)

get_osm: Download OSM data from geofabrik

Description

get_osm download osm data from geofabrik. Instead of other services, this function relies only on direct links. Just that.

Usage

get_osm(region, type = "shp", file = tempfile(), quiet = FALSE)

Arguments

region

Region of interest, see urlgeo

type

"pbf", "shp" or "osm"

file

a character string (or vector, see url) with the name where the downloaded file is saved.

quiet

If TRUE, suppress status messages (if any), and the progress bar.

Value

Download a file

Examples

Run this code
# NOT RUN {
head(urlgeo)
get_osm("Sao Tome and Principe")
get_osm("Sao Tome and Principe", "pbf")
get_osm("Sao Tome and Principe", "osm")
# }

Run the code above in your browser using DataLab