You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Turn restrictions don't work with negative ids #1222
Today I created a turn restriction using JOSM but GH (0.9) just ignored it. I double and triple checked everything, but the OSM tags where correct. After spending many hours I eventually found the cause: negative IDs. I'm not sure whether it was the node, ways or relation IDs. But after I replaced all negative IDs in the OSM files with positive ones, the restiction suddenly worked like a charm. I reproduced this many times. Existing restrictions (thus positive ids) work, newly created in Josm (thus negative ids) don't.
Unfortunately I have no Java experience so I can't provide any test code or the like, but I hope someone can confirm this issue.
We fixed this by not allowing negative OSM ids in the imported OSM file anymore (#2652). Negative ids are still used internally to create artificial edges that replace barrier nodes.
Activity
karussell commentedon Nov 16, 2017
Ah, ok. We had problems before with this #42 and must be fixed, so thanks for reporting!
mmuelder commentedon Nov 16, 2017
FYI:
Removing
if (fromWayID >= 0 && toWayID >= 0 && viaNodeID >= 0) {from OSMReader.java:849
and
&& wayId >= 0from OSMTurnRelation.java:92
makes it work. However, I have no idea what the collateral damage is ;-)
easbar commentedon Aug 30, 2022
We fixed this by not allowing negative OSM ids in the imported OSM file anymore (#2652). Negative ids are still used internally to create artificial edges that replace barrier nodes.