-
Notifications
You must be signed in to change notification settings - Fork 46
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
Implement osmdata_data_frame supporting out meta;
and adiff
queries
#285
Conversation
See also #252, which should be retained as the "original" vision of this kind of function, courtesy of @Mashin6. No XML filtering; no nodes, ways, rels; just data. So any @jmaspons Would you be able to modify this to reflect #252, and return that kind of data.frame, and yet still incorporate the functionality suggested here? |
Old fill_overpass_data return either the doc as an XML object or as a character vector, depending on the missing or not doc parameter. All the osmdata_* functions cast the doc to character with: rcpp_osmdata_* (paste0 (doc)) and therefore are not affected by this change.
I think the proposal is unrelated as it affects mostly
Once #252 is implemented, it should be easy to handle the case by parsing the opq$suffix or whatever flag that the implementation end up with, but I think it's premature while there are no option for different prefixes and suffixes. I will help to modify osmdata_data_frame when needed. P.S.: reading your post, I interpret that you prefer |
Profiling shows that list2DF is much faster than data.frame(list(...))
out meta;
and adiff
queries
Fixes to get_metadata to guess query type for empty results
|
8d48e7f
to
4bf05e5
Compare
@jmaspons I'll get to this one asap, but may take a couple of days. |
Still much slower than osmdata_sf
cherry-pick: 7fde28a
adiff have <new> node for deleted objects, but diff have not. diff results may contain duplicated entries -> unique(df)
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.
Apart from that one comment, this looks great!
The inputs should come from an opq object, thus, the datetimes already have passed check_datetime()
@jmaspons This seems good to merge now. Did you have any other changes in mind? If not, then I'll merge straight away. I had a play around with it - this really is a very nice addition! I think i'll end up using this quite a bit. |
Works and seems that doesn't break anything (check is fine). I will add tests if you like the idea.