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

Karl Wright commented on LUCENE-7316:
-------------------------------------

The code looks for legality in the following way:

{code}
      // Look for coplanarity; abort if so
      for (int i = 0; i < points.size(); i++) {
        final GeoPoint start = points.get(i);
        final GeoPoint end = points.get(getLegalIndex(i + 1, points.size()));
        // We have to find the next point that is not on the plane between 
start and end.
        // If there is no such point, it's an error.
        final Plane planeToFind = new Plane(start, end);
        int endPointIndex = -1;
        for (int j = 0; j < points.size(); j++) {
          final int index = getLegalIndex(j + i + 2, points.size());
          if (!planeToFind.evaluateIsZero(points.get(index))) {
            endPointIndex = index;
            break;
          }
        }
        if (endPointIndex == -1) {
          return false;
        }
      }
{code}

This should have been sufficient to prevent the creation of the degenerate 
triangle we are seeing.  I will need to figure out why it didn't.


> Geo3d test failure
> ------------------
>
>                 Key: LUCENE-7316
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7316
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/spatial3d
>    Affects Versions: master (7.0)
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>         Attachments: LUCENE-7316.patch
>
>
> Reproducible on master with:
> {code}
> ant test  -Dtestcase=TestGeo3DPoint -Dtests.method=testGeo3DRelations 
> -Dtests.seed=EEA08DD7FAE3C688 -Dtests.multiplier=2 -Dtests.slow=true 
> -Dtests.directory=MMapDirectory -Dtests.locale=es 
> -Dtests.timezone=America/Manaus -Dtests.asserts=true 
> -Dtests.file.encoding=UTF-8
> {code}
> Note: I was initially unable to reproduce this, until I pulled up code that 
> [~mikemccand] recently committed.  It seems possible that encoding/decoding 
> changes are triggering it.  Of specific concern is the new way 
> maximum/minimum decoded values are computed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to