Wiki page
[toponet-start] by
sandro
2015-10-28 16:31:09.
0000: 44 20 32 30 31 35 2d 31 30 2d 32 38 54 31 36 3a D 2015-10-28T16:
0010: 33 31 3a 30 39 2e 31 32 35 0a 4c 20 74 6f 70 6f 31:09.125.L topo
0020: 6e 65 74 2d 73 74 61 72 74 0a 50 20 31 33 31 36 net-start.P 1316
0030: 61 63 34 35 66 34 66 38 38 32 62 31 63 39 33 39 ac45f4f882b1c939
0040: 31 63 63 61 38 63 33 64 38 62 36 32 63 35 35 31 1cca8c3d8b62c551
0050: 31 65 36 31 0a 55 20 73 61 6e 64 72 6f 0a 57 20 1e61.U sandro.W
0060: 31 31 30 38 34 0a 3c 74 61 62 6c 65 20 63 65 6c 11084.<table cel
0070: 6c 73 70 61 63 69 6e 67 3d 22 31 32 22 20 77 69 lspacing="12" wi
0080: 64 74 68 3d 22 31 30 30 25 22 3e 0d 0a 3c 74 72 dth="100%">..<tr
0090: 3e 3c 74 64 20 63 6f 6c 73 70 61 6e 3d 22 32 22 ><td colspan="2"
00a0: 3e 0d 0a 3c 74 61 62 6c 65 20 77 69 64 74 68 3d >..<table width=
00b0: 22 31 30 30 25 22 20 62 67 63 6f 6c 6f 72 3d 22 "100%" bgcolor="
00c0: 23 66 30 66 30 66 38 22 3e 0d 0a 3c 74 72 3e 3c #f0f0f8">..<tr><
00d0: 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 td align="center
00e0: 22 3e 0d 0a 3c 68 31 3e 46 61 6d 69 6c 69 61 72 ">..<h1>Familiar
00f0: 69 7a 69 6e 67 20 77 69 74 68 20 54 6f 70 6f 6c izing with Topol
0100: 6f 67 79 2d 4e 65 74 77 6f 72 6b 3a 20 61 6e 20 ogy-Network: an
0110: 65 6c 65 6d 65 6e 74 61 72 79 20 74 75 74 6f 72 elementary tutor
0120: 69 61 6c 3c 2f 68 31 3e 0d 0a 3c 2f 74 64 3e 3c ial</h1>..</td><
0130: 2f 74 72 3e 3c 2f 74 61 62 6c 65 3e 0d 0a 3c 74 /tr></table>..<t
0140: 61 62 6c 65 20 77 69 64 74 68 3d 22 31 30 30 25 able width="100%
0150: 22 3e 3c 74 72 3e 0d 0a 3c 74 64 20 77 69 64 74 "><tr>..<td widt
0160: 68 3d 22 33 33 25 22 20 61 6c 69 67 6e 3d 22 6c h="33%" align="l
0170: 65 66 74 22 3e 3c 61 20 68 72 65 66 3d 22 68 74 eft"><a href="ht
0180: 74 70 73 3a 2f 2f 77 77 77 2e 67 61 69 61 2d 67 tps://www.gaia-g
0190: 69 73 2e 69 74 2f 66 6f 73 73 69 6c 2f 6c 69 62 is.it/fossil/lib
01a0: 73 70 61 74 69 61 6c 69 74 65 2f 77 69 6b 69 3f spatialite/wiki?
01b0: 6e 61 6d 65 3d 74 6f 70 6f 2d 73 74 61 72 74 22 name=topo-start"
01c0: 3e 70 72 65 76 69 6f 75 73 20 70 61 67 65 3c 2f >previous page</
01d0: 61 3e 3c 2f 74 64 3e 0d 0a 3c 74 64 20 61 6c 69 a></td>..<td ali
01e0: 67 6e 3d 22 63 65 6e 74 65 72 22 3e 3c 61 20 68 gn="center"><a h
01f0: 72 65 66 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 ref="https://www
0200: 2e 67 61 69 61 2d 67 69 73 2e 69 74 2f 66 6f 73 .gaia-gis.it/fos
0210: 73 69 6c 2f 6c 69 62 73 70 61 74 69 61 6c 69 74 sil/libspatialit
0220: 65 2f 77 69 6b 69 3f 6e 61 6d 65 3d 6d 69 73 63 e/wiki?name=misc
0230: 2d 64 6f 63 73 22 3e 62 61 63 6b 20 74 6f 20 69 -docs">back to i
0240: 6e 64 65 78 3c 2f 61 3e 3c 2f 74 64 3e 0d 0a 3c ndex</a></td>..<
0250: 74 64 20 77 69 64 74 68 3d 22 33 33 25 22 20 61 td width="33%" a
0260: 6c 69 67 6e 3d 22 72 69 67 68 74 22 3e 3c 61 20 lign="right"><a
0270: 68 72 65 66 3d 22 68 74 74 70 73 3a 2f 2f 77 77 href="https://ww
0280: 77 2e 67 61 69 61 2d 67 69 73 2e 69 74 2f 66 6f w.gaia-gis.it/fo
0290: 73 73 69 6c 2f 6c 69 62 73 70 61 74 69 61 6c 69 ssil/libspatiali
02a0: 74 65 2f 77 69 6b 69 3f 6e 61 6d 65 3d 74 6f 70 te/wiki?name=top
02b0: 6f 6e 65 74 2d 73 74 61 72 74 22 3e 6e 65 78 74 onet-start">next
02c0: 20 70 61 67 65 3c 2f 61 3e 3c 2f 74 64 3e 0d 0a page</a></td>..
02d0: 3c 2f 74 72 3e 3c 2f 74 61 62 6c 65 3e 0d 0a 3c </tr></table>..<
02e0: 68 33 3e 54 75 74 6f 72 69 61 6c 20 23 32 3a 20 h3>Tutorial #2:
02f0: 6e 65 74 77 6f 72 6b 20 65 64 69 74 69 6e 67 20 network editing
0300: 62 79 20 75 73 69 6e 67 20 62 61 73 69 63 20 49 by using basic I
0310: 53 4f 20 53 51 4c 20 66 75 6e 63 74 69 6f 6e 3c SO SQL function<
0320: 2f 68 33 3e 0d 0a 49 6e 20 74 68 69 73 20 74 75 /h3>..In this tu
0330: 74 6f 72 69 61 6c 20 77 69 6c 6c 20 71 75 69 63 torial will quic
0340: 6b 6c 79 20 65 78 70 6c 6f 72 65 20 74 68 65 20 kly explore the
0350: 49 53 4f 20 53 51 4c 2f 4d 4d 20 6d 61 69 6e 20 ISO SQL/MM main
0360: 63 6f 72 65 20 73 75 70 70 6f 72 74 69 6e 67 20 core supporting
0370: 54 6f 70 6f 6c 6f 67 79 2d 4e 65 74 77 6f 72 6b Topology-Network
0380: 20 28 6e 61 6d 65 6c 79 3a 20 53 70 61 74 69 61 (namely: Spatia
0390: 6c 20 4e 65 74 77 6f 72 6b 29 2e 3c 62 72 3e 0d l Network).<br>.
03a0: 0a 57 65 27 6c 6c 20 75 73 65 20 76 65 72 79 20 .We'll use very
03b0: 73 69 6d 70 6c 65 20 67 65 6f 6d 65 74 72 69 65 simple geometrie
03c0: 73 20 28 73 74 72 61 69 67 68 74 20 73 65 67 6d s (straight segm
03d0: 65 6e 74 73 29 20 73 6f 20 74 6f 20 61 76 6f 69 ents) so to avoi
03e0: 64 20 61 6e 79 20 70 6f 73 73 69 62 6c 65 20 63 d any possible c
03f0: 6f 6d 70 6c 65 78 69 74 79 20 74 68 75 73 20 6d omplexity thus m
0400: 61 6b 69 6e 67 20 62 61 73 69 63 61 6c 6c 79 20 aking basically
0410: 73 69 6d 70 6c 65 20 66 6f 6c 6c 6f 77 69 6e 67 simple following
0420: 20 61 6e 64 20 75 6e 64 65 72 73 74 61 6e 64 69 and understandi
0430: 6e 67 20 61 6e 79 20 73 74 65 70 2e 3c 62 72 3e ng any step.<br>
0440: 0d 0a 59 6f 75 20 63 61 6e 20 69 6e 64 69 66 66 ..You can indiff
0450: 65 72 65 6e 74 6c 79 20 75 73 65 20 3c 62 3e 73 erently use <b>s
0460: 70 61 74 69 61 6c 69 74 65 20 43 4c 49 3c 2f 62 patialite CLI</b
0470: 3e 20 6f 72 20 3c 62 3e 73 70 61 74 69 61 6c 69 > or <b>spatiali
0480: 74 65 5f 67 75 69 3c 2f 62 3e 20 69 6e 20 6f 72 te_gui</b> in or
0490: 64 65 72 20 74 6f 20 74 65 73 74 20 65 61 63 68 der to test each
04a0: 20 53 51 4c 20 73 74 61 74 65 6d 65 6e 74 2e 3c SQL statement.<
04b0: 62 72 3e 3c 62 72 3e 0d 0a 3c 74 61 62 6c 65 20 br><br>..<table
04c0: 62 67 63 6f 6c 6f 72 3d 22 23 66 66 66 66 65 30 bgcolor="#ffffe0
04d0: 22 20 63 65 6c 6c 73 70 61 63 69 6e 67 3d 22 38 " cellspacing="8
04e0: 22 20 63 65 6c 6c 70 61 64 64 69 6e 67 3d 22 38 " cellpadding="8
04f0: 22 3e 0d 0a 3c 74 72 3e 3c 74 64 20 61 6c 69 67 ">..<tr><td alig
0500: 6e 3d 22 63 65 6e 74 65 72 22 3e 3c 62 3e 43 41 n="center"><b>CA
0510: 56 45 41 54 3c 2f 62 3e 3c 2f 74 64 3e 3c 2f 74 VEAT</b></td></t
0520: 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 0d 0a 41 6e r>..<tr><td>..An
0530: 79 20 64 69 72 65 63 74 20 6d 61 6e 69 70 75 6c y direct manipul
0540: 61 74 69 6f 6e 20 6f 66 20 74 68 65 20 6c 6f 77 ation of the low
0550: 2d 6c 65 76 65 6c 20 44 42 20 74 61 62 6c 65 73 -level DB tables
0560: 20 69 6d 70 6c 65 6d 65 6e 74 69 6e 67 20 61 6e implementing an
0570: 20 49 53 4f 20 4e 65 74 77 6f 72 6b 20 77 69 6c ISO Network wil
0580: 6c 20 61 6c 6d 6f 73 74 20 63 65 72 74 61 69 6e l almost certain
0590: 6c 79 20 63 61 75 73 65 20 61 20 6d 61 6a 6f 72 ly cause a major
05a0: 20 64 69 73 61 73 74 65 72 2e 3c 62 72 3e 0d 0a disaster.<br>..
05b0: 59 6f 75 20 61 72 65 20 6e 65 76 65 72 20 65 78 You are never ex
05c0: 70 65 63 74 65 64 20 74 6f 20 65 78 65 63 75 74 pected to execut
05d0: 65 20 61 6e 79 20 3c 62 3e 49 4e 53 45 52 54 3c e any <b>INSERT<
05e0: 2f 62 3e 2c 20 3c 62 3e 55 50 44 41 54 45 3c 2f /b>, <b>UPDATE</
05f0: 62 3e 20 6f 72 20 3c 62 3e 44 45 4c 45 54 45 3c b> or <b>DELETE<
0600: 2f 62 3e 20 73 74 61 74 65 6d 65 6e 74 20 6f 6e /b> statement on
0610: 20 62 65 68 61 6c 66 20 6f 66 20 73 75 63 68 20 behalf of such
0620: 74 61 62 6c 65 73 2e 3c 62 72 3e 0d 0a 59 6f 75 tables.<br>..You
0630: 20 61 6c 77 61 79 73 20 68 61 76 65 20 74 6f 20 always have to
0640: 63 61 6c 6c 20 74 68 65 20 61 70 70 72 6f 70 72 call the appropr
0650: 69 61 74 65 20 49 53 4f 20 53 51 4c 20 66 75 6e iate ISO SQL fun
0660: 63 74 69 6f 6e 73 20 66 6f 72 20 61 6e 79 20 6f ctions for any o
0670: 70 65 72 61 74 69 6f 6e 20 74 61 72 67 65 74 69 peration targeti
0680: 6e 67 20 61 20 54 6f 70 6f 6c 6f 67 79 20 69 6e ng a Topology in
0690: 20 6f 72 64 65 72 20 74 6f 20 70 72 65 73 65 72 order to preser
06a0: 76 65 20 61 20 70 72 6f 70 65 72 20 63 6f 6e 73 ve a proper cons
06b0: 69 73 74 65 6e 63 79 2e 0d 0a 3c 2f 74 64 3e 3c istency...</td><
06c0: 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 0d 0a /tr>..<tr><td>..
06d0: 49 66 20 79 6f 75 20 61 72 65 20 73 74 72 6f 6e If you are stron
06e0: 67 6c 79 20 69 6e 74 65 72 65 73 74 65 64 20 69 gly interested i
06f0: 6e 20 62 65 74 74 65 72 20 75 6e 64 65 72 73 74 n better underst
0700: 61 6e 64 69 6e 67 20 6d 61 6e 79 20 69 6e 74 65 anding many inte
0710: 72 6e 61 6c 20 69 6d 70 6c 65 6d 65 6e 74 61 74 rnal implementat
0720: 69 6f 6e 20 6d 65 63 68 61 6e 69 73 6d 73 20 79 ion mechanisms y
0730: 6f 75 20 63 6f 75 6c 64 20 65 76 65 6e 74 75 61 ou could eventua
0740: 6c 6c 79 20 69 6e 73 70 65 63 74 20 66 72 6f 6d lly inspect from
0750: 20 74 69 6d 65 20 74 6f 20 74 69 6d 65 20 74 68 time to time th
0760: 65 20 63 6f 6e 74 65 6e 74 20 6f 66 20 74 68 65 e content of the
0770: 20 70 68 79 73 69 63 61 6c 20 44 42 20 74 61 62 physical DB tab
0780: 6c 65 73 20 73 75 70 70 6f 72 74 69 6e 67 20 74 les supporting t
0790: 68 65 20 74 65 73 74 20 54 6f 70 6f 6c 6f 67 79 he test Topology
07a0: 3a 0d 0a 3c 76 65 72 62 61 74 69 6d 3e 0d 0a 53 :..<verbatim>..S
07b0: 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 74 65 73 ELECT * FROM tes
07c0: 74 6e 65 74 5f 6e 6f 64 65 3b 0d 0a 0d 0a 53 45 tnet_node;....SE
07d0: 4c 45 43 54 20 2a 20 46 52 4f 4d 20 74 65 73 74 LECT * FROM test
07e0: 6e 65 74 5f 6c 69 6e 6b 3b 0d 0a 3c 2f 76 65 72 net_link;..</ver
07f0: 62 61 74 69 6d 3e 3c 2f 74 64 3e 3c 2f 74 72 3e batim></td></tr>
0800: 0d 0a 3c 74 72 3e 3c 74 64 3e 3c 75 3e 50 6c 65 ..<tr><td><u>Ple
0810: 61 73 65 20 6e 6f 74 65 3c 2f 75 3e 3a 20 74 68 ase note</u>: th
0820: 65 20 61 63 74 75 61 6c 20 6c 61 79 6f 75 74 20 e actual layout
0830: 61 64 6f 70 74 65 64 20 62 79 20 74 68 65 73 65 adopted by these
0840: 20 6c 6f 77 2d 6c 65 76 65 6c 20 44 42 20 74 61 low-level DB ta
0850: 62 6c 65 73 20 63 6f 75 6c 64 20 65 76 65 6e 74 bles could event
0860: 75 61 6c 6c 79 20 63 68 61 6e 67 65 20 69 6e 20 ually change in
0870: 66 75 74 75 72 65 20 76 65 72 73 69 6f 6e 73 2e future versions.
0880: 3c 62 72 3e 0d 0a 41 73 20 61 20 67 65 6e 65 72 <br>..As a gener
0890: 61 6c 20 70 72 69 6e 63 69 70 6c 65 20 61 6e 79 al principle any
08a0: 20 64 69 72 65 63 74 20 69 6e 74 65 72 61 63 74 direct interact
08b0: 69 6f 6e 20 77 69 74 68 20 74 68 65 20 6c 6f 77 ion with the low
08c0: 2d 6c 65 76 65 6c 20 44 42 20 74 61 62 6c 65 73 -level DB tables
08d0: 20 73 68 6f 75 6c 64 20 62 65 20 61 6c 77 61 79 should be alway
08e0: 73 20 63 61 72 65 66 75 6c 6c 79 20 61 76 6f 69 s carefully avoi
08f0: 64 65 64 20 65 76 65 6e 20 66 6f 72 20 3c 62 3e ded even for <b>
0900: 53 45 4c 45 43 54 3c 2f 62 3e 20 71 75 65 72 69 SELECT</b> queri
0910: 65 73 20 28 75 73 65 20 69 6e 73 74 65 61 64 20 es (use instead
0920: 74 68 65 20 61 70 70 72 6f 70 72 69 61 74 65 20 the appropriate
0930: 49 53 4f 20 53 51 4c 20 66 75 6e 63 74 69 6f 6e ISO SQL function
0940: 73 29 2e 3c 62 72 3e 0d 0a 41 6e 79 77 61 79 2c s).<br>..Anyway,
0950: 20 61 74 20 6c 65 61 73 74 20 66 6f 72 20 64 69 at least for di
0960: 64 61 63 74 69 63 20 2f 20 64 65 62 75 67 67 69 dactic / debuggi
0970: 6e 67 20 70 75 72 70 6f 73 65 73 2c 20 65 78 65 ng purposes, exe
0980: 63 75 74 69 6e 67 20 73 6f 6d 65 20 53 45 4c 45 cuting some SELE
0990: 43 54 20 73 74 61 74 65 6d 65 6e 74 20 69 6e 20 CT statement in
09a0: 6f 72 64 65 72 20 74 6f 20 69 6e 73 70 65 63 74 order to inspect
09b0: 20 74 68 65 20 61 63 74 75 61 6c 20 63 6f 6e 74 the actual cont
09c0: 65 6e 74 73 20 6f 66 20 74 68 65 73 65 20 74 61 ents of these ta
09d0: 62 6c 65 73 20 69 73 20 61 6e 20 61 62 73 6f 6c bles is an absol
09e0: 75 74 65 6c 79 20 68 61 72 6d 6c 65 73 73 20 6f utely harmless o
09f0: 70 65 72 61 74 69 6f 6e 2e 0d 0a 3c 2f 74 64 3e peration...</td>
0a00: 3c 2f 74 72 3e 0d 0a 3c 2f 74 61 62 6c 65 3e 3c </tr>..</table><
0a10: 62 72 3e 3c 62 72 3e 3c 68 72 3e 0d 0a 3c 74 61 br><br><hr>..<ta
0a20: 62 6c 65 20 63 65 6c 6c 73 70 61 63 69 6e 67 3d ble cellspacing=
0a30: 22 34 22 20 63 65 6c 6c 70 61 64 64 69 6e 67 3d "4" cellpadding=
0a40: 22 36 22 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 0d 0a "6">..<tr><td>..
0a50: 3c 75 6c 3e 0d 0a 3c 6c 69 3e 0d 0a 57 65 27 6c <ul>..<li>..We'l
0a60: 6c 20 73 74 61 72 74 20 62 79 20 63 72 65 61 74 l start by creat
0a70: 69 6e 67 20 61 20 62 72 61 6e 64 20 6e 65 77 20 ing a brand new
0a80: 49 53 4f 20 54 6f 70 6f 6c 6f 67 79 2d 4e 65 74 ISO Topology-Net
0a90: 77 6f 72 6b 20 28 6f 66 20 74 68 65 20 53 70 61 work (of the Spa
0aa0: 74 69 61 6c 20 74 79 70 65 29 20 6e 61 6d 65 64 tial type) named
0ab0: 20 3c 62 3e 74 65 73 74 6e 65 74 3c 2f 62 3e 3b <b>testnet</b>;
0ac0: 20 61 6c 6c 20 6e 65 74 77 6f 72 6b 20 67 65 6f all network geo
0ad0: 6d 65 74 72 69 65 73 20 61 72 65 20 65 78 70 65 metries are expe
0ae0: 63 74 65 64 20 74 6f 20 62 65 20 6c 6f 63 61 74 cted to be locat
0af0: 65 64 20 6f 6e 20 3c 62 3e 53 52 49 44 3d 34 33 ed on <b>SRID=43
0b00: 32 36 3c 2f 62 3e 20 28 61 6b 61 20 3c 69 3e 57 26</b> (aka <i>W
0b10: 47 53 38 34 20 6c 6f 6e 67 2f 6c 61 74 3c 2f 69 GS84 long/lat</i
0b20: 3e 29 20 61 6e 64 20 77 69 6c 6c 20 68 61 76 65 >) and will have
0b30: 20 3c 62 3e 32 44 20 58 59 3c 2f 62 3e 20 64 69 <b>2D XY</b> di
0b40: 6d 65 6e 73 69 6f 6e 73 3a 0d 0a 3c 76 65 72 62 mensions:..<verb
0b50: 61 74 69 6d 3e 0d 0a 53 45 4c 45 43 54 20 43 72 atim>..SELECT Cr
0b60: 65 61 74 65 4e 65 74 77 6f 72 6b 28 27 74 65 73 eateNetwork('tes
0b70: 74 6e 65 74 27 2c 20 31 2c 20 34 33 32 36 2c 20 tnet', 1, 4326,
0b80: 30 2c 20 30 29 3b 0d 0a 3c 2f 76 65 72 62 61 74 0, 0);..</verbat
0b90: 69 6d 3e 0d 0a 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e im>..</li>..<li>
0ba0: 0d 0a 4e 6f 77 20 77 65 27 6c 6c 20 69 6e 73 65 ..Now we'll inse
0bb0: 72 74 20 61 20 62 75 6e 63 68 20 6f 66 20 49 73 rt a bunch of Is
0bc0: 6f 6c 61 74 65 64 20 4e 6f 64 65 73 3a 0d 0a 3c olated Nodes:..<
0bd0: 76 65 72 62 61 74 69 6d 3e 0d 0a 53 45 4c 45 43 verbatim>..SELEC
0be0: 54 20 53 54 5f 41 64 64 49 73 6f 4e 65 74 4e 6f T ST_AddIsoNetNo
0bf0: 64 65 28 27 74 65 73 74 6e 65 74 27 2c 20 4d 61 de('testnet', Ma
0c00: 6b 65 50 6f 69 6e 74 28 2d 31 38 30 2c 20 39 30 kePoint(-180, 90
0c10: 2c 20 34 33 32 36 29 29 3b 0d 0a 53 45 4c 45 43 , 4326));..SELEC
0c20: 54 20 53 54 5f 41 64 64 49 73 6f 4e 65 74 4e 6f T ST_AddIsoNetNo
0c30: 64 65 28 27 74 65 73 74 6e 65 74 27 2c 20 4d 61 de('testnet', Ma
0c40: 6b 65 50 6f 69 6e 74 28 2d 31 38 30 2c 20 36 30 kePoint(-180, 60
0c50: 2c 20 34 33 32 36 29 29 3b 0d 0a 53 45 4c 45 43 , 4326));..SELEC
0c60: 54 20 53 54 5f 41 64 64 49 73 6f 4e 65 74 4e 6f T ST_AddIsoNetNo
0c70: 64 65 28 27 74 65 73 74 6e 65 74 27 2c 20 4d 61 de('testnet', Ma
0c80: 6b 65 50 6f 69 6e 74 28 2d 31 38 30 2c 20 30 2c kePoint(-180, 0,
0c90: 20 34 33 32 36 29 29 3b 0d 0a 53 45 4c 45 43 54 4326));..SELECT
0ca0: 20 53 54 5f 41 64 64 49 73 6f 4e 65 74 4e 6f 64 ST_AddIsoNetNod
0cb0: 65 28 27 74 65 73 74 6e 65 74 27 2c 20 4d 61 6b e('testnet', Mak
0cc0: 65 50 6f 69 6e 74 28 2d 31 38 30 2c 20 2d 33 30 ePoint(-180, -30
0cd0: 2c 20 34 33 32 36 29 29 3b 0d 0a 53 45 4c 45 43 , 4326));..SELEC
0ce0: 54 20 53 54 5f 41 64 64 49 73 6f 4e 65 74 4e 6f T ST_AddIsoNetNo
0cf0: 64 65 28 27 74 65 73 74 6e 65 74 27 2c 20 4d 61 de('testnet', Ma
0d00: 6b 65 50 6f 69 6e 74 28 2d 31 38 30 2c 20 2d 36 kePoint(-180, -6
0d10: 30 2c 20 34 33 32 36 29 29 3b 0d 0a 53 45 4c 45 0, 4326));..SELE
0d20: 43 54 20 53 54 5f 41 64 64 49 73 6f 4e 65 74 4e CT ST_AddIsoNetN
0d30: 6f 64 65 28 27 74 65 73 74 6e 65 74 27 2c 20 4d ode('testnet', M
0d40: 61 6b 65 50 6f 69 6e 74 28 2d 31 38 30 2c 20 2d akePoint(-180, -
0d50: 39 30 2c 20 34 33 32 36 29 29 3b 0d 0a 53 45 4c 90, 4326));..SEL
0d60: 45 43 54 20 53 54 5f 41 64 64 49 73 6f 4e 65 74 ECT ST_AddIsoNet
0d70: 4e 6f 64 65 28 27 74 65 73 74 6e 65 74 27 2c 20 Node('testnet',
0d80: 4d 61 6b 65 50 6f 69 6e 74 28 2d 39 30 2c 20 39 MakePoint(-90, 9
0d90: 30 2c 20 34 33 32 36 29 29 3b 0d 0a 53 45 4c 45 0, 4326));..SELE
0da0: 43 54 20 53 54 5f 41 64 64 49 73 6f 4e 65 74 4e CT ST_AddIsoNetN
0db0: 6f 64 65 28 27 74 65 73 74 6e 65 74 27 2c 20 4d ode('testnet', M
0dc0: 61 6b 65 50 6f 69 6e 74 28 2d 39 30 2c 20 33 30 akePoint(-90, 30
0dd0: 2c 20 34 33 32 36 29 29 3b 0d 0a 53 45 4c 45 43 , 4326));..SELEC
0de0: 54 20 53 54 5f 41 64 64 49 73 6f 4e 65 74 4e 6f T ST_AddIsoNetNo
0df0: 64 65 28 27 74 65 73 74 6e 65 74 27 2c 20 4d 61 de('testnet', Ma
0e00: 6b 65 50 6f 69 6e 74 28 2d 39 30 2c 20 30 2c 20 kePoint(-90, 0,
0e10: 34 33 32 36 29 29 3b 0d 0a 53 45 4c 45 43 54 20 4326));..SELECT
0e20: 53 54 5f 41 64 64 49 73 6f 4e 65 74 4e 6f 64 65 ST_AddIsoNetNode
0e30: 28 27 74 65 73 74 6e 65 74 27 2c 20 4d 61 6b 65 ('testnet', Make
0e40: 50 6f 69 6e 74 28 2d 39 30 2c 20 2d 33 30 2c 20 Point(-90, -30,
0e50: 34 33 32 36 29 29 3b 0d 0a 53 45 4c 45 43 54 20 4326));..SELECT
0e60: 53 54 5f 41 64 64 49 73 6f 4e 65 74 4e 6f 64 65 ST_AddIsoNetNode
0e70: 28 27 74 65 73 74 6e 65 74 27 2c 20 4d 61 6b 65 ('testnet', Make
0e80: 50 6f 69 6e 74 28 2d 39 30 2c 20 2d 36 30 2c 20 Point(-90, -60,
0e90: 34 33 32 36 29 29 3b 0d 0a 53 45 4c 45 43 54 20 4326));..SELECT
0ea0: 53 54 5f 41 64 64 49 73 6f 4e 65 74 4e 6f 64 65 ST_AddIsoNetNode
0eb0: 28 27 74 65 73 74 6e 65 74 27 2c 20 4d 61 6b 65 ('testnet', Make
0ec0: 50 6f 69 6e 74 28 2d 39 30 2c 20 2d 39 30 2c 20 Point(-90, -90,
0ed0: 34 33 32 36 29 29 3b 0d 0a 53 45 4c 45 43 54 20 4326));..SELECT
0ee0: 53 54 5f 41 64 64 49 73 6f 4e 65 74 4e 6f 64 65 ST_AddIsoNetNode
0ef0: 28 27 74 65 73 74 6e 65 74 27 2c 20 4d 61 6b 65 ('testnet', Make
0f00: 50 6f 69 6e 74 28 33 30 2c 20 30 2c 20 34 33 32 Point(30, 0, 432
0f10: 36 29 29 3b 0d 0a 53 45 4c 45 43 54 20 53 54 5f 6));..SELECT ST_
0f20: 41 64 64 49 73 6f 4e 65 74 4e 6f 64 65 28 27 74 AddIsoNetNode('t
0f30: 65 73 74 6e 65 74 27 2c 20 4d 61 6b 65 50 6f 69 estnet', MakePoi
0f40: 6e 74 28 30 2c 20 30 2c 20 34 33 32 36 29 29 3b nt(0, 0, 4326));
0f50: 0d 0a 53 45 4c 45 43 54 20 53 54 5f 41 64 64 49 ..SELECT ST_AddI
0f60: 73 6f 4e 65 74 4e 6f 64 65 28 27 74 65 73 74 6e soNetNode('testn
0f70: 65 74 27 2c 20 4d 61 6b 65 50 6f 69 6e 74 28 2d et', MakePoint(-
0f80: 33 30 2c 20 30 2c 20 34 33 32 36 29 29 3b 0d 0a 30, 0, 4326));..
0f90: 53 45 4c 45 43 54 20 53 54 5f 41 64 64 49 73 6f SELECT ST_AddIso
0fa0: 4e 65 74 4e 6f 64 65 28 27 74 65 73 74 6e 65 74 NetNode('testnet
0fb0: 27 2c 20 4d 61 6b 65 50 6f 69 6e 74 28 33 30 2c ', MakePoint(30,
0fc0: 20 39 30 2c 20 34 33 32 36 29 29 3b 0d 0a 53 45 90, 4326));..SE
0fd0: 4c 45 43 54 20 53 54 5f 41 64 64 49 73 6f 4e 65 LECT ST_AddIsoNe
0fe0: 74 4e 6f 64 65 28 27 74 65 73 74 6e 65 74 27 2c tNode('testnet',
0ff0: 20 4d 61 6b 65 50 6f 69 6e 74 28 33 30 2c 20 33 MakePoint(30, 3
1000: 30 2c 20 34 33 32 36 29 29 3b 0d 0a 53 45 4c 45 0, 4326));..SELE
1010: 43 54 20 53 54 5f 41 64 64 49 73 6f 4e 65 74 4e CT ST_AddIsoNetN
1020: 6f 64 65 28 27 74 65 73 74 6e 65 74 27 2c 20 4d ode('testnet', M
1030: 61 6b 65 50 6f 69 6e 74 28 31 38 30 2c 20 39 30 akePoint(180, 90
1040: 2c 20 34 33 32 36 29 29 3b 0d 0a 53 45 4c 45 43 , 4326));..SELEC
1050: 54 20 53 54 5f 41 64 64 49 73 6f 4e 65 74 4e 6f T ST_AddIsoNetNo
1060: 64 65 28 27 74 65 73 74 6e 65 74 27 2c 20 4d 61 de('testnet', Ma
1070: 6b 65 50 6f 69 6e 74 28 31 38 30 2c 20 33 30 2c kePoint(180, 30,
1080: 20 34 33 32 36 29 29 3b 0d 0a 53 45 4c 45 43 54 4326));..SELECT
1090: 20 53 54 5f 41 64 64 49 73 6f 4e 65 74 4e 6f 64 ST_AddIsoNetNod
10a0: 65 28 27 74 65 73 74 6e 65 74 27 2c 20 4d 61 6b e('testnet', Mak
10b0: 65 50 6f 69 6e 74 28 31 38 30 2c 20 30 2c 20 34 ePoint(180, 0, 4
10c0: 33 32 36 29 29 3b 0d 0a 3c 2f 76 65 72 62 61 74 326));..</verbat
10d0: 69 6d 3e 0d 0a 3c 2f 6c 69 3e 3c 2f 75 6c 3e 3c im>..</li></ul><
10e0: 2f 74 64 3e 0d 0a 3c 74 64 3e 3c 69 6d 67 20 73 /td>..<td><img s
10f0: 72 63 3d 22 68 74 74 70 3a 2f 2f 77 77 77 2e 67 rc="http://www.g
1100: 61 69 61 2d 67 69 73 2e 69 74 2f 67 61 69 61 2d aia-gis.it/gaia-
1110: 73 69 6e 73 2f 74 6f 70 6f 66 69 67 73 2f 6e 65 sins/topofigs/ne
1120: 74 2d 31 2e 70 6e 67 22 20 61 6c 74 3d 22 6e 65 t-1.png" alt="ne
1130: 74 2d 65 78 61 6d 70 6c 65 2d 31 22 3e 3c 2f 74 t-example-1"></t
1140: 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 d></tr>..<tr><td
1150: 20 63 6f 6c 73 70 61 6e 3d 22 32 22 3e 3c 68 72 colspan="2"><hr
1160: 3e 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 ></td></tr>..<tr
1170: 3e 3c 74 64 3e 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 ><td>..<ul>..<li
1180: 3e 0d 0a 54 68 65 6e 20 77 65 27 6c 6c 20 69 6e >..Then we'll in
1190: 73 65 72 74 20 61 20 62 75 6e 63 68 20 6f 66 20 sert a bunch of
11a0: 4c 69 6e 6b 73 3a 0d 0a 3c 76 65 72 62 61 74 69 Links:..<verbati
11b0: 6d 3e 53 45 4c 45 43 54 20 53 54 5f 41 64 64 4c m>SELECT ST_AddL
11c0: 69 6e 6b 28 27 74 65 73 74 6e 65 74 27 2c 20 31 ink('testnet', 1
11d0: 2c 20 32 2c 20 0d 0a 20 20 20 20 53 54 5f 47 65 , 2, .. ST_Ge
11e0: 6f 6d 46 72 6f 6d 54 65 78 74 28 27 4c 49 4e 45 omFromText('LINE
11f0: 53 54 52 49 4e 47 28 2d 31 38 30 20 39 30 2c 20 STRING(-180 90,
1200: 2d 31 38 30 20 36 30 29 27 2c 20 34 33 32 36 29 -180 60)', 4326)
1210: 29 3b 0d 0a 53 45 4c 45 43 54 20 53 54 5f 41 64 );..SELECT ST_Ad
1220: 64 4c 69 6e 6b 28 27 74 65 73 74 6e 65 74 27 2c dLink('testnet',
1230: 20 33 2c 20 34 2c 20 0d 0a 20 20 20 20 53 54 5f 3, 4, .. ST_
1240: 47 65 6f 6d 46 72 6f 6d 54 65 78 74 28 27 4c 49 GeomFromText('LI
1250: 4e 45 53 54 52 49 4e 47 28 2d 31 38 30 20 30 2c NESTRING(-180 0,
1260: 20 2d 31 38 30 20 2d 33 30 29 27 2c 20 34 33 32 -180 -30)', 432
1270: 36 29 29 3b 0d 0a 53 45 4c 45 43 54 20 53 54 5f 6));..SELECT ST_
1280: 41 64 64 4c 69 6e 6b 28 27 74 65 73 74 6e 65 74 AddLink('testnet
1290: 27 2c 20 34 2c 20 35 2c 20 0d 0a 20 20 20 20 53 ', 4, 5, .. S
12a0: 54 5f 47 65 6f 6d 46 72 6f 6d 54 65 78 74 28 27 T_GeomFromText('
12b0: 4c 49 4e 45 53 54 52 49 4e 47 28 2d 31 38 30 20 LINESTRING(-180
12c0: 2d 33 30 2c 20 2d 31 38 30 20 2d 36 30 29 27 2c -30, -180 -60)',
12d0: 20 34 33 32 36 29 29 3b 0d 0a 53 45 4c 45 43 54 4326));..SELECT
12e0: 20 53 54 5f 41 64 64 4c 69 6e 6b 28 27 74 65 73 ST_AddLink('tes
12f0: 74 6e 65 74 27 2c 20 35 2c 20 36 2c 20 0d 0a 20 tnet', 5, 6, ..
1300: 20 20 20 53 54 5f 47 65 6f 6d 46 72 6f 6d 54 65 ST_GeomFromTe
1310: 78 74 28 27 4c 49 4e 45 53 54 52 49 4e 47 28 2d xt('LINESTRING(-
1320: 31 38 30 20 2d 36 30 2c 20 2d 31 38 30 20 2d 39 180 -60, -180 -9
1330: 30 29 27 2c 20 34 33 32 36 29 29 3b 0d 0a 53 45 0)', 4326));..SE
1340: 4c 45 43 54 20 53 54 5f 41 64 64 4c 69 6e 6b 28 LECT ST_AddLink(
1350: 27 74 65 73 74 6e 65 74 27 2c 20 31 2c 20 37 2c 'testnet', 1, 7,
1360: 20 0d 0a 20 20 20 20 53 54 5f 47 65 6f 6d 46 72 .. ST_GeomFr
1370: 6f 6d 54 65 78 74 28 27 4c 49 4e 45 53 54 52 49 omText('LINESTRI
1380: 4e 47 28 2d 31 38 30 20 39 30 2c 20 2d 39 30 20 NG(-180 90, -90
1390: 39 30 29 27 2c 20 34 33 32 36 29 29 3b 0d 0a 53 90)', 4326));..S
13a0: 45 4c 45 43 54 20 53 54 5f 41 64 64 4c 69 6e 6b ELECT ST_AddLink
13b0: 28 27 74 65 73 74 6e 65 74 27 2c 20 32 2c 20 38 ('testnet', 2, 8
13c0: 2c 20 0d 0a 20 20 20 20 53 54 5f 47 65 6f 6d 46 , .. ST_GeomF
13d0: 72 6f 6d 54 65 78 74 28 27 4c 49 4e 45 53 54 52 romText('LINESTR
13e0: 49 4e 47 28 2d 31 38 30 20 36 30 2c 20 2d 39 30 ING(-180 60, -90
13f0: 20 33 30 29 27 2c 20 34 33 32 36 29 29 3b 0d 0a 30)', 4326));..
1400: 53 45 4c 45 43 54 20 53 54 5f 41 64 64 4c 69 6e SELECT ST_AddLin
1410: 6b 28 27 74 65 73 74 6e 65 74 27 2c 20 33 2c 20 k('testnet', 3,
1420: 39 2c 20 0d 0a 20 20 20 20 53 54 5f 47 65 6f 6d 9, .. ST_Geom
1430: 46 72 6f 6d 54 65 78 74 28 27 4c 49 4e 45 53 54 FromText('LINEST
1440: 52 49 4e 47 28 2d 31 38 30 20 30 2c 20 2d 39 30 RING(-180 0, -90
1450: 20 30 29 27 2c 20 34 33 32 36 29 29 3b 0d 0a 53 0)', 4326));..S
1460: 45 4c 45 43 54 20 53 54 5f 41 64 64 4c 69 6e 6b ELECT ST_AddLink
1470: 28 27 74 65 73 74 6e 65 74 27 2c 20 36 2c 20 31 ('testnet', 6, 1
1480: 32 2c 20 0d 0a 20 20 20 20 53 54 5f 47 65 6f 6d 2, .. ST_Geom
1490: 46 72 6f 6d 54 65 78 74 28 27 4c 49 4e 45 53 54 FromText('LINEST
14a0: 52 49 4e 47 28 2d 31 38 30 20 2d 39 30 2c 20 2d RING(-180 -90, -
14b0: 39 30 20 2d 39 30 29 27 2c 20 34 33 32 36 29 29 90 -90)', 4326))
14c0: 3b 0d 0a 53 45 4c 45 43 54 20 53 54 5f 41 64 64 ;..SELECT ST_Add
14d0: 4c 69 6e 6b 28 27 74 65 73 74 6e 65 74 27 2c 20 Link('testnet',
14e0: 37 2c 20 38 2c 20 0d 0a 20 20 20 20 53 54 5f 47 7, 8, .. ST_G
14f0: 65 6f 6d 46 72 6f 6d 54 65 78 74 28 27 4c 49 4e eomFromText('LIN
1500: 45 53 54 52 49 4e 47 28 2d 39 30 20 39 30 2c 20 ESTRING(-90 90,
1510: 2d 39 30 20 33 30 29 27 2c 20 34 33 32 36 29 29 -90 30)', 4326))
1520: 3b 0d 0a 53 45 4c 45 43 54 20 53 54 5f 41 64 64 ;..SELECT ST_Add
1530: 4c 69 6e 6b 28 27 74 65 73 74 6e 65 74 27 2c 20 Link('testnet',
1540: 38 2c 20 39 2c 20 0d 0a 20 20 20 20 53 54 5f 47 8, 9, .. ST_G
1550: 65 6f 6d 46 72 6f 6d 54 65 78 74 28 27 4c 49 4e eomFromText('LIN
1560: 45 53 54 52 49 4e 47 28 2d 39 30 20 33 30 2c 20 ESTRING(-90 30,
1570: 2d 39 30 20 30 29 27 2c 20 34 33 32 36 29 29 3b -90 0)', 4326));
1580: 0d 0a 53 45 4c 45 43 54 20 53 54 5f 41 64 64 4c ..SELECT ST_AddL
1590: 69 6e 6b 28 27 74 65 73 74 6e 65 74 27 2c 20 39 ink('testnet', 9
15a0: 2c 20 31 30 2c 20 0d 0a 20 20 20 20 53 54 5f 47 , 10, .. ST_G
15b0: 65 6f 6d 46 72 6f 6d 54 65 78 74 28 27 4c 49 4e eomFromText('LIN
15c0: 45 53 54 52 49 4e 47 28 2d 39 30 20 30 2c 20 2d ESTRING(-90 0, -
15d0: 39 30 20 2d 33 30 29 27 2c 20 34 33 32 36 29 29 90 -30)', 4326))
15e0: 3b 0d 0a 53 45 4c 45 43 54 20 53 54 5f 41 64 64 ;..SELECT ST_Add
15f0: 4c 69 6e 6b 28 27 74 65 73 74 6e 65 74 27 2c 20 Link('testnet',
1600: 31 30 2c 20 31 31 2c 20 0d 0a 20 20 20 20 53 54 10, 11, .. ST
1610: 5f 47 65 6f 6d 46 72 6f 6d 54 65 78 74 28 27 4c _GeomFromText('L
1620: 49 4e 45 53 54 52 49 4e 47 28 2d 39 30 20 2d 33 INESTRING(-90 -3
1630: 30 2c 20 2d 39 30 20 2d 36 30 29 27 2c 20 34 33 0, -90 -60)', 43
1640: 32 36 29 29 3b 0d 0a 53 45 4c 45 43 54 20 53 54 26));..SELECT ST
1650: 5f 41 64 64 4c 69 6e 6b 28 27 74 65 73 74 6e 65 _AddLink('testne
1660: 74 27 2c 20 31 31 2c 20 31 32 2c 20 0d 0a 20 20 t', 11, 12, ..
1670: 20 20 53 54 5f 47 65 6f 6d 46 72 6f 6d 54 65 78 ST_GeomFromTex
1680: 74 28 27 4c 49 4e 45 53 54 52 49 4e 47 28 2d 39 t('LINESTRING(-9
1690: 30 20 2d 36 30 2c 20 2d 39 30 20 2d 39 30 29 27 0 -60, -90 -90)'
16a0: 2c 20 34 33 32 36 29 29 3b 0d 0a 53 45 4c 45 43 , 4326));..SELEC
16b0: 54 20 53 54 5f 41 64 64 4c 69 6e 6b 28 27 74 65 T ST_AddLink('te
16c0: 73 74 6e 65 74 27 2c 20 34 2c 20 31 31 2c 20 0d stnet', 4, 11, .
16d0: 0a 20 20 20 20 53 54 5f 47 65 6f 6d 46 72 6f 6d . ST_GeomFrom
16e0: 54 65 78 74 28 27 4c 49 4e 45 53 54 52 49 4e 47 Text('LINESTRING
16f0: 28 2d 31 38 30 20 2d 33 30 2c 20 2d 39 30 20 2d (-180 -30, -90 -
1700: 36 30 29 27 2c 20 34 33 32 36 29 29 3b 0d 0a 53 60)', 4326));..S
1710: 45 4c 45 43 54 20 53 54 5f 41 64 64 4c 69 6e 6b ELECT ST_AddLink
1720: 28 27 74 65 73 74 6e 65 74 27 2c 20 35 2c 20 31 ('testnet', 5, 1
1730: 32 2c 20 0d 0a 20 20 20 20 53 54 5f 47 65 6f 6d 2, .. ST_Geom
1740: 46 72 6f 6d 54 65 78 74 28 27 4c 49 4e 45 53 54 FromText('LINEST
1750: 52 49 4e 47 28 2d 31 38 30 20 2d 36 30 2c 20 2d RING(-180 -60, -
1760: 39 30 20 2d 39 30 29 27 2c 20 34 33 32 36 29 29 90 -90)', 4326))
1770: 3b 0d 0a 53 45 4c 45 43 54 20 53 54 5f 41 64 64 ;..SELECT ST_Add
1780: 4c 69 6e 6b 28 27 74 65 73 74 6e 65 74 27 2c 20 Link('testnet',
1790: 39 2c 20 31 35 2c 20 0d 0a 20 20 20 20 53 54 5f 9, 15, .. ST_
17a0: 47 65 6f 6d 46 72 6f 6d 54 65 78 74 28 27 4c 49 GeomFromText('LI
17b0: 4e 45 53 54 52 49 4e 47 28 2d 39 30 20 30 2c 20 NESTRING(-90 0,
17c0: 2d 33 30 20 30 29 27 2c 20 34 33 32 36 29 29 3b -30 0)', 4326));
17d0: 0d 0a 53 45 4c 45 43 54 20 53 54 5f 41 64 64 4c ..SELECT ST_AddL
17e0: 69 6e 6b 28 27 74 65 73 74 6e 65 74 27 2c 20 31 ink('testnet', 1
17f0: 35 2c 20 31 34 2c 20 0d 0a 20 20 20 20 53 54 5f 5, 14, .. ST_
1800: 47 65 6f 6d 46 72 6f 6d 54 65 78 74 28 27 4c 49 GeomFromText('LI
1810: 4e 45 53 54 52 49 4e 47 28 2d 33 30 20 30 2c 20 NESTRING(-30 0,
1820: 30 20 30 29 27 2c 20 34 33 32 36 29 29 3b 0d 0a 0 0)', 4326));..
1830: 53 45 4c 45 43 54 20 53 54 5f 41 64 64 4c 69 6e SELECT ST_AddLin
1840: 6b 28 27 74 65 73 74 6e 65 74 27 2c 20 31 34 2c k('testnet', 14,
1850: 20 31 33 2c 20 0d 0a 20 20 20 20 53 54 5f 47 65 13, .. ST_Ge
1860: 6f 6d 46 72 6f 6d 54 65 78 74 28 27 4c 49 4e 45 omFromText('LINE
1870: 53 54 52 49 4e 47 28 30 20 30 2c 20 33 30 20 30 STRING(0 0, 30 0
1880: 29 27 2c 20 34 33 32 36 29 29 3b 0d 0a 53 45 4c )', 4326));..SEL
1890: 45 43 54 20 53 54 5f 41 64 64 4c 69 6e 6b 28 27 ECT ST_AddLink('
18a0: 74 65 73 74 6e 65 74 27 2c 20 31 33 2c 20 32 30 testnet', 13, 20
18b0: 2c 20 0d 0a 20 20 20 20 53 54 5f 47 65 6f 6d 46 , .. ST_GeomF
18c0: 72 6f 6d 54 65 78 74 28 27 4c 49 4e 45 53 54 52 romText('LINESTR
18d0: 49 4e 47 28 33 30 20 30 2c 20 31 38 30 20 30 29 ING(30 0, 180 0)
18e0: 27 2c 20 34 33 32 36 29 29 3b 0d 0a 53 45 4c 45 ', 4326));..SELE
18f0: 43 54 20 53 54 5f 41 64 64 4c 69 6e 6b 28 27 74 CT ST_AddLink('t
1900: 65 73 74 6e 65 74 27 2c 20 31 37 2c 20 31 39 2c estnet', 17, 19,
1910: 20 0d 0a 20 20 20 20 53 54 5f 47 65 6f 6d 46 72 .. ST_GeomFr
1920: 6f 6d 54 65 78 74 28 27 4c 49 4e 45 53 54 52 49 omText('LINESTRI
1930: 4e 47 28 33 30 20 33 30 2c 20 31 38 30 20 33 30 NG(30 30, 180 30
1940: 29 27 2c 20 34 33 32 36 29 29 3b 0d 0a 53 45 4c )', 4326));..SEL
1950: 45 43 54 20 53 54 5f 41 64 64 4c 69 6e 6b 28 27 ECT ST_AddLink('
1960: 74 65 73 74 6e 65 74 27 2c 20 31 34 2c 20 31 37 testnet', 14, 17
1970: 2c 20 0d 0a 20 20 20 20 53 54 5f 47 65 6f 6d 46 , .. ST_GeomF
1980: 72 6f 6d 54 65 78 74 28 27 4c 49 4e 45 53 54 52 romText('LINESTR
1990: 49 4e 47 28 30 20 30 2c 20 33 30 20 33 30 29 27 ING(0 0, 30 30)'
19a0: 2c 20 34 33 32 36 29 29 3b 0d 0a 53 45 4c 45 43 , 4326));..SELEC
19b0: 54 20 53 54 5f 41 64 64 4c 69 6e 6b 28 27 74 65 T ST_AddLink('te
19c0: 73 74 6e 65 74 27 2c 20 31 30 2c 20 31 35 2c 20 stnet', 10, 15,
19d0: 0d 0a 20 20 20 20 53 54 5f 47 65 6f 6d 46 72 6f .. ST_GeomFro
19e0: 6d 54 65 78 74 28 27 4c 49 4e 45 53 54 52 49 4e mText('LINESTRIN
19f0: 47 28 2d 39 30 20 2d 33 30 2c 20 2d 33 30 20 30 G(-90 -30, -30 0
1a00: 29 27 2c 20 34 33 32 36 29 29 3b 0d 0a 53 45 4c )', 4326));..SEL
1a10: 45 43 54 20 53 54 5f 41 64 64 4c 69 6e 6b 28 27 ECT ST_AddLink('
1a20: 74 65 73 74 6e 65 74 27 2c 20 31 32 2c 20 31 34 testnet', 12, 14
1a30: 2c 20 0d 0a 20 20 20 20 53 54 5f 47 65 6f 6d 46 , .. ST_GeomF
1a40: 72 6f 6d 54 65 78 74 28 27 4c 49 4e 45 53 54 52 romText('LINESTR
1a50: 49 4e 47 28 2d 39 30 20 2d 39 30 2c 20 30 20 30 ING(-90 -90, 0 0
1a60: 29 27 2c 20 34 33 32 36 29 29 3b 0d 0a 53 45 4c )', 4326));..SEL
1a70: 45 43 54 20 53 54 5f 41 64 64 4c 69 6e 6b 28 27 ECT ST_AddLink('
1a80: 74 65 73 74 6e 65 74 27 2c 20 31 36 2c 20 31 37 testnet', 16, 17
1a90: 2c 20 0d 0a 20 20 20 20 53 54 5f 47 65 6f 6d 46 , .. ST_GeomF
1aa0: 72 6f 6d 54 65 78 74 28 27 4c 49 4e 45 53 54 52 romText('LINESTR
1ab0: 49 4e 47 28 33 30 20 39 30 2c 20 33 30 20 33 30 ING(30 90, 30 30
1ac0: 29 27 2c 20 34 33 32 36 29 29 3b 0d 0a 53 45 4c )', 4326));..SEL
1ad0: 45 43 54 20 53 54 5f 41 64 64 4c 69 6e 6b 28 27 ECT ST_AddLink('
1ae0: 74 65 73 74 6e 65 74 27 2c 20 31 36 2c 20 31 38 testnet', 16, 18
1af0: 2c 20 0d 0a 20 20 20 20 53 54 5f 47 65 6f 6d 46 , .. ST_GeomF
1b00: 72 6f 6d 54 65 78 74 28 27 4c 49 4e 45 53 54 52 romText('LINESTR
1b10: 49 4e 47 28 33 30 20 39 30 2c 20 31 38 30 20 39 ING(30 90, 180 9
1b20: 30 29 27 2c 20 34 33 32 36 29 29 3b 0d 0a 53 45 0)', 4326));..SE
1b30: 4c 45 43 54 20 53 54 5f 41 64 64 4c 69 6e 6b 28 LECT ST_AddLink(
1b40: 27 74 65 73 74 6e 65 74 27 2c 20 31 39 2c 20 31 'testnet', 19, 1
1b50: 38 2c 20 0d 0a 20 20 20 20 53 54 5f 47 65 6f 6d 8, .. ST_Geom
1b60: 46 72 6f 6d 54 65 78 74 28 27 4c 49 4e 45 53 54 FromText('LINEST
1b70: 52 49 4e 47 28 31 38 30 20 33 30 2c 20 31 38 30 RING(180 30, 180
1b80: 20 39 30 29 27 2c 20 34 33 32 36 29 29 3b 0d 0a 90)', 4326));..
1b90: 53 45 4c 45 43 54 20 53 54 5f 41 64 64 4c 69 6e SELECT ST_AddLin
1ba0: 6b 28 27 74 65 73 74 6e 65 74 27 2c 20 31 39 2c k('testnet', 19,
1bb0: 20 32 30 2c 20 0d 0a 20 20 20 20 53 54 5f 47 65 20, .. ST_Ge
1bc0: 6f 6d 46 72 6f 6d 54 65 78 74 28 27 4c 49 4e 45 omFromText('LINE
1bd0: 53 54 52 49 4e 47 28 31 38 30 20 33 30 2c 20 31 STRING(180 30, 1
1be0: 38 30 20 30 29 27 2c 20 34 33 32 36 29 29 3b 0d 80 0)', 4326));.
1bf0: 0a 3c 2f 76 65 72 62 61 74 69 6d 3e 0d 0a 3c 2f .</verbatim>..</
1c00: 6c 69 3e 0d 0a 3c 2f 75 6c 3e 3c 2f 74 64 3e 0d li>..</ul></td>.
1c10: 0a 3c 74 64 3e 3c 69 6d 67 20 73 72 63 3d 22 68 .<td><img src="h
1c20: 74 74 70 3a 2f 2f 77 77 77 2e 67 61 69 61 2d 67 ttp://www.gaia-g
1c30: 69 73 2e 69 74 2f 67 61 69 61 2d 73 69 6e 73 2f is.it/gaia-sins/
1c40: 74 6f 70 6f 66 69 67 73 2f 6e 65 74 2d 32 2e 70 topofigs/net-2.p
1c50: 6e 67 22 20 61 6c 74 3d 22 6e 65 74 2d 65 78 61 ng" alt="net-exa
1c60: 6d 70 6c 65 2d 32 22 3e 3c 2f 74 64 3e 3c 2f 74 mple-2"></td></t
1c70: 72 3e 0d 0a 3c 74 72 3e 3c 74 64 20 63 6f 6c 73 r>..<tr><td cols
1c80: 70 61 6e 3d 22 32 22 3e 3c 68 72 3e 3c 2f 74 64 pan="2"><hr></td
1c90: 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e ></tr>..<tr><td>
1ca0: 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 0d 0a 57 65 ..<ul>..<li>..We
1cb0: 27 6c 6c 20 6e 6f 77 20 61 73 73 69 67 6e 20 61 'll now assign a
1cc0: 20 6d 6f 64 69 66 69 65 64 20 67 65 6f 6d 65 74 modified geomet
1cd0: 72 79 20 74 6f 20 4c 69 6e 6b 2d 36 2c 20 4c 69 ry to Link-6, Li
1ce0: 6e 6b 31 34 20 61 6e 64 20 4c 69 6e 6b 2d 31 35 nk14 and Link-15
1cf0: 3a 20 0d 0a 3c 76 65 72 62 61 74 69 6d 3e 0d 0a : ..<verbatim>..
1d00: 53 45 4c 45 43 54 20 53 54 5f 43 68 61 6e 67 65 SELECT ST_Change
1d10: 4c 69 6e 6b 47 65 6f 6d 28 27 74 65 73 74 6e 65 LinkGeom('testne
1d20: 74 27 2c 20 36 2c 20 0d 0a 20 20 20 20 53 54 5f t', 6, .. ST_
1d30: 47 65 6f 6d 46 72 6f 6d 54 65 78 74 28 27 4c 49 GeomFromText('LI
1d40: 4e 45 53 54 52 49 4e 47 28 2d 31 38 30 20 36 30 NESTRING(-180 60
1d50: 2c 20 2d 31 33 35 20 36 30 2c 20 2d 31 33 35 20 , -135 60, -135
1d60: 33 30 2c 20 2d 39 30 20 33 30 29 27 2c 20 34 33 30, -90 30)', 43
1d70: 32 36 29 29 3b 0d 0a 53 45 4c 45 43 54 20 53 54 26));..SELECT ST
1d80: 5f 43 68 61 6e 67 65 4c 69 6e 6b 47 65 6f 6d 28 _ChangeLinkGeom(
1d90: 27 74 65 73 74 6e 65 74 27 2c 20 31 34 2c 20 0d 'testnet', 14, .
1da0: 0a 20 20 20 20 53 54 5f 47 65 6f 6d 46 72 6f 6d . ST_GeomFrom
1db0: 54 65 78 74 28 27 4c 49 4e 45 53 54 52 49 4e 47 Text('LINESTRING
1dc0: 28 2d 31 38 30 20 2d 33 30 2c 20 2d 31 31 30 20 (-180 -30, -110
1dd0: 2d 33 30 2c 20 2d 31 31 30 20 2d 36 30 2c 20 2d -30, -110 -60, -
1de0: 39 30 20 2d 36 30 29 27 2c 20 34 33 32 36 29 29 90 -60)', 4326))
1df0: 3b 0d 0a 53 45 4c 45 43 54 20 53 54 5f 43 68 61 ;..SELECT ST_Cha
1e00: 6e 67 65 4c 69 6e 6b 47 65 6f 6d 28 27 74 65 73 ngeLinkGeom('tes
1e10: 74 6e 65 74 27 2c 20 31 35 2c 20 0d 0a 20 20 20 tnet', 15, ..
1e20: 20 53 54 5f 47 65 6f 6d 46 72 6f 6d 54 65 78 74 ST_GeomFromText
1e30: 28 27 4c 49 4e 45 53 54 52 49 4e 47 28 2d 31 38 ('LINESTRING(-18
1e40: 30 20 2d 36 30 2c 20 2d 31 32 30 20 2d 36 30 2c 0 -60, -120 -60,
1e50: 20 2d 39 30 20 2d 39 30 29 27 2c 20 34 33 32 36 -90 -90)', 4326
1e60: 29 29 3b 0d 0a 0d 0a 3c 2f 76 65 72 62 61 74 69 ));....</verbati
1e70: 6d 3e 0d 0a 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 0d m>..</li>..<li>.
1e80: 0a 4e 6f 77 20 77 65 27 6c 6c 20 73 70 6c 69 74 .Now we'll split
1e90: 20 4c 69 6e 6b 2d 32 30 20 62 79 20 69 6e 73 65 Link-20 by inse
1ea0: 72 74 69 6e 67 20 61 20 6e 65 77 20 4e 6f 64 65 rting a new Node
1eb0: 20 28 4e 6f 64 65 2d 32 31 29 2e 3c 62 72 3e 0d (Node-21).<br>.
1ec0: 0a 57 65 27 76 65 20 63 61 6c 6c 65 64 20 61 20 .We've called a
1ed0: 3c 62 3e 22 6d 6f 64 22 3c 2f 62 3e 20 6f 70 65 <b>"mod"</b> ope
1ee0: 72 61 74 6f 72 2c 20 61 6e 64 20 63 6f 6e 73 65 rator, and conse
1ef0: 71 75 65 6e 74 6c 79 20 4c 69 6e 6b 2d 32 30 20 quently Link-20
1f00: 77 69 6c 6c 20 62 65 20 6d 6f 64 69 66 69 65 64 will be modified
1f10: 20 61 6e 64 20 4c 69 6e 6b 2d 32 38 20 77 69 6c and Link-28 wil
1f20: 6c 20 62 65 20 69 6e 73 65 72 74 65 64 3a 0d 0a l be inserted:..
1f30: 3c 76 65 72 62 61 74 69 6d 3e 0d 0a 53 45 4c 45 <verbatim>..SELE
1f40: 43 54 20 53 54 5f 4d 6f 64 47 65 6f 4c 69 6e 6b CT ST_ModGeoLink
1f50: 53 70 6c 69 74 28 27 74 65 73 74 6e 65 74 27 2c Split('testnet',
1f60: 20 32 30 2c 20 4d 61 6b 65 50 6f 69 6e 74 28 31 20, MakePoint(1
1f70: 35 30 20 2c 33 30 2c 20 34 33 32 36 29 29 3b 0d 50 ,30, 4326));.
1f80: 0a 3c 2f 76 65 72 62 61 74 69 6d 3e 0d 0a 3c 2f .</verbatim>..</
1f90: 6c 69 3e 0d 0a 3c 6c 69 3e 0d 0a 57 65 27 6c 6c li>..<li>..We'll
1fa0: 20 67 6f 20 74 6f 20 73 70 6c 69 74 20 4c 69 6e go to split Lin
1fb0: 6b 2d 31 39 20 73 6f 20 4e 6f 64 65 2d 32 32 20 k-19 so Node-22
1fc0: 77 69 6c 6c 20 62 65 20 69 6e 73 65 72 74 65 64 will be inserted
1fd0: 2e 3c 62 72 3e 0d 0a 54 68 69 73 20 74 69 6d 65 .<br>..This time
1fe0: 20 77 65 27 76 65 20 63 61 6c 6c 65 64 20 61 20 we've called a
1ff0: 3c 62 3e 22 6e 65 77 22 3c 2f 62 3e 20 6f 70 65 <b>"new"</b> ope
2000: 72 61 74 6f 72 20 61 6e 64 20 63 6f 6e 73 65 71 rator and conseq
2010: 75 65 6e 74 6c 79 20 4c 69 6e 6b 2d 31 39 20 68 uently Link-19 h
2020: 61 73 20 62 65 65 6e 20 72 65 6d 6f 76 65 64 20 as been removed
2030: 61 6e 64 20 72 65 70 6c 61 63 65 64 20 62 79 20 and replaced by
2040: 4c 69 6e 6b 2d 32 39 20 61 6e 64 20 4c 69 6e 6b Link-29 and Link
2050: 2d 33 30 3a 0d 0a 3c 76 65 72 62 61 74 69 6d 3e -30:..<verbatim>
2060: 0d 0a 53 45 4c 45 43 54 20 53 54 5f 4e 65 77 47 ..SELECT ST_NewG
2070: 65 6f 4c 69 6e 6b 53 70 6c 69 74 28 27 74 65 73 eoLinkSplit('tes
2080: 74 6e 65 74 27 2c 20 31 39 2c 20 4d 61 6b 65 50 tnet', 19, MakeP
2090: 6f 69 6e 74 28 31 35 30 20 2c 30 2c 20 34 33 32 oint(150 ,0, 432
20a0: 36 29 29 3b 0d 0a 3c 2f 76 65 72 62 61 74 69 6d 6));..</verbatim
20b0: 3e 0d 0a 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 0d 0a >..</li>..<li>..
20c0: 46 69 6e 61 6c 6c 79 20 77 65 27 6c 6c 20 61 64 Finally we'll ad
20d0: 64 20 61 20 6e 65 77 20 4c 69 6e 6b 20 28 4c 69 d a new Link (Li
20e0: 6e 6b 2d 33 31 29 20 63 6f 6e 6e 65 63 74 69 6e nk-31) connectin
20f0: 67 20 4e 6f 64 65 2d 32 31 20 74 6f 20 4e 6f 64 g Node-21 to Nod
2100: 65 2d 32 32 3a 0d 0a 3c 76 65 72 62 61 74 69 6d e-22:..<verbatim
2110: 3e 0d 0a 53 45 4c 45 43 54 20 53 54 5f 41 64 64 >..SELECT ST_Add
2120: 4c 69 6e 6b 28 27 74 65 73 74 6e 65 74 27 2c 20 Link('testnet',
2130: 32 31 2c 20 32 32 2c 20 53 54 5f 47 65 6f 6d 46 21, 22, ST_GeomF
2140: 72 6f 6d 54 65 78 74 28 27 4c 49 4e 45 53 54 52 romText('LINESTR
2150: 49 4e 47 28 31 35 30 20 33 30 2c 20 31 35 30 20 ING(150 30, 150
2160: 30 29 27 2c 20 34 33 32 36 29 29 3b 0d 0a 3c 2f 0)', 4326));..</
2170: 76 65 72 62 61 74 69 6d 3e 0d 0a 3c 2f 6c 69 3e verbatim>..</li>
2180: 0d 0a 3c 2f 75 6c 3e 3c 2f 74 64 3e 0d 0a 3c 74 ..</ul></td>..<t
2190: 64 3e 3c 69 6d 67 20 73 72 63 3d 22 68 74 74 70 d><img src="http
21a0: 3a 2f 2f 77 77 77 2e 67 61 69 61 2d 67 69 73 2e ://www.gaia-gis.
21b0: 69 74 2f 67 61 69 61 2d 73 69 6e 73 2f 74 6f 70 it/gaia-sins/top
21c0: 6f 66 69 67 73 2f 6e 65 74 2d 33 2e 70 6e 67 22 ofigs/net-3.png"
21d0: 20 61 6c 74 3d 22 6e 65 74 2d 65 78 61 6d 70 6c alt="net-exampl
21e0: 65 2d 33 22 3e 3c 2f 74 64 3e 3c 2f 74 72 3e 0d e-3"></td></tr>.
21f0: 0a 3c 74 72 3e 3c 74 64 20 63 6f 6c 73 70 61 6e .<tr><td colspan
2200: 3d 22 32 22 3e 3c 68 72 3e 3c 2f 74 64 3e 3c 2f ="2"><hr></td></
2210: 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 0d 0a 3c tr>..<tr><td>..<
2220: 75 6c 3e 0d 0a 3c 6c 69 3e 0d 0a 4e 6f 77 20 77 ul>..<li>..Now w
2230: 65 27 6c 6c 20 6d 65 72 67 65 20 28 61 6b 61 20 e'll merge (aka
2240: 68 65 61 6c 29 20 4c 69 6e 6b 2d 31 38 20 61 6e heal) Link-18 an
2250: 64 20 4c 69 6e 6b 2d 32 39 20 61 6e 64 20 63 6f d Link-29 and co
2260: 6e 73 65 71 75 65 6e 74 6c 79 20 74 68 65 20 4e nsequently the N
2270: 6f 64 65 20 73 68 61 72 65 64 20 62 79 20 62 6f ode shared by bo
2280: 74 68 20 74 68 65 6d 20 28 4e 6f 64 65 2d 31 33 th them (Node-13
2290: 29 20 77 69 6c 6c 20 62 65 20 72 65 6d 6f 76 65 ) will be remove
22a0: 64 2e 3c 62 72 3e 0d 0a 57 65 27 76 65 20 63 61 d.<br>..We've ca
22b0: 6c 6c 65 64 20 61 20 3c 62 3e 22 6e 65 77 22 3c lled a <b>"new"<
22c0: 2f 62 3e 20 6f 70 65 72 61 74 6f 72 2c 20 73 6f /b> operator, so
22d0: 20 62 6f 74 68 20 4c 69 6e 6b 2d 31 38 20 61 6e both Link-18 an
22e0: 64 20 4c 69 6e 6b 2d 32 39 20 77 69 6c 6c 20 62 d Link-29 will b
22f0: 65 20 72 65 6d 6f 76 65 64 20 61 6e 64 20 72 65 e removed and re
2300: 70 6c 61 63 65 64 20 62 79 20 4c 69 6e 6b 2d 33 placed by Link-3
2310: 32 3a 0d 0a 3c 76 65 72 62 61 74 69 6d 3e 0d 0a 2:..<verbatim>..
2320: 53 45 4c 45 43 54 20 53 54 5f 4e 65 77 4c 69 6e SELECT ST_NewLin
2330: 6b 48 65 61 6c 28 27 74 65 73 74 6e 65 74 27 2c kHeal('testnet',
2340: 20 31 38 2c 20 32 39 29 3b 0d 0a 3c 2f 76 65 72 18, 29);..</ver
2350: 62 61 74 69 6d 3e 0d 0a 3c 2f 6c 69 3e 0d 0a 3c batim>..</li>..<
2360: 6c 69 3e 0d 0a 57 65 27 6c 6c 20 6e 6f 77 20 72 li>..We'll now r
2370: 65 6d 6f 76 65 20 4c 69 6e 6b 2d 32 32 3b 20 74 emove Link-22; t
2380: 68 65 20 77 65 27 6c 6c 20 68 65 61 6c 20 4c 69 he we'll heal Li
2390: 6e 6b 2d 31 31 20 61 6e 64 20 4c 69 6e 6b 2d 31 nk-11 and Link-1
23a0: 32 20 73 6f 20 74 6f 20 72 65 6d 6f 76 65 20 4e 2 so to remove N
23b0: 6f 64 65 2d 31 30 2e 3c 62 72 3e 0d 0a 54 68 69 ode-10.<br>..Thi
23c0: 73 20 74 69 6d 65 20 74 6f 6f 20 77 65 27 76 65 s time too we've
23d0: 20 63 61 6c 6c 65 64 20 61 20 3c 62 3e 22 6e 65 called a <b>"ne
23e0: 77 22 3c 2f 62 3e 20 6f 70 65 72 61 74 6f 72 2c w"</b> operator,
23f0: 20 73 6f 20 62 6f 74 68 20 4c 69 6e 6b 2d 31 31 so both Link-11
2400: 20 61 6e 64 20 4c 69 6e 6b 2d 31 32 20 77 69 6c and Link-12 wil
2410: 6c 20 62 65 20 72 65 6d 6f 76 65 64 20 61 6e 64 l be removed and
2420: 20 72 65 70 6c 61 63 65 64 20 62 79 20 4c 69 6e replaced by Lin
2430: 6b 2d 33 33 3a 0d 0a 3c 76 65 72 62 61 74 69 6d k-33:..<verbatim
2440: 3e 0d 0a 53 45 4c 45 43 54 20 53 54 5f 52 65 6d >..SELECT ST_Rem
2450: 6f 76 65 4c 69 6e 6b 28 27 74 65 73 74 6e 65 74 oveLink('testnet
2460: 27 2c 20 32 32 29 3b 0d 0a 53 45 4c 45 43 54 20 ', 22);..SELECT
2470: 53 54 5f 4e 65 77 4c 69 6e 6b 48 65 61 6c 28 27 ST_NewLinkHeal('
2480: 74 65 73 74 6e 65 74 27 2c 20 31 31 2c 20 31 32 testnet', 11, 12
2490: 29 3b 0d 0a 3c 2f 76 65 72 62 61 74 69 6d 3e 0d );..</verbatim>.
24a0: 0a 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 0d 0a 46 69 .</li>..<li>..Fi
24b0: 6e 61 6c 6c 79 20 77 65 27 6c 6c 20 68 65 61 6c nally we'll heal
24c0: 20 4c 69 6e 6b 2d 31 36 20 61 6e 64 20 4c 69 6e Link-16 and Lin
24d0: 6b 2d 31 37 20 73 6f 20 74 6f 20 72 65 6d 6f 76 k-17 so to remov
24e0: 65 20 4e 6f 64 65 2d 31 35 2e 3c 62 72 3e 0d 0a e Node-15.<br>..
24f0: 41 6e 79 77 61 79 20 74 68 69 73 20 74 69 6d 65 Anyway this time
2500: 20 77 65 27 76 65 20 63 61 6c 6c 65 64 20 61 20 we've called a
2510: 3c 62 3e 22 6d 6f 64 22 3c 2f 62 3e 20 6f 70 65 <b>"mod"</b> ope
2520: 72 61 74 6f 72 2c 20 73 6f 20 4c 69 6e 6b 2d 31 rator, so Link-1
2530: 36 20 77 69 6c 6c 20 62 65 20 6d 6f 64 69 66 69 6 will be modifi
2540: 65 64 20 61 6e 64 20 4c 69 6e 6b 2d 31 37 20 77 ed and Link-17 w
2550: 69 6c 6c 20 62 65 20 72 65 6d 6f 76 65 64 3a 0d ill be removed:.
2560: 0a 3c 76 65 72 62 61 74 69 6d 3e 0d 0a 53 45 4c .<verbatim>..SEL
2570: 45 43 54 20 53 54 5f 4d 6f 64 4c 69 6e 6b 48 65 ECT ST_ModLinkHe
2580: 61 6c 28 27 74 65 73 74 6e 65 74 27 2c 20 31 36 al('testnet', 16
2590: 2c 20 31 37 29 3b 0d 0a 3c 2f 76 65 72 62 61 74 , 17);..</verbat
25a0: 69 6d 3e 0d 0a 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c im>..</li>..</ul
25b0: 3e 0d 0a 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 3c 69 >..</td>..<td><i
25c0: 6d 67 20 73 72 63 3d 22 68 74 74 70 3a 2f 2f 77 mg src="http://w
25d0: 77 77 2e 67 61 69 61 2d 67 69 73 2e 69 74 2f 67 ww.gaia-gis.it/g
25e0: 61 69 61 2d 73 69 6e 73 2f 74 6f 70 6f 66 69 67 aia-sins/topofig
25f0: 73 2f 6e 65 74 2d 34 2e 70 6e 67 22 20 61 6c 74 s/net-4.png" alt
2600: 3d 22 6e 65 74 2d 65 78 61 6d 70 6c 65 2d 34 22 ="net-example-4"
2610: 3e 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 ></td></tr>..<tr
2620: 3e 3c 74 64 20 63 6f 6c 73 70 61 6e 3d 22 32 22 ><td colspan="2"
2630: 3e 3c 68 72 3e 3c 2f 74 64 3e 3c 2f 74 72 3e 0d ><hr></td></tr>.
2640: 0a 3c 74 72 3e 3c 74 64 3e 0d 0a 3c 75 6c 3e 0d .<tr><td>..<ul>.
2650: 0a 3c 6c 69 3e 0d 0a 4e 6f 77 20 77 65 27 6c 6c .<li>..Now we'll
2660: 20 72 65 6d 6f 76 65 20 62 6f 74 68 20 4c 69 6e remove both Lin
2670: 6b 2d 32 37 20 61 6e 64 20 4c 69 6e 6b 2d 33 30 k-27 and Link-30
2680: 2e 3c 62 72 3e 0d 0a 54 68 69 73 20 61 63 74 69 .<br>..This acti
2690: 6f 6e 20 77 69 6c 6c 20 66 72 65 65 20 4e 6f 64 on will free Nod
26a0: 65 2d 32 30 20 66 72 6f 6d 20 61 6e 79 20 4c 69 e-20 from any Li
26b0: 6e 6b 20 72 65 66 65 72 65 6e 63 65 3b 20 69 6e nk reference; in
26c0: 20 6f 74 68 65 72 20 77 6f 72 64 73 20 6e 6f 77 other words now
26d0: 20 4e 6f 64 65 2d 32 30 20 69 73 20 6f 6e 63 65 Node-20 is once
26e0: 20 61 67 61 69 6e 20 61 6e 20 49 73 6f 6c 61 74 again an Isolat
26f0: 65 64 20 4e 6f 64 65 2c 20 61 6e 64 20 77 65 20 ed Node, and we
2700: 63 61 6e 20 73 61 66 65 6c 79 20 72 65 6d 6f 76 can safely remov
2710: 65 20 69 74 3a 0d 0a 3c 76 65 72 62 61 74 69 6d e it:..<verbatim
2720: 3e 0d 0a 53 45 4c 45 43 54 20 53 54 5f 52 65 6d >..SELECT ST_Rem
2730: 6f 76 65 4c 69 6e 6b 28 27 74 65 73 74 6e 65 74 oveLink('testnet
2740: 27 2c 20 32 37 29 3b 0d 0a 53 45 4c 45 43 54 20 ', 27);..SELECT
2750: 53 54 5f 52 65 6d 6f 76 65 4c 69 6e 6b 28 27 74 ST_RemoveLink('t
2760: 65 73 74 6e 65 74 27 2c 20 33 30 29 3b 0d 0a 53 estnet', 30);..S
2770: 45 4c 45 43 54 20 53 54 5f 52 65 6d 49 73 6f 4e ELECT ST_RemIsoN
2780: 65 74 4e 6f 64 65 28 27 74 65 73 74 6e 65 74 27 etNode('testnet'
2790: 2c 20 32 30 29 3b 0d 0a 3c 2f 76 65 72 62 61 74 , 20);..</verbat
27a0: 69 6d 3e 0d 0a 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e im>..</li>..<li>
27b0: 0d 0a 41 73 20 61 20 6c 61 73 74 20 73 74 65 70 ..As a last step
27c0: 20 63 6f 6e 63 6c 75 64 69 6e 67 20 74 68 69 73 concluding this
27d0: 20 74 75 74 6f 72 69 61 6c 20 77 65 20 63 61 6e tutorial we can
27e0: 20 6e 6f 77 20 63 68 65 63 6b 20 6f 75 72 20 4e now check our N
27f0: 65 74 77 6f 72 6b 20 66 6f 72 20 63 6f 6e 73 69 etwork for consi
2800: 73 74 65 6e 63 79 3a 20 0d 0a 3c 76 65 72 62 61 stency: ..<verba
2810: 74 69 6d 3e 0d 0a 53 45 4c 45 43 54 20 53 54 5f tim>..SELECT ST_
2820: 56 61 6c 69 64 53 70 61 74 69 61 6c 4e 65 74 28 ValidSpatialNet(
2830: 27 74 65 73 74 6e 65 74 27 29 3b 0d 0a 3c 2f 76 'testnet');..</v
2840: 65 72 62 61 74 69 6d 3e 0d 0a 59 6f 75 20 63 61 erbatim>..You ca
2850: 6e 20 65 78 61 6d 69 6e 65 20 74 68 65 20 63 6f n examine the co
2860: 72 72 65 73 70 6f 6e 64 69 6e 67 20 64 69 61 67 rresponding diag
2870: 6e 6f 73 74 69 63 20 72 65 70 6f 72 74 20 73 74 nostic report st
2880: 6f 72 65 64 20 69 6e 20 74 68 65 20 74 65 6d 70 ored in the temp
2890: 6f 72 61 72 79 20 44 42 20 74 61 62 6c 65 20 6e orary DB table n
28a0: 61 6d 65 64 20 3c 62 3e 54 45 4d 50 2e 74 65 73 amed <b>TEMP.tes
28b0: 74 6e 65 74 5f 76 61 6c 69 64 61 74 65 5f 73 70 tnet_validate_sp
28c0: 61 74 69 61 6c 6e 65 74 3c 2f 62 3e 3a 0d 0a 3c atialnet</b>:..<
28d0: 76 65 72 62 61 74 69 6d 3e 0d 0a 53 45 4c 45 43 verbatim>..SELEC
28e0: 54 20 2a 20 46 52 4f 4d 20 54 45 4d 50 2e 74 65 T * FROM TEMP.te
28f0: 73 74 6e 65 74 5f 76 61 6c 69 64 61 74 65 5f 73 stnet_validate_s
2900: 70 61 74 69 61 6c 6e 65 74 3b 0d 0a 3c 2f 76 65 patialnet;..</ve
2910: 72 62 61 74 69 6d 3e 0d 0a 41 73 20 79 6f 75 20 rbatim>..As you
2920: 63 61 6e 20 65 61 73 69 6c 79 20 63 68 65 63 6b can easily check
2930: 2c 20 74 68 65 20 74 61 62 6c 65 20 69 73 20 63 , the table is c
2940: 6f 6d 70 6c 65 74 65 6c 79 20 65 6d 70 74 79 2c ompletely empty,
2950: 20 61 6e 64 20 74 68 69 73 20 6d 65 61 6e 73 20 and this means
2960: 74 68 61 74 20 79 6f 75 72 20 4e 65 74 77 6f 72 that your Networ
2970: 6b 20 69 73 20 66 75 6c 6c 79 20 63 6f 6e 73 69 k is fully consi
2980: 73 74 65 6e 74 2e 20 0d 0a 3c 2f 6c 69 3e 0d 0a stent. ..</li>..
2990: 3c 2f 75 6c 3e 0d 0a 3c 2f 74 64 3e 0d 0a 3c 74 </ul>..</td>..<t
29a0: 64 3e 3c 69 6d 67 20 73 72 63 3d 22 68 74 74 70 d><img src="http
29b0: 3a 2f 2f 77 77 77 2e 67 61 69 61 2d 67 69 73 2e ://www.gaia-gis.
29c0: 69 74 2f 67 61 69 61 2d 73 69 6e 73 2f 74 6f 70 it/gaia-sins/top
29d0: 6f 66 69 67 73 2f 6e 65 74 2d 35 2e 70 6e 67 22 ofigs/net-5.png"
29e0: 20 61 6c 74 3d 22 6e 65 74 2d 65 78 61 6d 70 6c alt="net-exampl
29f0: 65 2d 35 22 3e 3c 2f 74 64 3e 3c 2f 74 72 3e 0d e-5"></td></tr>.
2a00: 0a 3c 2f 74 61 62 6c 65 3e 3c 62 72 3e 3c 62 72 .</table><br><br
2a10: 3e 0d 0a 3c 74 61 62 6c 65 20 77 69 64 74 68 3d >..<table width=
2a20: 22 31 30 30 25 22 3e 3c 74 72 3e 0d 0a 3c 74 64 "100%"><tr>..<td
2a30: 20 77 69 64 74 68 3d 22 33 33 25 22 20 61 6c 69 width="33%" ali
2a40: 67 6e 3d 22 6c 65 66 74 22 3e 3c 61 20 68 72 65 gn="left"><a hre
2a50: 66 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 67 f="https://www.g
2a60: 61 69 61 2d 67 69 73 2e 69 74 2f 66 6f 73 73 69 aia-gis.it/fossi
2a70: 6c 2f 6c 69 62 73 70 61 74 69 61 6c 69 74 65 2f l/libspatialite/
2a80: 77 69 6b 69 3f 6e 61 6d 65 3d 74 6f 70 6f 2d 73 wiki?name=topo-s
2a90: 74 61 72 74 22 3e 70 72 65 76 69 6f 75 73 20 70 tart">previous p
2aa0: 61 67 65 3c 2f 61 3e 3c 2f 74 64 3e 0d 0a 3c 74 age</a></td>..<t
2ab0: 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 d align="center"
2ac0: 3e 3c 61 20 68 72 65 66 3d 22 68 74 74 70 73 3a ><a href="https:
2ad0: 2f 2f 77 77 77 2e 67 61 69 61 2d 67 69 73 2e 69 //www.gaia-gis.i
2ae0: 74 2f 66 6f 73 73 69 6c 2f 6c 69 62 73 70 61 74 t/fossil/libspat
2af0: 69 61 6c 69 74 65 2f 77 69 6b 69 3f 6e 61 6d 65 ialite/wiki?name
2b00: 3d 6d 69 73 63 2d 64 6f 63 73 22 3e 62 61 63 6b =misc-docs">back
2b10: 20 74 6f 20 69 6e 64 65 78 3c 2f 61 3e 3c 2f 74 to index</a></t
2b20: 64 3e 0d 0a 3c 74 64 20 77 69 64 74 68 3d 22 33 d>..<td width="3
2b30: 33 25 22 20 61 6c 69 67 6e 3d 22 72 69 67 68 74 3%" align="right
2b40: 22 3e 3c 61 20 68 72 65 66 3d 22 68 74 74 70 73 "><a href="https
2b50: 3a 2f 2f 77 77 77 2e 67 61 69 61 2d 67 69 73 2e ://www.gaia-gis.
2b60: 69 74 2f 66 6f 73 73 69 6c 2f 6c 69 62 73 70 61 it/fossil/libspa
2b70: 74 69 61 6c 69 74 65 2f 77 69 6b 69 3f 6e 61 6d tialite/wiki?nam
2b80: 65 3d 74 6f 70 6f 6e 65 74 2d 73 74 61 72 74 22 e=toponet-start"
2b90: 3e 6e 65 78 74 20 70 61 67 65 3c 2f 61 3e 3c 2f >next page</a></
2ba0: 74 64 3e 0d 0a 3c 2f 74 72 3e 3c 2f 74 61 62 6c td>..</tr></tabl
2bb0: 65 3e 0a 5a 20 34 62 61 33 32 62 33 63 30 65 37 e>.Z 4ba32b3c0e7
2bc0: 33 36 33 38 66 30 35 32 31 35 37 34 61 32 39 35 3638f0521574a295
2bd0: 30 30 31 61 37 0a 001a7.