Skip to content

Exclude ways with access=private or have access=no and do no explicitly allow bicycles#847

Merged
kodiakhq[bot] merged 3 commits into
PeopleForBikes:mainfrom
mitchellhenke:origin/exclude-access-no-ways
May 28, 2025
Merged

Exclude ways with access=private or have access=no and do no explicitly allow bicycles#847
kodiakhq[bot] merged 3 commits into
PeopleForBikes:mainfrom
mitchellhenke:origin/exclude-access-no-ways

Conversation

@mitchellhenke

Copy link
Copy Markdown
Contributor

Pull-Request

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to
    change)
  • Code cleanup / Refactoring
  • Documentation
  • Infrastructure and automation

Description

This change proposes adding additional exclusions for ways that have access=no or access=private to close #840. The exclusion exists for footways currently, but not other ways. I think it's probably correct and minimally impactful to add the exclusion to every case.

In running analysis for Madison, WI after applying this patch, the private path (1309414435) that was part of the report in #840 is shown crudely highlighted is now not part of the network as expected:

image

Checklist

  • I have updated the documentation accordingly
  • I have updated the Changelog (if applicable)

Fixes: #840

@pull-request-size pull-request-size Bot added the size/S Small (10-29 lines of changes) label Apr 19, 2025
@mitchellhenke mitchellhenke force-pushed the origin/exclude-access-no-ways branch from 6896e95 to c32fb08 Compare April 23, 2025 16:11
@rgreinho rgreinho added this to the 2.6.0 - refinement milestone Apr 24, 2025
@rgreinho rgreinho requested a review from lalver1 April 28, 2025 13:57
@rgreinho

rgreinho commented Apr 30, 2025

Copy link
Copy Markdown
Member

I am a bit wary of using access=no as I discovered this while working with OSNMX:

Filter for the OSM “access” tag. Default is [“access”!~”private”]. Note that also filtering out access=no ways prevents including transit-only bridges (e.g., Tilikum Crossing) from appearing in drivable road network (e.g., [“access”!~”private|no”]). However, some drivable tollroads have access=no plus a access:conditional tag to clarify when it is accessible, so we can’t filter out all access=no ways by default. Best to be permissive here then remove complicated combinations of tags programmatically after the full graph is downloaded and constructed.

source: https://osmnx.readthedocs.io/en/stable/user-reference.html#osmnx.graph.graph_from_place, for the default_access: str argument

Shall we just filter with access=private then? This sounds reasonable to me. But maybe finding a slightly more complex logic, as OSMNX recommends, may provides better results? 🤔

@vgXhc

vgXhc commented Apr 30, 2025

Copy link
Copy Markdown

Seems like the Tillikum crossing example isn't really relevant. The bike paths are mapped as separate ways, and the transit portion of the bridge shouldn't show up in the "drivable road network" nor in the BNA. I'm not sure about the toll roads.

There's probably more merit to account for cases when people tag access=no (or private) and then add bicycle=yes (or permissive/dedicated/whatever) to tag a bike-only or bike/ped-only way. This is not uncommon So filtering only by access=no is probably too coarse. It'd be something like access=no AND !bicycle=(yes|permissive|designated)?

@mitchellhenke mitchellhenke force-pushed the origin/exclude-access-no-ways branch from c32fb08 to cf71131 Compare May 2, 2025 22:33
@pull-request-size pull-request-size Bot added size/M Medium (30-99 lines of changes) and removed size/S Small (10-29 lines of changes) labels May 2, 2025
@mitchellhenke

mitchellhenke commented May 3, 2025

Copy link
Copy Markdown
Contributor Author

Based on the above, I've added a commit so that the following ways are included:

  • access is not defined
  • access is not private or no
  • access is no and bicycle=(yes|permissive|designated)

As an overpass query, it would be something like:

way[!"access"];
way["access"!="private"];
way["access"="no"]["bicycle"~"permitted|designated|yes"];

The (fixed) inverse query of ways that would be excluded:

way["access"="private"];
way["access"="no"]["bicycle"!~"permitted|designated|yes"];

@vgXhc

vgXhc commented May 3, 2025

Copy link
Copy Markdown

I think the overpass link for the inverse query got messed up. Here's what I think is the correct one. https://overpass-turbo.eu/s/23po

I took a quick look at what would be excluded in my area and it correctly removes the way that prompted the initial bug report. Other removals all seem to be correct -- I didn't see many false positives, and those were based on incorrect/dubious tagging. Most of the true negatives probably would have previously made it into the analysis as low stress -- stuff like highway=service service=driveway with an explicit access=no and the like. So I think this is good!

@rgreinho rgreinho removed this from the 2.6.0 - refinement milestone May 3, 2025
@mitchellhenke mitchellhenke changed the title Exclude all ways with access no/private Exclude ways with access=private or have access=no and do no explicitly allow bicycles May 10, 2025
@mitchellhenke mitchellhenke force-pushed the origin/exclude-access-no-ways branch from cf71131 to 5a621ce Compare May 10, 2025 15:48
@lalver1

lalver1 commented May 17, 2025

Copy link
Copy Markdown
Contributor

We went over these changes and they make a lot of sense, thanks! We'll approve this PR soon to get it merged, we just want to make sure that the documentation on our end is updated (if needed) and that this change does not conflict with anything else in the methodology.

@mitchellhenke

Copy link
Copy Markdown
Contributor Author

Thank you! If there's anything else I can update for this, just let me know.

@mitchellhenke mitchellhenke force-pushed the origin/exclude-access-no-ways branch from 5a621ce to 2c3fb21 Compare May 23, 2025 15:21

@lalver1 lalver1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@kodiakhq kodiakhq Bot merged commit ecfd7eb into PeopleForBikes:main May 28, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Medium (30-99 lines of changes)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add checks for access tags for all ways

4 participants