I have a KML file of a fiber regional network (covers 2 US States) and a geocoded list of ~500 building addresses (nodes). I'd like to calculate two numbers for every address:
- The distance back to the network backbone
- The distance to the next closest point on a hypothetical "extended network" (if it's a shorter distance than the distance to the backbone)
By "extended network" I mean that if I were to build the "last mile" of fiber from the network backbone out to the closest address (lets call it building A) and another building is slightly further away from the network in the same direction (building B), then I would not want to build redundant network from building B all the way back to the backbone. I would build from the backbone to building A and then continue to building B.
I'm able to get the first calculation just using the "shortest line between features" tool (nodes are green, network is pink, shortest lines are orange):
What I'm looking for to get my second number is something like this (my own rough drawing connecting the nodes in blue):
I then want to calculate the distance of each incremental span that would need to be built to connect to the broader network for each node. So for the red dot, my distance calculation would be the red line:
I believe that what I am looking for is akin to a minimum spanning tree but I think I am having trouble finding the shortest distances out to the nodes if I assume I'm starting from the network (a linestring).
I've tried the v.net.spanningtree GRASS tool using the fiber network as my "Input Vector Line Layer" and my list of geocoded addresses as the "Input Point Layer". The result is a partial tracing of my network but the nodes are not connected.
I've also tried the Minimum Spanning Tree Plugin for QGIS but have not be able to get the plugin to actually run. I'm trying to use the same files as inputs but keep getting an error message that my inputs are invalid. I'm struggling to find tutorials for this issue online.
I may be going down the wrong rabbit hole with Minimum Spanning Trees so I'm all ears if there is a different way to accomplish this.
These calculations are just being used as rough approximations, hence why other barriers like roads are not being considered yet.