[ 
https://issues.apache.org/jira/browse/LUCENE-10508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17528552#comment-17528552
 ] 

ASF subversion and git services commented on LUCENE-10508:
----------------------------------------------------------

Commit 2b20b3f2ca03eaca97f30342aa63e3b019bdc0b6 in lucene's branch 
refs/heads/main from Ignacio Vera
[ https://gitbox.apache.org/repos/asf?p=lucene.git;h=2b20b3f2ca0 ]

LUCENE-10508: Fix error for rectangles with an extent close to 180 degrees 
(#824)

This commit  introduces a GeoWideRectangle.MIN_WIDE_EXTENT that takes into 
account the angular resolution 
in order to build a GeoWideRectangle.

> GeoArea failure with degenerated latitude
> -----------------------------------------
>
>                 Key: LUCENE-10508
>                 URL: https://issues.apache.org/jira/browse/LUCENE-10508
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/spatial3d
>            Reporter: Ignacio Vera
>            Assignee: Ignacio Vera
>            Priority: Major
>             Fix For: 9.2
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> 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.7#820007)

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

Reply via email to