OSM data has way with "road_access": "private" but after import routing graph shows it as "yes"

I have a pretty simple question about road_access. My OSM data shows a way with “other_tags” where “road_access” is “private”. Yet when I import and start the server (version 10.0|2024-08-28T02:09:14Z (9,23,7,5,2,9)) locally and view the routing graph, the way shows up as “road_access”: “yes” and car_access/bike_access as “true”. Looking at the source code I imagined that this sort of a way would automatically and by default get “road_access”: “private”. I would like (for now at least) that private roads would block both bicycle and car. I thought this was the default.

I am using the Docker image of Graphhopper from GitHub - IsraelHikingMap/graphhopper-docker-image-push: Scripts to create and upload a docker image of graphhopper for running GH.

I’m not sure what you mean. There is no road_access tag in OSM.

Oh no, I guess it is “access”… I get so confused reading the source code, I’m afraid. I was looking at this: graphhopper/core/src/main/java/com/graphhopper/routing/ev/RoadAccess.java at master · graphhopper/graphhopper (github.com).

I suppose it is mentally mapping encoded values (like “road_access”) to OSM tags (like “access”) which seems to get me every time.

I’ll change my code and report back. This looks like a developer error :slight_smile:

Yes, this can be a bit confusing. An OSM way tagged as access=private should yield GH edges with encoded values road_access=private and car_access=false indeed. The latter can be changed using the block_private=false configuration.

Please note that road_access is related to “car”. For other transportation modes there is this issue: Enum for foot, bike and psv access tags · Issue #2819 · graphhopper/graphhopper · GitHub

Thank you for the heads up about other profiles. Everything seems to work as expected by using the correct OSM tag (“access”).

Regarding documentation, it would be marvelous to have a mapping table between OSM tags and different things in GH, e.g. which map to encoded values and in what way, and so on.

I tried something like this but this will be hard to maintain up to date: Add to Taginfo Projects · Issue #2715 · graphhopper/graphhopper · GitHub

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.