Skip to content

Commit

Permalink
rm purrr
Browse files Browse the repository at this point in the history
  • Loading branch information
ptimoner committed Mar 7, 2024
1 parent d638ec2 commit 750d6bd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ Imports:
jsonlite,
lubridate,
osmdata,
purrr,
raster,
RCurl,
readxl,
Expand Down
6 changes: 3 additions & 3 deletions R/download_osm.R
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ download_osm <- function (mainPath, location, type, alwaysDownload = FALSE, most
}
# Download
message(paste0("Downloading OSM data (", type, ")..."))
osmData <- opq(bbox = bb) %>%
add_osm_feature(key = colName, value = classes) %>%
osmdata_sf()
osmData <- osmdata::opq(bbox = sf::st_bbox(border)) %>%
osmdata::add_osm_feature(key = colName, value = classes) %>%
osmdata::osmdata_sf()

if (type == "roads" | type == "waterLines") {
shp <- osmData$osm_lines
Expand Down
2 changes: 1 addition & 1 deletion R/process_raster.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#' @keywords internal
#' @export
process_raster <- function (ras, border, epsg, projMeth) {
`%>%` <- purrr::`%>%`
# `%>%` <- purrr::`%>%`
border <- sf::st_transform(as(border, "sf"), terra::crs(ras))
cat(paste("Cropping:\n", ras %>% terra::sources()))
rasCrop <- terra::crop(ras, border)
Expand Down

0 comments on commit 750d6bd

Please sign in to comment.