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

Ignacio Vera commented on LUCENE-8063:
--------------------------------------

I think there is only one case where the test is flawed. If the original shape 
is the whole world then the relationship will be OVERLAPS as the relationship 
between the world with itself is OVERLAPS. 

{code}
@Override
  public int getRelationship(final GeoShape path) {
    if (path.getEdgePoints().length > 0)
      // Path is always within the world
      return WITHIN;

    return OVERLAPS;
  }
{code}

In any other case, I beleive it is guaranteed that relationship will be WITHIN. 


> Polygons with holes don't compute bounds properly in certain situations
> -----------------------------------------------------------------------
>
>                 Key: LUCENE-8063
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8063
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/spatial3d
>            Reporter: Ignacio Vera
>            Assignee: Karl Wright
>            Priority: Minor
>         Attachments: LUCENE_8063_fix.patch, LUCENE_8063_test.patch
>
>
> Hi [~daddywri],
> I thought it would be useful to create a random test for bounds. The test 
> have shown problems with polygon with holes. In this ticket I will submit a 
> random test for bounds and propose a fix for bounds for polygons.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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

Reply via email to