make_backdrop: Make an OpenStreetMap, Stamen or other map backdrop

Description Usage Arguments Details Value Examples

Description

Create a backdrop for sketchy maps, based on the extent of spdf. The backdrop can be from OpenStreetMap, Google, Stamen, ESRI, bing, Apple or other sources depending on location.

Usage

1
2
make_backdrop(spdf,bw,sepia,...)
spdf 

Arguments

spdf

a SpatialPolygons or SpatialPolygonsDataFrame object

bw

A variable indicating whether to create a monochrome backdrop - 0 indicates use colour, 1 is standard brightness, other values vary brightness

sepia

A variable indicating whether to create a sepia backdrop - 0 indicates use colour, 1 is standard brightness, other values vary brightness - this overwrites bw

...

parameters passed on to openmap

Details

This function requires that spdf has a well-defined proj4string in order to match the backdrop map with the extent of the spatial object.

Value

Echos spdf - this is useful for pipelines using %>%

Examples

1
2
3
4
5
6
# Here make_canvas is inserted in a pipeline after a simplified and tidied 
# map of Irish NUTS3 regions is created.  A sketchy rendition is then added to the
# backdrop of type osm-bw (monochrome OpenStreetMap)
data(RA) 
RA.spdf %>% small_chop %>% gSimplify(tol=11000) %>% tidy_it %>% 
  make_backdrop(type='osm',sepia=0.8) %>% sketch_it(col='darkred',lwd=2,rough=0.08)

chrisbrunsdon/caricRture documentation built on May 13, 2019, 6:52 p.m.