Yes, in fact, any way with footway=* set to anything will already have highway=footway, so you’re already including all of them by looking for highway=footway. You’d still need to look for sidewalk=* explicitly because those are tagged on roadways, such as highway=residential.
Some assorted notes:
-
sidewalk=separate just means there’s a highway=footway footway=sidewalk way has already been mapped beside the roadway, so you don’t need to count sidewalk=separate. In your query, this can look like way["sidewalk"]["sidewalk"!="separate"].
-
An alternative syntax is sidewalk:both=yes, sidewalk:left=yes, or sidewalk:right=yes. You might need to include those tags for an accurate count.
-
Some highway=pedestrian ways might actually be areas representing pedestrian malls or plazas. You’d detect them by area=yes. The “length” of these areas would be their perimeters. But typically a highway=footway way has been mapped redundantly through any plaza, and possibly any mall, for routing purposes, so you might be able to ignore them. In a typical U.S. city, these would be a small fraction of the walkable paths anyways.
1 Like