turf 7.1.0
In cases where the line is of zero length (start and end points the same) booleanPointOnLine incorrectly returns true for any other point on the same longitude.
const line = turf.lineString([[1, 1], [1, 1]]);
let pt;
pt = turf.point([2, 13]);
turf.booleanPointOnLine(pt, line);
//false, cool
pt = turf.point([1, 13]);
turf.booleanPointOnLine(pt, line);
// true, oh no
Technically (I guess?) this function should only return true if the three points - start, end, and point - are the same.
turf 7.1.0
In cases where the line is of zero length (start and end points the same) booleanPointOnLine incorrectly returns true for any other point on the same longitude.
Technically (I guess?) this function should only return true if the three points - start, end, and point - are the same.