Skip to main content

Hi,

I've been playing around with this for a few hours with no joy. I have lots of linework (imagine like river drainage) that is automatically generated, which I am trying to simplify and remove many of the vertices. The lines are split wherever there is a junction so during the simplification there should never be an issue with lines overlapping the end points of other lines.

I am using the Generalizer transformer (Thin No Point (Generalize)), and to the large part this is working exactly how I want it to, but there are the occasional lines which over-simplify to straighten out and overlap other lines. Obviously with rivers this cannot happen! See the two offending lines highlighted above and below.

When smoothing using the Generalize tool, I have previously used NURBfit, preserving shared boundaries, which seems to work fairly well, I get no overlaps. In this instance I'm trying to generalize and remove vertices, not smooth and add them. I'm struggling to get this functioning properly. Any ideas?

I have tried smoothing the lines first, but that didn't work.

Many thanks.

Since you want to preserve relative position, I would recommend the SherbendGeneralizer with spatial constraints.

 

 

That will prevent a line from being generalized to such an extent that it introduces intersections with another line.

Since you want to preserve relative position, I would recommend the SherbendGeneralizer with spatial constraints.

 

 

That will prevent a line from being generalized to such an extent that it introduces intersections with another line.

Hi @jdh,

I had tried SherbendGeneralizer on a previous job for that exact reason, the Self, Line-Line Intersection, Sidedness functionality. Unfortunately it didn't seem to be able to handle my complex, global dataset and got stuck. Just trying this again with the data mentioned above and am getting the same issue.


Perhaps you could capture all the separate ‘forks‘ in a concavehull polygon if you play around with the tolerance Alpha (hullreplacer). If that works you could maybe extract a centerline with the centreline replacer. This line should look smoother than the original lines. You could end up with wrong topology but creating nodes at all original intersections from the original data and snapping the result to it (groupby node) should fix that.


Reply