ggspatial (version 0.2.1)

annotation_spraster: Annotation raster using Raster* layers

Description

This is a thin wrapper around annotation_raster, with the bounds arguments filled in using the bounds of the raster. Like annotation_raster, this will not adjust the extents of the plot. The coordinates used are in the coordinate system of the raster, which are likely not lat/lon.

Usage

annotation_spraster(raster, interpolate = FALSE, na.value = NA)

geom_spraster_rgb(raster, interpolate = FALSE, na.value = NA)

Arguments

raster

A Raster* object

interpolate

TRUE to interpolate rendering

na.value

A value to represent NAs, since a transparency band may or may not exist for this raster. If na.value = NA, a transparency band will be created to remove missing values from display.

Value

An annotation layer or list of layers (geom_spraster_rgb)

Examples

Run this code
# NOT RUN {
ggplot() +
  annotation_spraster(longlake_osm) +
  geom_spatial(longlake_waterdf, toepsg = 26920) +
  coord_fixed()


# }

Run the code above in your browser using DataLab