Learn R Programming

spacey (version 0.1.1)

load_overlay: Import PNG textures for overlays

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

load_overlay(filename)

Arguments

filename

The path to the PNG file to be imported

Value

A matrix of values provided by readPNG

Examples

Run this code
# 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)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab