I created a post of the UK rail network some time ago and have been meaning to return to the subject.
This iteration is in Leaflet and will run weekly. The network is generated direcly from the UK rail network timetable file in GTFS format downloaded from: gbrail.info
If there are any issues or inconsistencies, please let me know, preferrably through the GitHub issues page: GitHub Issues
I am very happy with the overall result and all the hosting is done from scratch using a virtual server from: Digital Ocean
A good learning experience with NGINX and mobile forwarding.
As a final warning, the mobile version is not very good, if viewing on mobile and interested, please try on a desktop. Sincere appologies for that. Leaflet may not be the best mobile platform, although it is probably due to my inexperience with it.
For these I simply created multiple buffers using the QGIS buffer tool. This works for small samples, but was quite frustrating. I had initially hoped to do the whole analysis in SQLite, which worked pretty well initally, but struggled on the larger buffers. It took too long to run the queries, and did not allow for visualisation. I think using PostGIS would however be pretty feasible.
But creating a multi-ring buffer plugin for QGIS also seemed like a good learning experience. Which got me thinking, does it matter if you create increasingly large buffers around the original feature, or if you buffered the resulting buffer sequentially. My hypothesis was that there would be pretty significant differences due to the rounding of corners.
My question is not about the overlapping-ness of the buffers, since I think multi-ring buffers should be “doughnuts” anyway. But rather if smoothing will occur. The only answer was to try it myself.
Buffer styles:
Buffer the resulting buffer sequentially: Sequential
Buffer the original feature with increasing buffer distance: Central
[table caption=”Speed – In seconds”]
Features, Rings,Central, Sequential
1, 5, 0.59, 0.56
55, 5, 8.06, 6.38
1, 200, 60.83, 31.76
3, 200, 62.89, 40.89
55, 200, 628.38, 586.67
1, 2000, 203.84, 67.00
[/table]
No matter how you do it the sequential style is quicker, but that may be down to my code.
Rendering
Interestingly, although understandably, the sequential style results in a lot more vertices in the outer rings. For comparison, for a 500 ring buffer the outermost ring had the following vertice counts:
[table]
Style, Vertices
Central,488
Sequential,30918
[/table]
We can see this with editing turned on.
Central:
Sequential:
We can also see a smoother profile in the sequential buffer. However the difference is not major, and hard to discern with the naked eye.
So we have at most about around a 10m discrepancy, with 500 50m rings, so around 25000m of distance from the original feature.
This impacts rendering time dramatically, an example with our 500 rings:
Central:
Sequential:
So quicker to create but slower to draw. So which one is better, quicker calculation, or quicker rendering? Or should we not do 200+ ring buffers?
Hard to say. In version 0.2 of the Multi Ring Buffer Plugin. There is an option for either in the advanced tab.