Downloads OSM XML objects and extracts 'sp' polygons or lines. Requires
conversion to osmar object which can be quite slow, as can final conversion
to sp object for large numbers of objects
OSM key to search for. Useful keys include 'building',
'waterway', 'natural', 'grass', 'park', 'amenity', 'shop', 'boundary', and
'highway'. Others will be passed directly to the overpass API and may not
necessarily return results.
value
OSM value to match to key. If NULL, all keys will be returned.
Negation is specified by '!value'.
extra_pairs
A list of additional key-value pairs to be passed
to the overpass API.
bbox
the bounding box within which all key-value objects should be
downloaded. A 2-by-2 matrix of 4 elements with columns of min and
max values, and rows of x and y values.
verbose
If TRUE, provides notification of progress
Value
A list of 2 components:
obj: A data frame of sp objects
warn: Any warnings produced in downloading the data