Open ChristopherChudzicki opened 3 years ago
I looked into the cause a bit. As best I can tell, what's happening is:
splitter
point is truncated to 7 decimalsrbush.tree
without truncation.This seems like it could be an issue with very slightly sloped lines, too.
One idea for fixing : Just truncate the line segments that are loaded into rbush. One potential downside to this is that currently the LineString vertices returned by lineSplit
exactly match the original geometry except at the split points. Truncating the segments into rbush might mean the new vertices are not exactly equal to the old vertices. I dunno how big a deal that is. My understanding is that GeoJSON does not specify a standard precision, but recommends 6 decimals. So maybe it's ok.
Turf Version:
6.3.0
lineSplit
does not split horizontal lines whose latitudes have more than 7 decimal places.For example, the test below fails