Regarding node tags

Hello everyone,

It seems that, the node tags are handled for barrier only.

Could you please explain to me how the below tags are being used in the code. Are those tags create any impact on the edge weight.

tag k=“crossing” v=“uncontrolled”
tag k=“crossing_ref” v=“zebra”
tag k=“highway” v=“crossing”

tag k=“highway” v=“motorway_junction”

tag k=“highway” v=“turning_circle”

tag k=‘highway’ v=‘stop’

Is there any code which adds more penalty to the edges if the via node is Junction node or have the above tags associated with the node.

Manoj Kumar

Those node tags are not used and currently we only use barrier nodes.

Thank you for the response :slightly_smiling_face:.

Mostly the tags like traffic signals, stop sign, turning circle, crossing etc., are associated with the junction nodes. When the vehicle is approaching towards such junction nodes, the speed automatically gets reduced. Is the current version of Graph Hopper handling such use cases. If yes, could you please let me know how it is being handled.

If not, could you please suggest me the possible way to implement penalty on the edges which are approaching those junction nodes.

Right now, I am thinking of reducing the speed of vehicles in the handleWayTags() of OSMParser
when the addEdge() operation is being performed. But I am struggling to get the sense of direction; if the vehicle is moving towards Junction node having those tags, the edge weight should be impacted but not the other way around. Could you please confirm me whether I am going in the right direction or not

Manoj Kumar

Hi @karussell or @easbar

Could you please answer the above query.

Appreciate the efforts you put in developing such a amazing product!!

the tags like traffic signals, stop sign, turning circle, crossing etc., are associated with the junction nodes.

None of these are used to modify the speed currently. Turning times at a junction would probably be best implemented via turn costs. You can obtain all node tags for each way in the addEdge by calling way.getTag("node_tags").

Thanks @easbar for the quick response.

But the turn costs relations are not defined for every junction in the OSM data. I think the turn costs relations are there when there is a restriction (No_Right_Turn) to be there on the turn.

I am not sure about it, could you please help me whether my understanding is correct or not


Yes, that is correct. But I did not mean to use turn costs from OSM, but rather set turn costs on the routing graph (you can do this for every turn) wherever you think one needs to slow down (judging from traffic_signal etc. tags).

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