Converts map and track coordinates to col/row (X/Y), relative values with respect to the provided map. This is an internal function to interface with the C++ code which is not georeferenced internally. Note that you will need to use an equal area projection for best performance. For small areas lon/lat (WGS84) can be used but is not encouraged. The project should be chosen based on the locale.

hr_xy(map, track = NULL, crs = "+proj=longlat +datum=WGS84")

Arguments

map

a {terra} raster map (stack)

track

an {sf} multi-point file

crs

a valid CRS description (default = "+proj=longlat +datum=WGS84")

Value

a nested list containing a converted map array and a list of coordinates for the provided track points relative to this array.