Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-8549

Tessellator should throw an error if all points were not processed

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 7.6, 8.0
    • Fix Version/s: 7.6, 8.0
    • Component/s: modules/sandbox
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      Currently, the tessellation in some situations when it has not successfully process all points in the polygon, it will still return an incomplete/wrong tessellation. 

      For example the following code:

      public void testInvalidPolygon()  throws Exception {
        String wkt = "POLYGON((0 0, 1 1, 0 1, 1 0, 0 0))";
        Polygon polygon = (Polygon)SimpleWKTShapeParser.parse(wkt);
        expectThrows( IllegalArgumentException.class, () -> {Tessellator.tessellate(polygon); });
      }

      will fail as the tessellator return a wrong tessellation containing one triangle.

        Attachments

        1. LUCENE-8549.patch
          2 kB
          Ignacio Vera

          Activity

            People

            • Assignee:
              ivera Ignacio Vera
              Reporter:
              ivera Ignacio Vera
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: