I get the error: ' Error in validObject(.Object) : invalid class “SpatialLines” object: bbox should never contain infinite values'. But when I check for infinite values I cannot find them.
The runRSP works. But when I plot it:
plotTracks(rsp.data4,
base.raster = water,
type = "both",
tag = "A69-9002-7220",
track = "Track_1") + addStations(rsp.data)
My plot doesn't have the study-area as background.
I cannot upload my shape files and Rdata here but I can send it to you if needed.
Thanks so much in advance!
Hi, I'm really struggling with getting runRSP() and therefore plotTracks() to work. If I run:
water <- actel::shapeToRaster(shape = 'nederland_zuid_holland2.shp', size = 0.0001, buffer = 0.05) tl <- actel::transitionLayer(x = water, directions = 4) rsp.data3 <- runRSP(input = results, t.layer = tl, coord.x = "X_WGS84", coord.y = "Y_WGS84")
I get the error: ' Error in validObject(.Object) : invalid class “SpatialLines” object: bbox should never contain infinite values'. But when I check for infinite values I cannot find them.
If I run:
shapefile <- st_read('nederland_zuid_holland2.shp') r <- raster(extent(shapefile)) res(r) <- 1 crs(r) <- st_crs(shapefile)$proj4string print(extent(r)) print(crs(r)) raster_data <- rasterize(shapefile, r) transition_layer <- transition(raster_data, function(x) 1/mean(x), directions = 8) rsp.data4 <- runRSP(input = test, t.layer = transition_layer, coord.x = "X_WGS84", coord.y = "Y_WGS84")
The runRSP works. But when I plot it: plotTracks(rsp.data4, base.raster = water, type = "both", tag = "A69-9002-7220", track = "Track_1") + addStations(rsp.data) My plot doesn't have the study-area as background.
I cannot upload my shape files and Rdata here but I can send it to you if needed. Thanks so much in advance!