Cleancoords on edge case lineString results in 'invalid polygon' error
Turf 6.5.0
turf.cleanCoords(turf.lineString([[0, 0], [0, 1], [0, 0]])) causes an invalid polygon error to occur though interestingly turf.lineString([[0, 0], [0, 1], [0, 0]]) is just fine.
Expecting the output to be {"type":"Feature","properties":{},"geometry":{"type":"LineString","coordinates":[[0,0],[0,1]]}} as there is no point in a lineString which goes to a location and returns on exactly the same path?
Another example that can trigger the invalid polygon error: turf.cleanCoords(turf.lineString([[0, 0], [0, 0], [0, 2], [0,2], [0, 0]]))
Hi. I am facing the same issue. The code of cleanCoords has been fixed in august 2021, but [email protected] has been generated in july 2021. Is there a plan to generate a new version of turf that would include this fixed code?