Skip to content

Calculation of centroid for locations near the 180th meridian (antimeridian) is incorrect #15

@sergeykad

Description

@sergeykad

The centroid calculation, which simply averages latitude and longitude values, is accurate in most cases, but produces incorrect results near the 180th meridian. For example, with longitudes 179.649556 and -176.131694, the calculation is as follows:

(179.649556 - 176.131694) / 2 = 1.758931

As can be seen, the example produces results in the opposite hemisphere.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions