diff --git a/DESCRIPTION b/DESCRIPTION index d4df92f..1eb7159 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -10,7 +10,7 @@ Authors@R: person("Jakob", "Schwalb-Willmann", email = "movevis@schwalb-willmann Description: Tools to visualize movement data (e.g. from GPS tracking) and temporal changes of environmental data (e.g. from remote sensing) by creating video animations. License: GPL-3 Encoding: UTF-8 -RoxygenNote: 7.0.2 +RoxygenNote: 7.1.0 Imports: move, raster, diff --git a/NEWS.md b/NEWS.md index ef474a9..dccba3c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -9,7 +9,11 @@ Revised distance calculations & handling of dateline crossings. Development vers * Distance calculations are now based on `lwgeom` * Refined base map plotting (see additional arguments `...` of `frames_spatial` for available options) * Added `NA` handling for base maps (e.g. rasterized labels) -* Reduced dependencies +* Dropped dependencies + +**Bug fixes:** + +* Minor errors and warnings caused by reverse dependency changes of package `sf`
diff --git a/R/align_move.R b/R/align_move.R index a9c3671..2bae6ec 100644 --- a/R/align_move.R +++ b/R/align_move.R @@ -24,7 +24,6 @@ #' @author Jakob Schwalb-Willmann #' #' @importFrom move timestamps timeLag interpolateTime moveStack move split -#' @importFrom raster crs #' @importFrom lubridate second<- minute<- hour<- day<- #' #' @seealso \code{\link{df2move}} \code{\link{frames_spatial}} \code{\link{frames_graph}} diff --git a/R/frames_spatial.R b/R/frames_spatial.R index 76a29a9..6f31415 100644 --- a/R/frames_spatial.R +++ b/R/frames_spatial.R @@ -195,7 +195,7 @@ frames_spatial <- function(m, r_list = NULL, r_times = NULL, r_type = "gradient" if(is.null(equidistant)) if(is.null(ext)) equidistant <- TRUE else equidistant <- FALSE if(!is.logical(equidistant)) out("Argument 'equidistant' must be of type 'logical'.", type = 3) - if(all(as.integer(st_crs(m)[[1]]) != as.integer(4326), isTRUE(cross_dateline))){ + if(all(as.integer(st_crs(m)$epsg) != as.integer(4326), isTRUE(cross_dateline), na.rm = T)){ out("Argument 'cross_dateline' is ignored, since the coordinate reference system of 'm' is not geographical (long/lat).", type = 2) cross_dateline <- FALSE } diff --git a/R/moveVis-internal.R b/R/moveVis-internal.R index 8a69ec1..f869b70 100755 --- a/R/moveVis-internal.R +++ b/R/moveVis-internal.R @@ -519,7 +519,7 @@ repl_vals <- function(data, x, y){ #' @noRd .time_conform <- function(m){ - m.indi <- if(inherits(m, "MoveStack")) split(m) else list(m) + m.indi <- if(inherits(m, "MoveStack")) move::split(m) else list(m) ts <- .lapply(m.indi, timestamps, moveVis.verbose = F) tl <- .lapply(m.indi, timeLag, unit = "secs", moveVis.verbose = F) @@ -626,7 +626,7 @@ repl_vals <- function(data, x, y){ }) ## composite imagery - r <- compose_tile_grid(tg, images) + r <- quiet(compose_tile_grid(tg, images)) crop(projectRaster(r, crs = m.crs), extent(y[1], y[3], y[2], y[4]), snap = "out") }) diff --git a/docs/articles/example-1.html b/docs/articles/example-1.html index d6dfd6c..b20da9f 100644 --- a/docs/articles/example-1.html +++ b/docs/articles/example-1.html @@ -124,8 +124,8 @@

Creating a simple movement animation

data("move_data")

move_data is a moveStack, containing three individual tracks. moveVis works with move class objects. If your movement tracks are present as data.frames, see df2move() and the example code there for conversion. Let’s have a look at both timestamps and sampling rates of move_data:

-
unique(timestamps(move_data))
-timeLag(move_data, unit = "mins")
+
unique(timestamps(move_data))
+timeLag(move_data, unit = "mins")

We can conclude that each track has a sampling rate of roughly 4 minutes, however sampling rates differ over time. Due to this, tracks do not share unique timestamps. For animation, unique frame times are needed, regardless if we want to animate a single track or multiple at once. Thus, we need to align move_data in order to * make all tracks share unique timestamps that can be assigned to frames * make all tracks share unique, steady sampling rates without gaps

You can use align_move() to align move_data to a sampling rate of 4 minutes (240 seconds) at the seconds digit “:00”:

move_data <- align_move(move_data, res = 240, digit = 0, unit = "secs")
diff --git a/docs/articles/example-3.html b/docs/articles/example-3.html index 032def0..f49b0c7 100644 --- a/docs/articles/example-3.html +++ b/docs/articles/example-3.html @@ -126,12 +126,12 @@

Using a mapbox satellite base map

m <- align_move(move_data, res = 4, unit = "mins") ## assign some path colours by individual -m.list <- split(m) # split m into list by individual +m.list <- split(m) # split m into list by individual m.list <- mapply(x = m.list, y = c("red", "green", "blue"), function(x, y){ x$colour <- y return(x) }) # add colour per individual -m <- moveStack(m.list) # putting it back together into a moveStack +m <- moveStack(m.list) # putting it back together into a moveStack # create frames with mapbox satellite basemap frames <- frames_spatial(m, map_service = "mapbox", map_type = "satellite", diff --git a/docs/index.html b/docs/index.html index ad9215e..822b578 100644 --- a/docs/index.html +++ b/docs/index.html @@ -125,7 +125,7 @@

The latest stable version of moveVis can be installed from CRAN:

install.packages("moveVis")

The development version can be installed from GitHub:

-
devtools::install_github("16EAGLE/moveVis")
+
devtools::install_github("16EAGLE/moveVis")

Code written for moveVis version <=0.9.9 will not work with newer versions, but it is quite simple and thus highly recommended to switch to the new syntax due to a variety of advantages. moveVis version <=0.9.9 can still be downloaded here and installed manually:

setwd("your/download/directory")
 install.packages("moveVis-0.9.9.tar.gz", repos = NULL)
diff --git a/docs/news/index.html b/docs/news/index.html index 7266e50..8fc4078 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -157,7 +157,12 @@

  • Refined base map plotting (see additional arguments ... of frames_spatial for available options)
  • Added NA handling for base maps (e.g. rasterized labels)
  • -
  • Reduced dependencies
  • +
  • Dropped dependencies
  • + +

    Bug fixes:

    +



    diff --git a/docs/reference/align_move.html b/docs/reference/align_move.html index 2841300..e7ed8ea 100644 --- a/docs/reference/align_move.html +++ b/docs/reference/align_move.html @@ -194,7 +194,7 @@

    Arg spaceMethod -

    character, either "euclidean", "greatcircle" or "rhumbline", indicating the interpolation function to be used to interpolate locations of m to the aligned time scale. Interpolation is performed using move::interpolateTime.

    +

    character, either "euclidean", "greatcircle" or "rhumbline", indicating the interpolation function to be used to interpolate locations of m to the aligned time scale. Interpolation is performed using move::interpolateTime.

    @@ -212,25 +212,25 @@

    Examp # the tracks in move_data have irregular timestamps and sampling rates. # print unique timestamps and timeLag -unique(timestamps(move_data)) -unique(unlist(timeLag(move_data, units = "secs"))) +unique(timestamps(move_data)) +unique(unlist(timeLag(move_data, units = "secs"))) # use align_move to correct move_data to a uniform time scale and lag using interpolation. # resolution of 4 minutes (240 seconds) at digit 0 (:00 seconds) per timestamp: m <- align_move(move_data, res = 240, digit = 0, unit = "secs") -unique(unlist(timeLag(m, units = "secs"))) +unique(unlist(timeLag(m, units = "secs"))) # resolution of 1 hour (3600 seconds) at digit 0 (:00 seconds) per timestamp: m <- align_move(move_data, res = 3600, digit = 0, unit = "secs") -unique(unlist(timeLag(m, units = "secs"))) +unique(unlist(timeLag(m, units = "secs"))) # resolution of 1 hour (15 seconds) at digit 0 (:00 seconds) per timestamp: m <- align_move(move_data, res = 15, digit = 0, unit = "secs") -unique(unlist(timeLag(m, units = "secs"))) +unique(unlist(timeLag(m, units = "secs"))) # resolution of 1 hour: m <- align_move(move_data, res = 60, unit = "mins") -unique(unlist(timeLag(m, units = "secs"))) +unique(unlist(timeLag(m, units = "secs")))