GCPs are used to georeference images by providing known coordinates for specific points in the image. This function plots GCPs onto the original map (i.e. using the pixel coordinates of the points on the original image before georeferencing). This can be helpful in thinking about here additional GCPs might be needed to improve the transformation.

plot_gcp(image_obj, gcp = NULL, col = "red")

Arguments

image_obj

An array representing the image (colour images are generally imported as an array of nx x ny x 3 colour channels), or a file path to the image (currenly this can only be of type .jpg).

gcp

A dataframe of GCPs, containing at least columns id, x, y.

col

The colour of the points to be plotted on the image. Default is "red".

Value

A plot with the GCPs

Examples

if (FALSE) { # rlang::is_interactive()
# Get the path to an example image included in the package
img_path <- system.file("extdata/europe_map.jpeg", package = "crstools")
# load some previously captured GCPs
gcp_europe <- readRDS(system.file(
  "extdata/europe_gcp_georef.RDS",
  package = "crstools"
))
# plot
plot_gcp(img_path, gcp = gcp_europe)
}