volcano_polygon: Generate a polygon for the volcano raster.

View source: R/example_data.R

volcano_polygonR Documentation

Generate a polygon for the volcano raster.

Description

Generate a polygon for the volcano raster.

Usage

volcano_polygon()

Value

simple feature geometry for a POLYGON

Examples

## Not run: 
library(dplyr)
x <- volcano_stack(indexed = TRUE)
p <- volcano_polygon()
pts <- randomPts(x, polygon = p)
par(mfrow = c(1,3))
for (i in seq_len(3)){
  plot(x[[i]], main = paste("Layer", i))
  plot(p, add = TRUE)
  with(pts %>% dplyr::filter(layer == i), points(x, y))
}

## End(Not run)

BigelowLab/rasf documentation built on July 18, 2022, 10:19 p.m.