Uploaded image for project: 'Commons Geometry'
  1. Commons Geometry
  2. GEOMETRY-100

Invalid result for small spherical polygons

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • None
    • 1.0
    • None
    • None

    Description

      First test case: small spherical rectangle

      • Precision/Tolerance: EpsilonDoublePrecisionContext[epsilon= 1.5696101377226165E-12]
      • Spherical polygon/rectangle vertices: [(5.050647792392463, 0.8263048984534946), (5.050644504477406, 0.8263064367456399), (5.050649564478115, 0.8263123289902004), (5.050652852378331, 0.8263107907013917)]

      Centroid:

      • Expected (approximately the average of vertices): (5.050648678475973, 0.8263086112510253)
      • Actual: (5.0506454742491504, 0.8263177505886343)
        The difference looks small, however, the actual result is outside the polygon.

      Area (size):

      • Expected: 2.0005645375711432E-11
      • Actual: 1.9971579945377016E-11

      Perimeter (boundary size):

      • Expected: 1.9679779440894825E-5
      • Actual: 1.96697104639384E-5

      Second test case: small circular (sphere) polygon

      • Precision/Tolerance: EpsilonDoublePrecisionContext[epsilon= 1.5696101377226165E-12]
      • Circle discretized with 100 vertices: center: (0.5410520681182421, 1.3962634015954636), radius: 4.784171699778536E-8

      Centroid:

      • Expected (approximately circle center): (0.5410520681182421, 1.3962634015954636)
      • Actual: null

      Area (size):

      • Expected: 7.181590857887451E-15
      • Actual: 0.0

      Perimeter (boundary size):

      • Expected: 3.0054894917112657E-7
      • Actual: 3.005489492811408E-7

      Attachments

        Activity

          People

            Unassigned Unassigned
            balsingh Baljit Singh
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: