Question

Split lines at corners

  • 24 July 2019
  • 4 replies
  • 25 views

Badge

I have a curb line represented as one object. However, I would like to split it at its "corners" (marked with the black circles). Apart from the curb line, I also have the street centerline.. Any idea, how I could get a satisfying result?

Thanks!


4 replies

Badge
The Chopper set to 'By Vertex' with Maximum Vertices set to 2 will split a line where it either changes direction or crosses another line.
Badge +22

Assuming your curbline contains additional vertices not at corner (so you can't simply use the chopper), I would propose the following (caveat, haven't tested)

 

 

Use either a TopologyBuilder or Intersector on the street centerlines to get the intersection nodes.

 

PointOnLineOverlayer with the nodes and the curbline, with a point tolerance of something a little less than the width of the roads. This should split the curb at it's closest point to the intersection, which ought to be the corner.

 

 

Badge +12

Hi! Maybe the PolylineAnalyzer can help you? Have you had a look at this? https://knowledge.safe.com/questions/58178/splitting-lines-at-angles.html

 

 

(I was thinking you could find the vertices that have the largest angles, and then use those with a PointOnLineOverlayer to cut the curbline into separate polylines.)
Badge +3

@johannafalkenst

 

If you don't want to geustemate the corners:

 

Chopp lines to points by 1.

Feed lines and points to Topologybuilder.

The nodes are now ordered.

 

Neighbourfinder the nodes to road(center)lines, set to max 2 to find.

Corner points will have 2 roads that match. Those are your corner points.

merge the result pointnumber to the line.

Coordinateextractor on the line using the found pointnumber as index.

Create vertex out of resulting (extracted) coordinates.

PointOnLineoverlayer this with the line.

 

The line will be chopped at the coordinate.

 

Got sample data ?

 

 

 

Reply