load_overlay: Import PNG textures for overlays

Description Usage Arguments Value Examples

View source: R/get_image_overlay.R

Description

This is an extremely thin wrapper for readPNG, in order for users to not realize they even needed png for this package's functionality at all.

Usage

1
load_overlay(filename)

Arguments

filename

The path to the PNG file to be imported

Value

A matrix of values provided by readPNG

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
bbox <- get_centroid_bounding_box(c(
  "lat" = 44.121268,
  "lng" = -73.903734
),
distance = 10
)

overlay_file <- tempfile("overlay_file", fileext = ".png")
get_image_overlay(bbox,
  save.png = TRUE,
  png.filename = overlay_file,
  overlay = "World_Imagery"
)
overlay <- load_overlay(overlay_file)

## End(Not run)

spacey documentation built on March 15, 2020, 1:07 a.m.