-
Notifications
You must be signed in to change notification settings - Fork 2
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
Create list of key-value pairs and relation names defining osm data #10
Comments
Here's my starter for 10: https://github.com/cyipt/cyipt/blob/master/cyipt-created-data/cycling-key-values-osm.csv |
Here are the results as an online map: Here's the code that generated that: b = getbb("Bristol")
q = opq(b) %>% add_feature(key = "highway", value = "cycleway")
cycleway = osmdata_sp(q = q)
sp::plot(cycleway$osm_lines)
mapview::mapview(cycleway$osm_lines, lwd = 5, map.types = "Thunderforest.OpenCycleMap", color = "black") |
Any chance we could combine this with #9 which seems to be the same thing? |
NB Any approach that defines names will definitely always be wrong - that will not be comprehensive and it won't be robust. I really would an Osmosis pipeline -based approach for extracting OSM data robustly, though perhaps the key/value pair stuff noted above is doing the equivalent thing (albeit almost certainly a lot more slowly given how optimised Osmosis is for extracting efficiently from what is a large dataset). |
The stuff noted is just doing the same thing that osmosis would, albeit with fewer lines of code. Plus it would work on the raw .osm file I believe, right @mpadge? |
it's hard to directly compare Speed comparisons also can't really be done in any sensible way, but |
Of course, if it works best, go for it! |
Overpass previously has been known to be slow, because people overload it with queries for bulk amounts of data rather than focussed queries. Also, I'm not really clear about the point on pbf data. These are available at known URLs on the Geofabrik site. It's trivial to script a download of it as part of an import routine. We certainly do as part of our journey planner import, and indeed have a matching routine to get the smallest possible downloads for the geographical areas we want to cover. My point about R (actually Overpass) vs Osmosis was really with the assumption in my mind that in practice the full OSM data set of highway features will end up being needed, not just the small proportion that have cycling tagging on them. |
Yes, but it's better to import the kitchen sink piece-by-piece rather than as an entire kitchen sink, taps and all. Incidentally this complete .osm file for Chapeltown Road was downloaded with osmdata. So yes it works best for our current use case and given the team's current skills at present to the best of my knowledge. |
My comment at basically shows what is needed. However, I'm not sure how to represent this as a CSV file, because for instance
is combinatorial so can't be presented as two columns. |
Please add more columns, e.g. key2, value2. Sounds promising, thanks for working on this. |
Closing as we've got good working code for processing key-value pairs now. |
No description provided.
The text was updated successfully, but these errors were encountered: