Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upSLN example crashes on Travis #267
Comments
|
I've isolated the issue: library(stplanr)
sln <- SpatialLinesNetwork(route_network)
class(sln)
#> [1] "SpatialLinesNetwork"
#> attr(,"package")
#> [1] "stplanr"
weightfield(sln) # field used to determine shortest path
#> [1] "length"
plot(sln)
points(sln2points(sln)[1, ], cex = 5)
points(sln2points(sln)[50, ], cex = 5)
shortpath <- sum_network_routes(sln, 1, 50, sumvars = "length")
plot(shortpath, col = "red", lwd = 4, add = TRUE)
points(sln2points(sln)[35, ], cex = 5)
shortpath <- sum_network_routes(sln, 1, 35, sumvars = "length")
plot(shortpath, col = "red", lwd = 4, add = TRUE)library(sf)
#> Linking to GEOS 3.5.1, GDAL 2.1.2, PROJ 4.9.3
sln_sf <- SpatialLinesNetwork(route_network_sf)
plot(sln_sf)# \dontrun{
shortpath <- sum_network_routes(sln_sf, 1, 50, sumvars = "length")
#> Column `do_union` not found in `.data`
plot(shortpath$geometry, col = "red", lwd = 4, add = TRUE)
#> Warning in min(x): no non-missing arguments to min; returning Inf
#> Warning in max(x): no non-missing arguments to max; returning -Inf
#> Warning in min(x): no non-missing arguments to min; returning Inf
#> Warning in max(x): no non-missing arguments to max; returning -Inf
#> Warning in plot.window(...): "add" is not a graphical parameter
#> Error in plot.window(...): need finite 'xlim' valuesCreated on 2019-05-09 by the reprex package (v0.2.1) |



An locally sometimes it seems, but not in a reprex it seems:
Created on 2018-09-02 by the reprex package (v0.2.0).
See https://travis-ci.org/ropensci/stplanr/builds/423626174#L8581