Learn R Programming

osmplotr (version 0.1-3)

add_osm_objects: add_osm_objects

Description

Adds layers of spatial objects (polygons, lines, or points generated by extract_osm_objects ()) to a graphics object initialised with plot_osm_basemap().

Usage

add_osm_objects(obj = obj, col = "gray40", border = NA, ...)

Arguments

obj
an sp SPDF or SLDF (list of polygons or lines) returned by extract_osm_objects ()
col
colour of polygons or lines (default = 'gray40')
border
border colour of polygons
...
other parameters to be passed to polygons (such as border), lines (such as lwd, lty), or points (such as pch, cex)

Value

  • nothing (adds to graphics.device opened with plot_osm_basemap())

Examples

Run this code
plot_osm_basemap (bbox=get_bbox (c (-0.15, 51.5, -0.1, 51.52)), col="gray20")
add_osm_objects (london$dat_BNR, col="gray40") # non-residential buildings

Run the code above in your browser using DataLab