Skip to contents

Point a saved image (or project) at its source file again, for example after the file moved, or accept a source that changed since it was saved. The replacement is read with the selected reader and must have the same geometry; annotations are never changed.

Usage

at_relink_source(x, path, backend = NULL, options = NULL)

Arguments

x

An annot_image or annot_project. Annotations and geometry are preserved.

path

Replacement source path (may be the same path to revalidate).

backend

Reader backend; defaults to the saved backend.

options

Reader options as a list; defaults to the saved options.

Value

The updated image or project. Dimensions, pyramid levels, band count and wavelengths must agree. Relinking explicitly accepts the new source and refreshes image metadata from the selected reader.