<s>
In	O
applied	O
mathematics	O
,	O
transit	B-Protocol
node	I-Protocol
routing	I-Protocol
can	O
be	O
used	O
to	O
speed	O
up	O
shortest-path	O
routing	O
by	O
pre-computing	O
connections	O
between	O
common	O
access	O
nodes	B-Data_Structure
to	O
a	O
sub-network	O
relevant	O
to	O
long-distance	O
travel	O
.	O
</s>
<s>
Transit	B-Protocol
node	I-Protocol
routing	I-Protocol
as	O
a	O
framework	O
was	O
established	O
in	O
2007	O
and	O
many	O
concrete	O
implementations	O
have	O
surfaced	O
in	O
the	O
years	O
after	O
such	O
as	O
approaches	O
using	O
grids	O
,	O
highway	B-Protocol
hierarchies	I-Protocol
and	O
contraction	B-Protocol
hierarchies	I-Protocol
.	O
</s>
<s>
Transit	B-Protocol
node	I-Protocol
routing	I-Protocol
is	O
a	O
static	O
approach	O
that	O
requires	O
pre-processing	O
of	O
pair-wise	O
distances	O
between	O
important	O
nodes	B-Data_Structure
in	O
the	O
graph	O
(	O
see	O
below	O
how	O
those	O
nodes	B-Data_Structure
are	O
chosen	O
)	O
.	O
</s>
<s>
This	O
sub-network	O
can	O
only	O
be	O
entered	O
by	O
using	O
sparsely	O
distributed	O
access	O
nodes	B-Data_Structure
.	O
</s>
<s>
When	O
compared	O
to	O
one	O
another	O
,	O
multiple	O
long-distance	O
routes	O
starting	O
at	O
the	O
same	O
location	O
always	O
use	O
the	O
same	O
small	O
amount	O
of	O
access	O
nodes	B-Data_Structure
close	O
to	O
the	O
starting	O
location	O
to	O
enter	O
this	O
network	O
.	O
</s>
<s>
In	O
the	O
same	O
way	O
,	O
similar	O
target	O
locations	O
are	O
always	O
reached	O
by	O
using	O
the	O
same	O
access	O
nodes	B-Data_Structure
close	O
to	O
them	O
.	O
</s>
<s>
When	O
travelling	O
short	O
distances	O
,	O
such	O
access	O
nodes	B-Data_Structure
might	O
be	O
never	O
used	O
because	O
the	O
fastest	O
path	O
to	O
the	O
target	O
only	O
uses	O
local	O
roads	O
.	O
</s>
<s>
Because	O
the	O
number	O
of	O
such	O
access	O
nodes	B-Data_Structure
is	O
small	O
compared	O
to	O
the	O
overall	O
number	O
of	O
nodes	B-Data_Structure
in	O
a	O
road	O
network	O
,	O
all	O
shortest	O
routes	O
connecting	O
those	O
nodes	B-Data_Structure
with	O
each	O
other	O
can	O
be	O
pre-calculated	O
and	O
stored	O
.	O
</s>
<s>
When	O
calculating	O
a	O
shortest	O
path	O
therefore	O
only	O
routes	O
to	O
access	O
nodes	B-Data_Structure
close	O
to	O
start	O
and	O
target	O
location	O
need	O
to	O
be	O
calculated	O
.	O
</s>
<s>
Transit	B-Protocol
node	I-Protocol
routing	I-Protocol
starts	O
with	O
a	O
selection	O
of	O
transit	O
nodes	B-Data_Structure
as	O
a	O
subset	O
of	O
all	O
nodes	B-Data_Structure
of	O
the	O
road	O
network	O
.	O
</s>
<s>
For	O
every	O
node	O
dedicated	O
sets	O
of	O
forward	O
access	O
nodes	B-Data_Structure
and	O
backward	O
access	O
nodes	B-Data_Structure
are	O
chosen	O
from	O
all	O
transit	O
nodes	B-Data_Structure
.	O
</s>
<s>
Now	O
,	O
pairwise	O
distances	O
between	O
transit	O
nodes	B-Data_Structure
and	O
distances	O
between	O
nodes	B-Data_Structure
and	O
their	O
corresponding	O
access	O
nodes	B-Data_Structure
are	O
calculated	O
and	O
stored	O
.	O
</s>
<s>
Short	O
routes	O
between	O
close	O
start	O
and	O
target	O
locations	O
may	O
not	O
require	O
any	O
transit	O
nodes	B-Data_Structure
.	O
</s>
<s>
For	O
given	O
start	O
and	O
target	O
locations	O
,	O
the	O
locality	O
filter	O
decides	O
,	O
if	O
transit	B-Protocol
node	I-Protocol
routing	I-Protocol
should	O
be	O
applied	O
or	O
if	O
a	O
fallback-routine	O
should	O
be	O
used	O
(	O
local	O
query	O
)	O
.	O
</s>
<s>
Transit	B-Protocol
node	I-Protocol
routing	I-Protocol
is	O
not	O
an	O
algorithm	O
but	O
merely	O
a	O
framework	O
for	O
speeding	O
up	O
route	O
planning	O
.	O
</s>
<s>
How	O
are	O
transit	O
nodes	B-Data_Structure
selected	O
?	O
</s>
<s>
How	O
are	O
access	O
nodes	B-Data_Structure
chosen	O
?	O
</s>
<s>
The	O
following	O
example	O
implementations	O
of	O
this	O
framework	O
answer	O
these	O
questions	O
using	O
different	O
underlying	O
methods	O
such	O
as	O
grouping	O
nodes	B-Data_Structure
in	O
cells	O
of	O
an	O
overlay	O
grid	O
and	O
a	O
more	O
sophisticated	O
implementation	O
based	O
on	O
contraction	B-Protocol
hierarchies	I-Protocol
.	O
</s>
<s>
In	O
a	O
grid-based	O
approach	O
,	O
the	O
bounding	B-Algorithm
square	O
of	O
all	O
nodes	B-Data_Structure
is	O
equally	O
subdivided	O
into	O
square	O
cells	O
.	O
</s>
<s>
How	O
are	O
access	O
nodes	B-Data_Structure
selected	O
?	O
</s>
<s>
For	O
each	O
cell	O
,	O
a	O
set	O
of	O
access	O
nodes	B-Data_Structure
can	O
be	O
found	O
by	O
looking	O
at	O
an	O
inner	O
area	O
of	O
5x5	O
cells	O
and	O
an	O
outer	O
area	O
of	O
9x9	O
cells	O
around	O
.	O
</s>
<s>
Focusing	O
on	O
crossing	O
nodes	B-Data_Structure
(	O
ends	O
of	O
edges	O
that	O
cross	O
the	O
boundary	O
of	O
,	O
or	O
)	O
,	O
the	O
access	O
nodes	B-Data_Structure
for	O
are	O
those	O
nodes	B-Data_Structure
of	O
that	O
are	O
part	O
of	O
a	O
shortest	O
path	O
from	O
some	O
node	O
in	O
to	O
a	O
node	O
in	O
.	O
</s>
<s>
As	O
access	O
nodes	B-Data_Structure
for	O
an	O
arbitrary	O
node	O
all	O
access	O
nodes	B-Data_Structure
of	O
are	O
chosen	O
(	O
red	O
dots	O
in	O
the	O
image	O
to	O
the	O
right	O
)	O
.	O
</s>
<s>
How	O
are	O
transit	O
nodes	B-Data_Structure
selected	O
?	O
</s>
<s>
The	O
set	O
of	O
transit	O
nodes	B-Data_Structure
is	O
exactly	O
the	O
union	O
of	O
all	O
sets	O
of	O
access	O
nodes	B-Data_Structure
.	O
</s>
<s>
The	O
way	O
access	O
nodes	B-Data_Structure
are	O
selected	O
implies	O
that	O
if	O
source	O
and	O
target	O
are	O
more	O
than	O
four	O
grid	O
cells	O
apart	O
,	O
a	O
transit	O
node	O
must	O
be	O
passed	O
on	O
the	O
shortest	O
path	O
and	O
the	O
distance	O
can	O
be	O
calculated	O
as	O
described	O
above	O
.	O
</s>
<s>
Local	O
queries	O
are	O
only	O
needed	O
if	O
start	O
and	O
target	O
already	O
lie	O
close	O
together	O
,	O
therefore	O
every	O
suitable	O
shortest-path	O
algorithm	O
such	O
as	O
Dijkstra	B-Algorithm
's	I-Algorithm
algorithm	I-Algorithm
or	O
extensions	O
thereof	O
can	O
be	O
chosen	O
.	O
</s>
<s>
The	O
pre-computed	O
distances	O
between	O
each	O
node	O
and	O
the	O
corresponding	O
access	O
node	O
as	O
well	O
as	O
the	O
pairwise	O
distances	O
between	O
transit	O
nodes	B-Data_Structure
need	O
to	O
be	O
stored	O
in	O
distance	O
tables	O
.	O
</s>
<s>
A	O
full	O
graph	O
of	O
the	O
USA	O
road	O
network	O
has	O
23,947,347	O
nodes	B-Data_Structure
.	O
</s>
<s>
How	O
are	O
transit	O
nodes	B-Data_Structure
selected	O
?	O
</s>
<s>
By	O
definition	O
,	O
a	O
contraction	B-Protocol
hierarchy	I-Protocol
moves	O
important	O
nodes	B-Data_Structure
(	O
i.e.	O
</s>
<s>
nodes	B-Data_Structure
that	O
are	O
part	O
of	O
many	O
shortest	O
paths	O
)	O
to	O
the	O
top	O
of	O
the	O
hierarchy	O
.	O
</s>
<s>
A	O
set	O
of	O
transit	O
nodes	B-Data_Structure
therefore	O
can	O
be	O
selected	O
as	O
the	O
highest	O
nodes	B-Data_Structure
of	O
the	O
contraction	B-Protocol
hierarchy	I-Protocol
.	O
</s>
<s>
How	O
are	O
access	O
nodes	B-Data_Structure
selected	O
?	O
</s>
<s>
Forward	O
access	O
nodes	B-Data_Structure
of	O
a	O
node	O
can	O
be	O
found	O
by	O
running	O
the	O
upward-search	O
of	O
the	O
contraction	B-Protocol
hierarchy	I-Protocol
starting	O
at	O
.	O
</s>
<s>
During	O
the	O
upward-search	O
,	O
edges	O
leaving	O
previously	O
found	O
transit	O
nodes	B-Data_Structure
are	O
n't	O
relaxed	O
.	O
</s>
<s>
When	O
the	O
search	O
has	O
no	O
more	O
upward	O
nodes	B-Data_Structure
left	O
to	O
settle	O
,	O
those	O
transit	O
nodes	B-Data_Structure
that	O
have	O
been	O
settled	O
are	O
the	O
access	O
nodes	B-Data_Structure
of	O
.	O
</s>
<s>
Backward	O
access	O
nodes	B-Data_Structure
can	O
be	O
found	O
analogously	O
.	O
</s>
<s>
If	O
the	O
highest	O
node	O
of	O
a	O
shortest	O
up-down-path	O
in	O
the	O
hierarchy	O
is	O
not	O
part	O
of	O
the	O
set	O
of	O
transit	O
nodes	B-Data_Structure
,	O
then	O
the	O
query	O
was	O
local	O
.	O
</s>
<s>
During	O
the	O
calculation	O
of	O
the	O
access	O
nodes	B-Data_Structure
,	O
the	O
search	O
space	O
(	O
all	O
visited	O
nodes	B-Data_Structure
towards	O
the	O
top	O
of	O
the	O
hierarchy	O
)	O
for	O
each	O
node	O
can	O
be	O
stored	O
without	O
including	O
transit	O
nodes	B-Data_Structure
.	O
</s>
<s>
If	O
those	O
spaces	O
are	O
disjoint	B-Algorithm
,	O
transit	B-Protocol
node	I-Protocol
routing	I-Protocol
can	O
be	O
used	O
because	O
the	O
up	O
-	O
and	O
down-paths	O
must	O
meet	O
at	O
a	O
transit	O
node	O
.	O
</s>
<s>
Local	O
queries	O
use	O
the	O
regular	O
query	O
algorithm	O
of	O
the	O
contraction	B-Protocol
hierarchy	I-Protocol
.	O
</s>
