Skip to contents

Provides a simple console-based interactive workflow to help users select a subset of photos returned by find_photos(). The user chooses: a year, a color type and the number of photos to keep

Usage

select_photos(photos, outdir = NULL)

Arguments

photos

An sf object or data.frame produced by find_photos().

outdir

character or NULL; Directory where photos will be saved. Defaults to NULL, in which case the package user overwrite directory (tools::R_user_dir()) is used.

Value

Invisibly returns a subset of photos corresponding to the user selection. Returns NULL invisibly if the user quits.

Details

This function does not download files. It only returns the selected rows (typically to be passed to get_photos()).

Internal color codes are mapped as follows:

  • "P" -> "PHOTO" (panchromatic / black & white)

  • "C" -> "RGB" (color)

  • "IR"`` -> "IRC"` (infrared)

  • "IRC"`` -> "IRC"` (infrared color)

Examples

if (FALSE) { # \dontrun{
x <- sf::read_sf("my_area.gpkg")
photos <- find_photos(x)

sel <- select_photos(photos)

# Then download:
get_photos(sel$url, outdir = tempdir(), mode = "raw")
} # }