@turf/unkink-polygon unkinking polygons with lots of points results in stack overflow
2chen opened this issue · comments
2chen commented
version: 6.50
-
we have a polygon that looks something like:
{ type: "polygon", coordinates: [ Array(93031), Array(383), Array(79) ] }
-
calling unkinkPolygon on it results in
RangeError: Maximum call stack size exceeded
-
the relevant error is being thrown in this line:
-
the underlying issue comes from trying to call
Array.push.apply
(or callingapply
on any function) with a huge list of arguments (see https://stackoverflow.com/questions/22123769/rangeerror-maximum-call-stack-size-exceeded-why)