Skip to content

Distance of single edge restricted #435

Open

Description

@karussell

As the distance for every edge can be roughly max 1000km we have two OSM way where this is exceeded (ferries!) and we need to deal with this:

The problem is that we currently return Double.Infinity if Integer.max is reached but math operations with infinity can lead to NaN which makes nearly every operation with them invalid.

A quick workaround would be to use all 32 bits instead of only the positive range of int as it is currently done.

Activity

  1. zhiqiangZHAO commented on Jun 5, 2015

    @zhiqiangZHAO
    Contributor

    Since there are so rare, may be break them in osm?

  2. dos65 commented on Jun 5, 2015

    @dos65

    Also, there is possible to split them on reading process

  3. karussell commented on Jun 5, 2015

    @karussell
    MemberAuthor

    Yeah, good idea to split the edges in the import process.

  4. zhiqiangZHAO commented on Jun 5, 2015

    @zhiqiangZHAO
    Contributor

    hah, I am so lazy.

  5. karussell commented on Jun 6, 2015

    @karussell
    MemberAuthor

    Hmmh, such ferries should be normally tagged as route relationes i.e. the way should be splitted in OSM itself I think. As the wiki says: "The relation approach [...] is useful for very long ferry routes. The relation approach is standard across other types of transportation routes."

  6. karussell commented on Aug 10, 2015

    @karussell
    MemberAuthor

    Removing the bug label, as this is more an OSM issue. Still we need to think about if we should return a very large distance instead of infinity.

  7. added a commit that references this issue on Dec 1, 2015
  8. karussell commented on Dec 1, 2015

    @karussell
    MemberAuthor

    I included a workaround for this (no way splitting for now) as the work to do this splitting properly is not worth the effort (at least not at the current time). But at the same time it is critical to throw an exception in setDistance if the distance is too large.

  9. added this to the 0.6 milestone on Dec 1, 2015
  10. karussell commented on Jan 29, 2016

    @karussell
    MemberAuthor

    The problem is now that for CH preparation we set the distance and it can easily grow over int max for some shortcuts when processing world wide data.

    As a workaround we should just return max int. In the future we have to decide if we remove the distance data from the CH graph (then certain applications would slow down) or how we fix this properly. Maybe we should make the multiplication factor smaller?

  11. removed this from the 0.6 milestone on Jan 29, 2016
  12. easbar commented on Apr 1, 2019

    @easbar
    Member

    I think we should reduce the distance from currently mm to 0.1m.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions