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

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.7, 7.3, 8.0
    • Component/s: modules/spatial3d
    • Labels:
      None
    • Lucene Fields:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: