The nodes.sort() statement caused some trouble in older browsers
such as (FF 20, Chromium 25). Also, the straighten action should
conserve node order. Thus, the sorting made the test weaker than
it had to be.
This just removes the unnecessary sorting.
iD.geo.euclideanDistance should only be used for calculations of
projected coordinates or display (pixel) coordinates.
iD.geo.sphericalDistance calculates approximate geographical
distances, accounting for distortions at higher latitudes. This
can be used for determining the nearest node (operations.Delete,
actions.Circularize) or relative length comparisons (actions.Split).
if a way is closed, iD needs to choose a second node to
split the way at.
This algorithm looks for a node that is both far away from
the initial node in terms of way segment length and nearby
in terms of beeline-distance. This assures that areas get
split on the most "natural" points (independent of the number
of nodes).
For example: bone-shaped areas get split across their waist-
line, circles across the diameter.
Previously, adding a midpoint to an invalidly doubled-back
segment (aba) resulted in a self-intersection with an invalid
consecutive node (accba). Now a self-intersection is still
produced, but with only one c node (acba).
Refs #1296
Because the embedded iD does not show the account
UI, Connection#userDetails was not being called, so
the commit UI didn't show the user name and image.
Fixes#1464
* It shouldn't appear as a search result for simple areas.
* Changing to another area preset shouldn't remove the
type=multipolygon tag.
* It shouldn't be preferred to the Building preset, which
matches with score 0.5.
Fixes#1546.