vcp_map: Get map png from the Vegetation Characterization Program...

Description Usage Arguments Examples

View source: R/vcp_map.r

Description

Get map png from the Vegetation Characterization Program (VCP).

Usage

1
2
3
4
  vcp_map(park = "Acadia_NP", f = "image", bbox = NULL,
    size = NULL, dpi = NULL, format = "png",
    transparent = "false", file = "~/image", plot = FALSE,
    ...)

Arguments

park

Park to search, defaults to Acadia National Park ("Acadia_NP").

f

The response format, one of json, image, or kmz.

bbox

The extent (bounding box) of the exported image. Unless the bboxSR parameter has been specified, the bbox is assumed to be in the spatial reference of the map. See examples below.

size

The size (width * height) of the exported image in pixels. If the size is not specified, an image with a default size of 400 * 400 will be exported. e.g.: "600,500"

dpi

The device resolution of the exported image (dots per inch). If the dpi is not specified, an image with a default DPI of 96 will be exported.

format

The format of the exported image. The default format is png. Options are: png, png8, png24, jpg, pdf, bmp, gif, svg, and png32.

layers

Determines which layers appear on the exported map. There are four ways to specify which layers are shown: show: (only the layers specified in this list will be exported), hide (all layers except those specified in this list will be exported), include (in addition to the layers exported by default, the layers specified in this list will be exported), exclude (the layers exported by default excluding those specified in this list will be exported)

transparent

If TRUE, image will be exported with the background color of the map set as its transparent color. The default is FALSE. Only the png and gif formats support transparency.

...

Pass on parameters to grid.raster for plotting images. See ?grid::grid.raster for options.

Examples

1
2
3
4
5
6
7
8
## Not run: 
# plot a map
vcp_map(bbox="-1.1555796946844999E7,5220831.371255575,-1.1541665204054998E7,5230496.950050622", park="Agate_Fossil_Beds_NM", plot=TRUE)

# save the map to file
vcp_map(bbox="-1.1555796946844999E7,5220831.371255575,-1.1541665204054998E7,5230496.950050622", park="Agate_Fossil_Beds_NM")

## End(Not run)

sckott/usgs documentation built on May 29, 2019, 4:07 p.m.