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

Ignacio Vera commented on LUCENE-9139:
--------------------------------------

You are totally right, my proposal does not solve the issue.

What I have done to check that lines do not intersects is to change the 
intersect logic to use BigDecimals instead of doubles. In that case lines do 
not intersect (and test don't fail for those seeds).

 

> TestXYMultiPolygonShapeQueries test failures
> --------------------------------------------
>
>                 Key: LUCENE-9139
>                 URL: https://issues.apache.org/jira/browse/LUCENE-9139
>             Project: Lucene - Core
>          Issue Type: Test
>            Reporter: Ignacio Vera
>            Priority: Major
>
> We recently have two failures on CI from the test method 
> TestXYMultiPolygonShapeQueries. The reproduction lines are:
>  
> {code:java}
> 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{code}
> {code:java}
> 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{code}
>  
> 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: 
> {code:java}
> double ax = 3.314395000050712E38;
> double ay = -1.4151510014141656E37;
> double bx = 3.4028234663852886E38;
> double by = 9.641030236797581E20;{code}
> Line 2:
> {code:java}
> double cx = 3.4028234663852886E38;
> double cy = -0.0;
> double dx = 3.4028234663852886E38;
> double dy = -2.7386422951137726E38;{code}
> 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.
>  
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to