There have been a few mentions/discussions of the query I use to collect the streets from Overpass API, so it seems like a good idea to open a thread that solely discusses this.
This Google Doc - CityStrides Street Query - contains a full list of road types and the full/explained query that CityStrides currently uses.
We can use this thread to discuss what should/shouldn’t be excluded in CityStrides or otherwise improve the query.
Good one putting in in this separate thread.I noticed after the osm refresh, that a lot of highways here have cycle = no, but not foot = no. That was a lot of manual work for me in OSM (And the changes should be apparent in the next OSM update in a few months) Maybe you could consider to put cycle = no in the excluding script part. Since a path allowed for cycling ==walking/running?
At least for the time being, if i am sure a node in citystrides is private, not correct or whatever reason not to run as a citystreet, i personally put them on manually completed after changing OSM itself. The manually completed streets on my name should go away after future updates.
In order to make this process a bit more systematic, I’ve taken the liberty to compile a list of all possible highway and access values. I have also included a column indicating whether or not they should be excluded from the query.
It would be great if someone could have a look and check if I missed (or wrongly included) anything that should be excluded. The sheet is here, please add a comment if you edit anything, thanks!
I added the file to My Drive, then changed the name to “CityStrides Street Query” & tightened up the columns/rows. I’ve also added another Sheet with the full query, including comments on what each line does - this way we can collectively improve it.
Are those changes visible to you? I want to make sure I didn’t fork this into a private file…
happy to help, and yes, I can see your changes just fine
I have no knowledge of ruby on rails so apologies in advance if this is a stupid question, but I was wondering if it would make a difference in speed to make the ‘positive’ query, since there are more highway values to ignore than there are to keep.
I’ll have to figure out how to build that query. Maybe something that builds from:
['highway']
['highway' == 'primary']
This is all Overpass API stuff - the only Rails-specific code is the #{area_id + 3600000000} piece that generates the correct Overpass Area ID from the OSM Relation ID that I store locally.
I included a pile of links in the Overpass Query sheet in your doc.
I would consider adding [‘service’ !~ ‘drive-through’] to the list. I have several Dunkin’ Donuts, Burger King, or other food drive-thrus showing up as streets in CityStrides.
I’m surprised that your local Dunkin’ drive-through actually got a name= tag…
But yes, I quite agree. Re-reading the OSM docs, I might even go one step further and do the cleaner thing which is to eliminate anything with “highway=service”
@zelonewolf Any advice on how we could block plazas from import?
They are defined by highway = pedestrian and area = yes, which appears correct per the pedestrian tag notes.
Seems like blocking either of those tags independently might be an issue.
As far as I can tell, there is no need to include highway=bus_stop. Even if there is a road, the bus stop is never part of the road. There are always extra nodes for the stop. So we wouldn’t exclude any actual streets.
Well observed! At the bus station, a lot of “streets” will suddenly disappear from CS.
To be completely honest, I still have an open question for @JamesChevalier though, because I had listed a few bus stops for myself that are no real streets, and when I now check in OSM, I notice they are not marked as bus stops but as platforms, and although [‘highway’ !~ ‘platform’] is already in the query, they exist in CS as streets. Why?
There are “streets” in CS that should not be streets and that will be eventually removed when you update CS.
At the bus station of my hometown, there are following streets in CS: Gate 07, Gate 08, Gate 15, Gate 16, Gate 17, Gate 18, Gate 19, Gate 20, Gate 25, Gate 26, Gate 27, Gate 28, Gate 29, Gate 30, Gate 31, Gate 32, Gate 33.
As you can guess, these are no real streets but platforms where the long distance buses stop.
@r.weide brought this up earlier. I am just supporting his idea, because I noticed a looot of bus stops in my city, that are “streets” or part of streets in CS.
@dbafounta: [‘highway’ !~ ‘bus_stop’] seems more general than [‘highway’ !~ ‘platform’] , as it includes the bus stops, that do not have a platform. The platform then is added with public_transport=platform, if there is one.