Learn R Programming

quickmapr (version 0.3.0)

get_basemap: Get a basemap from USGS National Map

Description

Uses the National Map Aerial Image REST API to return an aerial image to be used as a basemap. May add functionality for 1m or 1ft images. May also add topo-map.

Usage

get_basemap(qmap_obj = NULL, base = c("1m_aerial", "topo"), width = 300,
  outfile = tempfile())

Arguments

qmap_obj

A valid qmap() object

base

A character indicating basemap to get (1m aerial or topo)

width

Width, in pixels of image exported from The National Map web service. Height is determined by width:height ratio of the extent of the qmap object.

outfile

an output file to save the resultant jpg.

Examples

Run this code
# NOT RUN {
#Can be run alone to get jpg, but best if run through qmap()
data(lake)
x<-qmap(lake,buffer)
x_base<-get_basemap(x,'1m_aerial',width=1000)
x<-qmap(x_base)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab