Skip to content

Turn restrictions don't work with negative ids #1222

Closed

Description

@mmuelder

Greetings!

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.

Best
Marius

Activity

  1. karussell commented on Nov 16, 2017

    @karussell
    Member

    Ah, ok. We had problems before with this #42 and must be fixed, so thanks for reporting!

  2. mmuelder commented on Nov 16, 2017

    @mmuelder
    Author

    FYI:

    Removing
    if (fromWayID >= 0 && toWayID >= 0 && viaNodeID >= 0) {
    from OSMReader.java:849

    and

    && wayId >= 0
    from OSMTurnRelation.java:92

    makes it work. However, I have no idea what the collateral damage is ;-)

  3. easbar commented on Aug 30, 2022

    @easbar
    Member

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions