Skip to main content
Question

Split lines at corners


Forum|alt.badge.img

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

Forum|alt.badge.img
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.

jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • July 24, 2019

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.

 

 


jonas_nelson
Enthusiast
Forum|alt.badge.img+19

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.)

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • July 25, 2019

@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 ?

 

 

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings