2

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.

  • Are Mapbox's tools using streets tagged with sidewalks present or using sidewalk lines in OSM? – DPSSpatial 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... – DPSSpatial 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
1

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

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

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.