terra
terra copied to clipboard
Click function gives shifted (relatively to the visible plot) coordinates
Hi!
I have tried to get approximate border of my interest polygons by clicking the border above my raster. Unfortunately, function click always gives me shifted position of points and lines.
Reproducible example:
library(terra)
elev_rast <- rast(system.file("ex/elev.tif", package = "terra"))
plot(elev_rast)
c1 <- click(n = 4, type = "l")
I try to reproduce the line of any valley on the elevation raster.
But the real positions of objects are always shifted orthogonally (?).
Oh, I'm sorry. I didn't think I should look the unsolved problem description in the list of closed issues. https://github.com/rspatial/terra/issues/1046
I did not close it, but that was a reasonable thing to do since it is a bug in Rstudio: https://github.com/rstudio/rstudio/issues/12682 , not in terra, or in R proper.
There is a workaround suggested here: Set "Display Setting -> Scale -> 100%" That does not help me much as that makes the fonts too small for me to read.