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

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 7.6, 8.0
    • 7.6, 8.0
    • modules/sandbox
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: