Georeference image overlays based on a reference raster
Georeference image overlays based on a reference raster
This function georeferences an image overlay based on a reference raster, setting the extent and CRS of the image to those of the raster file. To georeference multiple images and merge them into a single file, see merge_rasters .
overlay_file: The image overlay to georeference. File format will be detected automatically from file extension; options include jpeg/jpg, png, and tif/tiff.
reference_raster: The raster file to base georeferencing on. The output image will have the same extent and CRS as the reference raster. Accepts anything that can be read by terra::rast
output_file: The path to write the georeferenced image file to. Must be a TIFF.