Downloads OSM data from an Overpass API server and reads it into an osmar object.

get_osm_bbox(xmin, xmax, ymin, ymax, server = "https://overpass-api.de")

get_osm_file(file)

Arguments

xmin

Numeric. Minimum longitude

xmax

Numeric. Maximum longitude

ymin

Numeric. Minimum latitude

ymax

Numeric. Maximum latitude

server

Character. Hostname of an Overpass API server Defaults to https://overpass-api.de although you may specify a different hostname.

file

Filepath for an OSM XML file

Value

An osmar object.

Functions

  • get_osm_file: Read in OSM data from an XML file. get_osm_bbox() calls this function once it downloads the raw XML file.

See also

osmsource_api() which implements the same function but has stricter controls on the size that can be downloaded.