diff --git a/R/plot_slope.R b/R/plot_slope.R index f431f86..c6b76b8 100644 --- a/R/plot_slope.R +++ b/R/plot_slope.R @@ -51,7 +51,22 @@ plot_slope = function( ) } dz = distance_z(route_xyz, lonlat = lonlat) - plot_dz(dz$d, dz$z, seq_brks = seq_brks, brks = brks, ...) + plot_dz( + d = dz$d, + z = dz$z, + fill = fill, + horiz = horiz, + pal = pal, + legend_position = legend_position, + col = col, + cex = cex, + bg = bg, + title = title, + brks = brks, + seq_brks = seq_brks, + ncol = ncol, + ... + ) } #' Plot a digital elevation profile based on xyz data #' diff --git a/R/slope_get.R b/R/slope_get.R index 2becad7..e4c7cae 100644 --- a/R/slope_get.R +++ b/R/slope_get.R @@ -7,6 +7,8 @@ #' @examples #' # Time-consuming examples that require an internet connectioin and API key: #' \donttest{ +#' library(sf) +#' library(raster) #' routes = cyclestreets_route #' e = elevation_get(routes) #' class(e) diff --git a/R/slopes.R b/R/slopes.R index 715e55a..244b450 100644 --- a/R/slopes.R +++ b/R/slopes.R @@ -215,7 +215,7 @@ slope_xyz = function(route_xyz, fun = slope_matrix_weighted, lonlat = TRUE) { #' elevation_extract(m, dem, method = "simple") #' # Test with terra (requires internet connection): #' \donttest{ -#' if(has_terra()) { +#' if(slopes:::has_terra()) { #' u = paste0("https://github.com/ITSLeeds/slopes/", #' "releases/download/0.0.0/dem_lisbon.tif" ) #' if(!file.exists("dem_lisbon.tif")) download.file(u, "dem_lisbon.tif") diff --git a/man/elevation_extract.Rd b/man/elevation_extract.Rd index 8cfd857..cae7fe1 100644 --- a/man/elevation_extract.Rd +++ b/man/elevation_extract.Rd @@ -34,7 +34,7 @@ elevation_extract(m, dem) elevation_extract(m, dem, method = "simple") # Test with terra (requires internet connection): \donttest{ -if(has_terra()) { +if(slopes:::has_terra()) { u = paste0("https://github.com/ITSLeeds/slopes/", "releases/download/0.0.0/dem_lisbon.tif" ) if(!file.exists("dem_lisbon.tif")) download.file(u, "dem_lisbon.tif") diff --git a/man/elevation_get.Rd b/man/elevation_get.Rd index 0f1b087..424e212 100644 --- a/man/elevation_get.Rd +++ b/man/elevation_get.Rd @@ -20,6 +20,8 @@ Get elevation data from hosted maptile services \examples{ # Time-consuming examples that require an internet connectioin and API key: \donttest{ +library(sf) +library(raster) routes = cyclestreets_route e = elevation_get(routes) class(e)