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

Ignacio Vera commented on LUCENE-8281:
--------------------------------------

This might be useful and it is something I noticed when developing the random 
test. If I construct the testpoint2 in the following way:
{code:java}
// Pick the antipodes for testPoint2
GeoPoint p = new GeoPoint(-testPoint.x, -testPoint.y, -testPoint.z);
this.testPoint2 = new GeoPoint(planetModel, p.getLatitude(), 
p.getLongitude());{code}
Then we get:
{code:java}
Finding whether 
[-1.0011188539790565,-5.132245021424039E-6,-7.291706183250981E-7] is in-set, 
based on travel from [X=1.0011188539790565, Y=5.132245021274452E-6, 
Z=-7.291706183250981E-7] along [A=0.0, B=0.0; C=1.0; D=7.291706183250981E-7] 
(value=-7.291706183250981E-7)
 Constructing sector linear crossing edge iterator
 Edge [[lat=7.4E-323, lon=0.0([X=1.0011188539924791, Y=0.0, Z=7.4E-323])] --> 
[lat=-1.2617196632339242E-5, lon=-1.5701544210600105E-5([X=1.001118853788849, 
Y=-1.5719111944122703E-5, Z=-1.2631313432823315E-5])]] potentially crosses 
travel plane [A=0.0, B=0.0; C=1.0; D=7.291706183250981E-7]
  There were intersection points!
 Edge [[lat=7.4E-323, lon=0.0([X=1.0011188539924791, Y=0.0, Z=7.4E-323])] --> 
[lat=-1.2617196632339242E-5, lon=-1.5701544210600105E-5([X=1.001118853788849, 
Y=-1.5719111944122703E-5, Z=-1.2631313432823315E-5])]] intersects travel plane 
[A=0.0, B=0.0; C=1.0; D=7.291706183250981E-7]
 Edge [[lat=-2.8213942160840002E-6, 
lon=1.608008770581648E-5([X=1.0011188538590383, Y=1.60980789753873E-5, 
Z=-2.8245509442632E-6])] --> [lat=3.8977187534179774E-6, 
lon=1.9713406091526057E-5([X=1.0011188537902969, Y=1.9735462513207743E-5, 
Z=3.902079731596721E-6])]] potentially crosses travel plane [A=0.0, B=0.0; 
C=1.0; D=7.291706183250981E-7]
  There are no intersection points within bounds.
   Endpoint(s) of edge are not on travel plane
 Check point in set? false{code}
Which is the right answer. Looking at the differences:
{code:java}
Case 1) Failing
test point2 ([X=-1.0011188539790565, Y=-5.132245021274452E-6, 
Z=-7.291706183250981E-7]):

Constructing sector linear crossing edge iterator with bounds:
  bound1:[A=5.126509205983227E-6, B=-0.9999999999868595, C=0.0, D=0.0, 
side=-1.0]
  bound2:[A=-5.126509205983227E-6, B=0.9999999999868595, C=0.0, D=0.0, 
side=-1.0]

Case 2) Success
test point2 ([lat=-7.283556946482617E-7, 
lon=-3.141587527080587([X=-1.0011188539790565, Y=-5.132245021424039E-6, 
Z=-7.291706183250981E-7])]):

Constructing sector linear crossing edge iterator with bounds:
  bound1:[A=7.283556946481974E-7, B=0.0, C=-0.9999999999997348, D=0.0, 
side=-1.0]
  bound2:[A=4.983019447078322E-6, B=0.0, C=-0.9999999999875847, D=0.0, 
side=1.0]{code}
 

So clearly bounds for the iterator are totally messed up.

 

> Random polygon test failures
> ----------------------------
>
>                 Key: LUCENE-8281
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8281
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/spatial3d
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>            Priority: Major
>         Attachments: LUCENE-8281-debugging.patch, LUCENE-8281.jpg
>
>
> Reproduce here:
> {code}
> ant test  -Dtestcase=RandomGeoPolygonTest 
> -Dtests.method=testCompareSmallPolygons -Dtests.seed=42573983280EE568 
> -Dtests.multiplier=3 -Dtests.slow=true -Dtests.locale=jmc-TZ 
> -Dtests.timezone=US/Alaska -Dtests.asserts=true -Dtests.file.encoding=US-ASCII
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to