Currently I have roadcenterline data at hand. On my project, I need to digitize the road edges and importantly the junction lines in intersections and T-Junctions. See image below. (Desired output) enter image description here

At first, I was able to create the edges using buffer tool and toggle dissolve. enter image description here Then I will manually split the junctions to get the desired output. Now I am thinking of other ways to automate the splitting. What I first thought is to toggle off the dissolve. yet the junctions are not within standards. See image for reference. Are there any ways to automate this process? I have hundreds of lines per project. enter image description here

  • What about using a Round end cap in your Buffer? Commented Aug 13, 2023 at 12:34
  • I tried round end cap also, but its not the output that I need. It should be very similar to a road junction box, i.e. atleast straight lines not rounded. Commented Aug 13, 2023 at 13:11
  • What was the issue with your original approach (first two images above)? Commented Aug 14, 2023 at 0:58
  • There's no issue with the first two images, I included them in the query for a reference for my desired output. The problem that I am facing is doing the manual labor to split the junctions. (actually it doesn't matter if it is a polygon or a line, as long as it resembles the feature of a junction) so if split doesnt work, I convert the polygon to lines then just draw manually on the junctions. Commented Aug 14, 2023 at 1:12
  • You may need to define your rules more explicitly. For example, if you have 3 roads all coming in at 120 degrees, you're not going to end up with a nice junction box. More like a junction triangle. Commented Aug 14, 2023 at 12:02

1 Answer 1


Here's a starting point for an approach. It uses the road intersection vertices to select the footpath vertices for the junction box, and then minimum bounding geometry to create the junction box.

It's going to need some work to extend it for all scenarios, and whether it works at all might depend on how your road network is structured.

Assuming you already have a road layer, and a basic footpath layer as in your second image above (Buffer with dissolve):

  1. Get the point intersections of the road network using "Line intersections" tool, using the road network layer against itself.
  2. Remove duplicates using Remove duplicate geometries tool.
  3. Create the vertices of the footpath layer using Extract vertices tool.
  4. Add a field to the Vertices layer from (3) to link it to the nearest Intersection (from (2)), if it is within an appropriate max distance. Max distance will depend on the minimum angle of the road intersections - for 45°, it's about 2.6 times* the road edge distance. I used 50 as my buffer distance, so 130. The following formula can be used to create the field: array_first(overlay_nearest( 'Intersections Dedup',expression:=$id,limit:=1,max_distance:=130))
  5. Select the non-NULL vertices, and use Minimum Bounding Geometry, with Selected features only, and the field you added above as the grouping field.

This will give you results similar to below - using the intersection vertices to create the junctions.

enter image description here

enter image description here

  • The formula is 2*cos(a/2)/sin(a), where a is the minimum angle - basically the formula for the ratio of the long diagonal of a rhombus to its height.
  • Oh wow! That's what I needed. Thank you! This approach is straightforward and easy to follow. I still dont understand the math part but it works on my side. Now my next step is to create model builder for this to full automate this process. Again thank you! You really took an extra step to create this process flow. Commented Aug 16, 2023 at 4:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.