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

polygon constructor can't reliably find a point inside the polygon

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 6.7, 7.3, 8.0
    • modules/spatial3d
    • None
    • New

    Description

      The polygon factory uses a randomize algorithm to find a point inside of the polygon. This might fail, in particular when polygons are very small. I want to propose a small improvement; Before going into the randomize algorithm, we can first try to try a point defined by the center of mass of the provided points. This approach improves things, for example for very small polygons with three points.

       

      does it make sense?

      Attachments

        1. LUCENE-8139.patch
          2 kB
          Ignacio Vera

        Issue Links

          Activity

            People

              kwright@metacarta.com Karl Wright
              ivera Ignacio Vera
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: