Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-9139

TestXYMultiPolygonShapeQueries test failures

Details

    • Test
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None
    • New

    Description

      We recently have two failures on CI from the test method TestXYMultiPolygonShapeQueries. The reproduction lines are:

       

      ant test  -Dtestcase=TestXYMultiPolygonShapeQueries -Dtests.method=testRandomMedium -Dtests.seed=F1E142C2FBB612AF -Dtests.multiplier=3 -Dtests.slow=true -Dtests.badapples=true -Dtests.locale=el -Dtests.timezone=EST5EDT -Dtests.asserts=true -Dtests.file.encoding=US-ASCII
      ant test  -Dtestcase=TestXYMultiPolygonShapeQueries -Dtests.method=testRandomMedium -Dtests.seed=363603A0428EC788 -Dtests.multiplier=3 -Dtests.slow=true -Dtests.badapples=true -Dtests.locale=sv-SE -Dtests.timezone=America/Yakutat -Dtests.asserts=true -Dtests.file.encoding=UTF-8

       

      I dug into the failures and there seem to be due to numerical errors in the GeoUtils.orient method. The method is detecting intersections of two very long lines when it shouldn't. For example:

      Line 1: 

      double ax = 3.314395000050712E38;
      double ay = -1.4151510014141656E37;
      double bx = 3.4028234663852886E38;
      double by = 9.641030236797581E20;

      Line 2:

      double cx = 3.4028234663852886E38;
      double cy = -0.0;
      double dx = 3.4028234663852886E38;
      double dy = -2.7386422951137726E38;

      My proposal to prevent those numerical errors is to modify the shape generator to prevent creating shapes that expands more than half the float space.

       

       

       

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            ivera Ignacio Vera
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: