Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not possible to set custom extent with "ext" argument of frames_spatial() #128

Open
markbidwell opened this issue Dec 6, 2024 · 0 comments

Comments

@markbidwell
Copy link

markbidwell commented Dec 6, 2024

Specifying a custom extent with the "ext" argument of frames_spatial() doesn't result in a modified extent. Here is a reprex:

library(moveVis)
library(move)
library(raster)
library(ggplot2)

data("move_data")
move_data <- align_move(move_data, res = 4, unit = "mins")

With default extent (equidistant = TRUE)

frames <- frames_spatial(move_data, path_colours = c("red", "green", "blue"),
map_service = "osm", map_type = "streets", alpha = 0.5, equidistant=T)
length(frames) # number of frames
frames[[100]] # display one of the frames; extent is square (good)

With default extent (equidistant = FALSE)

frames <- frames_spatial(move_data, path_colours = c("red", "green", "blue"),
map_service = "osm", map_type = "streets", alpha = 0.5, equidistant=F)
length(frames) # number of frames
frames[[100]] # display one of the frames; extent is rectangular (good)

With CUSTOM extent - this doesn't work

extent(move_data) #inspect default extent
(ext <- extent(8.1, 9.9, 47.1, 47.9)) #specify and inspect custom extent, note that it's BIGGER than the default original extent
frames <- frames_spatial(move_data, path_colours = c("red", "green", "blue"),
map_service = "osm", map_type = "streets", map_res = 0.8, ext = ext, equidistant = F)
frames[[100]] # display one of the frames; NOTE that the extent hasn't changed, despite calling a different extent

@markbidwell markbidwell changed the title Not possible to set custom extent Not possible to set custom extent with "ext" argument of frames_spatial() Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant