R package for downloading OpenStreetMap data

methods::slot() -> @ ?base::slotOp

Drop methods from imports

+23 -44
+1 -2
DESCRIPTION
··· 1 1 Package: osmdata 2 2 Title: Import 'OpenStreetMap' Data as Simple Features or Spatial Objects 3 - Version: 0.3.0.9003 3 + Version: 0.3.0.9004 4 4 Authors@R: c( 5 5 person("Joan", "Maspons", , "joanmaspons@gmail.com", role = c("aut", "cre"), 6 6 comment = c(ORCID = "0000-0003-2286-8727")), ··· 32 32 Imports: 33 33 curl, 34 34 httr2, 35 - methods, 36 35 Rcpp (>= 0.12.4), 37 36 rvest, 38 37 tibble,
-1
NAMESPACE
··· 45 45 export(unique_osmdata) 46 46 export(unname_osmdata_sf) 47 47 importFrom(Rcpp,evalCpp) 48 - importFrom(methods,slot) 49 48 importFrom(utils,browseURL) 50 49 importFrom(utils,read.table) 51 50 useDynLib(osmdata, .registration = TRUE)
-1
R/osmdata-package.R
··· 50 50 #' @family package 51 51 #' @author Joan Maspons, Mark Padgham, Bob Rudis, Robin Lovelace, Maëlle Salmon 52 52 #' @keywords internal 53 - #' @importFrom methods slot 54 53 #' @importFrom Rcpp evalCpp 55 54 #' @importFrom utils browseURL read.table 56 55 #' @useDynLib osmdata, .registration = TRUE
+3 -3
R/trim-osmdata.R
··· 154 154 #' @export 155 155 bb_poly_to_mat.SpatialPolygonsDataFrame <- function (x) { # nolint 156 156 157 - x <- slot (x, "polygons") 157 + x <- x@polygons 158 158 if (length (x) > 1) { 159 159 more_than_one () 160 160 } 161 - x <- slot (x [[1]], "Polygons") 161 + x <- x [[1]]@Polygons 162 162 if (length (x) > 1) { 163 163 more_than_one () 164 164 } 165 - slot (x [[1]], "coords") 165 + x [[1]]@coords 166 166 } 167 167 168 168 #' @export
+11 -11
R/unique-osmdata.R
··· 79 79 #' @noRd 80 80 unique_points_sp <- function (dat) { 81 81 82 - pts <- rownames (slot (dat$osm_points, "data")) 82 + pts <- rownames (dat$osm_points@data) 83 83 84 - lns <- slot (dat$osm_lines, "lines") 84 + lns <- dat$osm_lines@lines 85 85 lns_pts <- lapply (lns, function (i) { 86 - rownames (slot (slot (i, "Lines") [[1]], "coords")) 86 + rownames (i@Lines [[1]]@coords) 87 87 }) 88 88 lns_pts <- unlist (lns_pts) 89 89 names (lns_pts) <- NULL 90 90 lns_pts <- unique (lns_pts) 91 91 92 - polys <- slot (dat$osm_polygons, "polygons") 92 + polys <- dat$osm_polygons@polygons 93 93 poly_pts <- lapply (polys, function (i) { 94 - rownames (slot (slot (i, "Polygons") [[1]], "coords")) 94 + rownames (i@Polygons [[1]]@coords) 95 95 }) 96 96 poly_pts <- unlist (poly_pts) 97 97 names (poly_pts) <- NULL ··· 119 119 #' @noRd 120 120 unique_lines_sp <- function (dat) { 121 121 122 - lns <- rownames (slot (dat$osm_lines, "data")) 122 + lns <- rownames (dat$osm_lines@data) 123 123 124 - mlns <- slot (dat$osm_multilines, "lines") [[1]] 125 - mlns <- names (slot (mlns, "Lines")) 124 + mlns <- dat$osm_multilines@lines [[1]] 125 + mlns <- names (mlns@Lines) 126 126 mlns <- unique (mlns) 127 127 128 128 which (!lns %in% mlns) ··· 149 149 #' @noRd 150 150 unique_polygons_sp <- function (dat) { 151 151 152 - polys <- rownames (slot (dat$osm_polygons, "data")) 152 + polys <- rownames (dat$osm_polygons@data) 153 153 154 - mpolys <- slot (dat$osm_multipolygons, "polygons") 154 + mpolys <- dat$osm_multipolygon@polygons 155 155 mpolys <- unlist (lapply (mpolys, function (i) { 156 - names (slot (i, "Polygons")) 156 + names (i@Polygons) 157 157 })) 158 158 names (mpolys) <- NULL 159 159 mpolys <- unique (mpolys)
+8 -26
codemeta.json
··· 11 11 "codeRepository": "https://github.com/ropensci/osmdata", 12 12 "issueTracker": "https://github.com/ropensci/osmdata/issues", 13 13 "license": "https://spdx.org/licenses/GPL-3.0", 14 - "version": "0.3.0.9003", 14 + "version": "0.3.0.9004", 15 15 "programmingLanguage": { 16 16 "@type": "ComputerLanguage", 17 17 "name": "R", ··· 257 257 }, 258 258 "4": { 259 259 "@type": "SoftwareApplication", 260 - "identifier": "methods", 261 - "name": "methods" 262 - }, 263 - "5": { 264 - "@type": "SoftwareApplication", 265 260 "identifier": "Rcpp", 266 261 "name": "Rcpp", 267 262 "version": ">= 0.12.4", ··· 273 268 }, 274 269 "sameAs": "https://CRAN.R-project.org/package=Rcpp" 275 270 }, 276 - "6": { 271 + "5": { 277 272 "@type": "SoftwareApplication", 278 273 "identifier": "rvest", 279 274 "name": "rvest", ··· 285 280 }, 286 281 "sameAs": "https://CRAN.R-project.org/package=rvest" 287 282 }, 288 - "7": { 283 + "6": { 289 284 "@type": "SoftwareApplication", 290 285 "identifier": "tibble", 291 286 "name": "tibble", ··· 297 292 }, 298 293 "sameAs": "https://CRAN.R-project.org/package=tibble" 299 294 }, 300 - "8": { 295 + "7": { 301 296 "@type": "SoftwareApplication", 302 297 "identifier": "utils", 303 298 "name": "utils" 304 299 }, 305 - "9": { 300 + "8": { 306 301 "@type": "SoftwareApplication", 307 302 "identifier": "xml2", 308 303 "name": "xml2", ··· 318 313 }, 319 314 "applicationCategory": "DataAccess", 320 315 "isPartOf": "https://ropensci.org", 321 - "keywords": [ 322 - "open0street0map", 323 - "openstreetmap", 324 - "overpass0API", 325 - "OSM", 326 - "overpass-api", 327 - "r", 328 - "cpp", 329 - "rstats", 330 - "osm", 331 - "osm-data", 332 - "r-package", 333 - "peer-reviewed" 334 - ], 335 - "fileSize": "38074.568KB", 316 + "keywords": ["open0street0map", "openstreetmap", "overpass0API", "OSM", "overpass-api", "r", "cpp", "rstats", "osm", "osm-data", "r-package", "peer-reviewed"], 317 + "fileSize": "38074.553KB", 336 318 "citation": [ 337 319 { 338 320 "@type": "ScholarlyArticle", ··· 376 358 } 377 359 } 378 360 ], 379 - "releaseNotes": "https://github.com/ropensci/osmdata/blob/master/NEWS.md", 361 + "releaseNotes": "https://github.com/ropensci/osmdata/blob/main/NEWS.md", 380 362 "readme": "https://github.com/ropensci/osmdata/blob/main/README.md", 381 363 "contIntegration": [ 382 364 "https://github.com/ropensci/osmdata/actions?query=workflow%3AR-CMD-check",