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

GeoArea failure with degenerated latitude

Details

    • Bug
    • Status: Reopened
    • Major
    • Resolution: Fixed
    • None
    • 9.2
    • modules/spatial3d
    • None
    • New

    Description

      I hit a failure when trying to build a GeoArea using the GeoAreaFactory. The issue seems to happen when you have an almost degenerated minLatitude and maxLatitude and you are close to the poles. Then you might hit the following exception"

      java.lang.IllegalArgumentException: Cannot determine sidedness because check point is on plane.
      	at __randomizedtesting.SeedInfo.seed([EA56BB13E754A996:C7560EE2BA56A507]:0)
      	at org.apache.lucene.spatial3d.geom.SidedPlane.<init>(SidedPlane.java:137)
      	at org.apache.lucene.spatial3d.geom.GeoDegenerateVerticalLine.<init>(GeoDegenerateVerticalLine.java:110)
      	at org.apache.lucene.spatial3d.geom.GeoBBoxFactory.makeGeoBBox(GeoBBoxFactory.java:100)
      	at org.apache.lucene.spatial3d.geom.GeoAreaFactory.makeGeoArea(GeoAreaFactory.java:43)
      

      The situation is easy to reproduce with the following test:

        public void testBBoxRandomDegenerate() {
          double minX = Geo3DUtil.fromDegrees(GeoTestUtil.nextLongitude());;
          double maxX = Math.nextUp(minX + Vector.MINIMUM_ANGULAR_RESOLUTION);
          double minY = Geo3DUtil.fromDegrees(GeoTestUtil.nextLatitude());
          double maxY = Math.nextUp(minY + Vector.MINIMUM_ANGULAR_RESOLUTION);
          assertNotNull(GeoAreaFactory.makeGeoArea(PlanetModel.SPHERE, maxY, minY, minX, maxX));
        }
      

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1.5h
                1.5h