3

I have a web map that is using the pedestrian routing from Mapbox's directions API. However, users have seen very long circuitous paths in certain locations because it appears that sidewalks (and/or foot access being allowed) are missing in the underlying OSM data. Is there an easy way to identify these gaps to fix within a major a city? Is there a way to query Overpass-Turbo to display roads/streets that have access:foot=not specified (or access, not food)?

Update
According to Mapbox

The Directions API (Walking profile) allows routing via all roads except:

  • motorways
  • trunk roads
  • all other roads where the value of either the 'foot' or the 'access' tag is set to any of 'no', 'private', 'agricultural', or 'forestry'

Roads other than motorways and trunk roads not having a 'footway', 'foot', or 'sidewalk' tag associated do not hinder routing as by default these routes are assumed to be accessible by pedestrians.

7
  • Are Mapbox's tools using streets tagged with sidewalks present or using sidewalk lines in OSM? Feb 19 '16 at 20:52
  • @mapBaker, unclear. The problem I discovered was with a street without tagged sidewalks and no sidewalk lines.
    – raphael
    Feb 19 '16 at 20:59
  • It seems Mapbox is specifically using whether allowed access is enabled for foot
    – raphael
    Feb 19 '16 at 21:11
  • if you can find where that tag lies in the OSM data, ie 'access = foot' or something, you can query the data for records where that is missing... Feb 19 '16 at 21:12
  • Read the OSM wiki page about sidewalks. The correct tags are sidewalk=* and highway=footway with footway=sidewalk. However there is no easy way to check this programatically since sidewalks can be either mapped separately or via the sidewalk tag on existing roads.
    – scai
    Feb 19 '16 at 23:14
2

There is an online tool called "OSM Quality Assurance Editor" which queries Overpass API for highways without sidewalk (smoothness, incline, or surface) tags. It was originally developed for improving wheelchair routing. You can log-in with your OSM account using iD or JOSM editor and start improving the map.

1
  • Would this only help if the sidewalks were a tag on the highway and not if the sidewalks were separate entities? Jan 17 at 15:26
2

One option might be to do the same routing using the Street data and then compare the paths, once diverged a given amount flag it so it can be fixed?

This would be computationally expensive though as you're going to be comparing lots of distances between two set line segments.

You'll need some way of having the path identified to be looked at though unless you want to run checks for every line segment in the city/bounding box.

Really crappy Pseudo code:

GET path_start 
GET path_end 
SET ped_path[] = pedestrian_path(path_start,path_end)
SET car_path[] = car_path(path_start,path_end)
SET X = NUM_OF_POINTS_TO_TRAIN_AVG_OFFSET
FOR(count = 0; count <= X; count++)
  TOTAL_OFFSET = distance_apart(car_path[count],ped_path[count])
END FOR
SET AVG_OFFSET = TOTAL_OFFSET / X
SET OFFSET_TOLERANCE = 1.5 //OR whatever you want
SET NO_SIDEWALK_MODE = FALSE
SET no_sidewalks = new Path[]
FOR(i = 0; i <= car_path.length; i++)
  SET CLOSEST_PED_POINT = getClosestPoint(car_path[i],ped_path)
  IF distance_apart(CLOSEST_PED_POINT,car_path[i]) > OFFSET_TOLERANCE * AVG_OFFSET) THEN
    IF(NO_SIDEWALK_MODE) THEN
      no_sidewalk_temp_path.AddPoint(car_path[i])
    ELSE
      SET NO_SIDEWALK_MODE = TRUE
      no_sidewalk_temp_path.AddPoint(car_path[i])
    END IF
  ELSE
    IF(NO_SIDEWALK_MODE) THEN
      SET NO_SIDEWALK_MODE = FALSE
      no_sidewalk_temp_path.AddPoint(car_path[i])
      no_sidewalks.AddPath(no_sidewalk_temp_path)
      no_sidewalk_temp_path = new Point[]
    END IF
  END IF
END FOR
1

I created a pretty good "missing sidewalk map" for the City of Bloomington, Indiana. In this case they had performed a LIDAR scan of every City street and had a complete map of all the sidewalks. The sidewalk map data I had was not tags on the street network map, but a completely separate data layer.

I imported both the street network map and the sidewalk map into QGIS. The idea was that I wanted to subtract the streets with sidewalks from the street network map, leaving only the streets with no sidewalks.

To do that, I used "Vector: Geoprocessing Tools: Buffer" to buffer out the sidewalk map 50 feet (after converting feet into degrees). The goal was to make the "sidewalk" sections wide enough to cover the adjacent street.

Then I used "Vector: Geoprocessing Tools: Difference" with the street layer as the input and the buffered sidewalk overlayer as the overlay layer.

This produced the "Difference" layer containing the street network with missing sidewalks. The result was not super "clean". There were flecks of road network here and there. However, the result was accurate enough for my needs.

I made a screencast that walks through the steps:

https://www.youtube.com/watch?v=gkKpp8nzCSA&feature=youtu.be

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.