You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Perhaps this is intentional, but if I have a LineString of, say, 100 points where the final point is identical to the first point (this happens a lot on plotted GPS routes), simplifying this line has a tendency to remove a chunk of the start or end of the line. It appears as though mapshaper considers this a continuous line and so simplifies away the first/last point. See attached. If you simplify this any amount significant amount the start and end disappear. Moving the start/end even marginally removes this behaviour.
Is this intentional and is there anything that I can do to prevent it, other than tweaking the points slightly to prevent them being snapped together example.txt
The text was updated successfully, but these errors were encountered:
You may find that the Douglas Peucker method does a better job of simplifying this kind of linework than the default method (which is based on Visvalingam's algorithm). So try adding method=dp to the simplify command. This method has less of a tendency to remove the most extreme points on a line.
Thanks - DP does the same thing. It believes the last point in the line is connected to the first point. Perhaps this is mathematically correct, so not something which needs 'fixing'. My solution is to iterate the points and ensure none of them are at the exact same coordinates as the others by introducing some jitter. I can't see any other way to resolve this.
Perhaps this is intentional, but if I have a LineString of, say, 100 points where the final point is identical to the first point (this happens a lot on plotted GPS routes), simplifying this line has a tendency to remove a chunk of the start or end of the line. It appears as though mapshaper considers this a continuous line and so simplifies away the first/last point. See attached. If you simplify this any amount significant amount the start and end disappear. Moving the start/end even marginally removes this behaviour.
Is this intentional and is there anything that I can do to prevent it, other than tweaking the points slightly to prevent them being snapped together
example.txt
The text was updated successfully, but these errors were encountered: