en.wikipedia.org

Route length is most often used to describe the length of track in a specific network.

What you found was line length. Route length though is still 19km.

Code:

```
C G K
/ \ / \ / \
A======B--D--E===F--H--I===J--L--M====N
```

Route length is calculated as the total length of the network's revenue earning fixed infrastructure where each section is only counted once regardless of the number of tracks. Given the configuration above it would be calculated as a sum of sections A=>B, B->D->E, B->C->E, E=>F, F->H->I, F->G->I, I=>J, J->K->M, J->L->M, and M=>N.

I calculated these lengths roughly using the Region of Waterloo's GIS Locator found

here
A=>B = ~5.94km

B->D->E = ~0.83 km

B->C->E = ~0.84 km

E=>F = ~1.84km

F->H->I =~1.04km

F->G->I = ~1.30km

I=>H = ~1.27km

J->L->M = ~1.18km

J->K->M = ~1.20km

+M=>N = ~3.82km

------------------------------

Total = ~19.26km