Skip to content

Commit

Permalink
restore sf attributes on return value for #338
Browse files Browse the repository at this point in the history
  • Loading branch information
mpadge committed Jun 6, 2024
1 parent 6ea97f1 commit ddc49ee
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: osmdata
Title: Import 'OpenStreetMap' Data as Simple Features or Spatial Objects
Version: 0.2.5.012
Version: 0.2.5.013
Authors@R: c(
person("Mark", "Padgham", , "[email protected]", role = c("aut", "cre")),
person("Bob", "Rudis", role = "aut"),
Expand Down
4 changes: 4 additions & 0 deletions R/getbb.R
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,10 @@ getbb <- function (place_name,
obj_index <- as.integer (c (names (gt_p), names (gt_mp)))
ret_data <- obj [obj_index, which (!names (obj) %in% c ("boundingbox", "geotext"))]
ret <- cbind (ret_data, ret_poly)
# Then restore sf attributes:
nms <- names (ret)
attributes (ret) <- attributes (ret_poly)
names (ret) <- nms
}

return (ret)
Expand Down
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"codeRepository": "https://github.com/ropensci/osmdata/",
"issueTracker": "https://github.com/ropensci/osmdata/issues",
"license": "https://spdx.org/licenses/GPL-3.0",
"version": "0.2.5.012",
"version": "0.2.5.013",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down

0 comments on commit ddc49ee

Please sign in to comment.