Returns a list of points that is equivalent to the input list, but with longitude values adjusted to ensure that
adjacent elements are "connected".
Two points are "connected" if the absolute difference of their
LatLonPointImpl#lonNormal is
≤180. For example, the longitudes
112 and
124 are connected. So are
15 and
-27.
Two points may be "disconnected" if they lie on opposite sides of the international date line. For example,
the longitudes
175 and
-175 are disconnected because their absolute difference is
350,
which is
>180. To connect the two points, we adjust the second longitude to an equivalent value
in the range
[firstLon ± 180] by adding or subtracting
360. So,
-175 would become
185. We perform this adjustment for each pair of adjacent elements in the list.
Performing the above adjustment will result in longitudes that lie outside of the normalized range of
(
[-180, 180]). To be precise, if adjustments are necessary, all of the longitudes in the returned list
will be in either
[-360, 0] or
[0, 360]. Consequently, adjusted points cannot be returned as
LatLonPoints; they are returned as
LatLonPointNoNormalize objects instead.
Longitudes
lon1 and
lon2 are considered equivalent if
lon1 == lon2 + 360 * i, for some
integer
i.