read_sf_exif: Read location data from images to a simple feature object...

View source: R/read_sf_exif.R

read_sf_exifR Documentation

Read location data from images to a simple feature object using EXIF or write EXIF metadata

Description

Read EXIF data from folder of images.

Usage

read_sf_exif(
  path = NULL,
  filetype = NULL,
  bbox = NULL,
  sort = "lon",
  tags = NULL,
  ...
)

write_exif(
  path = NULL,
  filetype = NULL,
  title = NULL,
  author = NULL,
  date = NULL,
  keywords = NULL,
  args = NULL,
  overwrite = TRUE
)

write_exif_keywords(
  path,
  filetype = NULL,
  key_list,
  key_col = "name",
  keywords = NULL,
  join = NULL,
  overwrite = TRUE
)

Arguments

path

A path to folder of one or more files with EXIF location metadata.

filetype

The file extension or file type; defaults to NULL.

bbox

Optional bounding box to crop returned file (excluding images with location data outside the bounding box). If bbox is provided the returned data will match the crs of the bbox.

sort

Column name for variable to sort by. Currently supports "lon" (default), "lat", or "filename"

tags

Optional list of EXIF tags to read from files. Must include GPS tags to create an sf object.

...

Additional EXIF tags to pass to exiftoolr::exif_read

title

Title to add to file metadata with exiftoolr, Default: NULL.

author

Author to add to file metadata with exiftoolr, Default: NULL.

date

Date to add to file metadata with exiftoolr (not currently working), Default: NULL.

keywords

Keyword(s) added to file metadata with with exiftoolr, Default: NULL.

args

Alternate arguments passed to exiftoolr::exif_call(). If args is not NULL, title, author, date, and keywords are ignored; defaults to NULL.

overwrite

If TRUE, overwrite any existing EXIF metadata present in the provided fields; defaults to TRUE

key_list

List of sf objects with features with keywords, e.g. boundaries

key_col

Column name in key_list with the values to use for keywords.

join

geometry predicate function; defaults to NULL, set to sf::st_intersects if key_list contains only POLYGON or MULTIPOLYGON objects or sf::st_nearest_feature if key_list contains other types.

Writing EXIF metadata

NA

See Also

Other read_write: make_filename(), read_sf_ext()

Examples

read_sf_exif(
  path = system.file("extdata/photos", package = "overedge"),
  filetype = "jpeg"
)

elipousson/overedge documentation built on Aug. 13, 2022, 7:41 p.m.