Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# R specific hooks: https://github.com/lorenzwalthert/precommit
repos:
- repo: https://github.com/lorenzwalthert/precommit
rev: v0.4.3.9015
rev: v0.4.3.9021
hooks:
- id: style-files
args: [--style_pkg=spaceout, --style_fun=spaceout_style]
Expand Down
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.3.0.9024
Version: 0.3.0.9026
Authors@R: c(
person("Joan", "Maspons", , "joanmaspons@gmail.com", role = c("aut", "cre"),
comment = c(ORCID = "0000-0003-2286-8727")),
Expand Down
7 changes: 6 additions & 1 deletion R/features.R
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,12 @@ tags_from_tables <- function (pg) {
if (identical (names (i) [1:2], c ("Key", "Value"))) {
res <- i [, 1:2]
} else {
res <- do.call (rbind, strsplit (i [[1]], split = "="))
# "Key" has value, generally "<key>=*", but sometimes multiple
# entries separated by commas.
keys_i <- unlist (strsplit (i [[1]], ","))
keys_i <- grep ("\\=", keys_i, value = TRUE)
keys_i <- gsub ("^\\s*|\\s*$", "", keys_i)
Comment thread
jmaspons marked this conversation as resolved.
res <- do.call (rbind, strsplit (keys_i, split = "="))
res <- data.frame (res)
names (res) <- c ("Key", "Value")
}
Expand Down
Loading