You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Ignacio Vera (Jira)" <ji...@apache.org> on 2022/04/08 08:08:00 UTC

[jira] [Created] (LUCENE-10508) GeoArea failure with degenerated latitude

Ignacio Vera created LUCENE-10508:
-------------------------------------

             Summary: GeoArea failure with degenerated latitude
                 Key: LUCENE-10508
                 URL: https://issues.apache.org/jira/browse/LUCENE-10508
             Project: Lucene - Core
          Issue Type: Improvement
          Components: modules/spatial3d
            Reporter: Ignacio Vera


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"

{code}
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)
{code}


The situation is easy to reproduce with the following test:

{code:java}
  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));
  }
{code}




--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org