Wiki page
[VirtualRouting] by
sandro
2018-04-01 19:53:48.
0000: 44 20 32 30 31 38 2d 30 34 2d 30 31 54 31 39 3a D 2018-04-01T19:
0010: 35 33 3a 34 38 2e 39 34 39 0a 4c 20 56 69 72 74 53:48.949.L Virt
0020: 75 61 6c 52 6f 75 74 69 6e 67 0a 50 20 65 62 34 ualRouting.P eb4
0030: 37 36 39 64 33 62 33 31 31 39 30 65 35 32 35 33 769d3b31190e5253
0040: 62 30 64 66 35 36 64 30 36 36 31 66 66 30 37 36 b0df56d0661ff076
0050: 64 37 34 34 61 0a 55 20 73 61 6e 64 72 6f 0a 57 d744a.U sandro.W
0060: 20 32 32 38 33 31 0a 3c 61 20 68 72 65 66 3d 22 22831.<a href="
0070: 68 74 74 70 73 3a 2f 2f 77 77 77 2e 67 61 69 61 https://www.gaia
0080: 2d 67 69 73 2e 69 74 2f 66 6f 73 73 69 6c 2f 6c -gis.it/fossil/l
0090: 69 62 73 70 61 74 69 61 6c 69 74 65 2f 77 69 6b ibspatialite/wik
00a0: 69 3f 6e 61 6d 65 3d 34 2e 33 2e 30 2d 64 6f 63 i?name=4.3.0-doc
00b0: 22 3e 62 61 63 6b 3c 2f 61 3e 3c 68 72 3e 3c 62 ">back</a><hr><b
00c0: 72 3e 0d 0a 3c 68 31 3e 54 61 62 6c 65 20 6f 66 r>..<h1>Table of
00d0: 20 43 6f 6e 74 65 6e 74 73 3c 2f 68 31 3e 0d 0a Contents</h1>..
00e0: 31 20 2d 20 3c 61 20 68 72 65 66 3d 22 23 69 6e 1 - <a href="#in
00f0: 74 72 6f 22 3e 49 6e 74 72 6f 64 75 63 74 69 6f tro">Introductio
0100: 6e 3c 2f 61 3e 3c 62 72 3e 0d 0a 32 20 2d 20 3c n</a><br>..2 - <
0110: 61 20 68 72 65 66 3d 22 23 73 61 6d 70 6c 65 22 a href="#sample"
0120: 3e 54 68 65 20 73 61 6d 70 6c 65 2f 74 65 73 74 >The sample/test
0130: 20 44 42 3c 2f 61 3e 3c 62 72 3e 0d 0a 33 20 2d DB</a><br>..3 -
0140: 20 3c 61 20 68 72 65 66 3d 22 23 63 72 65 61 74 <a href="#creat
0150: 65 22 3e 43 72 65 61 74 69 6e 67 20 56 69 72 74 e">Creating Virt
0160: 75 61 6c 52 6f 75 74 69 6e 67 20 54 61 62 6c 65 ualRouting Table
0170: 73 3c 2f 61 3e 3c 62 72 3e 0d 0a 3c 62 72 3e 3c s</a><br>..<br><
0180: 68 72 3e 0d 0a 3c 68 31 3e 3c 61 20 6e 61 6d 65 hr>..<h1><a name
0190: 3d 22 69 6e 74 72 6f 22 3e 31 20 2d 49 6e 74 72 ="intro">1 -Intr
01a0: 6f 64 75 63 74 69 6f 6e 3c 2f 61 3e 3c 2f 68 31 oduction</a></h1
01b0: 3e 0d 0a 50 72 65 76 69 6f 75 73 20 76 65 72 73 >..Previous vers
01c0: 69 6f 6e 73 20 6f 66 20 53 70 61 74 69 61 4c 69 ions of SpatiaLi
01d0: 74 65 20 74 72 61 64 69 74 69 6f 6e 61 6c 6c 79 te traditionally
01e0: 20 73 75 70 70 6f 72 74 65 64 20 61 20 3c 62 3e supported a <b>
01f0: 70 75 72 65 20 53 51 4c 20 72 6f 75 74 69 6e 67 pure SQL routing
0200: 20 6d 6f 64 75 6c 65 3c 2f 62 3e 20 74 68 61 74 module</b> that
0210: 20 77 61 73 20 6e 61 6d 65 64 20 3c 61 20 68 72 was named <a hr
0220: 65 66 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e ef="https://www.
0230: 67 61 69 61 2d 67 69 73 2e 69 74 2f 66 6f 73 73 gaia-gis.it/foss
0240: 69 6c 2f 6c 69 62 73 70 61 74 69 61 6c 69 74 65 il/libspatialite
0250: 2f 77 69 6b 69 3f 6e 61 6d 65 3d 56 69 72 74 75 /wiki?name=Virtu
0260: 61 6c 4e 65 74 77 6f 72 6b 2b 72 65 6c 6f 61 64 alNetwork+reload
0270: 65 64 22 3e 56 69 72 74 75 61 6c 4e 65 74 77 6f ed">VirtualNetwo
0280: 72 6b 3c 2f 61 3e 2e 3c 62 72 3e 3c 62 72 3e 0d rk</a>.<br><br>.
0290: 0a 53 69 6e 63 65 20 76 65 72 73 69 6f 6e 20 3c .Since version <
02a0: 62 3e 35 2e 30 2e 30 3c 2f 62 3e 20 61 20 62 72 b>5.0.0</b> a br
02b0: 61 6e 64 20 6e 65 77 20 3c 62 3e 72 6f 75 74 69 and new <b>routi
02c0: 6e 67 20 6d 6f 64 75 6c 65 3c 2f 62 3e 20 28 6d ng module</b> (m
02d0: 6f 72 65 20 61 64 76 61 6e 63 65 64 20 61 6e 64 ore advanced and
02e0: 20 73 6f 70 68 69 73 74 69 63 61 74 65 64 29 20 sophisticated)
02f0: 69 73 20 61 76 61 69 6c 61 62 6c 65 2c 20 74 68 is available, th
0300: 61 74 20 69 73 20 63 61 6c 6c 65 64 20 3c 62 3e at is called <b>
0310: 56 69 72 74 75 61 6c 52 6f 75 74 69 6e 67 3c 2f VirtualRouting</
0320: 62 3e 2e 3c 62 72 3e 0d 0a 54 68 65 20 6e 6f 77 b>.<br>..The now
0330: 20 6f 62 73 6f 6c 65 74 65 20 3c 62 3e 56 69 72 obsolete <b>Vir
0340: 74 75 61 6c 4e 65 74 77 6f 72 6b 3c 2f 62 3e 20 tualNetwork</b>
0350: 69 73 20 73 74 69 6c 6c 20 73 75 70 70 6f 72 74 is still support
0360: 65 64 20 62 79 20 76 65 72 73 69 6f 6e 20 3c 62 ed by version <b
0370: 3e 35 2e 30 2e 30 3c 2f 62 3e 20 73 6f 20 61 73 >5.0.0</b> so as
0380: 20 74 6f 20 6e 6f 74 20 63 61 75 73 65 20 61 6e to not cause an
0390: 20 61 62 72 75 70 74 20 62 72 65 61 6b 20 74 6f abrupt break to
03a0: 20 61 6c 72 65 61 64 79 20 65 78 69 73 74 69 6e already existin
03b0: 67 20 61 70 70 6c 69 63 61 74 69 6f 6e 73 2c 20 g applications,
03c0: 62 75 74 20 77 69 6c 6c 20 70 72 65 73 75 6d 61 but will presuma
03d0: 62 6c 79 20 62 65 20 64 69 73 63 6f 6e 74 69 6e bly be discontin
03e0: 75 65 64 20 69 6e 20 66 75 74 75 72 65 20 76 65 ued in future ve
03f0: 72 73 69 6f 6e 73 2e 3c 62 72 3e 0d 0a 55 73 69 rsions.<br>..Usi
0400: 6e 67 20 3c 62 3e 56 69 72 74 75 61 6c 52 6f 75 ng <b>VirtualRou
0410: 74 69 6e 67 3c 2f 62 3e 20 69 6e 73 74 65 61 64 ting</b> instead
0420: 20 6f 66 20 3c 62 3e 56 69 72 74 75 61 6c 4e 65 of <b>VirtualNe
0430: 74 77 69 72 6b 3c 2f 62 3e 20 69 73 20 77 61 72 twirk</b> is war
0440: 6d 6c 79 20 72 65 63 6f 6d 6d 65 6e 64 65 64 20 mly recommended
0450: 66 6f 72 20 61 6e 79 20 6e 65 77 20 64 65 76 65 for any new deve
0460: 6c 6f 70 6d 65 6e 74 2e 20 0d 0a 3c 68 32 3e 54 lopment. ..<h2>T
0470: 68 65 6f 72 65 74 69 63 61 6c 20 66 6f 75 6e 64 heoretical found
0480: 61 74 69 6f 6e 73 20 2d 20 61 6e 20 75 6c 74 72 ations - an ultr
0490: 61 2d 71 75 69 63 6b 20 72 65 63 61 6c 6c 3c 2f a-quick recall</
04a0: 68 32 3e 0d 0a 41 6c 6c 20 3c 62 3e 52 6f 75 74 h2>..All <b>Rout
04b0: 69 6e 67 20 61 6c 67 6f 72 69 74 68 6d 73 3c 2f ing algorithms</
04c0: 62 3e 20 28 3c 69 3e 61 6b 61 3c 2f 69 3e 20 3c b> (<i>aka</i> <
04d0: 62 3e 53 68 6f 72 74 65 73 74 20 50 61 74 68 3c b>Shortest Path<
04e0: 2f 62 3e 20 61 6c 67 6f 72 69 74 68 6d 73 29 20 /b> algorithms)
04f0: 61 72 65 20 62 61 73 65 64 20 6f 6e 20 74 68 65 are based on the
0500: 20 6d 61 74 68 65 6d 61 74 69 63 73 20 6f 66 20 mathematics of
0510: 74 68 65 20 3c 61 20 68 72 65 66 3d 22 68 74 74 the <a href="htt
0520: 70 73 3a 2f 2f 65 6e 2e 77 69 6b 69 70 65 64 69 ps://en.wikipedi
0530: 61 2e 6f 72 67 2f 77 69 6b 69 2f 47 72 61 70 68 a.org/wiki/Graph
0540: 5f 74 68 65 6f 72 79 22 3e 47 72 61 70 68 20 74 _theory">Graph t
0550: 68 65 6f 72 79 3c 2f 61 3e 20 6f 72 20 74 6f 20 heory</a> or to
0560: 62 65 20 6d 6f 72 65 20 70 72 65 63 69 73 65 3a be more precise:
0570: 20 6f 6e 20 3c 62 3e 57 65 69 67 68 74 65 64 20 on <b>Weighted
0580: 47 72 61 70 68 73 3c 2f 62 3e 2e 0d 0a 3c 62 72 Graphs</b>...<br
0590: 3e 0d 0a 3c 69 6d 67 20 73 72 63 3d 22 68 74 74 >..<img src="htt
05a0: 70 3a 2f 2f 77 77 77 2e 67 61 69 61 2d 67 69 73 p://www.gaia-gis
05b0: 2e 69 74 2f 67 61 69 61 2d 73 69 6e 73 2f 6e 65 .it/gaia-sins/ne
05c0: 74 77 6f 72 6b 2e 70 6e 67 22 20 61 6c 74 3d 22 twork.png" alt="
05d0: 6e 65 74 77 6f 72 6b 22 3e 0d 0a 3c 62 72 3e 0d network">..<br>.
05e0: 0a 41 20 74 6f 70 6f 6c 6f 67 69 63 61 6c 6c 79 .A topologically
05f0: 20 76 61 6c 69 64 20 3c 62 3e 4e 65 74 77 6f 72 valid <b>Networ
0600: 6b 3c 2f 62 3e 20 69 73 20 61 20 64 61 74 61 73 k</b> is a datas
0610: 65 74 20 74 68 61 74 20 66 75 6c 66 69 6c 6c 73 et that fulfills
0620: 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 72 the following r
0630: 65 71 75 69 72 65 6d 65 6e 74 73 3a 0d 0a 3c 75 equirements:..<u
0640: 6c 3e 0d 0a 3c 6c 69 3e 41 6c 6c 20 69 74 65 6d l>..<li>All item
0650: 73 20 69 6e 20 74 68 65 20 64 61 74 61 73 65 74 s in the dataset
0660: 20 61 72 65 20 63 61 6c 6c 65 64 20 3c 62 3e 4c are called <b>L
0670: 69 6e 6b 73 3c 2f 62 3e 20 28 3c 69 3e 61 6b 61 inks</b> (<i>aka
0680: 3c 2f 69 3e 20 3c 62 3e 41 72 63 73 3c 2f 62 3e </i> <b>Arcs</b>
0690: 29 2c 20 61 6e 64 20 61 72 65 20 65 78 70 65 63 ), and are expec
06a0: 74 65 64 20 74 6f 20 72 65 70 72 65 73 65 6e 74 ted to represent
06b0: 20 73 6f 6d 65 20 6f 72 69 65 6e 74 65 64 20 63 some oriented c
06c0: 6f 6e 6e 65 63 74 69 6f 6e 20 6a 6f 69 6e 69 6e onnection joinin
06d0: 67 20 74 77 6f 20 3c 62 3e 4e 6f 64 65 73 3c 2f g two <b>Nodes</
06e0: 62 3e 2e 3c 62 72 3e 0d 0a 3c 75 3e 45 78 61 6d b>.<br>..<u>Exam
06f0: 70 6c 65 3c 2f 75 3e 3a 20 69 6e 20 74 68 65 20 ple</u>: in the
0700: 61 62 6f 76 65 20 66 69 67 75 72 65 20 4c 69 6e above figure Lin
0710: 6b 20 3c 62 3e 4c 33 3c 2f 62 3e 20 63 6f 6e 6e k <b>L3</b> conn
0720: 65 63 74 73 20 4e 6f 64 65 73 20 3c 62 3e 4e 32 ects Nodes <b>N2
0730: 3c 2f 62 3e 20 61 6e 64 20 3c 62 3e 4e 35 3c 2f </b> and <b>N5</
0740: 62 3e 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 53 6f b>.</li>..<li>So
0750: 20 61 6c 6c 20 3c 62 3e 4c 69 6e 6b 73 3c 2f 62 all <b>Links</b
0760: 3e 20 61 72 65 20 61 6c 77 61 79 73 20 65 78 70 > are always exp
0770: 65 63 74 65 64 20 74 6f 20 65 78 70 6c 69 63 69 ected to explici
0780: 74 6c 79 20 72 65 66 65 72 65 6e 63 65 20 61 20 tly reference a
0790: 3c 62 3e 53 74 61 72 74 2d 4e 6f 64 65 3c 2f 62 <b>Start-Node</b
07a0: 3e 20 28 3c 69 3e 61 6b 61 3c 2f 69 3e 20 3c 62 > (<i>aka</i> <b
07b0: 3e 4e 6f 64 65 2d 46 72 6f 6d 3c 2f 62 3e 29 20 >Node-From</b>)
07c0: 61 6e 64 20 61 6e 20 3c 62 3e 45 6e 64 2d 4e 6f and an <b>End-No
07d0: 64 65 3c 2f 62 3e 20 28 3c 69 3e 61 6b 61 3c 2f de</b> (<i>aka</
07e0: 69 3e 20 3c 62 3e 4e 6f 64 65 2d 54 6f 3c 2f 62 i> <b>Node-To</b
07f0: 3e 29 2e 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 4c >)...<ul>..<li>L
0800: 69 6e 6b 73 20 61 72 65 20 61 6c 77 61 79 73 20 inks are always
0810: 3c 62 3e 6f 72 69 65 6e 74 65 64 3c 2f 62 3e 2c <b>oriented</b>,
0820: 20 61 6e 64 20 74 68 65 69 72 20 6e 61 74 75 72 and their natur
0830: 61 6c 20 64 69 72 65 63 74 69 6f 6e 20 69 73 20 al direction is
0840: 3c 62 3e 46 72 6f 6d 2d 54 6f 3c 2f 62 3e 3a 0d <b>From-To</b>:.
0850: 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 69 6e 20 61 6e .<ul>..<li>in an
0860: 20 3c 62 3e 75 6e 69 64 69 72 65 63 74 69 6f 6e <b>unidirection
0870: 61 6c 3c 2f 62 3e 20 4e 65 74 77 6f 72 6b 20 65 al</b> Network e
0880: 61 63 68 20 4c 69 6e 6b 20 69 73 20 61 6e 20 3c ach Link is an <
0890: 62 3e 6f 6e 65 2d 77 61 79 3c 2f 62 3e 20 63 6f b>one-way</b> co
08a0: 6e 6e 65 63 74 69 6f 6e 2e 3c 62 72 3e 0d 0a 49 nnection.<br>..I
08b0: 66 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e f the connection
08c0: 20 69 73 20 61 76 61 69 6c 61 62 6c 65 20 69 6e is available in
08d0: 20 74 68 65 20 6f 70 70 6f 73 69 74 65 20 64 69 the opposite di
08e0: 72 65 63 74 69 6f 6e 20 61 20 73 65 63 6f 6e 64 rection a second
08f0: 20 4c 69 6e 6b 20 6d 75 73 74 20 62 65 20 65 78 Link must be ex
0900: 70 6c 69 63 69 74 6c 79 20 64 65 63 6c 61 72 65 plicitly declare
0910: 64 2e 3c 62 72 3e 0d 0a 3c 75 3e 45 78 61 6d 70 d.<br>..<u>Examp
0920: 6c 65 3c 2f 75 3e 3a 20 4c 69 6e 6b 20 3c 62 3e le</u>: Link <b>
0930: 58 31 3c 2f 62 3e 20 67 6f 65 73 20 66 72 6f 6d X1</b> goes from
0940: 20 4e 6f 64 65 20 3c 62 3e 41 3c 2f 62 3e 20 74 Node <b>A</b> t
0950: 6f 20 4e 6f 64 65 20 3c 62 3e 42 3c 2f 62 3e 2c o Node <b>B</b>,
0960: 20 61 6e 64 20 4c 69 6e 6b 20 3c 62 3e 58 32 3c and Link <b>X2<
0970: 2f 62 3e 20 67 6f 65 73 20 66 72 6f 6d 20 4e 6f /b> goes from No
0980: 64 65 20 3c 62 3e 42 3c 2f 62 3e 20 74 6f 20 4e de <b>B</b> to N
0990: 6f 64 65 20 3c 62 3e 41 3c 2f 62 3e 2e 3c 2f 6c ode <b>A</b>.</l
09a0: 69 3e 0d 0a 3c 6c 69 3e 69 6e 20 61 20 3c 62 3e i>..<li>in a <b>
09b0: 62 69 64 69 72 65 63 74 69 6f 6e 61 6c 3c 2f 62 bidirectional</b
09c0: 3e 20 4e 65 74 77 6f 72 6b 20 61 6c 6c 20 4c 69 > Network all Li
09d0: 6e 6b 73 20 61 72 65 20 61 73 73 75 6d 65 64 20 nks are assumed
09e0: 74 6f 20 65 73 74 61 62 6c 69 73 68 20 61 20 63 to establish a c
09f0: 6f 6e 6e 65 63 74 69 6f 6e 20 69 6e 20 62 6f 74 onnection in bot
0a00: 68 20 64 69 72 65 63 74 69 6f 6e 73 2e 3c 62 72 h directions.<br
0a10: 3e 0d 0a 44 65 66 69 6e 69 74 69 6e 67 20 61 6e >..Definiting an
0a20: 20 3c 62 3e 6f 6e 65 2d 77 61 79 20 63 6f 6e 6e <b>one-way conn
0a30: 65 63 74 69 6f 6e 3c 2f 62 3e 20 72 65 71 75 69 ection</b> requi
0a40: 72 65 73 20 61 6e 20 61 70 70 72 6f 70 72 69 61 res an appropria
0a50: 74 65 20 61 74 74 72 69 62 75 74 65 20 74 6f 20 te attribute to
0a60: 62 65 20 73 65 74 20 28 73 65 65 20 62 65 6c 6f be set (see belo
0a70: 77 29 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 3c w).</li>..</ul><
0a80: 2f 6c 69 3e 0d 0a 3c 6c 69 3e 54 68 65 20 3c 62 /li>..<li>The <b
0a90: 3e 53 74 61 72 74 2d 3c 2f 62 3e 20 61 6e 64 20 >Start-</b> and
0aa0: 3c 62 3e 45 6e 64 2d 4e 6f 64 65 3c 2f 62 3e 20 <b>End-Node</b>
0ab0: 63 6f 75 6c 64 20 65 76 65 6e 74 75 61 6c 6c 79 could eventually
0ac0: 20 62 65 20 74 68 65 20 73 61 6d 65 2c 20 61 6e be the same, an
0ad0: 64 20 69 6e 20 74 68 69 73 20 63 61 73 65 20 77 d in this case w
0ae0: 65 27 6c 6c 20 68 61 76 65 20 61 20 3c 62 3e 73 e'll have a <b>s
0af0: 65 6c 66 2d 63 6c 6f 73 65 64 3c 2f 62 3e 20 4c elf-closed</b> L
0b00: 69 6e 6b 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 4e ink.</li>..<li>N
0b10: 65 74 77 6f 72 6b 27 73 20 4c 69 6e 6b 73 20 3c etwork's Links <
0b20: 62 3e 63 61 6e 3c 2f 62 3e 20 65 76 65 6e 74 75 b>can</b> eventu
0b30: 61 6c 6c 79 20 64 65 66 69 6e 65 20 61 20 6c 69 ally define a li
0b40: 6e 65 61 72 20 47 65 6f 6d 65 74 72 79 20 28 3c near Geometry (<
0b50: 62 3e 4c 49 4e 45 53 54 52 49 4e 47 3c 2f 62 3e b>LINESTRING</b>
0b60: 29 20 67 6f 69 6e 67 20 66 72 6f 6d 20 74 68 65 ) going from the
0b70: 20 3c 62 3e 53 74 61 72 74 2d 4e 6f 64 65 3c 2f <b>Start-Node</
0b80: 62 3e 20 74 6f 20 74 68 65 20 3c 62 3e 45 6e 64 b> to the <b>End
0b90: 2d 4e 6f 64 65 3c 2f 62 3e 2c 20 62 75 74 20 74 -Node</b>, but t
0ba0: 68 69 73 20 69 73 20 61 6e 20 6f 70 74 69 6f 6e his is an option
0bb0: 61 6c 20 66 65 61 74 75 72 65 2c 20 6e 6f 74 20 al feature, not
0bc0: 61 20 6d 61 6e 64 61 74 6f 72 79 20 72 65 71 75 a mandatory requ
0bd0: 69 72 65 6d 65 6e 74 2e 3c 2f 6c 69 3e 0d 0a 3c irement.</li>..<
0be0: 6c 69 3e 57 68 61 74 20 69 73 20 61 62 73 6f 6c li>What is absol
0bf0: 75 74 65 6c 79 20 6d 61 6e 64 61 74 6f 72 79 20 utely mandatory
0c00: 69 73 20 74 68 61 74 20 65 61 63 68 20 3c 62 3e is that each <b>
0c10: 4c 69 6e 6b 3c 2f 62 3e 20 6d 75 73 74 20 65 78 Link</b> must ex
0c20: 70 6c 69 63 69 74 6c 79 20 72 65 66 65 72 65 6e plicitly referen
0c30: 63 65 20 69 74 73 20 3c 62 3e 4e 6f 64 65 73 3c ce its <b>Nodes<
0c40: 2f 62 3e 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e /b>.</li>..</ul>
0c50: 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 41 20 4e 65 74 </li>..<li>A Net
0c60: 77 6f 72 6b 20 73 75 70 70 6f 72 74 69 6e 67 20 work supporting
0c70: 47 65 6f 6d 65 74 72 69 65 73 20 69 73 20 61 20 Geometries is a
0c80: 3c 62 3e 53 70 61 74 69 61 6c 20 4e 65 74 77 6f <b>Spatial Netwo
0c90: 72 6b 3c 2f 62 3e 3b 20 6f 74 68 65 72 77 69 73 rk</b>; otherwis
0ca0: 65 20 61 20 4e 65 74 77 6f 72 6b 20 6c 61 63 6b e a Network lack
0cb0: 69 6e 67 20 61 6e 79 20 47 65 6f 6d 65 74 72 79 ing any Geometry
0cc0: 20 69 73 20 61 20 3c 62 3e 4c 6f 67 69 63 61 6c is a <b>Logical
0cd0: 20 4e 65 74 77 6f 72 6b 3c 2f 62 3e 2e 0d 0a 3c Network</b>...<
0ce0: 75 6c 3e 0d 0a 3c 6c 69 3e 49 6e 20 61 20 3c 62 ul>..<li>In a <b
0cf0: 3e 53 70 61 74 69 61 6c 20 4e 65 74 77 6f 72 6b >Spatial Network
0d00: 3c 2f 62 3e 20 61 6c 6c 20 4c 69 6e 6b 73 20 3c </b> all Links <
0d10: 62 3e 6d 75 73 74 3c 2f 62 3e 20 68 61 76 65 20 b>must</b> have
0d20: 61 20 63 6f 72 72 65 73 70 6f 6e 64 69 6e 67 20 a corresponding
0d30: 47 65 6f 6d 65 74 72 79 2e 3c 2f 6c 69 3e 0d 0a Geometry.</li>..
0d40: 3c 6c 69 3e 49 6e 20 61 20 3c 62 3e 4c 6f 67 69 <li>In a <b>Logi
0d50: 63 61 6c 20 4e 65 74 77 6f 72 6b 3c 2f 62 3e 20 cal Network</b>
0d60: 61 6c 6c 20 4c 69 6e 6b 73 20 3c 62 3e 61 72 65 all Links <b>are
0d70: 20 73 74 72 69 63 74 6c 79 20 66 6f 72 62 69 64 strictly forbid
0d80: 64 65 6e 3c 2f 62 3e 20 74 6f 20 68 61 76 65 20 den</b> to have
0d90: 61 6e 79 20 47 65 6f 6d 65 74 72 79 2e 3c 2f 6c any Geometry.</l
0da0: 69 3e 0d 0a 3c 6c 69 3e 49 6e 20 61 20 3c 62 3e i>..<li>In a <b>
0db0: 53 70 61 74 69 61 6c 20 4e 65 74 77 6f 72 6b 3c Spatial Network<
0dc0: 2f 62 3e 20 62 6f 74 68 20 74 68 65 20 3c 62 3e /b> both the <b>
0dd0: 53 74 61 72 74 50 6f 69 6e 74 3c 2f 62 3e 20 61 StartPoint</b> a
0de0: 6e 64 20 3c 62 3e 45 6e 64 50 6f 69 6e 74 3c 2f nd <b>EndPoint</
0df0: 62 3e 20 6f 66 20 65 61 63 68 20 4c 69 6e 6b 27 b> of each Link'
0e00: 73 20 3c 62 3e 4c 49 4e 45 53 54 52 49 4e 47 3c s <b>LINESTRING<
0e10: 2f 62 3e 20 61 72 65 20 61 6c 77 61 79 73 20 65 /b> are always e
0e20: 78 70 65 63 74 65 64 20 74 6f 20 65 78 61 63 74 xpected to exact
0e30: 6c 79 20 63 6f 69 6e 63 69 64 65 20 77 69 74 68 ly coincide with
0e40: 20 74 68 65 20 63 6f 72 72 65 73 70 6f 6e 64 69 the correspondi
0e50: 6e 67 20 3c 62 3e 4e 6f 64 65 73 3c 2f 62 3e 2e ng <b>Nodes</b>.
0e60: 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 3c 2f 6c 69 </li>..</ul></li
0e70: 3e 0d 0a 3c 6c 69 3e 49 6e 20 61 20 3c 62 3e 53 >..<li>In a <b>S
0e80: 70 61 74 69 61 6c 20 4e 65 74 77 6f 72 6b 3c 2f patial Network</
0e90: 62 3e 20 61 6c 6c 20 72 65 66 65 72 65 6e 63 65 b> all reference
0ea0: 73 20 74 6f 20 74 68 65 20 73 61 6d 65 20 3c 62 s to the same <b
0eb0: 3e 4e 6f 64 65 3c 2f 62 3e 20 62 79 20 64 69 66 >Node</b> by dif
0ec0: 66 65 72 65 6e 74 20 4c 69 6e 6b 73 20 3c 62 3e ferent Links <b>
0ed0: 6d 75 73 74 3c 2f 62 3e 20 62 65 20 61 6e 20 65 must</b> be an e
0ee0: 78 61 63 74 20 6d 61 74 63 68 2e 3c 62 72 3e 0d xact match.<br>.
0ef0: 0a 3c 75 3e 45 78 61 6d 70 6c 65 3c 2f 75 3e 3a .<u>Example</u>:
0f00: 20 4e 6f 64 65 20 3c 62 3e 4e 35 3c 2f 62 3e 20 Node <b>N5</b>
0f10: 69 73 20 73 68 61 72 65 64 20 62 79 20 4c 69 6e is shared by Lin
0f20: 6b 73 20 3c 62 3e 4c 33 3c 2f 62 3e 2c 20 3c 62 ks <b>L3</b>, <b
0f30: 3e 4c 36 3c 2f 62 3e 2c 20 3c 62 3e 4c 37 3c 2f >L6</b>, <b>L7</
0f40: 62 3e 2c 20 3c 62 3e 4c 39 3c 2f 62 3e 20 61 6e b>, <b>L9</b> an
0f50: 64 20 3c 62 3e 4c 31 30 3c 2f 62 3e 2c 20 73 6f d <b>L10</b>, so
0f60: 20 61 6c 6c 20 74 68 65 69 72 20 63 6f 72 72 65 all their corre
0f70: 73 70 6f 6e 64 69 6e 67 20 4c 49 4e 45 53 54 52 sponding LINESTR
0f80: 49 4e 47 53 20 61 72 65 20 65 78 70 65 63 74 65 INGS are expecte
0f90: 64 20 74 6f 20 68 61 76 65 20 74 68 65 20 63 6f d to have the co
0fa0: 72 72 65 73 70 6f 6e 64 69 6e 67 20 65 78 74 72 rresponding extr
0fb0: 65 6d 69 74 79 20 28 3c 62 3e 53 74 61 72 74 2d emity (<b>Start-
0fc0: 3c 2f 62 3e 20 6f 72 20 3c 62 3e 45 6e 64 2d 3c </b> or <b>End-<
0fd0: 2f 62 3e 2c 20 64 65 70 65 6e 64 69 6e 67 20 6f /b>, depending o
0fe0: 6e 20 74 68 65 20 6f 72 69 65 6e 74 61 74 69 6f n the orientatio
0ff0: 6e 29 20 70 6f 69 6e 74 73 20 74 68 61 74 20 6d n) points that m
1000: 75 73 74 20 65 78 61 63 74 6c 79 20 6d 61 74 63 ust exactly matc
1010: 68 20 74 68 65 20 6f 74 68 65 72 2e 3c 62 72 3e h the other.<br>
1020: 0d 0a 41 20 3c 62 3e 74 6f 70 6f 6c 6f 67 69 63 ..A <b>topologic
1030: 61 6c 20 69 6e 63 6f 6e 73 69 73 74 65 6e 63 79 al inconsistency
1040: 3c 2f 62 3e 20 65 78 69 73 74 73 20 69 66 20 61 </b> exists if a
1050: 6e 79 20 6f 66 20 74 68 65 73 65 20 63 6f 6e 64 ny of these cond
1060: 69 74 69 6f 6e 73 20 61 72 65 20 6e 6f 74 20 73 itions are not s
1070: 61 74 69 73 66 69 65 64 2c 20 77 68 69 63 68 20 atisfied, which
1080: 6c 65 61 64 73 20 74 6f 20 61 6e 20 3c 62 3e 69 leads to an <b>i
1090: 6e 76 61 6c 69 64 3c 2f 62 3e 20 4e 65 74 77 6f nvalid</b> Netwo
10a0: 72 6b 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 49 6e rk.</li>..<li>In
10b0: 20 61 20 3c 62 3e 53 70 61 74 69 61 6c 20 4e 65 a <b>Spatial Ne
10c0: 74 77 6f 72 6b 3c 2f 62 3e 20 74 77 6f 0d 0a 3c twork</b> two..<
10d0: 6c 69 3e 41 63 63 6f 72 64 69 6e 67 6c 79 20 74 li>Accordingly t
10e0: 6f 20 74 68 65 20 61 62 6f 76 65 20 70 72 65 6d o the above prem
10f0: 69 73 65 73 2c 20 3c 62 3e 4e 6f 64 65 73 3c 2f ises, <b>Nodes</
1100: 62 3e 20 61 72 65 20 6e 65 76 65 72 20 65 78 70 b> are never exp
1110: 65 63 74 65 64 20 74 6f 20 62 65 20 65 78 70 6c ected to be expl
1120: 69 63 69 74 6c 79 20 64 65 63 6c 61 72 65 64 20 icitly declared
1130: 69 6e 20 61 20 73 65 70 61 72 61 74 65 20 54 61 in a separate Ta
1140: 62 6c 65 2e 3c 62 72 3e 0d 0a 4a 75 73 74 20 61 ble.<br>..Just a
1150: 20 73 69 6e 67 6c 65 20 54 61 62 6c 65 20 64 65 single Table de
1160: 63 6c 61 72 69 6e 67 20 61 6c 6c 20 3c 62 3e 4c claring all <b>L
1170: 69 6e 6b 73 3c 2f 62 3e 20 69 73 20 72 65 71 75 inks</b> is requ
1180: 69 72 65 64 20 69 6e 20 6f 72 64 65 72 20 74 6f ired in order to
1190: 20 66 75 6c 6c 79 20 64 65 66 69 6e 65 20 61 20 fully define a
11a0: 74 6f 70 6f 6c 6f 67 69 63 61 6c 6c 79 20 76 61 topologically va
11b0: 6c 69 64 20 4e 65 74 77 6f 72 6b 2e 3c 62 72 3e lid Network.<br>
11c0: 0d 0a 41 6c 6c 20 74 68 65 20 4e 6f 64 65 73 20 ..All the Nodes
11d0: 63 61 6e 20 74 68 65 6e 20 62 65 20 65 61 73 69 can then be easi
11e0: 6c 79 20 65 78 74 72 61 63 74 65 64 20 66 72 6f ly extracted fro
11f0: 6d 20 74 68 65 20 4c 69 6e 6b 73 27 20 64 65 66 m the Links' def
1200: 69 6e 69 74 69 6f 6e 73 20 61 6e 64 20 74 68 65 initions and the
1210: 20 63 6f 6f 72 64 69 6e 61 74 65 73 20 66 6f 72 coordinates for
1220: 20 65 61 63 68 20 4e 6f 64 65 20 63 61 6e 20 62 each Node can b
1230: 65 20 64 69 72 65 63 74 6c 79 20 73 65 74 20 62 e directly set b
1240: 79 20 65 78 74 72 61 63 74 69 6e 67 20 74 68 65 y extracting the
1250: 20 65 78 74 72 65 6d 65 20 50 6f 69 6e 74 20 6f extreme Point o
1260: 66 20 74 68 65 20 63 6f 72 72 65 73 70 6f 6e 64 f the correspond
1270: 69 6e 67 20 4c 69 6e 65 73 74 72 69 6e 67 73 2e ing Linestrings.
1280: 3c 62 72 3e 0d 0a 49 66 20 61 6e 79 20 6d 69 73 <br>..If any mis
1290: 6d 61 74 63 68 20 69 73 20 64 65 74 65 63 74 65 match is detecte
12a0: 64 20 74 68 69 73 20 73 75 72 65 6c 79 20 6d 65 d this surely me
12b0: 61 6e 73 20 74 68 61 74 20 74 68 65 20 4e 65 74 ans that the Net
12c0: 77 6f 72 6b 20 69 73 20 69 6e 76 61 6c 69 64 2e work is invalid.
12d0: 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 41 20 3c 62 3e </li>..<li>A <b>
12e0: 4c 69 6e 6b 3c 2f 62 3e 20 6d 61 79 20 6c 65 67 Link</b> may leg
12f0: 69 74 69 6d 61 74 65 6c 79 20 73 65 6c 66 2d 69 itimately self-i
1300: 6e 74 65 72 73 65 63 74 20 69 74 73 65 6c 66 20 ntersect itself
1310: 28 65 2e 67 2e 20 66 6f 72 6d 69 6e 67 20 61 20 (e.g. forming a
1320: 6c 6f 6f 70 29 2c 20 61 73 20 73 68 6f 77 6e 20 loop), as shown
1330: 69 6e 20 74 68 65 20 61 62 6f 76 65 20 66 69 67 in the above fig
1340: 75 72 65 20 62 79 20 4c 69 6e 6b 20 3c 62 3e 4c ure by Link <b>L
1350: 31 35 3c 2f 62 3e 20 28 6f 72 61 6e 67 65 20 73 15</b> (orange s
1360: 70 6f 74 29 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e pot).</li>..<li>
1370: 54 77 6f 20 3c 62 3e 4c 69 6e 6b 73 3c 2f 62 3e Two <b>Links</b>
1380: 20 6d 61 79 20 6c 65 67 69 74 69 6d 61 74 65 6c may legitimatel
1390: 79 20 69 6e 74 65 72 73 65 63 74 20 77 68 65 72 y intersect wher
13a0: 65 20 6e 6f 20 4e 6f 64 65 20 65 78 69 73 74 73 e no Node exists
13b0: 2c 20 61 73 20 65 78 65 6d 70 6c 69 66 69 65 64 , as exemplified
13c0: 20 6f 6e 20 74 68 65 20 61 62 6f 76 65 20 66 69 on the above fi
13d0: 67 75 72 65 20 62 79 20 4c 69 6e 6b 73 20 3c 62 gure by Links <b
13e0: 3e 4c 34 3c 2f 62 3e 20 61 6e 64 20 3c 62 3e 4c >L4</b> and <b>L
13f0: 37 3c 2f 62 3e 20 28 67 72 65 65 6e 20 73 70 6f 7</b> (green spo
1400: 74 29 2e 3c 62 72 3e 0d 0a 54 68 69 73 20 75 73 t).<br>..This us
1410: 75 61 6c 6c 79 20 68 61 70 70 65 6e 73 20 77 68 ually happens wh
1420: 65 6e 20 6f 6e 65 20 6f 66 20 74 68 65 20 74 77 en one of the tw
1430: 6f 20 4c 69 6e 6b 73 20 6f 76 65 72 70 61 73 73 o Links overpass
1440: 65 73 20 74 68 65 20 6f 74 68 65 72 2c 20 6f 72 es the other, or
1450: 20 77 68 65 72 65 20 73 6f 6d 65 20 74 65 63 68 where some tech
1460: 6e 69 63 61 6c 20 72 65 73 74 72 69 63 74 69 6f nical restrictio
1470: 6e 20 65 78 69 73 74 73 20 28 65 2e 67 2e 20 74 n exists (e.g. t
1480: 77 6f 20 69 6e 73 75 6c 61 74 65 64 20 77 69 72 wo insulated wir
1490: 65 73 20 69 6e 20 61 6e 20 45 6c 65 63 74 72 69 es in an Electri
14a0: 63 61 6c 20 4e 65 74 77 6f 72 6b 29 2e 3c 2f 6c cal Network).</l
14b0: 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 4c 69 6e 6b 73 i>..<li><b>Links
14c0: 3c 2f 62 3e 20 61 72 65 6e 27 74 20 73 74 72 69 </b> aren't stri
14d0: 63 74 6c 79 20 72 65 71 75 69 72 65 64 20 74 6f ctly required to
14e0: 20 62 65 20 61 73 73 6f 63 69 61 74 65 64 20 77 be associated w
14f0: 69 74 68 20 61 6e 79 20 73 70 65 63 69 66 69 63 ith any specific
1500: 20 61 74 74 72 69 62 75 74 65 2c 20 62 75 74 20 attribute, but
1510: 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 61 74 the following at
1520: 74 72 69 62 75 74 65 73 20 61 72 65 20 61 6c 6d tributes are alm
1530: 6f 73 74 20 75 6e 69 76 65 72 73 61 6c 6c 79 20 ost universally
1540: 73 75 70 70 6f 72 74 65 64 3a 0d 0a 3c 75 6c 3e supported:..<ul>
1550: 0d 0a 3c 6c 69 3e 61 20 3c 62 3e 6e 61 6d 65 3c ..<li>a <b>name<
1560: 2f 62 3e 20 69 64 65 6e 74 69 66 79 69 6e 67 20 /b> identifying
1570: 74 68 65 20 4c 69 6e 6b 2e 3c 62 72 3e 0d 0a 3c the Link.<br>..<
1580: 75 3e 45 78 61 6d 70 6c 65 73 3c 2f 75 3e 3a 20 u>Examples</u>:
1590: 74 68 65 20 3c 69 3e 72 6f 61 64 20 74 6f 70 6f the <i>road topo
15a0: 6e 79 6d 3c 2f 69 3e 20 69 6e 20 61 20 3c 62 3e nym</i> in a <b>
15b0: 72 6f 61 64 20 6e 65 74 77 6f 72 6b 3c 2f 62 3e road network</b>
15c0: 2c 20 6f 72 20 74 68 65 20 3c 69 3e 72 69 76 65 , or the <i>rive
15d0: 72 20 6e 61 6d 65 3c 2f 69 3e 20 69 6e 20 61 6e r name</i> in an
15e0: 20 3c 62 3e 68 79 64 72 6f 67 72 61 70 68 69 63 <b>hydrographic
15f0: 20 6e 65 74 77 6f 72 6b 3c 2f 62 3e 2e 3c 2f 6c network</b>.</l
1600: 69 3e 0d 0a 3c 6c 69 3e 6f 6e 65 20 28 6f 72 20 i>..<li>one (or
1610: 65 76 65 6e 20 6d 6f 72 65 29 20 61 70 70 72 6f even more) appro
1620: 70 72 69 61 74 65 20 3c 62 3e 63 6f 73 74 20 76 priate <b>cost v
1630: 61 6c 75 65 3c 2f 62 3e 28 73 29 2e 3c 62 72 3e alue</b>(s).<br>
1640: 0d 0a 3c 75 3e 45 78 61 6d 70 6c 65 3c 2f 75 3e ..<u>Example</u>
1650: 3a 20 74 68 65 20 3c 69 3e 74 69 6d 65 3c 2f 69 : the <i>time</i
1660: 3e 20 72 65 71 75 69 72 65 64 20 74 6f 20 74 72 > required to tr
1670: 61 76 65 72 73 65 20 74 68 65 20 4c 69 6e 6b 20 averse the Link
1680: 28 6d 61 79 20 62 65 20 64 69 73 74 69 6e 67 75 (may be distingu
1690: 69 73 68 65 64 20 62 65 74 77 65 65 6e 20 70 65 ished between pe
16a0: 64 65 73 74 72 69 61 6e 73 2c 20 62 69 63 79 63 destrians, bicyc
16b0: 6c 65 73 2c 20 63 61 72 73 2c 20 6c 6f 72 72 69 les, cars, lorri
16c0: 65 73 20 61 6e 64 20 73 6f 20 6f 6e 29 2e 3c 2f es and so on).</
16d0: 6c 69 3e 0d 0a 3c 6c 69 3e 61 20 70 61 69 72 20 li>..<li>a pair
16e0: 6f 66 20 3c 62 3e 62 6f 6f 6c 65 61 6e 20 66 6c of <b>boolean fl
16f0: 61 67 73 3c 2f 62 3e 20 28 3c 62 3e 66 72 6f 6d ags</b> (<b>from
1700: 2d 74 6f 3c 2f 62 3e 20 61 6e 64 20 3c 62 3e 74 -to</b> and <b>t
1710: 6f 2d 66 72 6f 6d 3c 2f 62 3e 29 20 61 72 65 20 o-from</b>) are
1720: 69 6e 74 65 6e 64 65 6e 64 20 74 6f 20 73 70 65 intendend to spe
1730: 63 69 66 79 20 69 66 20 74 68 65 20 4c 69 6e 6b cify if the Link
1740: 20 63 61 6e 20 62 65 20 74 72 61 76 65 72 73 65 can be traverse
1750: 64 20 6f 6e 20 62 6f 74 68 20 64 69 72 65 63 74 d on both direct
1760: 69 6f 6e 73 20 6f 72 20 6a 75 73 74 20 69 6e 20 ions or just in
1770: 6f 6e 65 20 28 3c 62 3e 6f 6e 65 2d 77 61 79 3c one (<b>one-way<
1780: 2f 62 3e 29 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c /b>).</li>..</ul
1790: 3e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c ></li>..</ul>..<
17a0: 68 34 3e 4c 6f 67 69 63 61 6c 20 63 6f 6e 63 6c h4>Logical concl
17b0: 75 73 69 6f 6e 73 3c 2f 68 34 3e 0d 0a 41 6e 79 usions</h4>..Any
17c0: 20 74 6f 70 6f 6c 6f 67 69 63 61 6c 6c 79 20 76 topologically v
17d0: 61 6c 69 64 20 3c 62 3e 4e 65 74 77 6f 72 6b 3c alid <b>Network<
17e0: 2f 62 3e 20 28 69 72 72 65 73 70 65 63 74 69 76 /b> (irrespectiv
17f0: 65 20 6f 66 20 77 68 65 74 68 65 72 20 69 74 20 e of whether it
1800: 69 73 20 61 20 3c 62 3e 53 70 61 74 69 61 6c 3c is a <b>Spatial<
1810: 2f 62 3e 20 6f 72 20 3c 62 3e 4c 6f 67 69 63 61 /b> or <b>Logica
1820: 6c 3c 2f 62 3e 20 74 79 70 65 29 20 69 73 20 61 l</b> type) is a
1830: 20 76 61 6c 69 64 20 3c 62 3e 47 72 61 70 68 3c valid <b>Graph<
1840: 2f 62 3e 2e 3c 62 72 3e 0d 0a 41 20 4e 65 74 77 /b>.<br>..A Netw
1850: 6f 72 6b 20 61 6c 6c 6f 77 69 6e 67 20 74 68 65 ork allowing the
1860: 20 73 75 70 70 6f 72 74 20 28 64 69 72 65 63 74 support (direct
1870: 20 6f 72 20 69 6e 64 69 72 65 63 74 29 20 6f 66 or indirect) of
1880: 20 73 6f 6d 65 20 61 70 70 72 6f 70 72 69 61 74 some appropriat
1890: 65 20 3c 62 3e 63 6f 73 74 20 76 61 6c 75 65 3c e <b>cost value<
18a0: 2f 62 3e 20 69 73 20 61 20 76 61 6c 69 64 20 3c /b> is a valid <
18b0: 62 3e 57 65 69 67 68 74 65 64 20 47 72 61 70 68 b>Weighted Graph
18c0: 3c 2f 62 3e 2c 20 61 6e 64 20 63 61 6e 20 63 6f </b>, and can co
18d0: 6e 73 65 71 75 65 6e 74 6c 79 20 73 75 70 70 6f nsequently suppo
18e0: 72 74 20 3c 62 3e 52 6f 75 74 69 6e 67 20 61 6c rt <b>Routing al
18f0: 67 6f 72 69 74 68 6d 73 3c 2f 62 3e 2e 3c 62 72 gorithms</b>.<br
1900: 3e 0d 0a 41 6c 6c 20 52 6f 75 74 69 6e 67 20 61 >..All Routing a
1910: 6c 67 6f 72 69 74 68 6d 73 20 61 72 65 20 69 6e lgorithms are in
1920: 74 65 6e 64 65 64 20 74 6f 20 69 64 65 6e 74 69 tended to identi
1930: 66 79 20 74 68 65 20 3c 62 3e 53 68 6f 72 74 65 fy the <b>Shorte
1940: 73 74 20 50 61 74 68 3c 2f 62 3e 20 73 6f 6c 75 st Path</b> solu
1950: 74 69 6f 6e 20 63 6f 6e 6e 65 63 74 69 6e 67 20 tion connecting
1960: 74 77 6f 20 3c 62 3e 4e 6f 64 65 73 3c 2f 62 3e two <b>Nodes</b>
1970: 20 69 6e 20 61 20 3c 62 3e 77 65 69 67 68 74 65 in a <b>weighte
1980: 64 20 67 72 61 70 68 3c 2f 62 3e 20 28 3c 69 3e d graph</b> (<i>
1990: 61 6b 61 3c 2f 69 3e 20 3c 62 3e 4e 65 74 77 6f aka</i> <b>Netwo
19a0: 72 6b 3c 2f 62 3e 29 2e 3c 62 72 3e 3c 62 72 3e rk</b>).<br><br>
19b0: 0d 0a 3c 62 3e 3c 75 3e 4e 6f 74 65 3c 2f 75 3e ..<b><u>Note</u>
19c0: 3c 2f 62 3e 3a 20 74 68 65 20 74 65 72 6d 20 3c </b>: the term <
19d0: 62 3e 3c 69 3e 53 68 6f 72 74 65 73 74 20 50 61 b><i>Shortest Pa
19e0: 74 68 3c 2f 69 3e 3c 2f 62 3e 20 63 61 6e 20 62 th</i></b> can b
19f0: 65 20 65 61 73 69 6c 79 20 6d 69 73 75 6e 64 65 e easily misunde
1a00: 72 73 74 6f 6f 64 2e 3c 62 72 3e 0d 0a 44 75 65 rstood.<br>..Due
1a10: 20 74 6f 20 68 69 73 74 6f 72 69 63 61 6c 20 72 to historical r
1a20: 65 61 73 6f 6e 73 20 74 68 65 20 6d 6f 73 74 20 easons the most
1a30: 63 6f 6d 6d 6f 6e 20 61 70 70 6c 69 63 61 74 69 common applicati
1a40: 6f 6e 20 66 69 65 6c 64 20 66 6f 72 20 52 6f 75 on field for Rou
1a50: 74 69 6e 67 20 61 6c 67 6f 72 69 74 68 6d 73 20 ting algorithms
1a60: 69 73 20 72 65 6c 61 74 65 64 20 74 6f 20 3c 62 is related to <b
1a70: 3e 52 6f 61 64 20 4e 65 74 77 6f 72 6b 73 3c 2f >Road Networks</
1a80: 62 3e 2c 20 62 75 74 20 61 6c 73 6f 20 6d 61 6e b>, but also man
1a90: 79 20 6f 74 68 65 72 20 6b 69 6e 64 73 20 6f 66 y other kinds of
1aa0: 20 4e 65 74 77 6f 72 6b 73 20 65 78 69 73 74 3a Networks exist:
1ab0: 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 48 79 64 72 ..<ul>..<li>Hydr
1ac0: 6f 67 72 61 70 68 69 63 20 4e 65 74 77 6f 72 6b ographic Network
1ad0: 73 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 47 61 73 s.</li>..<li>Gas
1ae0: 20 2f 20 57 61 74 65 72 20 2f 20 4f 69 6c 20 4e / Water / Oil N
1af0: 65 74 77 6f 72 6b 73 2e 3c 2f 6c 69 3e 0d 0a 3c etworks.</li>..<
1b00: 6c 69 3e 45 6c 65 63 74 72 69 63 61 6c 20 4e 65 li>Electrical Ne
1b10: 74 77 6f 72 6b 73 2e 3c 2f 6c 69 3e 0d 0a 3c 6c tworks.</li>..<l
1b20: 69 3e 54 65 6c 65 63 6f 6d 75 6e 69 63 61 74 69 i>Telecomunicati
1b30: 6f 6e 20 4e 65 74 77 6f 72 6b 73 2e 3c 2f 6c 69 on Networks.</li
1b40: 3e 0d 0a 3c 6c 69 3e 53 6f 63 69 61 6c 20 6f 72 >..<li>Social or
1b50: 20 45 63 6f 6e 6f 6d 69 63 61 6c 20 4e 65 74 77 Economical Netw
1b60: 6f 72 6b 73 20 72 65 70 72 65 73 65 6e 74 69 6e orks representin
1b70: 67 20 72 65 6c 61 74 69 6f 6e 73 68 69 70 73 20 g relationships
1b80: 62 65 74 77 65 65 6e 20 69 6e 64 69 76 69 64 75 between individu
1b90: 61 6c 73 20 6f 72 20 63 6f 6d 70 61 6e 69 65 73 als or companies
1ba0: 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 45 70 69 64 .</li>..<li>Epid
1bb0: 65 6d 69 6f 6c 6f 67 69 63 61 6c 20 4e 65 74 77 emiological Netw
1bc0: 6f 72 6b 73 20 72 65 70 72 65 73 65 6e 74 69 6e orks representin
1bd0: 67 20 74 68 65 20 70 72 6f 70 61 67 61 74 69 6f g the propagatio
1be0: 6e 20 6f 66 20 69 6e 66 65 63 74 69 76 65 20 64 n of infective d
1bf0: 69 73 65 61 73 65 73 20 62 65 74 77 65 65 6e 20 iseases between
1c00: 69 6e 64 69 76 69 64 75 61 6c 73 20 6f 72 20 67 individuals or g
1c10: 72 6f 75 70 73 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 roups.</li>..</u
1c20: 6c 3e 3c 2f 6c 69 3e 20 0d 0a 3c 62 72 3e 0d 0a l></li> ..<br>..
1c30: 49 6e 20 61 6c 6c 20 74 68 65 20 61 62 6f 76 65 In all the above
1c40: 20 63 61 73 65 73 20 77 65 20 63 65 72 74 61 69 cases we certai
1c50: 6e 6c 79 20 68 61 76 65 20 76 61 6c 69 64 20 4e nly have valid N
1c60: 65 74 77 6f 72 6b 73 20 73 75 70 70 6f 72 74 69 etworks supporti
1c70: 6e 67 20 52 6f 75 74 69 6e 67 20 61 6c 67 6f 72 ng Routing algor
1c80: 69 74 68 6e 73 2c 20 62 75 74 20 6e 6f 74 20 61 ithns, but not a
1c90: 6c 6c 20 6f 66 20 74 68 65 6d 20 63 61 6e 20 69 ll of them can i
1ca0: 6d 70 6c 79 20 73 6f 6d 65 74 68 69 6e 67 20 6c mply something l
1cb0: 69 6b 65 20 61 20 3c 69 3e 73 70 61 74 69 61 6c ike a <i>spatial
1cc0: 20 64 69 73 74 61 6e 63 65 3c 2f 69 3e 20 28 3c distance</i> (<
1cd0: 69 3e 67 65 6f 6d 65 74 72 69 63 20 6c 65 6e 67 i>geometric leng
1ce0: 74 68 3c 2f 69 3e 29 20 6f 72 20 61 20 3c 69 3e th</i>) or a <i>
1cf0: 74 72 61 76 65 6c 20 74 69 6d 65 3c 2f 69 3e 2e travel time</i>.
1d00: 3c 62 72 3e 0d 0a 49 6e 20 74 68 65 20 6d 6f 73 <br>..In the mos
1d10: 74 20 67 65 6e 65 72 61 6c 20 61 63 63 65 70 74 t general accept
1d20: 69 6f 6e 20 3c 62 3e 63 6f 73 74 73 3c 2f 62 3e ion <b>costs</b>
1d30: 20 63 61 6e 20 62 65 20 72 65 70 72 65 73 65 6e can be represen
1d40: 74 65 64 20 62 79 20 61 6e 79 20 72 65 61 73 6f ted by any reaso
1d50: 6e 61 62 6c 65 20 70 68 79 73 69 63 61 6c 20 71 nable physical q
1d60: 75 61 6e 74 69 74 79 2e 3c 62 72 3e 0d 0a 53 6f uantity.<br>..So
1d70: 20 61 20 6d 6f 72 65 20 67 65 6e 65 72 61 6c 69 a more generali
1d80: 7a 65 64 20 64 65 66 69 6e 69 74 69 6f 6e 20 69 zed definition i
1d90: 73 20 61 73 73 75 6d 69 6e 67 20 74 68 61 74 20 s assuming that
1da0: 52 6f 75 74 69 6e 67 20 61 6c 67 6f 72 69 74 68 Routing algorith
1db0: 6d 73 20 61 72 65 20 69 6e 74 65 6e 64 65 64 20 ms are intended
1dc0: 74 6f 20 69 64 65 6e 74 69 66 79 20 3c 62 3e 6c to identify <b>l
1dd0: 65 73 73 65 72 20 63 6f 73 74 3c 2f 62 3e 20 73 esser cost</b> s
1de0: 6f 6c 75 74 69 6f 6e 73 20 6f 6e 20 61 20 3c 62 olutions on a <b
1df0: 3e 77 65 69 67 68 74 65 64 20 67 72 61 70 68 3c >weighted graph<
1e00: 2f 62 3e 2e 3c 62 72 3e 0d 0a 54 68 65 20 65 78 /b>.<br>..The ex
1e10: 61 63 74 20 69 6e 74 65 72 70 72 65 74 61 74 69 act interpretati
1e20: 6f 6e 20 6f 66 20 74 68 65 20 69 6e 76 6f 6c 76 on of the involv
1e30: 65 64 20 3c 62 3e 63 6f 73 74 73 3c 2f 62 3e 20 ed <b>costs</b>
1e40: 28 3c 69 3e 61 6b 61 3c 2f 69 3e 20 3c 62 3e 77 (<i>aka</i> <b>w
1e50: 65 69 67 68 74 73 3c 2f 62 3e 29 20 73 74 72 69 eights</b>) stri
1e60: 63 74 6c 79 20 64 65 70 65 6e 64 73 20 6f 6e 20 ctly depends on
1e70: 74 68 65 20 76 65 72 79 20 73 70 65 63 69 66 69 the very specifi
1e80: 63 20 6e 61 74 75 72 65 20 6f 66 20 65 61 63 68 c nature of each
1e90: 20 4e 65 74 77 6f 72 6b 2e 0d 0a 3c 68 33 3e 54 Network...<h3>T
1ea0: 68 65 20 44 69 6a 6b 73 74 72 61 27 73 20 61 6c he Dijkstra's al
1eb0: 67 6f 72 69 74 68 6d 3c 2f 68 33 3e 0d 0a 54 68 gorithm</h3>..Th
1ec0: 69 73 20 77 65 6c 6c 20 6b 6e 6f 77 6e 20 3c 61 is well known <a
1ed0: 20 68 72 65 66 3d 22 68 74 74 70 73 3a 2f 2f 65 href="https://e
1ee0: 6e 2e 77 69 6b 69 70 65 64 69 61 2e 6f 72 67 2f n.wikipedia.org/
1ef0: 77 69 6b 69 2f 44 69 6a 6b 73 74 72 61 25 32 37 wiki/Dijkstra%27
1f00: 73 5f 61 6c 67 6f 72 69 74 68 6d 22 3e 61 6c 67 s_algorithm">alg
1f10: 6f 72 69 74 68 6d 3c 2f 61 3e 20 69 73 6e 27 74 orithm</a> isn't
1f20: 20 6e 65 63 65 73 73 61 72 69 6c 79 20 74 68 65 necessarily the
1f30: 20 66 61 73 74 65 73 74 20 6f 6e 65 2c 20 62 75 fastest one, bu
1f40: 74 20 69 74 20 61 6c 77 61 79 73 20 65 6e 73 75 t it always ensu
1f50: 72 65 73 20 3c 62 3e 66 75 6c 6c 20 63 6f 72 72 res <b>full corr
1f60: 65 63 74 6e 65 73 73 3c 2f 62 3e 3a 0d 0a 3c 75 ectness</b>:..<u
1f70: 6c 3e 0d 0a 3c 6c 69 3e 41 6e 79 20 4e 6f 64 65 l>..<li>Any Node
1f80: 2d 74 6f 2d 4e 6f 64 65 20 63 6f 6e 6e 65 63 74 -to-Node connect
1f90: 69 6f 6e 20 69 64 65 6e 74 69 66 69 65 64 20 62 ion identified b
1fa0: 79 20 44 69 6a 6b 73 74 72 61 27 73 20 69 73 20 y Dijkstra's is
1fb0: 63 65 72 74 61 69 6e 6c 79 20 65 6e 73 75 72 65 certainly ensure
1fc0: 64 20 74 6f 20 62 65 20 3c 62 3e 6f 70 74 69 6d d to be <b>optim
1fd0: 61 6c 3c 2f 62 3e 2e 3c 62 72 3e 0d 0a 49 6e 20 al</b>.<br>..In
1fe0: 6f 74 68 65 72 20 77 6f 72 64 73 2c 20 6e 6f 20 other words, no
1ff0: 63 6f 6e 6e 65 74 63 74 69 6f 6e 20 70 72 65 73 connetction pres
2000: 65 6e 74 69 6e 67 20 61 20 6c 6f 77 65 72 20 63 enting a lower c
2010: 6f 73 74 20 63 61 6e 20 63 6f 6e 63 65 70 74 75 ost can conceptu
2020: 61 6c 6c 79 20 65 78 69 73 74 2e 3c 2f 6c 69 3e ally exist.</li>
2030: 0d 0a 3c 6c 69 3e 57 68 65 6e 20 44 69 6a 73 6a ..<li>When Dijsj
2040: 74 72 61 27 73 20 66 61 69 6c 73 20 74 6f 20 69 tra's fails to i
2050: 64 65 6e 74 69 66 79 20 61 20 73 6f 6c 75 74 69 dentify a soluti
2060: 6f 6e 20 74 68 69 73 20 73 75 72 65 6c 79 20 6d on this surely m
2070: 65 61 6e 73 20 74 68 61 74 20 6e 6f 20 73 6f 6c eans that no sol
2080: 75 74 69 6f 6e 20 69 73 20 70 6f 73 73 69 62 6c ution is possibl
2090: 65 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a e.</li>..</ul>..
20a0: 3c 68 33 3e 54 68 65 20 41 2a 20 61 6c 67 6f 72 <h3>The A* algor
20b0: 69 74 68 6d 3c 2f 68 33 3e 0d 0a 4d 61 6e 79 20 ithm</h3>..Many
20c0: 61 6c 74 65 72 6e 61 74 69 76 65 20 52 6f 75 74 alternative Rout
20d0: 69 6e 67 20 61 6c 67 6f 72 69 74 68 6d 73 20 68 ing algorithms h
20e0: 61 76 65 20 62 65 65 6e 20 69 6e 76 65 6e 74 65 ave been invente
20f0: 64 20 64 75 72 69 6e 67 20 74 68 65 20 79 65 61 d during the yea
2100: 72 73 2e 3c 62 72 3e 0d 0a 41 6c 6c 20 74 68 65 rs.<br>..All the
2110: 6d 20 61 72 65 20 62 61 73 65 64 20 6f 6e 20 68 m are based on h
2120: 65 75 72 69 73 74 69 63 20 61 73 73 75 6d 70 74 euristic assumpt
2130: 69 6f 6e 73 20 61 6e 64 20 61 72 65 20 69 6e 74 ions and are int
2140: 65 6e 64 65 64 20 74 6f 20 62 65 20 66 61 73 74 ended to be fast
2150: 65 72 20 74 68 61 6e 20 44 69 6a 6b 73 74 72 61 er than Dijkstra
2160: 27 73 2c 20 62 75 74 20 6e 6f 6e 65 20 6f 66 20 's, but none of
2170: 74 68 65 6d 20 63 61 6e 20 65 6e 73 75 72 65 20 them can ensure
2180: 3c 62 3e 66 75 6c 6c 20 63 6f 72 72 65 63 74 6e <b>full correctn
2190: 65 73 73 3c 2f 62 3e 20 61 73 20 44 69 6a 6b 73 ess</b> as Dijks
21a0: 74 72 61 27 73 20 64 6f 65 73 2e 3c 62 72 3e 0d tra's does.<br>.
21b0: 0a 54 68 65 20 3c 61 20 68 72 65 66 3d 22 68 74 .The <a href="ht
21c0: 74 70 73 3a 2f 2f 65 6e 2e 77 69 6b 69 70 65 64 tps://en.wikiped
21d0: 69 61 2e 6f 72 67 2f 77 69 6b 69 2f 41 2a 5f 73 ia.org/wiki/A*_s
21e0: 65 61 72 63 68 5f 61 6c 67 6f 72 69 74 68 6d 22 earch_algorithm"
21f0: 3e 41 2a 20 61 6c 67 6f 72 69 74 68 6d 3c 2f 61 >A* algorithm</a
2200: 3e 20 61 70 70 6c 69 65 73 20 61 20 6d 69 6c 64 > applies a mild
2210: 20 68 65 75 72 69 73 74 69 63 20 6f 70 74 69 6d heuristic optim
2220: 69 7a 61 74 69 6f 6e 2c 20 61 6e 64 20 63 61 6e ization, and can
2230: 20 62 65 20 61 20 72 65 61 6c 69 73 74 69 63 20 be a realistic
2240: 61 6c 74 65 72 6e 61 74 69 76 65 20 74 6f 20 44 alternative to D
2250: 69 6a 6b 73 74 72 61 27 73 20 69 6e 20 6d 61 6e ijkstra's in man
2260: 79 20 63 61 73 65 73 2e 3c 62 72 3e 3c 62 72 3e y cases.<br><br>
2270: 0d 0a 3c 68 72 3e 0d 0a 3c 68 31 3e 32 20 2d 20 ..<hr>..<h1>2 -
2280: 54 68 65 20 73 61 6d 70 6c 65 2f 74 65 73 74 20 The sample/test
2290: 44 42 3c 2f 68 31 3e 0d 0a 59 6f 75 20 61 72 65 DB</h1>..You are
22a0: 20 65 78 70 65 63 74 65 64 20 74 6f 20 66 6f 6c expected to fol
22b0: 6c 6f 77 20 74 68 65 20 63 75 72 72 65 6e 74 20 low the current
22c0: 74 75 74 6f 72 69 61 6c 20 61 62 6f 75 74 20 3c tutorial about <
22d0: 62 3e 56 69 72 74 75 61 6c 52 6f 75 74 69 6e 67 b>VirtualRouting
22e0: 3c 2f 62 3e 20 62 79 20 64 69 72 65 63 74 6c 79 </b> by directly
22f0: 20 74 65 73 74 69 6e 67 20 61 6c 6c 20 53 51 4c testing all SQL
2300: 20 71 75 65 72 69 65 73 20 64 69 73 63 75 73 73 queries discuss
2310: 65 64 20 62 65 6c 6f 77 20 6f 6e 20 62 65 68 61 ed below on beha
2320: 6c 66 20 6f 66 20 74 68 65 20 3c 61 20 68 72 65 lf of the <a hre
2330: 66 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 67 f="https://www.g
2340: 61 69 61 2d 67 69 73 2e 69 74 2f 67 61 69 61 2d aia-gis.it/gaia-
2350: 73 69 6e 73 2f 72 6f 75 74 69 6e 67 2d 73 61 6d sins/routing-sam
2360: 70 6c 65 2d 35 2e 30 2e 30 2e 37 7a 22 3e 73 61 ple-5.0.0.7z">sa
2370: 6d 70 6c 65 2f 74 65 73 74 20 44 42 20 74 68 61 mple/test DB tha
2380: 74 20 79 6f 75 20 63 61 6e 20 64 6f 77 6e 6c 6f t you can downlo
2390: 61 64 20 66 72 6f 6d 20 68 65 72 65 3c 2f 61 3e ad from here</a>
23a0: 3c 62 72 3e 3c 62 72 3e 0d 0a 54 68 65 20 73 61 <br><br>..The sa
23b0: 6d 70 6c 65 20 44 42 20 63 6f 6e 74 61 69 6e 73 mple DB contains
23c0: 20 74 68 65 20 66 75 6c 6c 20 3c 62 3e 72 6f 61 the full <b>roa
23d0: 64 20 6e 65 74 77 6f 72 6b 3c 2f 62 3e 20 6f 66 d network</b> of
23e0: 20 3c 62 3e 54 75 73 63 61 6e 79 20 52 65 67 69 <b>Tuscany Regi
23f0: 6f 6e 20 28 49 74 61 6c 79 29 3c 2f 62 3e 20 28 on (Italy)</b> (
2400: 3c 61 20 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f <a href="http://
2410: 77 77 77 35 30 32 2e 72 65 67 69 6f 6e 65 2e 74 www502.regione.t
2420: 6f 73 63 61 6e 61 2e 69 74 2f 67 65 6f 73 63 6f oscana.it/geosco
2430: 70 69 6f 2f 64 6f 77 6e 6c 6f 61 64 2f 67 72 61 pio/download/gra
2440: 66 6f 5f 73 74 72 61 64 61 6c 65 2f 69 74 65 72 fo_stradale/iter
2450: 6e 65 74 2e 7a 69 70 22 3e 49 74 65 72 2e 4e 65 net.zip">Iter.Ne
2460: 74 20 64 61 74 61 73 65 74 3c 2f 61 3e 29 20 6b t dataset</a>) k
2470: 69 6e 64 6c 79 20 72 65 6c 65 61 73 65 64 20 75 indly released u
2480: 6e 64 65 72 20 74 68 65 20 3c 62 3e 43 43 2d 42 nder the <b>CC-B
2490: 59 2d 53 41 20 34 2e 30 3c 2f 62 3e 20 6c 69 63 Y-SA 4.0</b> lic
24a0: 65 6e 63 65 20 74 65 72 6d 73 2e 3c 62 72 3e 0d ence terms.<br>.
24b0: 0a 54 68 65 20 63 6f 6e 74 65 6e 74 73 20 73 74 .The contents st
24c0: 6f 72 65 64 20 69 6e 74 6f 20 74 68 65 20 73 61 ored into the sa
24d0: 6d 70 6c 65 20 64 61 74 61 62 61 73 65 20 77 65 mple database we
24e0: 72 65 20 6f 70 70 6f 72 74 75 6e 65 6c 79 20 72 re opportunely r
24f0: 65 61 72 72 61 6e 67 65 64 2c 20 61 6e 64 20 61 earranged, and a
2500: 72 65 20 73 74 69 6c 6c 20 73 75 62 6a 65 63 74 re still subject
2510: 20 74 6f 20 74 68 65 20 69 6e 69 74 69 61 6c 20 to the initial
2520: 3c 62 3e 43 43 2d 42 59 2d 53 41 20 34 2e 30 3c <b>CC-BY-SA 4.0<
2530: 2f 62 3e 20 63 6c 61 75 73 65 73 20 28 3c 69 3e /b> clauses (<i>
2540: 64 65 72 69 76 65 64 20 77 6f 72 6b 3c 2f 69 3e derived work</i>
2550: 29 2e 0d 0a 3c 62 72 3e 3c 62 72 3e 0d 0a 3c 75 )...<br><br>..<u
2560: 6c 3e 0d 0a 3c 6c 69 3e 61 6c 6c 20 72 6f 61 64 l>..<li>all road
2570: 20 6e 61 6d 65 73 20 61 72 65 20 73 74 6f 72 65 names are store
2580: 64 20 77 69 74 68 69 6e 20 74 68 65 20 3c 62 3e d within the <b>
2590: 74 6f 70 6f 6e 79 6d 73 3c 2f 62 3e 20 54 61 62 toponyms</b> Tab
25a0: 6c 65 2e 3c 62 72 3e 0d 0a 74 68 65 20 73 61 6d le.<br>..the sam
25b0: 65 20 72 6f 61 64 20 6e 61 6d 65 20 63 6f 75 6c e road name coul
25c0: 64 20 62 65 20 75 73 65 64 20 69 6e 20 64 69 66 d be used in dif
25d0: 66 65 72 65 6e 74 20 4d 75 6e 69 63 69 70 61 6c ferent Municipal
25e0: 69 74 69 65 73 2c 20 73 6f 20 74 68 65 20 3c 62 ities, so the <b
25f0: 3e 74 6f 70 6f 6e 79 6d 73 3c 2f 62 3e 20 54 61 >toponyms</b> Ta
2600: 62 6c 65 20 72 65 6c 61 74 69 6f 6e 61 6c 6c 79 ble relationally
2610: 20 72 65 66 65 72 65 6e 63 65 73 20 74 68 65 20 references the
2620: 3c 62 3e 6d 75 6e 69 63 69 70 61 6c 69 74 69 65 <b>municipalitie
2630: 73 3c 2f 62 3e 20 54 61 62 6c 65 20 28 76 69 61 s</b> Table (via
2640: 20 3c 62 3e 50 52 49 4d 41 52 59 3c 2f 62 3e 20 <b>PRIMARY</b>
2650: 2f 20 3c 62 3e 46 4f 52 45 49 47 4e 20 4b 45 59 / <b>FOREIGN KEY
2660: 3c 2f 62 3e 20 72 65 6c 61 74 69 6f 6e 73 68 69 </b> relationshi
2670: 70 73 29 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 74 ps).</li>..<li>t
2680: 68 65 20 3c 62 3e 72 6f 61 64 73 3c 2f 62 3e 20 he <b>roads</b>
2690: 53 70 61 74 69 61 6c 20 54 61 62 6c 65 20 63 6f Spatial Table co
26a0: 6e 74 61 69 6e 73 20 61 62 6f 75 74 20 3c 62 3e ntains about <b>
26b0: 33 38 30 2c 30 30 30 3c 2f 62 3e 20 4c 69 6e 6b 380,000</b> Link
26c0: 73 2c 20 61 6e 64 20 68 61 73 20 74 68 65 20 66 s, and has the f
26d0: 6f 6c 6c 6f 77 69 6e 67 20 63 6f 6c 75 6d 6e 73 ollowing columns
26e0: 3a 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 3c 62 3e :..<ul>..<li><b>
26f0: 69 64 3c 2f 62 3e 3a 20 75 6e 69 71 75 65 20 69 id</b>: unique i
2700: 64 65 6e 74 69 66 69 65 72 20 6f 66 20 65 61 63 dentifier of eac
2710: 68 20 4c 69 6e 6b 20 28 3c 62 3e 50 52 49 4d 41 h Link (<b>PRIMA
2720: 52 59 20 4b 45 59 3c 2f 62 3e 29 2e 3c 2f 6c 69 RY KEY</b>).</li
2730: 3e 0d 0a 3c 6c 69 3e 3c 62 3e 6e 6f 64 65 5f 66 >..<li><b>node_f
2740: 72 6f 6d 3c 2f 62 3e 20 61 6e 64 20 3c 62 3e 6e rom</b> and <b>n
2750: 6f 64 65 5f 74 6f 3c 2f 62 3e 3a 20 4e 6f 64 65 ode_to</b>: Node
2760: 20 69 64 65 6e 74 69 66 69 65 72 73 2e 0d 0a 54 identifiers...T
2770: 68 65 20 6f 72 69 67 69 6e 61 6c 20 49 74 65 72 he original Iter
2780: 2e 4e 65 74 20 64 61 74 61 73 65 74 20 61 64 6f .Net dataset ado
2790: 70 74 73 20 76 65 72 79 20 6c 6f 6e 67 20 61 6e pts very long an
27a0: 20 63 6f 6d 70 6c 65 78 20 61 6c 70 68 61 6e 75 complex alphanu
27b0: 6d 65 72 69 63 20 4e 6f 64 65 20 63 6f 64 65 73 meric Node codes
27c0: 3b 20 74 68 65 20 69 6e 74 65 67 65 72 20 4e 6f ; the integer No
27d0: 64 65 20 49 44 73 20 77 65 72 65 20 6f 62 74 61 de IDs were obta
27e0: 69 6e 65 64 20 62 79 20 63 61 6c 6c 69 6e 67 20 ined by calling
27f0: 74 68 65 20 3c 62 3e 43 72 65 61 74 65 52 6f 75 the <b>CreateRou
2800: 74 69 6e 67 4e 6f 64 65 73 28 29 3c 2f 62 3e 20 tingNodes()</b>
2810: 53 51 4c 20 66 75 6e 63 74 69 6f 6e 20 64 69 73 SQL function dis
2820: 63 75 73 73 65 64 20 69 6e 20 61 20 66 6f 6c 6c cussed in a foll
2830: 6f 77 69 6e 67 20 73 65 63 74 69 6f 6e 2e 3c 2f owing section.</
2840: 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 69 64 5f 74 li>..<li><b>id_t
2850: 6f 70 6f 6e 79 6d 3c 2f 62 3e 3a 20 72 65 6c 61 oponym</b>: rela
2860: 74 69 6f 6e 61 6c 20 72 65 66 65 72 65 6e 63 65 tional reference
2870: 20 74 6f 20 74 68 65 20 63 6f 72 72 65 73 70 6f to the correspo
2880: 6e 64 69 6e 67 20 72 6f 61 64 20 6e 61 6d 65 20 nding road name
2890: 63 6f 6e 74 61 69 6e 65 64 20 69 6e 74 6f 20 74 contained into t
28a0: 68 65 20 3c 62 3e 74 6f 70 6f 6e 79 6d 73 3c 2f he <b>toponyms</
28b0: 62 3e 20 54 61 62 6c 65 20 28 3c 62 3e 46 4f 52 b> Table (<b>FOR
28c0: 45 49 47 4e 20 4b 45 59 3c 2f 62 3e 29 2e 3c 2f EIGN KEY</b>).</
28d0: 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 73 70 65 65 li>..<li><b>spee
28e0: 64 5f 6b 6d 68 3c 2f 62 3e 3a 20 74 68 65 20 65 d_kmh</b>: the e
28f0: 73 74 69 6d 61 74 65 64 20 61 76 65 72 61 67 65 stimated average
2900: 20 73 70 65 65 64 20 73 75 70 70 6f 72 74 65 64 speed supported
2910: 20 62 79 20 74 68 65 20 4c 69 6e 6b 2c 20 65 78 by the Link, ex
2920: 70 72 65 73 73 65 64 20 69 6e 20 3c 62 3e 6b 6d pressed in <b>km
2930: 2f 68 3c 2f 62 3e 2e 3c 62 72 3e 0d 0a 3c 75 3e /h</b>.<br>..<u>
2940: 4e 6f 74 65 3c 2f 75 3e 3a 20 3c 62 3e 6e 65 67 Note</u>: <b>neg
2950: 61 74 69 76 65 3c 2f 62 3e 20 73 70 65 65 64 73 ative</b> speeds
2960: 20 69 6e 74 65 6e 64 20 61 20 66 6f 72 62 69 64 intend a forbid
2970: 64 65 6e 20 4c 69 6e 6b 2e 3c 2f 6c 69 3e 0d 0a den Link.</li>..
2980: 3c 6c 69 3e 3c 62 3e 6f 6e 65 77 61 79 5f 66 72 <li><b>oneway_fr
2990: 6f 6d 74 6f 3c 2f 62 3e 20 61 6e 64 20 3c 62 3e omto</b> and <b>
29a0: 6f 6e 65 77 61 79 5f 74 6f 66 72 6f 6d 3c 2f 62 oneway_tofrom</b
29b0: 3e 3a 20 62 6f 6f 6c 65 61 6e 20 66 6c 61 67 73 >: boolean flags
29c0: 20 69 6e 74 65 6e 64 65 64 20 74 6f 20 73 74 61 intended to sta
29d0: 74 65 20 69 66 20 61 20 4c 69 6e 6b 20 63 61 6e te if a Link can
29e0: 20 62 65 20 74 72 61 76 65 72 73 65 64 20 69 6e be traversed in
29f0: 20 62 6f 74 68 20 64 69 72 65 63 74 69 6f 6e 73 both directions
2a00: 20 6f 72 20 6a 75 73 74 20 69 6e 20 61 20 73 69 or just in a si
2a10: 6e 67 6c 65 20 64 69 72 65 63 74 69 6f 6e 20 28 ngle direction (
2a20: 3c 62 3e 6f 6e 65 2d 77 61 79 3c 2f 62 3e 29 2e <b>one-way</b>).
2a30: 3c 62 72 3e 0d 0a 3c 75 3e 4e 6f 74 65 3c 2f 75 <br>..<u>Note</u
2a40: 3e 3a 20 61 6c 6c 20 4c 69 6e 6b 73 20 64 65 63 >: all Links dec
2a50: 6c 61 72 69 6e 67 20 3c 62 3e 6f 6e 65 77 61 79 laring <b>oneway
2a60: 5f 66 72 6f 6d 74 6f 3d 30 3c 2f 62 3e 20 61 6e _fromto=0</b> an
2a70: 64 20 3c 62 3e 6f 6e 65 77 61 79 5f 74 6f 66 72 d <b>oneway_tofr
2a80: 6f 6d 3d 30 3c 2f 62 3e 20 61 72 65 20 69 6e 74 om=0</b> are int
2a90: 65 6e 64 65 64 20 74 6f 20 62 65 20 61 6c 77 61 ended to be alwa
2aa0: 79 73 20 66 6f 72 62 69 64 64 65 6e 2e 3c 2f 6c ys forbidden.</l
2ab0: 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 63 6f 73 74 3c i>..<li><b>cost<
2ac0: 2f 62 3e 3a 20 74 68 65 20 3c 62 3e 74 69 6d 65 /b>: the <b>time
2ad0: 3c 2f 62 3e 20 65 78 70 72 65 73 73 65 64 20 69 </b> expressed i
2ae0: 6e 20 3c 62 3e 73 65 63 6f 6e 64 73 3c 2f 62 3e n <b>seconds</b>
2af0: 20 72 65 71 75 69 72 65 64 20 74 6f 20 74 72 61 required to tra
2b00: 76 65 72 73 65 20 65 61 63 68 20 4c 69 6e 6b 2e verse each Link.
2b10: 3c 62 72 3e 0d 0a 3c 75 3e 4e 6f 74 65 20 23 31 <br>..<u>Note #1
2b20: 3c 2f 75 3e 20 61 6c 6c 20 63 6f 73 74 73 20 77 </u> all costs w
2b30: 65 72 65 20 63 61 6c 63 75 6c 61 74 65 64 20 61 ere calculated a
2b40: 63 63 6f 72 64 69 6e 67 6c 79 20 74 6f 20 74 68 ccordingly to th
2b50: 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 66 6f 72 6d e following form
2b60: 75 6c 61 3a 20 3c 62 3e 63 6f 73 74 20 3d 20 28 ula: <b>cost = (
2b70: 28 53 54 5f 4c 65 6e 67 74 68 28 67 65 6f 6d 29 (ST_Length(geom)
2b80: 20 2f 20 31 30 30 30 2e 30 29 20 2f 20 73 70 65 / 1000.0) / spe
2b90: 65 64 5f 6b 6d 68 29 20 2a 20 33 36 30 30 2e 30 ed_kmh) * 3600.0
2ba0: 3c 2f 62 3e 3c 62 72 3e 0d 0a 3c 75 3e 4e 6f 74 </b><br>..<u>Not
2bb0: 65 20 23 32 3c 2f 75 3e 20 61 6c 6c 20 3c 62 3e e #2</u> all <b>
2bc0: 38 36 2c 34 30 30 2e 30 3c 2f 62 3e 20 63 6f 73 86,400.0</b> cos
2bd0: 74 20 76 61 6c 75 65 73 20 28 65 71 75 69 76 61 t values (equiva
2be0: 6c 65 6e 74 20 74 6f 20 31 20 64 61 79 29 20 61 lent to 1 day) a
2bf0: 70 70 72 6f 78 69 6d 61 74 65 20 61 6e 20 3c 62 pproximate an <b
2c00: 3e 69 6e 66 69 6e 69 74 69 76 65 20 63 6f 73 74 >infinitive cost
2c10: 3c 2f 62 3e 20 74 68 75 73 20 69 6e 74 65 6e 64 </b> thus intend
2c20: 69 6e 67 20 61 20 3c 62 3e 66 6f 72 62 69 64 64 ing a <b>forbidd
2c30: 65 6e 3c 2f 62 3e 20 4c 69 6e 6b 2e 3c 2f 6c 69 en</b> Link.</li
2c40: 3e 0d 0a 3c 6c 69 3e 3c 62 3e 67 65 6f 6d 3c 2f >..<li><b>geom</
2c50: 62 3e 3a 20 61 20 3c 62 3e 33 44 20 4c 69 6e 65 b>: a <b>3D Line
2c60: 73 74 72 69 6e 67 3c 2f 62 3e 20 72 65 70 72 65 string</b> repre
2c70: 73 65 6e 74 69 6e 67 20 74 68 65 20 47 65 6f 6d senting the Geom
2c80: 65 74 72 79 20 6f 66 20 65 61 63 68 20 4c 69 6e etry of each Lin
2c90: 6b 2e 3c 62 72 3e 0d 0a 3c 75 3e 4e 6f 74 65 3c k.<br>..<u>Note<
2ca0: 2f 75 3e 3a 20 74 68 65 20 6f 72 69 67 69 6e 61 /u>: the origina
2cb0: 6c 20 3c 62 3e 49 74 65 72 2e 4e 65 74 3c 2f 62 l <b>Iter.Net</b
2cc0: 3e 20 64 61 74 61 73 65 74 20 69 73 20 6a 75 73 > dataset is jus
2cd0: 74 20 3c 62 3e 32 44 3c 2f 62 3e 3b 20 65 6c 65 t <b>2D</b>; ele
2ce0: 76 61 74 69 6f 6e 73 20 28 3c 62 3e 5a 3c 2f 62 vations (<b>Z</b
2cf0: 3e 20 63 6f 6f 72 64 69 6e 61 74 65 73 29 20 77 > coordinates) w
2d00: 65 72 65 20 69 6e 74 65 72 70 6f 6c 61 74 65 64 ere interpolated
2d10: 20 62 79 20 64 72 61 70 69 6e 67 20 74 68 65 20 by draping the
2d20: 64 61 74 61 73 65 74 20 6f 76 65 72 20 61 6e 20 dataset over an
2d30: 3c 61 20 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f <a href="http://
2d40: 77 77 77 35 30 32 2e 72 65 67 69 6f 6e 65 2e 74 www502.regione.t
2d50: 6f 73 63 61 6e 61 2e 69 74 2f 67 65 6f 73 63 6f oscana.it/geosco
2d60: 70 69 6f 2f 64 6f 77 6e 6c 6f 61 64 2f 61 6c 74 pio/download/alt
2d70: 69 6d 65 74 72 69 61 2f 64 61 5f 63 74 72 31 30 imetria/da_ctr10
2d80: 6b 2f 67 62 2f 44 54 4d 5f 4f 72 6f 67 72 61 66 k/gb/DTM_Orograf
2d90: 69 63 6f 2e 37 7a 22 3e 6f 72 6f 67 72 61 70 68 ico.7z">orograph
2da0: 69 63 20 44 45 4d 20 28 31 30 6d 20 58 20 31 30 ic DEM (10m X 10
2db0: 6d 20 63 65 6c 6c 73 29 3c 2f 61 3e 3c 2f 6c 69 m cells)</a></li
2dc0: 3e 0d 0a 3c 2f 75 6c 3e 3c 2f 6c 69 3e 0d 0a 3c >..</ul></li>..<
2dd0: 6c 69 3e 74 68 65 20 3c 62 3e 72 6f 61 64 73 5f li>the <b>roads_
2de0: 76 77 3c 2f 62 3e 20 53 70 61 74 69 61 6c 20 56 vw</b> Spatial V
2df0: 69 65 77 20 69 73 20 6a 75 73 74 20 69 6e 74 65 iew is just inte
2e00: 6e 64 65 64 20 74 6f 20 66 75 6c 6c 79 20 72 65 nded to fully re
2e10: 73 6f 6c 76 65 20 61 6c 6c 20 72 65 6c 61 74 69 solve all relati
2e20: 6f 6e 61 6c 20 72 65 66 65 72 65 6e 63 65 73 20 onal references
2e30: 62 65 74 77 65 65 6e 20 3c 62 3e 72 6f 61 64 73 between <b>roads
2e40: 3c 2f 62 3e 2c 20 3c 62 3e 74 6f 70 6f 6e 79 6d </b>, <b>toponym
2e50: 73 3c 2f 62 3e 20 61 6e 64 20 3c 62 3e 6d 75 6e s</b> and <b>mun
2e60: 69 63 69 70 61 6c 69 74 69 65 73 3c 2f 62 3e 2c icipalities</b>,
2e70: 20 74 68 75 73 20 61 6c 6c 6f 77 69 6e 67 20 66 thus allowing f
2e80: 6f 72 20 65 61 73 69 65 72 20 53 51 4c 20 71 75 or easier SQL qu
2e90: 65 72 69 65 73 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 eries.</li>..<li
2ea0: 3e 74 68 65 20 3c 62 3e 68 6f 75 73 65 5f 6e 72 >the <b>house_nr
2eb0: 3c 2f 62 3e 20 53 70 61 74 69 61 6c 20 54 61 62 </b> Spatial Tab
2ec0: 6c 65 20 63 6f 6e 74 61 69 6e 73 20 61 62 6f 75 le contains abou
2ed0: 74 20 3c 62 3e 31 2c 34 38 30 2c 30 30 30 3c 2f t <b>1,480,000</
2ee0: 62 3e 20 48 6f 75 73 65 20 4e 75 6d 62 65 72 73 b> House Numbers
2ef0: 2c 20 61 6e 64 20 68 61 73 20 74 68 65 20 66 6f , and has the fo
2f00: 6c 6c 6f 77 69 6e 67 20 63 6f 6c 75 6d 6e 73 3a llowing columns:
2f10: 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 3c 62 3e 69 ..<ul>..<li><b>i
2f20: 64 3c 2f 62 3e 3a 20 75 6e 69 71 75 65 20 69 64 d</b>: unique id
2f30: 65 6e 74 69 66 69 65 72 20 6f 66 20 65 61 63 68 entifier of each
2f40: 20 48 6f 75 73 65 20 4e 75 6d 62 65 72 20 28 3c House Number (<
2f50: 62 3e 50 52 49 4d 41 52 59 20 4b 45 59 3c 2f 62 b>PRIMARY KEY</b
2f60: 3e 29 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 >).</li>..<li><b
2f70: 3e 69 64 5f 72 6f 61 64 3c 2f 62 3e 3a 20 72 65 >id_road</b>: re
2f80: 6c 61 74 69 6f 6e 61 6c 20 72 65 66 65 72 65 6e lational referen
2f90: 63 65 20 74 6f 20 74 68 65 20 63 6f 72 72 65 73 ce to the corres
2fa0: 70 6f 6e 64 69 6e 67 20 4c 69 6e 6b 20 63 6f 6e ponding Link con
2fb0: 74 61 69 6e 65 64 20 69 6e 74 6f 20 74 68 65 20 tained into the
2fc0: 3c 62 3e 72 6f 61 64 73 3c 2f 62 3e 20 54 61 62 <b>roads</b> Tab
2fd0: 6c 65 20 28 3c 62 3e 46 4f 52 45 49 47 4e 20 4b le (<b>FOREIGN K
2fe0: 45 59 3c 2f 62 3e 29 2e 3c 2f 6c 69 3e 0d 0a 3c EY</b>).</li>..<
2ff0: 6c 69 3e 3c 62 3e 6c 61 62 65 6c 3c 2f 62 3e 3a li><b>label</b>:
3000: 20 74 68 65 20 74 65 78 74 75 61 6c 20 6c 61 62 the textual lab
3010: 65 6c 20 66 75 6c 6c 79 20 71 75 61 6c 69 66 79 el fully qualify
3020: 69 6e 67 20 65 61 63 68 20 48 6f 75 73 65 20 4e ing each House N
3030: 75 6d 62 65 72 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 umber.</li>..<li
3040: 3e 3c 62 3e 67 65 6f 6d 3c 2f 62 3e 3a 20 61 20 ><b>geom</b>: a
3050: 3c 62 3e 33 44 20 50 6f 69 6e 74 3c 2f 62 3e 20 <b>3D Point</b>
3060: 72 65 70 72 65 73 65 6e 74 69 6e 67 20 74 68 65 representing the
3070: 20 47 65 6f 6d 65 74 72 79 20 6f 66 20 65 61 63 Geometry of eac
3080: 68 20 48 6f 75 73 65 20 4e 75 6d 62 65 72 2e 3c h House Number.<
3090: 62 72 3e 0d 0a 3c 75 3e 4e 6f 74 65 20 23 31 3c br>..<u>Note #1<
30a0: 2f 75 3e 3a 20 61 6c 73 6f 20 69 6e 20 74 68 69 /u>: also in thi
30b0: 73 20 63 61 73 65 20 61 6c 6c 20 65 6c 65 76 61 s case all eleva
30c0: 74 69 6f 6e 73 20 28 3c 62 3e 5a 3c 2f 62 3e 20 tions (<b>Z</b>
30d0: 63 6f 6f 72 64 69 6e 61 74 65 73 29 20 77 65 72 coordinates) wer
30e0: 65 20 69 6e 74 65 72 70 6f 6c 61 74 65 64 20 62 e interpolated b
30f0: 79 20 64 72 61 70 69 6e 67 20 74 68 65 20 64 61 y draping the da
3100: 74 61 73 65 74 20 6f 76 65 72 20 74 68 65 20 73 taset over the s
3110: 61 6d 65 20 44 45 4d 20 61 73 20 61 62 6f 76 65 ame DEM as above
3120: 2e 3c 62 72 3e 0d 0a 3c 75 3e 4e 6f 74 65 20 23 .<br>..<u>Note #
3130: 32 3c 2f 75 3e 3a 20 73 74 72 69 63 74 6c 79 20 2</u>: strictly
3140: 73 70 65 63 6b 69 6e 67 20 74 68 65 20 48 6f 75 specking the Hou
3150: 73 65 20 4e 75 6d 62 65 72 73 20 61 72 65 20 6e se Numbers are n
3160: 6f 74 20 70 61 72 74 20 6f 66 20 74 68 65 20 52 ot part of the R
3170: 6f 61 64 20 4e 65 74 77 6f 72 6b 3b 20 74 68 65 oad Network; the
3180: 79 20 61 72 65 20 69 6e 63 6c 75 64 65 20 69 6e y are include in
3190: 74 6f 20 74 68 65 20 73 61 6d 70 6c 65 2f 74 65 to the sample/te
31a0: 73 74 20 64 61 74 61 62 61 73 65 20 6a 75 73 74 st database just
31b0: 20 62 65 63 61 75 73 65 20 74 68 65 79 27 6c 6c because they'll
31c0: 20 62 65 20 75 73 65 66 75 6c 20 69 6e 20 73 6f be useful in so
31d0: 6d 65 20 6f 66 20 74 68 65 20 65 78 61 6d 70 6c me of the exampl
31e0: 65 73 20 65 78 70 6c 61 69 6e 65 64 20 69 6e 20 es explained in
31f0: 62 65 6c 6f 77 20 70 61 72 61 67 72 61 70 68 73 below paragraphs
3200: 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 3c 2f 6c .</li>..</ul></l
3210: 69 3e 0d 0a 3c 6c 69 3e 74 68 65 20 3c 62 3e 68 i>..<li>the <b>h
3220: 6f 75 73 65 5f 6e 72 5f 76 77 3c 2f 62 3e 20 53 ouse_nr_vw</b> S
3230: 70 61 74 69 61 6c 20 56 69 65 77 20 69 73 20 6a patial View is j
3240: 75 73 74 20 69 6e 74 65 6e 64 65 64 20 74 6f 20 ust intended to
3250: 66 75 6c 6c 79 20 72 65 73 6f 6c 76 65 20 61 6c fully resolve al
3260: 6c 20 72 65 6c 61 74 69 6f 6e 61 6c 20 72 65 66 l relational ref
3270: 65 72 65 6e 63 65 73 20 62 65 74 77 65 65 6e 20 erences between
3280: 3c 62 3e 68 6f 75 73 65 5f 6e 72 3c 2f 62 3e 2c <b>house_nr</b>,
3290: 20 3c 62 3e 72 6f 61 64 73 3c 2f 62 3e 2c 20 3c <b>roads</b>, <
32a0: 62 3e 74 6f 70 6f 6e 79 6d 73 3c 2f 62 3e 20 61 b>toponyms</b> a
32b0: 6e 64 20 3c 62 3e 6d 75 6e 69 63 69 70 61 6c 69 nd <b>municipali
32c0: 74 69 65 73 3c 2f 62 3e 2c 20 74 68 75 73 20 61 ties</b>, thus a
32d0: 6c 6c 6f 77 69 6e 67 20 66 6f 72 20 65 61 73 69 llowing for easi
32e0: 65 72 20 53 51 4c 20 71 75 65 72 69 65 73 2e 3c er SQL queries.<
32f0: 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 0d 0a 3c /li>..</ul>....<
3300: 62 72 3e 0d 0a 20 3c 68 72 3e 0d 0a 3c 68 31 3e br>.. <hr>..<h1>
3310: 3c 61 20 6e 61 6d 65 3d 22 63 72 65 61 74 65 22 <a name="create"
3320: 3e 33 20 2d 20 43 72 65 61 74 69 6e 67 20 56 69 >3 - Creating Vi
3330: 72 74 75 61 6c 52 6f 75 74 69 6e 67 20 54 61 62 rtualRouting Tab
3340: 6c 65 73 3c 2f 61 3e 3c 2f 68 31 3e 0d 0a 41 6c les</a></h1>..Al
3350: 6c 20 56 69 72 74 75 61 6c 52 6f 75 74 69 6e 67 l VirtualRouting
3360: 20 71 75 65 72 69 65 73 20 61 72 65 20 62 61 73 queries are bas
3370: 65 64 20 6f 6e 20 73 6f 6d 65 20 3c 62 3e 56 69 ed on some <b>Vi
3380: 72 74 75 61 6c 52 6f 75 74 69 6e 67 20 54 61 62 rtualRouting Tab
3390: 6c 65 3c 2f 62 3e 2c 20 61 6e 64 20 69 6e 20 74 le</b>, and in t
33a0: 75 72 6e 20 61 6e 79 20 56 69 72 74 75 61 6c 52 urn any VirtualR
33b0: 6f 75 74 69 6e 67 20 54 61 62 6c 65 20 69 73 20 outing Table is
33c0: 62 61 73 65 64 20 6f 6e 20 73 6f 6d 65 20 61 70 based on some ap
33d0: 70 72 6f 70 72 69 61 74 65 20 3c 62 3e 42 69 6e propriate <b>Bin
33e0: 61 72 79 20 44 61 74 61 20 54 61 62 6c 65 3c 2f ary Data Table</
33f0: 62 3e 20 73 75 70 70 6f 72 74 69 6e 67 20 61 6e b> supporting an
3400: 20 65 66 66 69 63 69 65 6e 74 20 72 65 70 72 65 efficient repre
3410: 73 65 6e 74 61 74 69 6f 6e 20 6f 66 20 74 68 65 sentation of the
3420: 20 75 6e 64 65 72 6c 79 69 6e 67 20 4e 65 74 77 underlying Netw
3430: 6f 72 6b 2e 3c 62 72 3e 0d 0a 53 6f 20 77 65 27 ork.<br>..So we'
3440: 6c 6c 20 73 74 61 72 74 20 66 69 72 73 74 20 62 ll start first b
3450: 79 20 63 72 65 61 74 69 6e 67 20 73 75 63 68 20 y creating such
3460: 74 61 62 6c 65 73 2e 3c 62 72 3e 3c 62 72 3e 0d tables.<br><br>.
3470: 0a 54 68 65 20 6f 6c 64 20 61 6e 64 20 6e 6f 77 .The old and now
3480: 20 73 75 70 65 72 73 65 64 65 64 20 3c 62 3e 56 superseded <b>V
3490: 69 72 74 75 61 6c 4e 65 74 77 6f 72 6b 3c 2f 62 irtualNetwork</b
34a0: 3e 20 72 65 71 75 69 72 65 64 20 75 73 69 6e 67 > required using
34b0: 20 61 20 73 65 70 61 72 61 74 65 20 43 4c 49 20 a separate CLI
34c0: 74 6f 6f 6c 20 28 3c 62 3e 73 70 61 74 69 61 6c tool (<b>spatial
34d0: 69 74 65 5f 6e 65 74 77 6f 72 6b 3c 2f 62 3e 29 ite_network</b>)
34e0: 20 69 6e 20 6f 72 64 65 72 20 74 6f 20 70 72 6f in order to pro
34f0: 70 65 72 6c 79 20 69 6e 69 74 69 61 6c 69 7a 65 perly initialize
3500: 20 61 20 56 69 72 74 75 61 6c 4e 65 74 77 6f 72 a VirtualNetwor
3510: 6b 20 54 61 62 6c 65 20 61 6e 64 20 69 74 73 20 k Table and its
3520: 63 6f 6d 70 61 6e 69 6f 6e 20 42 69 6e 61 72 79 companion Binary
3530: 20 44 61 74 61 20 54 61 62 6c 65 3b 0d 0a 61 6c Data Table;..al
3540: 74 65 72 6e 61 74 69 76 65 6c 79 20 3c 62 3e 73 ternatively <b>s
3550: 70 61 74 69 61 6c 69 74 65 5f 67 75 69 3c 2f 62 patialite_gui</b
3560: 3e 20 73 75 70 70 6f 72 74 65 64 20 61 20 3c 62 > supported a <b
3570: 3e 47 55 49 20 77 69 7a 61 72 64 3c 2f 62 3e 20 >GUI wizard</b>
3580: 66 6f 72 20 74 68 65 20 73 61 6d 65 20 74 61 73 for the same tas
3590: 6b 2e 20 53 69 6e 63 65 20 76 65 72 73 69 6f 6e k. Since version
35a0: 20 3c 62 3e 35 2e 30 2e 30 3c 2f 62 3e 20 6e 6f <b>5.0.0</b> no
35b0: 77 20 53 70 61 74 69 61 4c 69 74 65 20 64 69 72 w SpatiaLite dir
35c0: 65 63 74 6c 79 20 73 75 70 70 6f 72 74 73 20 61 ectly supports a
35d0: 20 73 70 65 63 69 66 69 63 20 3c 62 3e 43 72 65 specific <b>Cre
35e0: 61 74 65 52 6f 75 74 69 6e 67 28 29 3c 2f 62 3e ateRouting()</b>
35f0: 20 53 51 4c 20 66 75 6e 63 74 69 6f 6e 2e 0d 0a SQL function...
3600: 3c 76 65 72 62 61 74 69 6d 3e 0d 0a 53 45 4c 45 <verbatim>..SELE
3610: 43 54 20 43 72 65 61 74 65 52 6f 75 74 69 6e 67 CT CreateRouting
3620: 28 27 62 79 66 6f 6f 74 5f 64 61 74 61 27 2c 20 ('byfoot_data',
3630: 27 62 79 66 6f 6f 74 27 2c 20 27 72 6f 61 64 73 'byfoot', 'roads
3640: 5f 76 77 27 2c 20 27 6e 6f 64 65 5f 66 72 6f 6d _vw', 'node_from
3650: 27 2c 20 27 6e 6f 64 65 74 6f 27 2c 20 27 67 65 ', 'nodeto', 'ge
3660: 6f 6d 27 2c 20 4e 55 4c 4c 29 3b 0d 0a 0d 0a 53 om', NULL);....S
3670: 45 4c 45 43 54 20 43 72 65 61 74 65 52 6f 75 74 ELECT CreateRout
3680: 69 6e 67 5f 47 65 74 4c 61 73 74 45 72 72 6f 72 ing_GetLastError
3690: 28 29 3b 0d 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ();..-----------
36a0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
36b0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 0a 54 6f 4e 6f 64 ---------..ToNod
36c0: 65 20 43 6f 6c 75 6d 6e 20 22 6e 6f 64 65 74 6f e Column "nodeto
36d0: 22 20 69 73 20 6e 6f 74 20 64 65 66 69 6e 65 64 " is not defined
36e0: 20 69 6e 20 74 68 65 20 49 6e 70 75 74 20 54 61 in the Input Ta
36f0: 62 6c 65 0d 0a 3c 2f 76 65 72 62 61 74 69 6d 3e ble..</verbatim>
3700: 0d 0a 3c 75 3e 4e 6f 74 65 3c 2f 75 3e 3a 20 74 ..<u>Note</u>: t
3710: 68 69 73 20 66 69 72 73 74 20 71 75 65 72 79 20 his first query
3720: 63 6f 6e 74 61 69 6e 73 20 61 6e 20 69 6e 74 65 contains an inte
3730: 6e 64 65 64 20 65 72 72 6f 72 20 63 61 75 73 69 nded error causi
3740: 6e 67 20 3c 62 3e 43 72 65 61 74 65 52 6f 75 74 ng <b>CreateRout
3750: 69 6e 67 28 29 3c 2f 62 3e 20 74 6f 20 66 61 69 ing()</b> to fai
3760: 6c 20 72 61 69 73 69 6e 67 20 61 6e 20 65 78 63 l raising an exc
3770: 65 70 74 69 6f 6e 2e 3c 62 72 3e 0d 0a 43 72 65 eption.<br>..Cre
3780: 61 74 65 52 6f 75 74 69 6e 67 28 29 20 63 61 6e ateRouting() can
3790: 20 66 61 69 6c 20 66 6f 72 20 6d 75 6c 74 69 70 fail for multip
37a0: 6c 65 20 72 65 61 73 6f 6e 73 2c 20 61 6e 64 20 le reasons, and
37b0: 62 79 20 63 61 6c 6c 69 6e 67 20 3c 62 3e 43 72 by calling <b>Cr
37c0: 65 61 74 65 52 6f 75 74 69 6e 67 5f 47 65 74 4c eateRouting_GetL
37d0: 61 73 74 45 72 72 6f 72 28 29 3c 2f 62 3e 20 79 astError()</b> y
37e0: 6f 75 20 63 61 6e 20 65 61 73 69 6c 79 20 69 64 ou can easily id
37f0: 65 6e 74 69 66 79 20 74 68 65 20 65 78 61 63 74 entify the exact
3800: 20 72 65 61 73 6f 6e 20 77 68 79 20 74 68 65 20 reason why the
3810: 6d 6f 73 74 20 72 65 63 65 6e 74 20 63 61 6c 6c most recent call
3820: 20 74 6f 20 43 72 65 61 74 65 52 6f 75 74 69 6e to CreateRoutin
3830: 67 28 29 20 66 61 69 6c 65 64 2e 3c 62 72 3e 0d g() failed.<br>.
3840: 0a 3c 76 65 72 62 61 74 69 6d 3e 0d 0a 53 45 4c .<verbatim>..SEL
3850: 45 43 54 20 43 72 65 61 74 65 52 6f 75 74 69 6e ECT CreateRoutin
3860: 67 28 27 62 79 66 6f 6f 74 5f 64 61 74 61 27 2c g('byfoot_data',
3870: 20 27 62 79 66 6f 6f 74 27 2c 20 27 72 6f 61 64 'byfoot', 'road
3880: 73 5f 76 77 27 2c 20 27 6e 6f 64 65 5f 66 72 6f s_vw', 'node_fro
3890: 6d 27 2c 20 27 6e 6f 64 65 5f 74 6f 27 2c 20 27 m', 'node_to', '
38a0: 67 65 6f 6d 27 2c 20 4e 55 4c 4c 29 3b 0d 0a 2d geom', NULL);..-
38b0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 0a 31 0d ------------..1.
38c0: 0a 0d 0a 53 45 4c 45 43 54 20 43 72 65 61 74 65 ...SELECT Create
38d0: 52 6f 75 74 69 6e 67 5f 47 65 74 4c 61 73 74 45 Routing_GetLastE
38e0: 72 72 6f 72 28 29 3b 0d 0a 2d 2d 2d 2d 2d 2d 2d rror();..-------
38f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3900: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 0a 4e -------------..N
3910: 55 4c 4c 0d 0a 3c 2f 76 65 72 62 61 74 69 6d 3e ULL..</verbatim>
3920: 0d 0a 54 68 69 73 20 73 65 63 6f 6e 64 20 61 74 ..This second at
3930: 74 65 6d 70 74 20 69 66 20 66 69 6e 61 6c 6c 79 tempt if finally
3940: 20 73 75 63 63 65 73 73 66 75 6c 2c 20 61 6e 64 successful, and
3950: 20 6e 6f 77 20 43 72 65 61 74 65 52 6f 75 74 69 now CreateRouti
3960: 6e 67 28 29 20 72 65 74 75 72 6e 73 20 3c 62 3e ng() returns <b>
3970: 31 3c 2f 62 3e 20 28 3c 69 3e 61 6b 61 3c 2f 69 1</b> (<i>aka</i
3980: 3e 20 3c 62 3e 54 52 55 45 3c 2f 62 3e 29 2c 20 > <b>TRUE</b>),
3990: 61 6e 64 20 61 73 20 79 6f 75 20 63 61 6e 20 65 and as you can e
39a0: 61 73 69 6c 79 20 63 68 65 63 6b 20 6e 6f 77 20 asily check now
39b0: 74 68 65 20 44 61 74 61 62 61 73 65 20 63 6f 6e the Database con
39c0: 74 61 69 6e 73 20 74 77 6f 20 6e 65 77 20 54 61 tains two new Ta
39d0: 62 6c 65 73 3a 20 3c 62 3e 62 79 66 6f 6f 74 3c bles: <b>byfoot<
39e0: 2f 62 3e 20 61 6e 64 20 3c 62 3e 62 79 66 6f 6f /b> and <b>byfoo
39f0: 74 5f 64 61 74 61 3c 2f 62 3e 2e 3c 62 72 3e 0d t_data</b>.<br>.
3a00: 0a 3c 75 3e 4e 6f 74 65 3c 2f 75 3e 3a 20 61 66 .<u>Note</u>: af
3a10: 74 65 72 20 61 20 73 75 63 63 65 73 73 66 75 6c ter a successful
3a20: 20 63 61 6c 6c 20 74 6f 20 43 72 65 61 74 65 52 call to CreateR
3a30: 6f 75 74 69 6e 67 28 29 20 3c 62 3e 43 72 65 61 outing() <b>Crea
3a40: 74 65 52 6f 75 74 69 6e 67 5f 47 65 74 4c 61 73 teRouting_GetLas
3a50: 74 45 72 72 6f 72 28 29 3c 2f 62 3e 20 77 69 6c tError()</b> wil
3a60: 6c 20 61 6c 77 61 79 73 20 72 65 74 75 72 6e 20 l always return
3a70: 3c 62 3e 4e 55 4c 4c 3c 2f 62 3e 2e 3c 62 72 3e <b>NULL</b>.<br>
3a80: 3c 62 72 3e 0d 0a 59 6f 75 27 76 65 20 6a 75 73 <br>..You've jus
3a90: 74 20 75 73 65 64 20 74 68 65 20 3c 69 3e 72 65 t used the <i>re
3aa0: 64 75 63 65 64 20 66 6f 72 6d 3c 2f 69 3e 20 6f duced form</i> o
3ab0: 66 20 43 72 65 61 74 65 52 6f 75 74 69 6e 67 28 f CreateRouting(
3ac0: 29 3b 20 6c 65 74 27 73 20 73 65 65 20 69 6e 20 ); let's see in
3ad0: 6d 6f 72 65 20 64 65 70 74 68 20 61 6c 6c 20 74 more depth all t
3ae0: 68 65 20 61 72 67 75 6d 65 6e 74 73 20 61 6e 64 he arguments and
3af0: 20 74 68 65 69 72 20 6d 65 61 6e 69 6e 67 3a 0d their meaning:.
3b00: 0a 3c 6f 6c 3e 0d 0a 3c 6c 69 3e 3c 69 3e 62 79 .<ol>..<li><i>by
3b10: 66 6f 6f 74 5f 64 61 74 61 3c 2f 69 3e 3a 20 74 foot_data</i>: t
3b20: 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 4e he name of the N
3b30: 65 74 77 6f 72 6b 20 42 69 6e 61 72 79 20 44 61 etwork Binary Da
3b40: 74 61 20 54 61 62 6c 65 20 74 6f 20 62 65 20 63 ta Table to be c
3b50: 72 65 61 74 65 64 2e 3c 2f 6c 69 3e 0d 0a 3c 6c reated.</li>..<l
3b60: 69 3e 3c 69 3e 62 79 66 6f 6f 74 3c 2f 69 3e 3a i><i>byfoot</i>:
3b70: 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 the name of the
3b80: 20 56 69 72 74 75 61 6c 52 6f 75 74 69 6e 67 20 VirtualRouting
3b90: 54 61 62 6c 65 20 74 6f 20 62 65 20 63 72 65 61 Table to be crea
3ba0: 74 65 64 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c ted.</li>..<li><
3bb0: 69 3e 72 6f 61 64 73 5f 76 77 3c 2f 69 3e 3a 20 i>roads_vw</i>:
3bc0: 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 the name of the
3bd0: 3c 62 3e 53 70 61 74 69 61 6c 20 54 61 62 6c 65 <b>Spatial Table
3be0: 3c 2f 62 3e 20 6f 72 20 3c 62 3e 53 70 61 74 69 </b> or <b>Spati
3bf0: 61 6c 20 56 69 65 77 3c 2f 62 3e 20 72 65 70 72 al View</b> repr
3c00: 65 73 65 6e 74 69 6e 67 20 74 68 65 20 75 6e 64 esenting the und
3c10: 65 72 6c 79 69 6e 67 20 4e 65 74 77 6f 72 6b 2e erlying Network.
3c20: 3c 62 72 3e 0d 0a 3c 75 3e 4e 6f 74 65 3c 2f 75 <br>..<u>Note</u
3c30: 3e 3a 20 69 6e 20 74 68 69 73 20 63 61 73 65 20 >: in this case
3c40: 77 65 20 61 63 74 75 61 6c 6c 79 20 75 73 65 64 we actually used
3c50: 20 61 20 53 70 61 74 69 61 6c 20 56 69 65 77 2e a Spatial View.
3c60: 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 69 3e 6e 6f </li>..<li><i>no
3c70: 64 65 5f 66 72 6f 6d 3c 2f 69 3e 3a 20 6e 61 6d de_from</i>: nam
3c80: 65 20 6f 66 20 74 68 65 20 63 6f 6c 75 6d 6e 20 e of the column
3c90: 28 69 6e 20 74 68 65 20 61 62 6f 76 65 20 54 61 (in the above Ta
3ca0: 62 6c 65 20 6f 72 20 56 69 65 77 29 20 65 78 70 ble or View) exp
3cb0: 65 63 74 65 64 20 74 6f 20 63 6f 6e 74 61 69 6e ected to contain
3cc0: 20 3c 62 3e 6e 6f 64 65 2d 66 72 6f 6d 3c 2f 62 <b>node-from</b
3cd0: 3e 20 76 61 6c 75 65 73 2e 3c 2f 6c 69 3e 0d 0a > values.</li>..
3ce0: 3c 6c 69 3e 3c 69 3e 6e 6f 64 65 5f 74 6f 3c 2f <li><i>node_to</
3cf0: 69 3e 3a 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 i>: name of the
3d00: 63 6f 6c 75 6d 6e 20 28 69 6e 20 74 68 65 20 61 column (in the a
3d10: 62 6f 76 65 20 54 61 62 6c 65 20 6f 72 20 56 69 bove Table or Vi
3d20: 65 77 29 20 65 78 70 65 63 74 65 64 20 74 6f 20 ew) expected to
3d30: 63 6f 6e 74 61 69 6e 20 3c 62 3e 6e 6f 64 65 2d contain <b>node-
3d40: 74 6f 3c 2f 62 3e 20 76 61 6c 75 65 73 2e 3c 2f to</b> values.</
3d50: 6c 69 3e 0d 0a 3c 6c 69 3e 3c 69 3e 67 65 6f 6d li>..<li><i>geom
3d60: 3c 2f 69 3e 3a 20 6e 61 6d 65 20 6f 66 20 74 68 </i>: name of th
3d70: 65 20 63 6f 6c 75 6d 6e 20 28 69 6e 20 74 68 65 e column (in the
3d80: 20 61 62 6f 76 65 20 54 61 62 6c 65 20 6f 72 20 above Table or
3d90: 56 69 65 77 29 20 65 78 70 65 63 74 65 64 20 74 View) expected t
3da0: 6f 20 63 6f 6e 74 61 69 6e 20 3c 62 3e 4c 69 6e o contain <b>Lin
3db0: 65 73 74 72 69 6e 67 73 3c 2f 62 3e 2e 3c 62 72 estrings</b>.<br
3dc0: 3e 0d 0a 57 65 20 63 6f 75 6c 64 20 68 61 76 65 >..We could have
3dd0: 20 6c 65 67 69 74 69 6d 61 74 65 6c 79 20 70 61 legitimately pa
3de0: 73 73 65 64 20 61 20 3c 62 3e 4e 55 4c 4c 3c 2f ssed a <b>NULL</
3df0: 62 3e 20 76 61 6c 75 65 20 66 6f 72 20 74 68 69 b> value for thi
3e00: 73 20 61 72 67 75 6d 65 6e 74 20 69 6e 20 74 68 s argument in th
3e10: 65 20 63 61 73 65 20 6f 66 20 61 20 3c 62 3e 4c e case of a <b>L
3e20: 6f 67 69 63 61 6c 20 4e 65 74 77 6f 72 6b 3c 2f ogical Network</
3e30: 62 3e 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 69 b>.</li>..<li><i
3e40: 3e 4e 55 4c 4c 3c 2f 69 3e 3a 20 6e 61 6d 65 20 >NULL</i>: name
3e50: 6f 66 20 74 68 65 20 63 6f 6c 75 6d 6e 20 28 69 of the column (i
3e60: 6e 20 74 68 65 20 61 62 6f 76 65 20 54 61 62 6c n the above Tabl
3e70: 65 20 6f 72 20 56 69 65 77 29 20 65 78 70 65 63 e or View) expec
3e80: 74 65 64 20 74 6f 20 63 6f 6e 74 61 69 6e 20 3c ted to contain <
3e90: 62 3e 63 6f 73 74 3c 2f 62 3e 20 76 61 6c 75 65 b>cost</b> value
3ea0: 73 2e 3c 62 72 3e 0d 0a 49 6e 20 74 68 69 73 20 s.<br>..In this
3eb0: 63 61 73 65 20 77 65 20 68 61 76 65 20 70 61 73 case we have pas
3ec0: 73 65 64 20 61 20 3c 62 3e 4e 55 4c 4c 3c 2f 62 sed a <b>NULL</b
3ed0: 3e 20 76 61 6c 75 65 2c 20 61 6e 64 20 63 6f 6e > value, and con
3ee0: 73 65 71 75 65 6e 74 6c 79 20 74 68 65 20 3c 62 sequently the <b
3ef0: 3e 63 6f 73 74 3c 2f 62 3e 20 6f 66 20 65 61 63 >cost</b> of eac
3f00: 68 20 4c 69 6e 6b 20 77 69 6c 6c 20 62 65 20 61 h Link will be a
3f10: 73 73 75 6d 65 64 20 74 6f 20 62 65 20 72 65 70 ssumed to be rep
3f20: 72 65 73 65 6e 74 65 64 20 62 79 20 74 68 65 20 resented by the
3f30: 3c 62 3e 67 65 6f 6d 65 74 72 69 63 20 6c 65 6e <b>geometric len
3f40: 67 74 68 3c 2f 62 3e 20 6f 66 20 74 68 65 20 63 gth</b> of the c
3f50: 6f 72 72 65 73 70 6f 6e 64 69 6e 67 20 4c 69 6e orresponding Lin
3f60: 65 73 74 72 69 6e 67 2e 3c 62 72 3e 0d 0a 3c 75 estring.<br>..<u
3f70: 3e 4e 6f 74 65 20 23 31 3c 2f 75 3e 3a 20 69 6e >Note #1</u>: in
3f80: 20 74 68 65 20 63 61 73 65 20 6f 66 20 4e 65 74 the case of Net
3f90: 77 6f 72 6b 73 20 62 61 73 65 64 20 6f 6e 20 3c works based on <
3fa0: 62 3e 6c 6f 6e 67 69 74 75 64 65 73 3c 2f 62 3e b>longitudes</b>
3fb0: 20 61 6e 64 20 3c 62 3e 6c 61 74 69 74 75 64 65 and <b>latitude
3fc0: 73 3c 2f 62 3e 20 28 3c 69 3e 61 6b 61 3c 2f 69 s</b> (<i>aka</i
3fd0: 3e 20 3c 62 3e 67 65 6f 67 72 61 70 68 69 63 3c > <b>geographic<
3fe0: 2f 62 3e 20 52 65 66 65 72 65 6e 63 65 20 53 79 /b> Reference Sy
3ff0: 73 74 65 6d 73 29 20 74 68 65 20 67 65 6f 6d 65 stems) the geome
4000: 74 72 79 20 6c 65 6e 67 74 68 20 6f 66 20 61 6c try length of al
4010: 6c 20 4c 69 6e 65 73 74 72 69 6e 67 73 20 77 69 l Linestrings wi
4020: 6c 6c 20 62 65 20 70 72 65 63 69 73 65 6c 79 20 ll be precisely
4030: 3c 62 3e 6d 65 61 73 75 72 65 64 20 6f 6e 20 74 <b>measured on t
4040: 68 65 20 65 6c 6c 69 70 73 6f 69 64 3c 2f 62 3e he ellipsoid</b>
4050: 20 62 79 20 61 70 70 6c 79 69 6e 67 20 74 68 65 by applying the
4060: 20 6d 6f 73 74 20 61 63 63 75 72 61 74 65 20 3c most accurate <
4070: 62 3e 67 65 6f 64 65 73 69 63 20 66 6f 72 6d 75 b>geodesic formu
4080: 6c 61 65 3c 2f 62 3e 20 61 6e 64 20 77 69 6c 6c lae</b> and will
4090: 20 62 65 20 63 6f 6e 73 65 71 75 65 6e 74 6c 79 be consequently
40a0: 20 65 78 70 72 65 73 73 65 64 20 69 6e 20 3c 62 expressed in <b
40b0: 3e 6d 65 74 65 72 73 3c 2f 62 3e 2e 20 49 6e 20 >meters</b>. In
40c0: 61 6e 79 20 6f 74 68 65 72 20 63 61 73 65 20 28 any other case (
40d0: 3c 62 3e 70 72 6f 6a 65 63 74 65 64 3c 2f 62 3e <b>projected</b>
40e0: 20 52 65 66 65 72 65 6e 63 65 20 53 79 73 74 65 Reference Syste
40f0: 6d 73 29 20 6c 65 6e 67 74 68 73 20 77 69 6c 6c ms) lengths will
4100: 20 62 65 20 65 78 70 72 65 73 73 65 64 20 69 6e be expressed in
4110: 20 74 68 65 20 3c 62 3e 6d 65 61 73 75 72 65 20 the <b>measure
4120: 75 6e 69 74 3c 2f 62 3e 20 64 65 66 69 6e 65 64 unit</b> defined
4130: 20 62 79 20 74 68 65 20 52 65 66 65 72 65 6e 63 by the Referenc
4140: 65 20 53 79 73 74 65 6d 20 28 65 2e 67 2e 20 3c e System (e.g. <
4150: 62 3e 6d 65 74 65 72 73 3c 2f 62 3e 20 66 6f 72 b>meters</b> for
4160: 20 3c 62 3e 55 54 4d 3c 2f 62 3e 20 70 72 6f 6a <b>UTM</b> proj
4170: 65 63 74 69 6f 6e 73 20 61 6e 64 20 3c 62 3e 66 ections and <b>f
4180: 65 65 74 3c 2f 62 3e 20 66 6f 72 20 3c 62 3e 4e eet</b> for <b>N
4190: 41 44 2d 66 74 3c 2f 62 3e 20 70 72 6f 6a 65 63 AD-ft</b> projec
41a0: 74 69 6f 6e 73 29 2e 3c 62 72 3e 0d 0a 3c 75 3e tions).<br>..<u>
41b0: 4e 6f 74 65 20 23 32 3c 2f 75 3e 3a 20 74 68 65 Note #2</u>: the
41c0: 20 3c 62 3e 67 65 6f 6d 2d 63 6f 6c 75 6d 6e 3c <b>geom-column<
41d0: 2f 62 3e 20 61 6e 64 20 3c 62 3e 63 6f 73 74 2d /b> and <b>cost-
41e0: 63 6f 6c 75 6d 6e 3c 2f 62 3e 20 61 72 67 75 6d column</b> argum
41f0: 65 6e 74 73 20 61 72 65 20 6e 65 76 65 72 20 61 ents are never a
4200: 6c 6c 6f 77 65 64 20 74 6f 20 62 65 20 3c 62 3e llowed to be <b>
4210: 4e 55 4c 4c 3c 2f 62 3e 20 61 74 20 74 68 65 20 NULL</b> at the
4220: 73 61 6d 65 20 74 69 6d 65 2e 3c 2f 6c 69 3e 20 same time.</li>
4230: 0d 0a 3c 2f 6f 6c 3e 0d 0a 3c 74 61 62 6c 65 20 ..</ol>..<table
4240: 62 67 63 6f 6c 6f 72 3d 22 23 63 30 66 66 63 30 bgcolor="#c0ffc0
4250: 22 20 63 65 6c 6c 73 70 61 63 69 6e 67 3d 22 31 " cellspacing="1
4260: 30 22 20 63 65 6c 6c 70 61 64 64 69 6e 67 3d 22 0" cellpadding="
4270: 36 22 3e 3c 74 72 3e 3c 74 64 3e 0d 0a 3c 68 33 6"><tr><td>..<h3
4280: 3e 54 65 63 68 6e 69 63 61 6c 20 6e 6f 74 65 3c >Technical note<
4290: 2f 68 33 3e 0d 0a 54 68 65 20 69 6e 74 65 72 6e /h3>..The intern
42a0: 61 6c 20 65 6e 63 6f 64 69 6e 67 20 61 64 6f 70 al encoding adop
42b0: 74 65 64 20 62 79 20 74 68 65 20 3c 62 3e 42 69 ted by the <b>Bi
42c0: 6e 61 72 79 20 44 61 74 61 20 54 61 62 6c 65 3c nary Data Table<
42d0: 2f 62 3e 20 69 73 20 75 6e 63 68 61 6e 67 65 64 /b> is unchanged
42e0: 20 61 6e 64 20 69 73 20 74 68 65 20 73 61 6d 65 and is the same
42f0: 20 66 6f 72 20 62 6f 74 68 20 3c 62 3e 56 69 72 for both <b>Vir
4300: 74 75 61 6c 4e 65 74 77 6f 6b 3c 2f 62 3e 20 61 tualNetwok</b> a
4310: 6e 64 20 3c 62 3e 56 69 72 74 75 61 6c 52 6f 75 nd <b>VirtualRou
4320: 74 69 6e 67 3c 2f 62 3e 2e 3c 62 72 3e 0d 0a 59 ting</b>.<br>..Y
4330: 6f 75 20 63 61 6e 20 73 61 66 65 6c 79 20 62 61 ou can safely ba
4340: 73 65 20 61 20 3c 62 3e 56 69 72 74 75 61 6c 52 se a <b>VirtualR
4350: 6f 75 74 69 6e 67 20 54 61 62 6c 65 3c 2f 62 3e outing Table</b>
4360: 20 6f 6e 20 61 6e 79 20 65 78 69 73 74 69 6e 67 on any existing
4370: 20 42 69 6e 61 72 79 20 44 61 74 61 0d 0a 54 61 Binary Data..Ta
4380: 62 6c 65 20 63 72 65 61 74 65 64 20 62 79 20 74 ble created by t
4390: 68 65 20 3c 62 3e 73 70 61 74 69 61 6c 69 74 65 he <b>spatialite
43a0: 2d 6e 65 74 77 6f 72 6b 3c 2f 62 3e 20 43 4c 49 -network</b> CLI
43b0: 20 74 6f 6f 6c 2c 20 65 78 61 63 74 6c 79 20 61 tool, exactly a
43c0: 73 20 79 6f 75 20 63 61 6e 20 62 61 73 65 20 61 s you can base a
43d0: 20 3c 62 3e 56 69 72 74 75 61 6c 4e 65 74 77 6f <b>VirtualNetwo
43e0: 72 6b 20 54 61 62 6c 65 3c 2f 62 3e 20 6f 6e 20 rk Table</b> on
43f0: 61 6e 79 20 42 69 6e 61 72 79 20 44 61 74 61 20 any Binary Data
4400: 54 61 62 6c 65 20 63 72 65 61 74 65 64 20 62 79 Table created by
4410: 20 74 68 65 20 3c 62 3e 43 72 65 61 74 65 52 6f the <b>CreateRo
4420: 75 74 69 6e 67 28 29 3c 2f 62 3e 20 53 51 4c 20 uting()</b> SQL
4430: 66 75 6e 63 74 69 6f 6e 2e 0d 0a 3c 76 65 72 62 function...<verb
4440: 61 74 69 6d 3e 0d 0a 43 52 45 41 54 45 20 56 49 atim>..CREATE VI
4450: 52 54 55 41 4c 20 54 41 42 4c 45 20 74 65 73 74 RTUAL TABLE test
4460: 5f 6e 65 74 77 6f 72 6b 20 55 53 49 4e 47 20 56 _network USING V
4470: 69 72 74 75 61 6c 4e 65 74 77 6f 72 6b 28 27 73 irtualNetwork('s
4480: 6f 6d 65 5f 64 61 74 61 5f 74 61 62 6c 65 27 29 ome_data_table')
4490: 3b 0d 0a 0d 0a 43 52 45 41 54 45 20 56 49 52 54 ;....CREATE VIRT
44a0: 55 41 4c 20 54 41 42 4c 45 20 74 65 73 74 5f 72 UAL TABLE test_r
44b0: 6f 75 74 69 6e 67 20 55 53 49 4e 47 20 56 69 72 outing USING Vir
44c0: 74 75 61 6c 52 6f 75 74 69 6e 67 28 27 73 6f 6d tualRouting('som
44d0: 65 5f 64 61 74 61 5f 74 61 62 6c 65 27 29 3b 0d e_data_table');.
44e0: 0a 3c 2f 76 65 72 62 61 74 69 6d 3e 0d 0a 49 6e .</verbatim>..In
44f0: 20 6f 72 64 65 72 20 74 6f 20 6d 61 6e 75 61 6c order to manual
4500: 6c 79 20 63 72 65 61 74 65 20 79 6f 75 72 20 56 ly create your V
4510: 69 72 74 75 61 6c 20 54 61 62 6c 65 73 20 79 6f irtual Tables yo
4520: 75 20 6a 75 73 74 20 68 61 76 65 20 74 6f 20 65 u just have to e
4530: 78 65 63 75 74 65 20 61 6e 20 61 70 70 72 6f 70 xecute an approp
4540: 72 69 61 74 65 20 3c 62 3e 43 52 45 41 54 45 20 riate <b>CREATE
4550: 56 49 52 54 55 41 4c 20 54 41 42 4c 45 20 2e 2e VIRTUAL TABLE ..
4560: 2e 20 55 53 49 4e 47 20 56 69 72 74 75 61 6c 2e . USING Virtual.
4570: 2e 2e 20 28 2e 2e 2e 29 3c 2f 62 3e 20 73 74 61 .. (...)</b> sta
4580: 74 65 6d 65 6e 74 2e 0d 0a 3c 68 34 3e 57 61 72 tement...<h4>War
4590: 6e 69 6e 67 3c 2f 68 34 3e 0d 0a 49 6e 20 74 68 ning</h4>..In th
45a0: 65 20 63 61 73 65 20 6f 66 20 3c 62 3e 53 70 61 e case of <b>Spa
45b0: 74 69 61 6c 20 4e 65 74 77 6f 72 6b 73 3c 2f 62 tial Networks</b
45c0: 3e 20 62 61 73 65 64 20 6f 6e 20 61 6e 79 20 3c > based on any <
45d0: 62 3e 67 65 6f 67 72 61 70 68 69 63 3c 2f 62 3e b>geographic</b>
45e0: 20 52 65 66 65 72 65 6e 63 65 20 53 79 73 74 65 Reference Syste
45f0: 6d 20 28 75 73 69 6e 67 20 3c 62 3e 6c 6f 6e 67 m (using <b>long
4600: 69 74 75 64 65 73 3c 2f 62 3e 20 61 6e 64 20 3c itudes</b> and <
4610: 62 3e 6c 61 74 69 74 75 64 65 73 3c 2f 62 3e 29 b>latitudes</b>)
4620: 20 74 68 65 72 65 20 69 73 20 61 6e 20 69 6d 70 there is an imp
4630: 6f 72 74 61 6e 74 20 64 69 66 66 65 72 65 6e 63 ortant differenc
4640: 65 20 62 65 74 77 65 65 6e 20 42 69 6e 61 72 79 e between Binary
4650: 20 44 61 74 61 20 54 61 62 6c 65 73 20 63 72 65 Data Tables cre
4660: 61 74 65 64 20 62 79 20 74 68 65 20 3c 62 3e 73 ated by the <b>s
4670: 70 61 74 69 61 6c 69 74 65 5f 6e 65 74 77 6f 72 patialite_networ
4680: 6b 3c 2f 62 3e 20 47 55 49 20 74 6f 6f 6c 20 61 k</b> GUI tool a
4690: 6e 64 20 20 42 69 6e 61 72 79 20 44 61 74 61 20 nd Binary Data
46a0: 54 61 62 6c 65 73 20 63 72 65 61 74 65 64 20 62 Tables created b
46b0: 79 20 74 68 65 20 3c 62 3e 43 72 65 61 74 65 52 y the <b>CreateR
46c0: 6f 75 74 69 6e 67 28 29 3c 2f 62 3e 20 53 51 4c outing()</b> SQL
46d0: 20 66 75 6e 63 74 69 6f 6e 20 77 68 65 6e 20 3c function when <
46e0: 62 3e 63 6f 73 74 73 3c 2f 62 3e 20 61 72 65 20 b>costs</b> are
46f0: 69 6d 70 6c 69 63 69 74 6c 79 20 62 61 73 65 64 implicitly based
4700: 20 6f 6e 20 74 68 65 20 67 65 6f 6d 65 74 72 69 on the geometri
4710: 63 20 6c 65 6e 67 74 68 20 6f 66 20 74 68 65 20 c length of the
4720: 4c 69 6e 6b 27 73 20 4c 69 6e 65 73 74 72 69 6e Link's Linestrin
4730: 67 3a 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 74 68 g:..<ul>..<li>th
4740: 65 20 3c 62 3e 73 70 61 74 69 61 6c 69 74 65 5f e <b>spatialite_
4750: 6e 65 74 77 6f 72 6b 3c 2f 62 3e 20 43 4c 49 20 network</b> CLI
4760: 74 6f 6f 6c 20 28 61 6e 64 20 74 68 65 20 3c 62 tool (and the <b
4770: 3e 47 55 49 20 77 69 7a 61 72 64 3c 2f 62 3e 20 >GUI wizard</b>
4780: 69 6d 70 6c 65 6d 65 6e 74 65 64 20 62 79 20 70 implemented by p
4790: 72 65 76 69 6f 75 73 20 76 65 72 73 69 6f 6e 73 revious versions
47a0: 20 6f 66 20 3c 62 3e 73 70 61 74 69 61 6c 69 74 of <b>spatialit
47b0: 65 5f 67 75 69 3c 2f 62 3e 29 20 63 6f 6d 70 75 e_gui</b>) compu
47c0: 74 65 20 74 68 65 20 4c 69 6e 65 73 74 72 69 6e te the Linestrin
47d0: 67 27 73 20 6c 65 6e 67 74 68 20 61 73 20 61 6e g's length as an
47e0: 20 3c 62 3e 61 6e 67 75 6c 61 72 20 64 69 73 74 <b>angular dist
47f0: 61 6e 63 65 3c 2f 62 3e 20 65 78 70 72 65 73 73 ance</b> express
4800: 65 64 20 69 6e 20 3c 62 3e 64 65 67 72 65 65 73 ed in <b>degrees
4810: 3c 2f 62 3e 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e </b>.</li>..<li>
4820: 74 68 65 20 3c 62 3e 43 72 65 61 74 65 52 6f 75 the <b>CreateRou
4830: 74 69 6e 67 28 29 3c 2f 62 3e 20 53 51 4c 20 66 ting()</b> SQL f
4840: 75 6e 63 74 69 6f 6e 20 63 6f 6d 70 75 74 65 73 unction computes
4850: 20 74 68 65 20 4c 69 6e 65 73 74 72 69 6e 67 27 the Linestring'
4860: 73 20 6c 65 6e 67 74 68 20 61 73 20 61 20 3c 62 s length as a <b
4870: 3e 6c 69 6e 65 61 72 20 64 69 73 74 61 6e 63 65 >linear distance
4880: 3c 2f 62 3e 20 65 78 70 72 65 73 73 65 64 20 69 </b> expressed i
4890: 6e 20 3c 62 3e 6d 65 74 72 65 73 3c 2f 62 3e 20 n <b>metres</b>
48a0: 62 79 20 61 70 70 6c 79 69 6e 67 20 74 68 65 20 by applying the
48b0: 6d 6f 73 74 20 61 63 63 75 72 61 74 65 20 3c 62 most accurate <b
48c0: 3e 67 65 6f 64 65 73 69 63 20 66 6f 72 6d 75 6c >geodesic formul
48d0: 61 65 3c 2f 62 3e 20 6f 6e 20 74 68 65 20 65 6c ae</b> on the el
48e0: 6c 69 70 73 6f 69 64 2e 3c 2f 6c 69 3e 0d 0a 3c lipsoid.</li>..<
48f0: 2f 75 6c 3e 0d 0a 3c 2f 74 64 3e 3c 2f 74 72 3e /ul>..</td></tr>
4900: 3c 2f 74 61 62 6c 65 3e 3c 62 72 3e 3c 62 72 3e </table><br><br>
4910: 0d 0a 3c 76 65 72 62 61 74 69 6d 3e 0d 0a 53 45 ..<verbatim>..SE
4920: 4c 45 43 54 20 43 72 65 61 74 65 52 6f 75 74 69 LECT CreateRouti
4930: 6e 67 28 27 62 79 63 61 72 5f 64 61 74 61 27 2c ng('bycar_data',
4940: 20 27 62 79 63 61 72 27 2c 20 27 72 6f 61 64 73 'bycar', 'roads
4950: 5f 76 77 27 2c 20 27 6e 6f 64 65 5f 66 72 6f 6d _vw', 'node_from
4960: 27 2c 20 27 6e 6f 64 65 5f 74 6f 27 2c 20 27 67 ', 'node_to', 'g
4970: 65 6f 6d 27 2c 20 27 63 6f 73 74 27 2c 20 27 74 eom', 'cost', 't
4980: 6f 70 6f 6e 79 6d 27 2c 20 31 2c 20 31 2c 20 27 oponym', 1, 1, '
4990: 6f 6e 65 77 61 79 5f 66 72 6f 6d 74 6f 27 2c 20 oneway_fromto',
49a0: 27 6f 6e 65 77 61 79 5f 74 6f 66 72 6f 6d 27 2c 'oneway_tofrom',
49b0: 20 30 29 3b 0d 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0);..----------
49c0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 0a 31 0d 0a 3c ----------..1..<
49d0: 2f 76 65 72 62 61 74 69 6d 3e 0d 0a 41 66 74 65 /verbatim>..Afte
49e0: 72 20 63 61 6c 6c 69 6e 67 20 79 65 74 20 61 6e r calling yet an
49f0: 6f 74 68 65 72 20 74 69 6d 65 20 3c 62 3e 43 72 other time <b>Cr
4a00: 65 61 74 65 52 6f 75 74 69 6e 67 28 29 3c 2f 62 eateRouting()</b
4a10: 3e 20 6e 6f 77 20 74 68 65 20 44 61 74 61 62 61 > now the Databa
4a20: 73 65 20 63 6f 6e 74 61 69 6e 73 20 74 77 6f 20 se contains two
4a30: 66 75 72 74 68 65 72 20 54 61 62 6c 65 73 3a 20 further Tables:
4a40: 3c 62 3e 62 79 63 61 72 3c 2f 62 3e 20 61 6e 64 <b>bycar</b> and
4a50: 20 3c 62 3e 62 79 63 61 72 5f 64 61 74 61 3c 2f <b>bycar_data</
4a60: 62 3e 2e 3c 62 72 3e 0d 0a 54 68 69 73 20 74 69 b>.<br>..This ti
4a70: 6d 65 20 79 6f 75 27 76 65 20 75 73 65 64 20 74 me you've used t
4a80: 68 65 20 3c 69 3e 63 6f 6d 70 6c 65 74 65 20 66 he <i>complete f
4a90: 6f 72 6d 3c 2f 69 3e 20 6f 66 20 43 72 65 61 74 orm</i> of Creat
4aa0: 65 52 6f 75 74 69 6e 67 28 29 3b 20 6c 65 74 27 eRouting(); let'
4ab0: 73 20 73 65 65 20 69 6e 20 6d 6f 72 65 20 64 65 s see in more de
4ac0: 70 74 68 20 61 6c 6c 20 74 68 65 20 61 72 67 75 pth all the argu
4ad0: 6d 65 6e 74 73 20 61 6e 64 20 74 68 65 69 72 20 ments and their
4ae0: 6d 65 61 6e 69 6e 67 3a 0d 0a 3c 6f 6c 3e 0d 0a meaning:..<ol>..
4af0: 3c 6c 69 3e 3c 69 3e 62 79 63 61 72 5f 64 61 74 <li><i>bycar_dat
4b00: 61 3c 2f 69 3e 3a 20 73 61 6d 65 20 61 73 20 61 a</i>: same as a
4b10: 62 6f 76 65 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e bove.</li>..<li>
4b20: 3c 69 3e 62 79 63 61 72 3c 2f 69 3e 3a 20 73 61 <i>bycar</i>: sa
4b30: 6d 65 20 61 73 20 61 62 6f 76 65 2e 3c 2f 6c 69 me as above.</li
4b40: 3e 0d 0a 3c 6c 69 3e 3c 69 3e 72 6f 61 64 73 5f >..<li><i>roads_
4b50: 76 77 3c 2f 69 3e 3a 20 73 61 6d 65 20 61 73 20 vw</i>: same as
4b60: 61 62 6f 76 65 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 above.</li>..<li
4b70: 3e 3c 69 3e 6e 6f 64 65 5f 66 72 6f 6d 3c 2f 69 ><i>node_from</i
4b80: 3e 3a 20 73 61 6d 65 20 61 73 20 61 62 6f 76 65 >: same as above
4b90: 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 69 3e 6e .</li>..<li><i>n
4ba0: 6f 64 65 5f 74 6f 3c 2f 69 3e 3a 20 73 61 6d 65 ode_to</i>: same
4bb0: 20 61 73 20 61 62 6f 76 65 2e 3c 2f 6c 69 3e 0d as above.</li>.
4bc0: 0a 3c 6c 69 3e 3c 69 3e 67 65 6f 6d 3c 2f 69 3e .<li><i>geom</i>
4bd0: 3a 20 73 61 6d 65 20 61 73 20 61 62 6f 76 65 2e : same as above.
4be0: 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 69 3e 63 6f </li>..<li><i>co
4bf0: 73 74 3c 2f 69 3e 3a 20 73 61 6d 65 20 61 73 20 st</i>: same as
4c00: 61 62 6f 76 65 2e 0d 0a 49 6e 20 74 68 69 73 20 above...In this
4c10: 63 61 73 65 20 77 65 20 68 61 76 65 20 72 65 66 case we have ref
4c20: 65 72 65 6e 63 65 64 20 61 20 63 6f 6c 75 6d 6e erenced a column
4c30: 20 70 72 65 6c 6f 61 64 65 64 20 77 69 74 68 20 preloaded with
4c40: 76 61 6c 75 65 73 20 63 6f 72 72 65 73 70 6f 6e values correspon
4c50: 64 69 6e 67 20 74 6f 20 74 68 65 20 3c 62 3e 74 ding to the <b>t
4c60: 69 6d 65 3c 2f 62 3e 20 6d 65 61 73 75 72 65 64 ime</b> measured
4c70: 20 69 6e 20 3c 62 3e 73 65 63 6f 6e 64 73 3c 2f in <b>seconds</
4c80: 62 3e 20 72 65 71 75 69 72 65 64 20 74 6f 20 74 b> required to t
4c90: 72 61 76 65 72 73 65 20 65 61 63 68 20 4c 69 6e raverse each Lin
4ca0: 6b 2e 3c 2f 6c 69 3e 20 0d 0a 3c 6c 69 3e 3c 69 k.</li> ..<li><i
4cb0: 3e 74 6f 70 6f 6e 79 6d 3c 2f 69 3e 3a 20 6e 61 >toponym</i>: na
4cc0: 6d 65 20 6f 66 20 74 68 65 20 63 6f 6c 75 6d 6e me of the column
4cd0: 20 28 69 6e 20 74 68 65 20 61 62 6f 76 65 20 54 (in the above T
4ce0: 61 62 6c 65 20 6f 72 20 56 69 65 77 29 20 65 78 able or View) ex
4cf0: 70 65 63 74 65 64 20 74 6f 20 63 6f 6e 74 61 69 pected to contai
4d00: 6e 20 3c 62 3e 72 6f 61 64 2d 6e 61 6d 65 3c 2f n <b>road-name</
4d10: 62 3e 20 76 61 6c 75 65 73 2e 3c 62 72 3e 0d 0a b> values.<br>..
4d20: 49 74 20 63 6f 75 6c 64 20 62 65 20 6c 65 67 69 It could be legi
4d30: 74 69 6d 61 74 65 6c 79 20 73 65 74 20 74 6f 20 timately set to
4d40: 3c 62 3e 4e 55 4c 4c 3c 2f 62 3e 20 69 66 20 61 <b>NULL</b> if a
4d50: 6c 6c 20 4c 69 6e 6b 73 20 61 72 65 20 61 6e 6f ll Links are ano
4d60: 6e 79 6d 6f 75 73 2e 3c 2f 6c 69 3e 0d 0a 3c 6c nymous.</li>..<l
4d70: 69 3e 3c 69 3e 31 3c 2f 69 3e 3a 20 61 20 62 6f i><i>1</i>: a bo
4d80: 6f 6c 65 61 6e 20 66 6c 61 67 20 69 6e 74 65 6e olean flag inten
4d90: 64 65 64 20 74 6f 20 73 70 65 63 69 66 79 20 69 ded to specify i
4da0: 66 20 74 68 65 20 4e 65 74 77 6f 72 6b 20 6d 75 f the Network mu
4db0: 73 74 20 73 75 70 70 6f 72 74 20 74 68 65 20 3c st support the <
4dc0: 62 3e 41 2a 20 61 6c 67 6f 72 69 74 68 6d 3c 2f b>A* algorithm</
4dd0: 62 3e 20 6f 72 20 6e 6f 74 20 28 73 65 74 20 74 b> or not (set t
4de0: 6f 20 3c 62 3e 54 52 55 45 3c 2f 62 3e 20 62 79 o <b>TRUE</b> by
4df0: 20 64 65 66 61 75 6c 74 29 2e 3c 2f 6c 69 3e 0d default).</li>.
4e00: 0a 3c 6c 69 3e 3c 69 3e 31 3c 2f 69 3e 3a 20 61 .<li><i>1</i>: a
4e10: 20 62 6f 6f 6c 65 61 6e 20 66 6c 61 67 20 69 6e boolean flag in
4e20: 74 65 6e 64 65 64 20 74 6f 20 73 70 65 63 69 66 tended to specif
4e30: 79 20 69 66 20 61 6c 6c 20 4e 65 74 77 6f 72 6b y if all Network
4e40: 27 73 20 4c 69 6e 6b 73 20 61 72 65 20 61 73 73 's Links are ass
4e50: 75 6d 65 64 20 74 6f 20 62 65 20 3c 62 3e 62 69 umed to be <b>bi
4e60: 64 69 72 65 63 74 69 6f 6e 61 6c 3c 2f 62 3e 20 directional</b>
4e70: 6f 72 20 6e 6f 74 20 28 61 73 73 75 6d 65 64 20 or not (assumed
4e80: 74 6f 20 62 65 20 3c 62 3e 54 52 55 45 3c 2f 62 to be <b>TRUE</b
4e90: 3e 20 62 79 20 64 65 66 61 75 6c 74 29 2e 3c 2f > by default).</
4ea0: 6c 69 3e 0d 0a 3c 6c 69 3e 3c 69 3e 6f 6e 65 77 li>..<li><i>onew
4eb0: 61 79 5f 66 72 6f 6d 74 6f 3c 2f 69 3e 3a 20 6e ay_fromto</i>: n
4ec0: 61 6d 65 20 6f 66 20 74 68 65 20 63 6f 6c 75 6d ame of the colum
4ed0: 6e 20 28 69 6e 20 74 68 65 20 61 62 6f 76 65 20 n (in the above
4ee0: 54 61 62 6c 65 20 6f 72 20 56 69 65 77 29 20 65 Table or View) e
4ef0: 78 70 65 63 74 65 64 20 74 6f 20 63 6f 6e 74 61 xpected to conta
4f00: 69 6e 20 62 6f 6f 6c 65 61 6e 20 66 6c 61 67 73 in boolean flags
4f10: 20 73 70 65 63 69 66 79 69 6e 67 20 69 66 20 65 specifying if e
4f20: 61 63 68 20 4c 69 6e 6b 20 63 61 6e 20 62 65 20 ach Link can be
4f30: 74 72 61 76 65 72 73 65 64 20 69 6e 20 74 68 65 traversed in the
4f40: 20 3c 62 3e 66 72 6f 6d 2d 74 6f 3c 2f 62 3e 20 <b>from-to</b>
4f50: 64 69 72 65 63 74 69 6f 6e 20 6f 72 20 6e 6f 74 direction or not
4f60: 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 69 3e 6f .</li>..<li><i>o
4f70: 6e 65 77 61 79 5f 74 6f 66 72 6f 6d 3c 2f 69 3e neway_tofrom</i>
4f80: 3a 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 63 6f : name of the co
4f90: 6c 75 6d 6e 20 28 69 6e 20 74 68 65 20 61 62 6f lumn (in the abo
4fa0: 76 65 20 54 61 62 6c 65 20 6f 72 20 56 69 65 77 ve Table or View
4fb0: 29 20 65 78 70 65 63 74 65 64 20 74 6f 20 63 6f ) expected to co
4fc0: 6e 74 61 69 6e 20 62 6f 6f 6c 65 61 6e 20 66 6c ntain boolean fl
4fd0: 61 67 73 20 73 70 65 63 69 66 79 69 6e 67 20 69 ags specifying i
4fe0: 66 20 65 61 63 68 20 4c 69 6e 6b 20 63 61 6e 20 f each Link can
4ff0: 62 65 20 74 72 61 76 65 72 73 65 64 20 69 6e 20 be traversed in
5000: 74 68 65 20 3c 62 3e 74 6f 2d 66 72 6f 6d 3c 2f the <b>to-from</
5010: 62 3e 20 64 69 72 65 63 74 69 6f 6e 20 6f 72 20 b> direction or
5020: 6e 6f 74 2e 3c 62 72 3e 0d 0a 3c 75 3e 4e 6f 74 not.<br>..<u>Not
5030: 65 20 23 31 3c 2f 75 3e 3a 20 62 6f 74 68 20 3c e #1</u>: both <
5040: 62 3e 66 72 6f 6d 2d 74 6f 3c 2f 62 3e 20 61 6e b>from-to</b> an
5050: 64 20 3c 62 3e 74 6f 2d 66 72 6f 6d 3c 2f 62 3e d <b>to-from</b>
5060: 20 63 6f 6c 75 6d 6e 20 6e 61 6d 65 73 20 63 61 column names ca
5070: 6e 20 62 65 20 6c 65 67 69 74 69 6d 61 74 65 6c n be legitimatel
5080: 79 20 73 65 74 20 61 73 20 3c 62 3e 4e 55 4c 4c y set as <b>NULL
5090: 3c 2f 62 3e 20 69 66 20 6e 6f 20 3c 62 3e 6f 6e </b> if no <b>on
50a0: 65 2d 77 61 79 3c 2f 62 3e 20 72 65 73 74 72 69 e-way</b> restri
50b0: 63 74 69 6f 6e 73 20 61 70 70 6c 79 20 74 6f 20 ctions apply to
50c0: 74 68 65 20 63 75 72 72 65 6e 74 20 4e 65 74 77 the current Netw
50d0: 6f 72 6b 2e 3c 62 72 3e 0d 0a 3c 75 3e 4e 6f 74 ork.<br>..<u>Not
50e0: 65 20 23 32 3c 2f 75 3e 3a 20 4e 65 74 77 6f 72 e #2</u>: Networ
50f0: 6b 73 20 6f 66 20 74 68 65 20 3c 62 3e 75 6e 69 ks of the <b>uni
5100: 64 69 72 65 63 74 69 6f 6e 61 6c 3c 2f 62 3e 20 directional</b>
5110: 74 79 70 65 20 61 72 65 20 6e 65 76 65 72 20 65 type are never e
5120: 6e 61 62 6c 65 64 20 74 6f 20 72 65 66 65 72 65 nabled to refere
5130: 6e 63 65 20 3c 62 3e 6f 6e 65 2d 77 61 79 3c 2f nce <b>one-way</
5140: 62 3e 20 63 6f 6c 75 6d 6e 73 20 28 74 68 65 79 b> columns (they
5150: 20 73 68 6f 75 6c 64 20 61 6c 77 61 79 73 20 62 should always b
5160: 65 20 73 65 74 20 74 6f 20 3c 62 3e 4e 55 4c 4c e set to <b>NULL
5170: 3c 2f 62 3e 29 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 </b>).</li>..<li
5180: 3e 3c 69 3e 30 3c 2f 69 3e 3a 20 61 20 62 6f 6f ><i>0</i>: a boo
5190: 6c 65 61 6e 20 66 6c 61 67 20 69 6e 74 65 6e 64 lean flag intend
51a0: 69 6e 67 20 61 6e 20 3c 62 3e 6f 76 65 72 77 72 ing an <b>overwr
51b0: 69 74 65 20 61 75 74 68 6f 72 69 7a 61 74 69 6f ite authorizatio
51c0: 6e 3c 2f 62 3e 2e 0d 0a 3c 75 6c 3e 0d 0a 3c 6c n</b>...<ul>..<l
51d0: 69 3e 49 66 20 73 65 74 20 74 6f 20 3c 62 3e 46 i>If set to <b>F
51e0: 41 4c 53 45 3c 2f 62 3e 20 61 6e 20 65 78 63 65 ALSE</b> an exce
51f0: 70 74 69 6f 6e 20 77 69 6c 6c 20 62 65 20 72 61 ption will be ra
5200: 69 73 65 64 20 69 66 20 74 68 65 20 3c 62 3e 42 ised if the <b>B
5210: 69 6e 61 72 79 20 44 61 74 61 20 54 61 62 6c 65 inary Data Table
5220: 3c 2f 62 3e 20 61 6e 64 2f 6f 72 20 74 68 65 20 </b> and/or the
5230: 3c 62 3e 56 69 72 74 75 61 6c 52 6f 75 74 69 6e <b>VirtualRoutin
5240: 67 20 54 61 62 6c 65 3c 2f 62 3e 20 64 6f 20 61 g Table</b> do a
5250: 6c 72 65 61 64 79 20 65 78 69 73 74 2e 3c 2f 6c lready exist.</l
5260: 69 3e 0d 0a 3c 6c 69 3e 49 66 20 73 65 74 20 74 i>..<li>If set t
5270: 6f 20 3c 62 3e 54 52 55 45 3c 2f 62 3e 20 65 76 o <b>TRUE</b> ev
5280: 65 6e 74 75 61 6c 6c 79 20 65 78 69 73 74 69 6e entually existin
5290: 67 20 54 61 62 6c 65 73 20 77 69 6c 6c 20 62 65 g Tables will be
52a0: 20 70 72 65 76 65 6e 74 69 76 65 6c 79 20 64 72 preventively dr
52b0: 6f 70 70 65 64 20 69 6d 6d 65 64 69 61 74 65 6c opped immediatel
52c0: 79 20 62 65 66 6f 72 65 20 73 74 61 72 74 69 6e y before startin
52d0: 67 20 74 68 65 20 65 78 65 63 75 74 69 6f 6e 20 g the execution
52e0: 6f 66 20 3c 62 3e 43 72 65 61 74 65 52 6f 75 74 of <b>CreateRout
52f0: 69 6e 67 28 29 3c 2f 62 3e 2e 3c 2f 6c 69 3e 0d ing()</b>.</li>.
5300: 0a 3c 2f 75 6c 3e 3c 2f 6c 69 3e 0d 0a 3c 2f 6f .</ul></li>..</o
5310: 6c 3e 0d 0a 3c 68 33 3e 41 75 74 6f 6d 61 74 69 l>..<h3>Automati
5320: 63 61 6c 6c 79 20 73 65 74 74 69 6e 67 20 4e 6f cally setting No
5330: 64 65 46 72 6f 6d 20 61 6e 64 20 4e 6f 64 65 54 deFrom and NodeT
5340: 6f 20 49 44 73 3c 2f 68 33 3e 0d 0a 53 6f 6d 65 o IDs</h3>..Some
5350: 74 69 6d 65 73 20 69 74 20 63 6f 75 6c 64 20 65 times it could e
5360: 76 65 6e 74 75 61 6c 6c 79 20 68 61 70 70 65 6e ventually happen
5370: 20 74 6f 20 65 6e 63 6f 75 6e 74 65 72 20 73 6f to encounter so
5380: 6d 65 20 3c 62 3e 53 70 61 74 69 61 6c 20 4e 65 me <b>Spatial Ne
5390: 74 77 6f 72 6b 3c 2f 62 3e 20 72 65 70 72 65 73 twork</b> repres
53a0: 65 6e 74 61 74 69 6f 6e 20 62 65 69 6e 67 20 66 entation being f
53b0: 75 6c 6c 79 20 74 6f 70 6f 6c 6f 67 69 63 61 6c ully topological
53c0: 6c 79 20 63 6f 6e 73 69 73 74 65 6e 74 20 62 75 ly consistent bu
53d0: 74 20 63 6f 6d 70 6c 65 74 65 6c 79 20 6c 61 63 t completely lac
53e0: 6b 69 6e 67 20 61 6e 79 20 64 65 66 69 6e 69 74 king any definit
53f0: 69 6f 6e 20 61 62 6f 75 74 20 3c 62 3e 4e 6f 64 ion about <b>Nod
5400: 65 46 72 6f 6d 3c 2f 62 3e 20 61 6e 64 20 3c 62 eFrom</b> and <b
5410: 3e 4e 6f 64 65 54 6f 3c 2f 62 3e 20 69 64 65 6e >NodeTo</b> iden
5420: 74 69 66 69 65 72 73 2e 3c 62 72 3e 0d 0a 49 6e tifiers.<br>..In
5430: 20 74 68 69 73 20 73 70 65 63 69 66 69 63 20 63 this specific c
5440: 61 73 65 20 79 6f 75 20 63 61 6e 20 73 75 63 63 ase you can succ
5450: 65 73 73 66 75 6c 6c 79 20 72 65 63 6f 76 65 72 essfully recover
5460: 20 61 20 70 65 72 66 65 63 74 6c 79 20 76 61 6c a perfectly val
5470: 69 64 20 4e 65 74 77 6f 72 6b 20 62 79 20 63 61 id Network by ca
5480: 6c 6c 69 6e 67 20 74 68 65 20 3c 62 3e 43 72 65 lling the <b>Cre
5490: 61 74 65 52 6f 75 74 69 6e 67 4e 6f 64 65 73 28 ateRoutingNodes(
54a0: 29 3c 2f 62 3e 20 53 51 4c 20 66 75 6e 63 74 69 )</b> SQL functi
54b0: 6f 6e 2e 0d 0a 3c 76 65 72 62 61 74 69 6d 3e 0d on...<verbatim>.
54c0: 0a 53 45 4c 45 43 54 20 43 72 65 61 74 65 52 6f .SELECT CreateRo
54d0: 75 74 69 6e 67 4e 6f 64 65 73 28 4e 55 4c 4c 2c utingNodes(NULL,
54e0: 20 27 74 61 62 6c 65 5f 6e 61 6d 65 27 2c 20 27 'table_name', '
54f0: 67 65 6f 6d 27 2c 20 27 6e 6f 64 65 5f 66 72 6f geom', 'node_fro
5500: 6d 27 2c 20 27 6e 6f 64 65 5f 74 6f 27 29 3b 0d m', 'node_to');.
5510: 0a 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f ._______________
5520: 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 0d 0a 31 0d 0a 3c __________..1..<
5530: 2f 76 65 72 62 61 74 69 6d 3e 0d 0a 4c 65 74 27 /verbatim>..Let'
5540: 73 20 65 78 61 6d 69 6e 65 20 61 6c 6c 20 61 72 s examine all ar
5550: 67 75 6d 65 6e 74 73 20 61 6e 64 20 74 68 65 69 guments and thei
5560: 72 20 6d 65 61 6e 69 6e 67 3a 0d 0a 3c 6f 6c 3e r meaning:..<ol>
5570: 0d 0a 3c 6c 69 3e 3c 69 3e 4e 55 4c 4c 3c 2f 69 ..<li><i>NULL</i
5580: 3e 3a 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 3c >: name of the <
5590: 62 3e 41 74 74 61 63 68 65 64 2d 44 42 3c 2f 62 b>Attached-DB</b
55a0: 3e 20 63 6f 6e 74 61 69 6e 69 6e 67 20 74 68 65 > containing the
55b0: 20 53 70 61 74 69 61 6c 20 54 61 62 6c 65 2e 3c Spatial Table.<
55c0: 62 72 3e 0d 0a 49 74 20 63 61 6e 20 62 65 20 6c br>..It can be l
55d0: 65 67 69 74 69 6d 61 74 65 6c 79 20 73 65 74 20 egitimately set
55e0: 74 6f 20 3c 62 3e 4e 55 4c 4c 3c 2f 62 3e 2c 20 to <b>NULL</b>,
55f0: 61 6e 64 20 69 6e 20 74 68 69 73 20 63 61 73 65 and in this case
5600: 20 74 68 65 20 3c 62 3e 4d 41 49 4e 3c 2f 62 3e the <b>MAIN</b>
5610: 20 44 42 20 69 73 20 61 73 73 75 6d 65 64 2e 3c DB is assumed.<
5620: 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 69 3e 74 61 62 /li>..<li><i>tab
5630: 6c 65 5f 6e 61 6d 65 3c 2f 69 3e 3a 20 6e 61 6d le_name</i>: nam
5640: 65 20 6f 66 20 74 68 65 20 53 70 61 74 69 61 6c e of the Spatial
5650: 20 54 61 62 6c 65 2e 3c 2f 6c 69 3e 0d 0a 3c 6c Table.</li>..<l
5660: 69 3e 3c 69 3e 67 65 6f 6d 3c 2f 6c 69 3e 3a 20 i><i>geom</li>:
5670: 6e 61 6d 65 20 6f 66 20 74 68 65 20 63 6f 6c 75 name of the colu
5680: 6d 6e 20 28 28 69 6e 20 74 68 65 20 61 62 6f 76 mn ((in the abov
5690: 65 20 54 61 62 6c 65 29 20 63 6f 6e 74 61 69 6e e Table) contain
56a0: 69 6e 67 20 3c 62 3e 4c 69 6e 65 73 74 72 69 6e ing <b>Linestrin
56b0: 67 73 3c 2f 62 3e 2e 3c 2f 6c 69 3e 0d 0a 3c 6c gs</b>.</li>..<l
56c0: 69 3e 3c 69 3e 6e 6f 64 65 5f 66 72 6f 6d 3c 2f i><i>node_from</
56d0: 69 3e 3a 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 i>: name of the
56e0: 63 6f 6c 75 6d 6e 20 74 6f 20 62 65 20 61 64 64 column to be add
56f0: 65 64 20 74 6f 20 74 68 65 20 61 62 6f 76 65 20 ed to the above
5700: 54 61 62 6c 65 20 61 6e 64 20 70 6f 70 75 6c 61 Table and popula
5710: 74 65 64 20 77 69 74 68 20 61 70 70 72 6f 70 72 ted with appropr
5720: 69 61 74 65 20 3c 62 3e 4e 6f 64 65 46 72 6f 6d iate <b>NodeFrom
5730: 3c 2f 62 3e 20 49 44 73 2e 3c 2f 6c 69 3e 0d 0a </b> IDs.</li>..
5740: 3c 6c 69 3e 3c 69 3e 6e 6f 64 65 5f 74 6f 3c 2f <li><i>node_to</
5750: 69 3e 3a 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 i>: name of the
5760: 63 6f 6c 75 6d 6e 20 74 6f 20 62 65 20 61 64 64 column to be add
5770: 65 64 20 74 6f 20 74 68 65 20 61 62 6f 76 65 20 ed to the above
5780: 54 61 62 6c 65 20 61 6e 64 20 70 6f 70 75 6c 61 Table and popula
5790: 74 65 64 20 77 69 74 68 20 61 70 70 72 6f 70 72 ted with appropr
57a0: 69 61 74 65 20 3c 62 3e 4e 6f 64 65 54 6f 3c 2f iate <b>NodeTo</
57b0: 62 3e 20 49 44 73 2e 3c 62 72 3e 0d 0a 3c 75 3e b> IDs.<br>..<u>
57c0: 4e 6f 74 65 3c 2f 75 3e 3a 20 62 6f 74 68 20 3c Note</u>: both <
57d0: 62 3e 4e 6f 64 65 46 72 6f 6d 3c 2f 62 3e 20 61 b>NodeFrom</b> a
57e0: 6e 64 20 3c 62 3e 4e 6f 64 65 54 6f 3c 2f 62 3e nd <b>NodeTo</b>
57f0: 20 63 6f 6c 75 6d 6e 73 20 73 68 6f 75 6c 64 20 columns should
5800: 6e 6f 74 20 62 65 20 61 6c 72 65 61 64 79 20 64 not be already d
5810: 65 66 69 6e 65 64 20 69 6e 20 74 68 65 20 61 62 efined in the ab
5820: 6f 76 65 20 54 61 62 6c 65 2e 3c 2f 6c 69 3e 0d ove Table.</li>.
5830: 0a 3c 2f 6f 6c 3e 0d 0a 3c 62 3e 43 72 65 61 74 .</ol>..<b>Creat
5840: 65 52 6f 75 74 69 6e 67 4e 6f 64 65 73 28 29 3c eRoutingNodes()<
5850: 2f 62 3e 20 77 69 6c 6c 20 72 65 74 75 72 6e 20 /b> will return
5860: 3c 62 3e 31 3c 2f 62 3e 20 28 3c 69 3e 61 6b 61 <b>1</b> (<i>aka
5870: 3c 2f 69 3e 20 3c 62 3e 54 52 55 45 3c 2f 62 3e </i> <b>TRUE</b>
5880: 29 20 6f 6e 20 73 75 63 63 65 73 73 3b 20 61 6e ) on success; an
5890: 20 65 78 63 65 70 74 69 6f 6e 20 77 69 6c 6c 20 exception will
58a0: 62 65 20 72 61 69 73 65 64 20 6f 6e 20 66 61 69 be raised on fai
58b0: 6c 75 72 65 2e 3c 62 72 3e 0d 0a 3c 75 3e 4e 6f lure.<br>..<u>No
58c0: 74 65 3c 2f 75 3e 3a 20 79 6f 75 20 63 61 6e 20 te</u>: you can
58d0: 63 61 6c 6c 20 3c 62 3e 43 72 65 61 74 65 52 6f call <b>CreateRo
58e0: 75 74 69 6e 67 5f 47 65 74 4c 61 73 74 45 72 72 uting_GetLastErr
58f0: 6f 72 28 29 3c 2f 62 3e 20 73 6f 20 74 6f 20 70 or()</b> so to p
5900: 72 65 63 69 73 65 6c 79 20 69 64 65 6e 74 69 66 recisely identif
5910: 79 20 74 68 65 20 63 61 75 73 65 20 61 63 63 6f y the cause acco
5920: 75 6e 74 69 6e 67 20 66 6f 72 20 66 61 69 6c 75 unting for failu
5930: 72 65 2e 0d 0a 0d 0a 0d 0a 3c 68 72 3e 3c 62 72 re.......<hr><br
5940: 3e 0d 0a 3c 61 20 68 72 65 66 3d 22 68 74 74 70 >..<a href="http
5950: 73 3a 2f 2f 77 77 77 2e 67 61 69 61 2d 67 69 73 s://www.gaia-gis
5960: 2e 69 74 2f 66 6f 73 73 69 6c 2f 6c 69 62 73 70 .it/fossil/libsp
5970: 61 74 69 61 6c 69 74 65 2f 77 69 6b 69 3f 6e 61 atialite/wiki?na
5980: 6d 65 3d 34 2e 33 2e 30 2d 64 6f 63 22 3e 62 61 me=4.3.0-doc">ba
5990: 63 6b 3c 2f 61 3e 0a 5a 20 63 62 63 32 66 64 38 ck</a>.Z cbc2fd8
59a0: 63 32 39 63 37 34 61 63 61 34 31 31 33 65 61 30 c29c74aca4113ea0
59b0: 61 62 64 61 35 65 33 39 32 0a abda5e392.