3

I need to track along each of the lines that originates from the points below. As you can see, there are a number of lines that lead out from each point. I need to find the point along each of the lines that is 3 miles from the point. I had thought about using a buffer but I need the line's length to be 3 miles and not just a crows flight distance, I'd also tried QGIS's service area analysis but that only tracks along one line in each "cluster". The line layer is dissolved by branches as they originate off the point. Red and yellow are my attempt to demonstrate what I mean by that and hopefully shows what the geometry of each individual feature looks like. Ideally the 3 mile distance would trace down each of the branches within the clusters too to determine which of the branches are or aren't within 3 miles.

enter image description here enter image description here

Snip of my results from the "service area (from layer)" tool. The short little pink segments (not super visible) are what resulted, one segment was .05 miles, one was 7 feet, and the third didn't even generate a segment. enter image description here

1
  • Please decide whether it is QGIS, R or ArcGIS Pro that you wish to ask about in this particular question. If it’s R then also include a code attempt.
    – PolyGeo
    May 19, 2023 at 20:14

1 Answer 1

5

Use the algorithm Service area from Layer: like this, you can define not one single point feature, but rather all points of a layer are taken into consideration. In the screenshot, three multipart line features (in yellow) are created along the street network (black), one for each starting point each (red):

enter image description here

You can create a boundary around the end points that are within the max distance using a concave hull with this expression: concave_hull($geometry,0.2). This creates a polygon, so to say a "buffer" around the red points, but instead of beeline distance using distance along the network (similar to what you can achieve with QNEAT3 plugin area tools):

enter image description here

To get the end points (dangles) of the yellow lines, convert the layer to single parts (see Multipart to single parts), then use this solution: https://gis.stackexchange.com/a/427802/88814

Blue points: points that lie exactly at the maximum distance defined from the red points, along the street network:

enter image description here


Edit: if it doesn't connect to all the streets in the defined distance, your network is probably broken (small gaps). You can try to repair it, connecting the gaps (see comment by @Matt). Another option is to set a value (distance) for topology tolerance.

Zoom in (as much as possible) to the point where the output ends, until you see (probably) a gap in the lines. Measure the distance to get a feeling of the size of these gaps and use a value slightly larger for the tolerance. Like this,

two lines with nodes closer than the specified tolerance are considered connected https://docs.qgis.org/latest/en/docs/user_manual/processing_algs/qgis/networkanalysis.html#service-area-from-layer

4
  • Thanks for the detail Babel! I edited my original post to include an output I got from using that tool you explained. I only get one segment off each point and they are way shorter than three miles even though there is plenty of network remaining. Do you know why this could be? I used shortest path type and 4828 (3 miles in meters since that is the units of my file's projection) as my travel cost. May 22, 2023 at 16:50
  • 2
    @almanacsmurf that probably means your network layer is not properly connected. You could try using the tool Snap geometries to layer with the network as both the Input layer and the Reference layer and use the result as the input to the Service area (from layer) tool.
    – Matt
    May 22, 2023 at 17:43
  • 1
    Another option is to set a value (distance) for topology tolerance. Zoom in to the point where the output ends, as much as possible, until you see (probably) a gap in the lines. Measure the distance to get a feeling of the size of these gaps and use a value slightly larger for the tolerance.
    – Babel
    May 22, 2023 at 18:23
  • Thanks Matt and Babel! I ended up doing a combination of what you two suggested. I snapped the network layer to itself, snapped the points to the network, and then fiddled with the topology tolerance value until I got something that worked! May 22, 2023 at 19:11

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.