adds a new trait LineStringSegmentizeHaversine to segment a linestring using haversine distance instead of euclidean distance
this gives downstream users an option to segment linestrings on geographic as well as projected coordinates
fixes a bug in LineStringSegmentize where n - 1 linestrings were created for very small distances
this was caused by precision in the 6-ish decimal place. It was fixed by subtracting f64::EPSILON from the calculated segment length that is passed to densify()
turns the segmentize implementation into a macro.
the benefit of this is that segmentize for haversine does not need to duplicate code and other future implementations (hopefully geodesic) will not need more than a Densify and Length trait of the same type.
[x] I added an entry to
CHANGES.md
if knowledge of this change could be valuable to users.Supercedes https://github.com/georust/geo/pull/1106.
This PR:
LineStringSegmentizeHaversine
to segment a linestring using haversine distance instead of euclidean distanceLineStringSegmentize
wheren - 1
linestrings were created for very small distancesf64::EPSILON
from the calculated segment length that is passed todensify()