get_basemap: Get a basemap from USGS National Map

View source: R/qmap.R

get_basemapR Documentation

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

## 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)

## End(Not run)


jhollist/quickmapr documentation built on Oct. 15, 2023, 10:07 p.m.