16EAGLE / moveVis

An R package providing 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.
http://www.movevis.org
GNU General Public License v3.0
131 stars 20 forks source link

Error in wkt(projfrom) : could not find function "wkt" when trying to create frames using mapbox satellite imagery #98

Open rpedler opened 3 years ago

rpedler commented 3 years ago

Hi there, I am using the example code from the move vis website http://movevis.org/articles/example-3.html frames <- frames_spatial(m, map_service = "mapbox", map_type = "satellite", map_token = "YOUR_MAPBOX_TOKEN")

but it returns the following error

Error in wkt(projfrom) : could not find function "wkt"

Is there a package I need to update?

Here's the code:

library(moveVis) library(move) library(raster) library(ggplot2) data <- read.csv(file.choose()) data_df <- methods::as(data, "data.frame") movedata <- df2move(data_df, proj = "+init=epsg:4326 +proj=longlat +datum=WGS84 +no_defs", x = "Longitude", y = "Latitude", time = "timestamp", track_id = "trackID") movedata <- align_move(movedata, res = 1, unit = "hours")

Here's my data structure 'data.frame': 519 obs. of 8 variables: $ trackID : Factor w/ 2 levels $ Latitude : num
$ Longitude: num
$ HDOP : num 2.4 2.3 1.8 2.6 1.2 1 1.1 2.2 1 1.8 ... $ timestamp: POSIXct, format: "2020-09-11 09:30:11" "2020-09-11 11:30:10" "2020-09-11 12:30:06" "2020-09-11 01:30:11" ...

marcoscarloseduardo commented 3 years ago

Hi, try this: https://stackoverflow.com/questions/63206426/reprojecting-a-raster-in-r-error-could-not-find-function-wkt