Skip to content

VincentyGeodesy.distanceInMeters works incorrectly if one of the points is either South or North pole #66

@satorg

Description

@satorg

Example (all results in meters are converted into kilometers for convenience):

VincentyGeodesy.distanceInMeters(new WGS84Point(90, 0), new WGS84Point(89, 0)) / 1000.0
  results to 19892.237593638412

whereas

VincentyGeodesy.distanceInMeters(new WGS84Point(-90, 0), new WGS84Point(89, 0)) / 1000.0
  results to 111.69386491426172

which is apparently incorrect.

Note that for a point that is off the pole just a fraction of a degree, the algorithm seems working correctly (or at least plausible):

VincentyGeodesy.distanceInMeters(new WGS84Point(89.9999, 0), new WGS84Point(89, 0)) / 1000.0
  results to 111.6826955163081

VincentyGeodesy.distanceInMeters(new WGS84Point(-89.9999, 0), new WGS84Point(89, 0)) / 1000.0
  results to 19892.22642424046

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions