turf icon indicating copy to clipboard operation
turf copied to clipboard

Along returns out of bounds coordinates when antimeridian crossed

Open dimon82 opened this issue 5 years ago • 2 comments

var line = turf.lineString([[-82.461, 35.3187], [144.985, -37.813]]);
var segment = turf.along(line, 1500);
console.log(segment.geometry.coordinates);

this outputs 262.6856469517484, 30.179864583770968

Because of this, when I do the LineString in MapBox between [-82.461, 35.3187] and 262.6856469517484, 30.179864583770968, it looks like this: image

Isn't it supposed to output -97.314353, 30.179864583770968 instead?

dimon82 avatar Oct 03 '19 00:10 dimon82

@dimon82 did you ever get some hint why this is? What was your solution?

matths avatar Dec 11 '23 13:12 matths