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

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

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          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:

              Slack

                Issue deployment