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

Add a Geo3d shape that models an exact circle, even when the planet model is not a sphere

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 6.7, 7.1, 8.0
    • modules/spatial3d
    • None
    • New

    Description

      Hi Karl wright,

      How circles are currently build do not behave very well when the planet model is not an sphere. when you are close to the border in WGS84 you might get false positves or false negatives when checking if a point is WITHIN. I think the reason is how the points to generate the circle plane are generated which assumes a sphere.

      My proposal is the following:

      Add a new method to PlanetModel:

      public GeoPoint pointOnBearing(GeoPoint from, double dist, double bearing);

      Which uses and algorithm that takes into account that the planet might not be spherical. For example Vincenty's formulae (https://en.wikipedia.org/wiki/Vincenty%27s_formulae).

      Use this method to generate the points for the circle plane. My experiments shows that this approach removes false negatives in WGS84 meanwhile it works nicely in the Sphere.

      Does it make sense?

      Attachments

        1. circle.jpg
          3 kB
          Ignacio Vera
        2. LUCENE_7970.patch
          15 kB
          Ignacio Vera
        3. LUCENE-7970_testBearingPoint.patch
          4 kB
          Ignacio Vera
        4. LUCENE-7970.patch
          1 kB
          Ignacio Vera
        5. LUCENE-7970-exact.diff
          20 kB
          Karl Wright
        6. LUCENE-7970-generator.patch
          4 kB
          Ignacio Vera
        7. LUCENE-7970-proposed.patch
          5 kB
          Ignacio Vera

        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: