-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow vectors of ids + types for opq_osm_id #283
Conversation
@jmaspons I see what you're trying to do here, and think that this also is a good improvement. It still needs a bit of work though. Overpass queries should have all of the id <- paste(sprintf (" %s(id:%s);\n", opq$id$type, opq$id$id), collapse="") Just puts every ID with its own distinct if (!is.null (opq$id)) { # opq with opq_osm_id
id_types <- data.frame (type = opq$id$type, id = opq$id$id)
id_types <- lapply (split (id_types, f = factor (id_types$type)), function (i) {
sprintf (" %s(id:%s);\n", i$type [1], paste0 (i$id, collapse = ","))
})
id_types <- paste0 (id_types, collapse = "")
res <- paste0 (opq$prefix, id_types, opq$suffix)
} Note that Another minor issue is that the initial checks also need to be improved. You've currently just added I think those two tweaks should pretty much get us there - let me know when that's done, and i'll aim to merge asap after that. Thanks! |
One more thing: There will once again also be failing tests which will need to be updated as well. You can run those locally yourself (in |
6777ccb
to
cbad6a0
Compare
I think it's ready. For the initial checks, I removed the Also, instead of testing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Those edits are just to conform with camel case standard here - no upper case in variable names.
snake_case done! |
Requires #282