How to compute areas of influence in QGIS?
the grass algorithm v.net.alloc can produce the subnets - you can call it from the Processing toolbox (tested in QGIS 2.16)
You'll need a point layer (for facilities) and a lines layer with costs (either time/length). It'll create a new line layer with a field called cat
added, which will be the id of the nearest facility.
Here's an example based on walking distance to the nearest pub. Each line segment is coloured by cat
using random colours:-
Note that sometimes two adjacent pubs' road networks are given very similar colours; if you label them, you'll see it has actually worked.
As to getting gap-free polygons like you show above, I'm stumped. If you 'extract nodes' on the results and apply 'Convex Hull' (grouping by cat), there will be gaps and overlaps.
EDIT
you can indeed get the desired result. As you suggested in your comment, you can do the following..
- run Extract nodes on the output of v.net.alloc
- run Voronoi polygons on the extract nodes layer
- run Fixed distance buffer on that to make sure polygons overlap (e.g buffer by 1 meter)
- run Dissolve on the buffered layer, using the field 'cat'
Here's the result...it's not perfect, you'll sometimes see parts of the road network stray into neighbouring polygons.
There's a 'trap' in the new 2.16 GUI for dissolve. I set the field, but it seemed to dissolve everything. You need to remember to uncheck the 'dissolve all' checkbox, or the field setting is ignored.