Uploaded image for project: 'Blazegraph (by SYSTAP)'
  1. Blazegraph (by SYSTAP)
  2. BLZG-9038

Distance calculation fails for small distances

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: BLAZEGRAPH_2_1_4
    • Fix Version/s: None
    • Component/s: Wikidata Query Service
    • Labels:
      None

      Description

      CoordinateUtility.distance function fails for points within meters of each other. E.g., two points:

      Point(-96.0775581 46.2830152)
      Point(-96.077558 46.283015)
      

      produce NaN as the result of CoordinateUtility.distance call. This seems to be because standard formula is not good for low distances - due to rounding errors in double expression under arccos gets > 1 and the whole thing becomes NaN. The suggestion is to use haversine formula instead, which seems to behave better with small distances.

        Attachments

          Activity

            People

            Assignee:
            bryanthompson bryanthompson
            Reporter:
            stasmalyshev stasmalyshev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: