Artifact
2e0f70ffeae7af9d751abf770eda8ae42e7ccf93:
Wiki page
[topo-advanced] by
sandro
2015-11-13 19:36:06.
0000: 44 20 32 30 31 35 2d 31 31 2d 31 33 54 31 39 3a D 2015-11-13T19:
0010: 33 36 3a 30 36 2e 30 31 32 0a 4c 20 74 6f 70 6f 36:06.012.L topo
0020: 2d 61 64 76 61 6e 63 65 64 0a 50 20 37 65 35 62 -advanced.P 7e5b
0030: 62 65 61 33 62 36 65 31 35 61 66 65 31 30 63 62 bea3b6e15afe10cb
0040: 61 34 35 64 32 30 62 62 63 31 64 39 66 61 65 62 a45d20bbc1d9faeb
0050: 61 36 34 35 0a 55 20 73 61 6e 64 72 6f 0a 57 20 a645.U sandro.W
0060: 37 34 39 37 0a 3c 74 61 62 6c 65 20 63 65 6c 6c 7497.<table cell
0070: 73 70 61 63 69 6e 67 3d 22 31 32 22 20 77 69 64 spacing="12" wid
0080: 74 68 3d 22 31 30 30 25 22 3e 0d 0a 3c 74 72 3e th="100%">..<tr>
0090: 3c 74 64 20 63 6f 6c 73 70 61 6e 3d 22 32 22 3e <td colspan="2">
00a0: 0d 0a 3c 74 61 62 6c 65 20 77 69 64 74 68 3d 22 ..<table width="
00b0: 31 30 30 25 22 20 62 67 63 6f 6c 6f 72 3d 22 23 100%" bgcolor="#
00c0: 66 30 66 30 66 38 22 3e 0d 0a 3c 74 72 3e 3c 74 f0f0f8">..<tr><t
00d0: 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 d align="center"
00e0: 3e 0d 0a 3c 68 31 3e 54 6f 70 6f 6c 6f 67 79 2d >..<h1>Topology-
00f0: 47 65 6f 6d 65 74 72 79 3a 20 61 6e 20 61 64 76 Geometry: an adv
0100: 61 6e 63 65 64 20 74 75 74 6f 72 69 61 6c 3c 2f anced tutorial</
0110: 68 31 3e 0d 0a 3c 2f 74 64 3e 3c 2f 74 72 3e 3c h1>..</td></tr><
0120: 2f 74 61 62 6c 65 3e 0d 0a 3c 74 61 62 6c 65 20 /table>..<table
0130: 77 69 64 74 68 3d 22 31 30 30 25 22 3e 3c 74 72 width="100%"><tr
0140: 3e 0d 0a 3c 74 64 20 77 69 64 74 68 3d 22 33 33 >..<td width="33
0150: 25 22 20 61 6c 69 67 6e 3d 22 6c 65 66 74 22 3e %" align="left">
0160: 3c 61 20 68 72 65 66 3d 22 68 74 74 70 73 3a 2f <a href="https:/
0170: 2f 77 77 77 2e 67 61 69 61 2d 67 69 73 2e 69 74 /www.gaia-gis.it
0180: 2f 66 6f 73 73 69 6c 2f 6c 69 62 73 70 61 74 69 /fossil/libspati
0190: 61 6c 69 74 65 2f 77 69 6b 69 3f 6e 61 6d 65 3d alite/wiki?name=
01a0: 74 6f 70 6f 6e 65 74 2d 69 6e 74 65 72 6d 65 64 toponet-intermed
01b0: 69 61 74 65 22 3e 70 72 65 76 69 6f 75 73 20 70 iate">previous p
01c0: 61 67 65 3c 2f 61 3e 3c 2f 74 64 3e 0d 0a 3c 74 age</a></td>..<t
01d0: 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 d align="center"
01e0: 3e 3c 61 20 68 72 65 66 3d 22 68 74 74 70 73 3a ><a href="https:
01f0: 2f 2f 77 77 77 2e 67 61 69 61 2d 67 69 73 2e 69 //www.gaia-gis.i
0200: 74 2f 66 6f 73 73 69 6c 2f 6c 69 62 73 70 61 74 t/fossil/libspat
0210: 69 61 6c 69 74 65 2f 77 69 6b 69 3f 6e 61 6d 65 ialite/wiki?name
0220: 3d 6d 69 73 63 2d 64 6f 63 73 22 3e 62 61 63 6b =misc-docs">back
0230: 20 74 6f 20 69 6e 64 65 78 3c 2f 61 3e 3c 2f 74 to index</a></t
0240: 64 3e 0d 0a 3c 74 64 20 77 69 64 74 68 3d 22 33 d>..<td width="3
0250: 33 25 22 20 61 6c 69 67 6e 3d 22 72 69 67 68 74 3%" align="right
0260: 22 3e 3c 61 20 68 72 65 66 3d 22 68 74 74 70 73 "><a href="https
0270: 3a 2f 2f 77 77 77 2e 67 61 69 61 2d 67 69 73 2e ://www.gaia-gis.
0280: 69 74 2f 66 6f 73 73 69 6c 2f 6c 69 62 73 70 61 it/fossil/libspa
0290: 74 69 61 6c 69 74 65 2f 77 69 6b 69 3f 6e 61 6d tialite/wiki?nam
02a0: 65 3d 74 6f 70 6f 2d 61 64 76 61 6e 63 65 64 22 e=topo-advanced"
02b0: 3e 6e 65 78 74 20 70 61 67 65 3c 2f 61 3e 3c 2f >next page</a></
02c0: 74 64 3e 0d 0a 3c 2f 74 72 3e 3c 2f 74 61 62 6c td>..</tr></tabl
02d0: 65 3e 0d 0a 3c 68 33 3e 54 6f 70 6f 4c 61 79 65 e>..<h3>TopoLaye
02e0: 72 73 20 61 6e 64 20 54 6f 70 6f 46 65 61 74 75 rs and TopoFeatu
02f0: 72 65 73 3c 2f 68 33 3e 0d 0a 49 6e 20 74 68 65 res</h3>..In the
0300: 20 70 72 65 76 69 6f 75 73 20 74 75 74 6f 72 69 previous tutori
0310: 61 6c 20 77 65 27 76 65 20 65 78 61 6d 69 6e 65 al we've examine
0320: 64 20 61 20 66 69 72 73 74 20 63 6f 75 70 6c 65 d a first couple
0330: 20 6f 66 20 53 51 4c 20 66 75 6e 63 74 69 6f 6e of SQL function
0340: 73 20 69 6e 74 65 6e 64 65 64 20 74 6f 20 65 78 s intended to ex
0350: 70 6f 72 74 20 61 20 47 65 6f 54 61 62 6c 65 20 port a GeoTable
0360: 6f 75 74 20 66 72 6f 6d 20 61 6e 20 65 78 69 73 out from an exis
0370: 74 69 6e 67 20 54 6f 70 6f 6c 6f 67 79 3a 20 3c ting Topology: <
0380: 62 3e 54 6f 70 6f 47 65 6f 5f 54 6f 47 65 6f 54 b>TopoGeo_ToGeoT
0390: 61 62 6c 65 28 29 3c 2f 62 3e 20 61 6e 64 20 3c able()</b> and <
03a0: 62 3e 54 6f 70 6f 47 65 6f 5f 54 6f 47 65 6f 54 b>TopoGeo_ToGeoT
03b0: 61 62 6c 65 47 65 6e 65 72 61 6c 69 7a 65 28 29 ableGeneralize()
03c0: 3c 2f 62 3e 2e 3c 62 72 3e 0d 0a 41 6e 79 77 61 </b>.<br>..Anywa
03d0: 79 20 53 70 61 74 69 61 4c 69 74 65 20 73 75 70 y SpatiaLite sup
03e0: 70 6f 72 74 73 20 61 6e 20 6d 6f 72 65 20 73 6f ports an more so
03f0: 70 68 69 73 74 69 63 61 74 65 64 20 28 61 6e 64 phisticated (and
0400: 20 63 6f 6d 70 6c 65 78 29 20 61 70 70 72 6f 61 complex) approa
0410: 63 68 20 62 61 73 65 64 20 6f 6e 20 3c 62 3e 54 ch based on <b>T
0420: 6f 70 6f 4c 61 79 65 72 73 3c 2f 62 3e 20 61 6e opoLayers</b> an
0430: 64 20 3c 62 3e 54 6f 70 6f 46 65 61 74 75 72 65 d <b>TopoFeature
0440: 73 3c 2f 62 3e 20 73 70 65 63 69 66 69 63 61 6c s</b> specifical
0450: 6c 79 20 69 6e 74 65 6e 64 65 64 20 74 6f 20 73 ly intended to s
0460: 75 70 70 6f 72 74 20 61 20 76 65 72 79 20 66 6c upport a very fl
0470: 65 78 69 62 6c 65 20 6d 65 63 68 61 6e 69 73 6d exible mechanism
0480: 20 66 6f 72 20 65 78 70 6f 72 74 69 6e 67 20 61 for exporting a
0490: 20 66 75 6c 6c 20 73 65 74 20 6f 66 20 47 65 6f full set of Geo
04a0: 54 61 62 6c 65 28 73 29 20 64 69 72 65 63 74 6c Table(s) directl
04b0: 79 20 64 65 72 69 76 69 6e 67 20 66 72 6f 6d 20 y deriving from
04c0: 61 20 54 6f 70 6f 6c 6f 67 79 2e 0d 0a 3c 68 34 a Topology...<h4
04d0: 3e 61 20 63 6f 6e 63 65 70 74 75 61 6c 20 72 65 >a conceptual re
04e0: 66 65 72 65 6e 63 65 20 66 72 61 6d 65 77 6f 72 ference framewor
04f0: 6b 3c 2f 68 34 3e 0d 0a 3c 75 6c 3e 0d 0a 3c 6c k</h4>..<ul>..<l
0500: 69 3e 61 6e 20 49 53 4f 20 54 6f 70 6f 6c 6f 67 i>an ISO Topolog
0510: 79 20 69 73 20 6a 75 73 74 20 69 6e 74 65 6e 64 y is just intend
0520: 65 64 20 74 6f 20 73 75 70 70 6f 72 74 20 61 20 ed to support a
0530: 63 6f 6e 73 69 73 74 65 6e 74 20 73 65 74 20 6f consistent set o
0540: 66 20 3c 62 3e 4e 6f 64 65 73 3c 2f 62 3e 2c 20 f <b>Nodes</b>,
0550: 3c 62 3e 45 64 67 65 73 3c 2f 62 3e 20 61 6e 64 <b>Edges</b> and
0560: 20 3c 62 3e 46 61 63 65 73 3c 2f 62 3e 20 70 72 <b>Faces</b> pr
0570: 69 6d 69 74 69 76 65 73 20 66 75 6c 6c 79 20 63 imitives fully c
0580: 6f 76 65 72 69 6e 67 20 74 68 65 20 70 6c 61 6e overing the plan
0590: 65 2e 0d 0a 54 6f 70 6f 6c 6f 67 79 20 70 72 69 e...Topology pri
05a0: 6d 69 74 69 76 65 73 20 63 6f 72 72 65 73 70 6f mitives correspo
05b0: 6e 64 20 74 6f 20 70 75 72 65 20 67 65 6f 6d 65 nd to pure geome
05c0: 74 72 69 65 73 2c 20 61 6e 64 20 63 61 6e 20 6e tries, and can n
05d0: 65 76 65 72 20 62 65 20 64 69 72 65 63 74 6c 79 ever be directly
05e0: 20 20 61 73 73 6f 63 69 61 74 65 64 20 74 6f 20 associated to
05f0: 61 20 63 6f 72 72 65 73 70 6f 6e 64 69 6e 67 20 a corresponding
0600: 73 65 74 20 6f 66 20 69 6e 66 6f 72 6d 61 74 69 set of informati
0610: 6f 6e 20 61 74 74 72 69 62 75 74 65 73 2e 0d 0a on attributes...
0620: 42 6f 74 68 20 4e 6f 64 65 20 61 6e 64 20 45 64 Both Node and Ed
0630: 67 65 20 70 72 69 6d 69 74 69 76 65 73 20 64 69 ge primitives di
0640: 72 65 63 74 6c 79 20 63 6f 72 72 65 73 70 6f 6e rectly correspon
0650: 64 20 74 6f 20 61 20 3c 75 3e 3c 69 3e 72 65 61 d to a <u><i>rea
0660: 6c 20 67 65 6f 6d 65 74 72 79 3c 2f 69 3e 3c 2f l geometry</i></
0670: 75 3e 2c 20 62 75 74 20 46 61 63 65 20 70 72 69 u>, but Face pri
0680: 6d 69 74 69 76 65 73 20 73 69 6d 70 6c 79 20 63 mitives simply c
0690: 6f 72 72 65 73 70 6f 6e 64 20 74 6f 20 61 20 3c orrespond to a <
06a0: 75 3e 3c 69 3e 76 69 72 74 75 61 6c 20 67 65 6f u><i>virtual geo
06b0: 6d 65 74 72 79 3c 2f 69 3e 3c 2f 75 3e 20 74 68 metry</i></u> th
06c0: 75 73 20 6e 65 63 65 73 73 61 72 69 6c 79 20 72 us necessarily r
06d0: 65 71 75 69 72 69 6e 67 20 74 6f 20 62 65 20 64 equiring to be d
06e0: 79 6e 61 6d 69 63 61 6c 6c 79 20 72 65 63 6f 6e ynamically recon
06f0: 74 72 75 63 74 65 64 20 65 76 65 72 79 20 74 69 tructed every ti
0700: 6d 65 20 74 68 61 74 20 74 68 65 79 20 61 72 65 me that they are
0710: 20 72 65 66 65 72 65 6e 63 65 64 20 28 61 6e 64 referenced (and
0720: 20 74 68 69 73 20 63 6f 75 6c 64 20 65 61 73 69 this could easi
0730: 6c 79 20 62 65 63 6f 6d 65 20 61 20 72 65 61 6c ly become a real
0740: 20 62 6f 74 74 6c 65 6e 65 63 6b 29 2e 3c 2f 6c bottleneck).</l
0750: 69 3e 0d 0a 3c 6c 69 3e 6f 6e 20 74 68 65 20 6f i>..<li>on the o
0760: 74 68 65 72 20 68 61 6e 64 20 61 20 47 65 6f 54 ther hand a GeoT
0770: 61 62 6c 65 20 28 61 6b 61 20 3c 75 3e 3c 69 3e able (aka <u><i>
0780: 6c 61 79 65 72 3c 2f 69 3e 3c 2f 75 3e 2c 20 61 layer</i></u>, a
0790: 73 20 69 6e 20 74 68 65 20 63 6f 6d 6d 6f 6e 20 s in the common
07a0: 47 49 53 20 70 61 72 6c 61 6e 63 65 29 20 69 73 GIS parlance) is
07b0: 20 61 6c 77 61 79 73 20 62 61 73 65 64 20 6f 6e always based on
07c0: 20 6d 61 6e 79 20 64 69 73 74 69 6e 63 74 20 66 many distinct f
07d0: 65 61 74 75 72 65 73 2c 20 61 6e 64 20 66 6f 72 eatures, and for
07e0: 20 65 61 63 68 20 66 65 61 74 75 72 65 20 61 20 each feature a
07f0: 47 65 6f 6d 65 74 72 79 20 61 6e 64 20 61 6e 20 Geometry and an
0800: 61 73 73 6f 63 69 61 74 65 64 20 73 65 74 20 6f associated set o
0810: 66 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 61 74 f information at
0820: 74 72 69 62 75 74 65 73 20 61 72 65 20 65 78 70 tributes are exp
0830: 65 63 74 65 64 20 74 6f 20 62 65 20 64 65 63 6c ected to be decl
0840: 61 72 65 64 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e ared.</li>..<li>
0850: 74 68 65 72 65 20 69 73 20 66 75 72 74 68 65 72 there is further
0860: 20 64 69 66 66 65 72 65 6e 63 65 20 74 6f 20 62 difference to b
0870: 65 20 74 61 6b 65 6e 20 69 6e 20 70 72 6f 70 65 e taken in prope
0880: 72 20 61 63 63 6f 75 6e 74 3a 20 54 6f 70 6f 6c r account: Topol
0890: 6f 67 79 20 70 72 69 6d 69 74 69 76 65 73 20 6e ogy primitives n
08a0: 65 63 65 73 73 61 72 69 6c 79 20 61 72 65 20 65 ecessarily are e
08b0: 6c 65 6d 65 6e 74 61 72 79 2e 20 46 65 61 74 75 lementary. Featu
08c0: 72 65 20 47 65 6f 6d 65 74 72 69 65 73 20 63 61 re Geometries ca
08d0: 6e 20 75 73 75 61 6c 6c 79 20 72 65 70 72 65 73 n usually repres
08e0: 65 6e 74 20 73 6f 6d 65 20 63 6f 6d 70 6c 65 78 ent some complex
08f0: 20 74 79 70 65 3a 20 4d 55 4c 54 49 50 4f 49 4e type: MULTIPOIN
0900: 54 2c 20 4d 55 4c 54 49 4c 49 4e 45 53 54 52 49 T, MULTILINESTRI
0910: 4e 47 2c 20 4d 55 4c 54 49 50 4f 4c 59 47 4f 4e NG, MULTIPOLYGON
0920: 20 61 6e 64 2c 20 6d 61 79 20 62 65 2c 20 47 45 and, may be, GE
0930: 4f 4d 45 54 52 59 43 4f 4c 4c 45 43 54 49 4f 4e OMETRYCOLLECTION
0940: 2e 20 53 6f 20 69 74 20 73 68 6f 75 6c 64 20 62 . So it should b
0950: 65 20 61 62 73 6f 6c 75 74 65 6c 79 20 63 6c 65 e absolutely cle
0960: 61 72 20 74 68 61 74 20 61 20 46 65 61 74 75 72 ar that a Featur
0970: 65 20 47 65 6f 6d 65 74 72 79 20 64 6f 65 73 20 e Geometry does
0980: 6e 6f 74 20 6e 65 63 65 73 73 61 72 69 6c 79 20 not necessarily
0990: 63 6f 72 72 65 73 70 6f 6e 64 73 20 74 6f 20 61 corresponds to a
09a0: 20 73 69 6e 67 6c 65 20 54 6f 70 6f 6c 6f 67 79 single Topology
09b0: 20 70 72 69 6d 69 74 69 76 65 20 3b 20 61 20 46 primitive ; a F
09c0: 65 61 74 75 72 65 20 47 65 6f 6d 65 74 72 79 20 eature Geometry
09d0: 63 6f 75 6c 64 20 65 61 73 69 6c 79 20 62 65 20 could easily be
09e0: 64 65 72 69 76 65 64 20 66 72 6f 6d 20 61 67 67 derived from agg
09f0: 72 65 67 61 74 69 6e 67 20 6d 61 6e 79 20 64 69 regating many di
0a00: 66 66 65 72 65 6e 74 20 54 6f 70 6f 6c 6f 67 79 fferent Topology
0a10: 20 70 72 69 6d 69 74 65 73 2e 3c 2f 6c 69 3e 20 primites.</li>
0a20: 0d 0a 3c 6c 69 3e 74 68 61 74 27 73 20 6e 6f 74 ..<li>that's not
0a30: 20 61 6c 6c 3a 20 6d 61 6e 79 20 64 69 66 66 65 all: many diffe
0a40: 72 65 6e 74 20 47 65 6f 54 61 62 6c 65 73 20 63 rent GeoTables c
0a50: 6f 75 6c 64 20 65 76 65 6e 61 74 75 61 6c 6c 79 ould evenatually
0a60: 20 62 65 20 64 65 72 69 76 65 64 20 66 72 6f 6d be derived from
0a70: 20 61 20 73 69 6e 67 6c 65 20 54 6f 70 6f 6c 6f a single Topolo
0a80: 67 79 3b 20 61 6e 64 20 74 68 65 20 73 61 6d 65 gy; and the same
0a90: 20 54 6f 70 6f 6c 6f 67 79 20 70 72 69 6d 69 74 Topology primit
0aa0: 69 76 65 20 63 6f 75 6c 64 20 70 6c 61 79 20 61 ive could play a
0ab0: 20 76 65 72 79 20 64 69 66 66 65 72 65 6e 74 20 very different
0ac0: 72 6f 6c 65 20 69 6e 20 65 76 65 72 79 6f 6e 65 role in everyone
0ad0: 20 6f 66 20 74 68 65 73 65 20 47 65 6f 54 61 62 of these GeoTab
0ae0: 6c 65 73 2e 3c 62 72 3e 0d 0a 4a 75 73 74 20 61 les.<br>..Just a
0af0: 20 62 61 73 69 63 61 6c 6c 79 20 73 69 6d 70 6c basically simpl
0b00: 65 20 65 78 61 6d 70 6c 65 3a 20 69 6d 61 67 69 e example: imagi
0b10: 6e 65 20 61 20 54 6f 70 6f 6c 6f 67 79 20 63 6f ne a Topology co
0b20: 72 72 65 73 70 6f 6e 64 69 6e 67 20 74 6f 20 73 rresponding to s
0b30: 6f 6d 65 20 63 61 64 61 73 74 72 61 6c 20 6d 61 ome cadastral ma
0b40: 70 2e 20 57 65 27 6c 6c 20 73 75 72 65 6c 79 20 p. We'll surely
0b50: 68 61 76 65 20 6d 61 6e 79 20 70 6f 74 65 6e 74 have many potent
0b60: 69 61 6c 20 6c 61 79 65 72 73 3a 20 62 75 69 6c ial layers: buil
0b70: 64 69 6e 67 73 2c 20 61 67 72 69 63 75 6c 74 75 dings, agricultu
0b80: 72 61 6c 20 6c 61 6e 64 2c 20 70 6f 70 75 6c 61 ral land, popula
0b90: 74 65 64 20 70 6c 61 63 65 73 2c 20 61 64 6d 69 ted places, admi
0ba0: 6e 69 73 74 72 61 74 69 76 65 20 62 6f 75 6e 64 nistrative bound
0bb0: 61 72 69 65 73 2c 20 72 6f 61 64 73 2c 20 70 6f aries, roads, po
0bc0: 6e 64 73 2c 20 72 69 76 65 72 73 2c 20 66 65 6e nds, rivers, fen
0bd0: 63 65 73 20 61 6e 64 20 73 6f 20 6f 6e 2e 3c 62 ces and so on.<b
0be0: 72 3e 0d 0a 49 6e 20 73 75 63 68 20 61 20 63 6f r>..In such a co
0bf0: 6e 74 65 78 74 20 61 20 66 65 6e 63 65 20 63 6f ntext a fence co
0c00: 75 6c 64 20 65 61 73 69 6c 79 20 63 6f 72 72 65 uld easily corre
0c10: 73 70 6f 6e 64 20 74 6f 20 61 20 46 65 61 74 75 spond to a Featu
0c20: 72 65 20 77 69 74 68 69 6e 20 74 68 65 20 22 3c re within the "<
0c30: 69 3e 3c 62 3e 66 65 6e 63 65 73 3c 2f 62 3e 3c i><b>fences</b><
0c40: 2f 69 3e 22 20 6c 61 79 65 72 2c 20 63 6f 75 6c /i>" layer, coul
0c50: 64 20 70 72 6f 62 61 62 6c 79 20 64 65 6c 69 6d d probably delim
0c60: 69 74 20 74 77 6f 20 61 64 6a 61 63 65 6e 74 20 it two adjacent
0c70: 61 67 72 69 63 75 6c 74 75 72 61 6c 20 61 72 65 agricultural are
0c80: 61 73 20 61 6e 64 20 63 6f 75 6c 64 20 65 76 65 as and could eve
0c90: 6e 74 75 61 6c 6c 79 20 62 65 20 70 61 72 74 20 ntually be part
0ca0: 6f 66 20 73 6f 6d 65 20 61 64 6d 69 6e 69 73 74 of some administ
0cb0: 72 61 74 69 76 65 20 62 6f 75 6e 64 61 72 79 2e rative boundary.
0cc0: 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 54 6f </li>..<li><b>To
0cd0: 70 6f 4c 61 79 65 72 73 3c 2f 62 3e 20 61 6e 64 poLayers</b> and
0ce0: 20 3c 62 3e 54 6f 70 6f 46 65 61 74 75 72 65 73 <b>TopoFeatures
0cf0: 3c 2f 62 3e 20 72 65 70 72 65 73 65 6e 74 20 61 </b> represent a
0d00: 20 63 6f 6d 70 6c 65 78 20 61 6e 64 20 66 6c 65 complex and fle
0d10: 78 69 62 6c 65 20 73 74 72 75 63 74 75 72 65 20 xible structure
0d20: 69 6e 74 65 6e 64 65 64 20 74 6f 20 65 73 74 61 intended to esta
0d30: 62 6c 69 73 68 20 70 65 72 6d 61 6e 65 6e 74 20 blish permanent
0d40: 65 78 70 6c 69 63 69 74 20 63 6f 72 72 65 73 70 explicit corresp
0d50: 6f 6e 64 65 6e 63 65 73 20 62 65 74 77 65 65 6e ondences between
0d60: 20 54 6f 70 6f 6c 6f 67 79 20 50 72 69 6d 69 74 Topology Primit
0d70: 69 76 65 73 20 61 6e 64 20 47 65 6f 54 61 62 6c ives and GeoTabl
0d80: 65 20 46 65 61 74 75 72 65 73 2e 0d 0a 3c 75 6c e Features...<ul
0d90: 3e 0d 0a 3c 6c 69 3e 65 61 63 68 20 3c 62 3e 54 >..<li>each <b>T
0da0: 6f 70 6f 4c 61 79 65 72 3c 2f 62 3e 20 69 73 20 opoLayer</b> is
0db0: 75 6e 69 71 75 65 6c 79 20 69 64 65 6e 74 69 66 uniquely identif
0dc0: 69 65 64 20 62 79 20 69 74 73 20 3c 62 3e 6e 61 ied by its <b>na
0dd0: 6d 65 3c 2f 62 3e 20 61 6e 64 20 64 69 72 65 63 me</b> and direc
0de0: 74 6c 79 20 63 6f 72 72 65 73 70 6f 6e 64 73 20 tly corresponds
0df0: 74 6f 20 61 20 73 69 6e 67 6c 65 20 47 65 6f 54 to a single GeoT
0e00: 61 62 6c 65 20 74 6f 20 62 65 20 65 78 70 6f 72 able to be expor
0e10: 74 65 64 20 66 72 6f 6d 20 74 68 65 20 54 6f 70 ted from the Top
0e20: 6f 6c 6f 67 79 3c 62 72 3e 0d 0a 41 6e 20 61 72 ology<br>..An ar
0e30: 62 69 74 72 61 72 79 20 6e 75 6d 62 65 72 20 6f bitrary number o
0e40: 66 20 54 6f 70 6f 4c 61 79 65 72 73 20 63 61 6e f TopoLayers can
0e50: 20 62 65 20 63 72 65 61 74 65 64 20 6f 6e 20 74 be created on t
0e60: 68 65 20 73 61 6d 65 20 54 6f 70 6f 6c 6f 67 79 he same Topology
0e70: 2c 20 61 6e 64 20 65 61 63 68 20 6f 6e 65 20 6f , and each one o
0e80: 66 20 74 68 65 6d 20 77 69 6c 6c 20 61 63 74 20 f them will act
0e90: 61 73 20 61 20 73 65 70 61 72 61 74 65 20 63 6f as a separate co
0ea0: 6e 74 61 69 6e 65 72 2e 3c 2f 6c 69 3e 0d 0a 3c ntainer.</li>..<
0eb0: 6c 69 3e 65 61 63 68 20 3c 62 3e 54 6f 70 6f 46 li>each <b>TopoF
0ec0: 65 61 74 75 72 65 3c 2f 62 3e 20 69 73 20 75 6e eature</b> is un
0ed0: 69 71 75 65 6c 79 20 69 64 65 6e 74 69 66 69 65 iquely identifie
0ee0: 64 20 62 79 20 69 74 73 20 3c 62 3e 66 69 64 3c d by its <b>fid<
0ef0: 2f 62 3e 20 28 3c 69 3e 66 65 61 74 75 72 65 2d /b> (<i>feature-
0f00: 69 64 3c 2f 69 3e 29 20 61 6e 64 20 63 6f 72 72 id</i>) and corr
0f10: 65 73 70 6f 6e 64 73 20 74 6f 20 61 20 73 69 6e esponds to a sin
0f20: 67 6c 65 20 46 65 61 74 75 72 65 20 63 6f 6e 74 gle Feature cont
0f30: 61 69 6e 69 6e 67 20 61 6e 20 69 6e 64 69 76 69 aining an indivi
0f40: 64 75 61 6c 20 73 65 74 20 6f 66 20 69 6e 66 6f dual set of info
0f50: 72 6d 61 74 69 6f 6e 20 61 74 74 72 69 62 75 74 rmation attribut
0f60: 65 73 2e 3c 62 72 3e 0d 0a 54 68 65 20 47 65 6f es.<br>..The Geo
0f70: 6d 65 74 72 79 20 66 6f 72 20 65 61 63 68 20 54 metry for each T
0f80: 6f 70 6f 46 65 61 74 75 72 65 20 69 73 20 61 6c opoFeature is al
0f90: 77 61 79 73 20 69 6e 64 69 72 65 63 74 6c 79 20 ways indirectly
0fa0: 64 65 66 69 6e 65 64 20 62 79 20 73 70 65 63 69 defined by speci
0fb0: 66 79 69 6e 67 20 61 20 6c 69 73 74 20 6f 66 20 fying a list of
0fc0: 54 6f 70 6f 6c 6f 67 79 20 70 72 69 6d 69 74 69 Topology primiti
0fd0: 76 65 73 20 69 6e 64 69 76 69 64 75 61 6c 6c 79 ves individually
0fe0: 20 72 65 66 65 72 65 6e 63 65 64 20 62 79 20 74 referenced by t
0ff0: 68 65 69 72 20 49 44 73 2e 3c 62 72 3e 0d 0a 53 heir IDs.<br>..S
1000: 75 63 68 20 61 20 67 65 6f 6d 65 74 72 79 20 6f uch a geometry o
1010: 62 76 69 6f 75 73 6c 79 20 69 73 20 61 20 3c 75 bviously is a <u
1020: 3e 3c 69 3e 76 69 72 74 75 61 6c 3c 2f 69 3e 3c ><i>virtual</i><
1030: 2f 75 3e 20 6f 6e 65 2c 20 61 6e 64 20 77 69 6c /u> one, and wil
1040: 6c 20 62 65 20 61 63 74 75 61 6c 6c 79 20 6d 61 l be actually ma
1050: 74 65 72 69 61 6c 69 7a 65 64 20 28 62 79 20 61 terialized (by a
1060: 67 67 72 65 67 61 74 69 6e 67 20 61 6c 6c 20 72 ggregating all r
1070: 65 66 65 72 65 6e 63 65 64 20 54 6f 70 6f 6c 6f eferenced Topolo
1080: 67 79 20 70 72 69 6d 69 74 69 76 65 73 29 20 6f gy primitives) o
1090: 6e 6c 79 20 77 68 65 6e 20 65 78 70 6f 72 74 69 nly when exporti
10a0: 6e 67 20 74 68 65 20 64 65 73 74 69 6e 61 74 69 ng the destinati
10b0: 6f 6e 20 47 65 6f 54 61 62 6c 65 2e 3c 2f 6c 69 on GeoTable.</li
10c0: 3e 0d 0a 3c 2f 75 6c 3e 3c 2f 6c 69 3e 0d 0a 3c >..</ul></li>..<
10d0: 6c 69 3e 54 68 65 20 54 6f 70 6f 4c 61 79 65 72 li>The TopoLayer
10e0: 73 20 2f 20 54 6f 70 6f 46 65 61 74 75 72 65 73 s / TopoFeatures
10f0: 20 73 74 72 75 63 74 75 72 65 20 69 73 20 70 72 structure is pr
1100: 61 63 74 69 63 61 6c 6c 79 20 69 6d 70 6c 65 6d actically implem
1110: 65 6e 74 65 64 20 61 73 20 61 20 73 65 74 20 6f ented as a set o
1120: 66 20 73 65 76 65 72 61 6c 20 63 6c 6f 73 65 6c f several closel
1130: 79 20 72 65 6c 61 74 65 64 20 44 42 2d 74 61 62 y related DB-tab
1140: 6c 65 73 20 29 77 65 27 6c 6c 20 65 78 61 6d 69 les )we'll exami
1150: 6e 65 20 6c 61 74 65 72 20 74 68 65 69 72 20 72 ne later their r
1160: 65 73 70 65 63 74 69 76 65 20 6c 61 79 6f 75 74 espective layout
1170: 73 20 69 6e 20 66 75 6c 6c 20 64 65 74 61 69 6c s in full detail
1180: 29 3a 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 3c 62 ):..<ul>..<li><b
1190: 3e 3c 3c 69 3e 74 6f 70 6f 2d 70 72 65 66 69 78 ><<i>topo-prefix
11a0: 3c 2f 69 3e 3e 5f 74 6f 70 6f 6c 61 79 65 72 73 </i>>_topolayers
11b0: 3c 2f 62 3e 3a 20 74 68 69 73 20 66 69 72 73 74 </b>: this first
11c0: 20 74 61 62 6c 65 20 73 69 6d 70 6c 79 20 69 73 table simply is
11d0: 20 61 20 63 61 74 61 6c 6f 67 20 6f 66 20 61 6c a catalog of al
11e0: 6c 20 54 6f 70 6f 4c 61 79 65 72 73 20 73 75 70 l TopoLayers sup
11f0: 70 6f 72 74 69 6e 67 20 74 68 65 20 73 61 6d 65 porting the same
1200: 20 54 6f 70 6f 6c 6f 67 79 2e 3c 62 72 3e 0d 0a Topology.<br>..
1210: 45 61 63 68 20 54 6f 70 6f 4c 61 79 65 72 20 69 Each TopoLayer i
1220: 73 20 69 64 65 6e 74 69 66 69 65 64 20 62 79 20 s identified by
1230: 69 74 73 20 3c 62 3e 6e 61 6d 65 3c 2f 62 3e 20 its <b>name</b>
1240: 61 6e 64 20 62 79 20 69 74 73 20 3c 62 3e 49 44 and by its <b>ID
1250: 3c 2f 62 3e 3b 20 62 6f 74 68 20 69 64 65 6e 74 </b>; both ident
1260: 69 66 69 65 72 73 20 61 72 65 20 67 72 61 6e 74 ifiers are grant
1270: 65 64 20 74 6f 20 62 65 20 3c 69 3e 3c 75 3e 75 ed to be <i><u>u
1280: 6e 69 71 75 65 3c 2f 75 3e 3c 2f 69 3e 2e 3c 2f nique</u></i>.</
1290: 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 3c 3c 69 3e li>..<li><b><<i>
12a0: 74 6f 70 6f 2d 70 72 65 66 69 78 3c 2f 69 3e 3e topo-prefix</i>>
12b0: 5f 74 6f 70 6f 66 65 61 74 75 72 65 73 3c 2f 62 _topofeatures</b
12c0: 3e 3a 20 74 68 69 73 20 73 65 63 6f 6e 64 20 74 >: this second t
12d0: 61 62 6c 65 20 69 73 20 69 6e 74 65 6e 64 65 64 able is intended
12e0: 20 74 6f 20 70 65 72 6d 61 6e 65 6e 74 6c 79 20 to permanently
12f0: 73 74 6f 72 65 20 61 6c 6c 20 63 72 6f 73 73 2d store all cross-
1300: 72 65 66 65 72 65 6e 63 65 73 20 65 78 69 73 74 references exist
1310: 69 6e 67 20 62 65 74 77 65 65 6e 20 54 6f 70 6f ing between Topo
1320: 6c 6f 67 79 20 70 72 69 6d 69 74 69 76 65 73 20 logy primitives
1330: 61 6e 64 20 54 6f 70 6f 46 65 61 74 75 72 65 73 and TopoFeatures
1340: 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 3c .</li>..<li><b><
1350: 3c 69 3e 74 6f 70 6f 2d 70 72 65 66 69 78 3c 2f <i>topo-prefix</
1360: 69 3e 3e 5f 74 6f 70 6f 66 65 61 74 75 72 65 73 i>>_topofeatures
1370: 5f 3c 3c 69 3e 74 6f 70 6f 6c 61 79 65 72 2d 69 _<<i>topolayer-i
1380: 64 3c 2f 69 3e 3e 3c 2f 62 3e 3a 20 66 6f 72 20 d</i>></b>: for
1390: 65 61 63 68 20 73 69 6e 67 6c 65 20 54 6f 70 6f each single Topo
13a0: 4c 61 79 65 72 20 61 20 73 65 70 61 72 61 74 65 Layer a separate
13b0: 20 74 61 62 6c 65 20 69 73 20 72 65 71 75 69 72 table is requir
13c0: 65 64 2e 20 54 68 65 20 61 63 74 75 61 6c 20 63 ed. The actual c
13d0: 6f 72 72 65 73 70 6f 6e 64 65 6e 63 65 20 69 73 orrespondence is
13e0: 20 65 73 74 61 62 6c 69 73 68 65 64 20 76 69 61 established via
13f0: 20 74 68 65 20 3c 62 3e 54 6f 70 6f 4c 61 79 65 the <b>TopoLaye
1400: 72 2d 49 44 3c 2f 62 3e 20 73 75 66 66 69 78 2e r-ID</b> suffix.
1410: 3c 62 72 3e 0d 0a 41 6c 6c 20 74 68 65 73 65 20 <br>..All these
1420: 74 61 62 6c 65 73 20 61 72 65 20 69 6e 74 65 6e tables are inten
1430: 64 65 64 20 74 6f 20 70 65 72 6d 61 6e 65 6e 74 ded to permanent
1440: 6c 79 20 73 74 6f 72 65 20 74 68 65 20 69 6e 66 ly store the inf
1450: 6f 72 6d 61 74 69 6f 6e 20 61 74 74 72 69 62 75 ormation attribu
1460: 74 65 73 20 66 6f 72 20 65 61 63 68 20 54 6f 70 tes for each Top
1470: 6f 46 65 61 74 75 72 65 20 69 6e 20 74 68 65 20 oFeature in the
1480: 73 61 6d 65 20 54 6f 70 6f 4c 61 79 65 72 2e 0d same TopoLayer..
1490: 0a 44 69 66 66 65 72 65 6e 74 20 54 6f 70 6f 4c .Different TopoL
14a0: 61 79 65 72 73 20 77 69 6c 6c 20 6f 62 76 69 6f ayers will obvio
14b0: 73 75 6c 79 20 73 75 70 70 6f 72 74 20 61 20 64 suly support a d
14c0: 69 66 66 65 72 65 6e 74 20 73 65 74 20 6f 66 20 ifferent set of
14d0: 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 61 74 74 72 information attr
14e0: 69 62 75 74 65 73 20 74 68 75 73 20 72 65 71 75 ibutes thus requ
14f0: 69 72 69 6e 67 20 61 6e 20 69 6e 64 69 76 69 64 iring an individ
1500: 75 61 6c 20 74 61 62 6c 65 20 6c 61 79 6f 75 74 ual table layout
1510: 2e 3c 62 72 3e 0d 0a 41 6e 79 77 61 79 20 61 6c .<br>..Anyway al
1520: 6c 20 74 68 65 73 65 20 74 61 62 6c 65 73 20 61 l these tables a
1530: 72 65 20 61 6c 77 61 79 73 20 65 78 70 65 63 74 re always expect
1540: 65 64 20 74 6f 20 64 65 63 6c 61 72 65 20 61 20 ed to declare a
1550: 3c 62 3e 50 72 69 6d 61 72 79 20 4b 65 79 3c 2f <b>Primary Key</
1560: 62 3e 20 6f 66 20 74 68 65 20 3c 62 3e 49 4e 54 b> of the <b>INT
1570: 45 47 45 52 3c 2f 62 3e 20 74 79 70 65 20 6e 61 EGER</b> type na
1580: 6d 65 64 20 3c 62 3e 66 69 64 3c 2f 62 3e 20 61 med <b>fid</b> a
1590: 6e 64 20 69 6e 74 65 6e 64 65 64 20 74 6f 20 62 nd intended to b
15a0: 65 20 61 6e 20 75 6e 69 71 75 65 20 69 64 65 6e e an unique iden
15b0: 74 69 66 69 65 72 20 66 6f 72 20 65 61 63 68 20 tifier for each
15c0: 54 6f 70 6f 46 65 61 74 75 72 65 2e 3c 2f 6c 69 TopoFeature.</li
15d0: 3e 0d 0a 3c 2f 75 6c 3e 3c 2f 6c 69 3e 0d 0a 3c >..</ul></li>..<
15e0: 6c 69 3e 53 65 76 65 72 61 6c 20 53 51 4c 20 66 li>Several SQL f
15f0: 75 6e 63 74 69 6f 6e 73 20 61 72 65 20 73 70 65 unctions are spe
1600: 63 69 66 69 63 61 6c 6c 79 20 69 6e 74 65 6e 64 cifically intend
1610: 65 64 20 74 6f 20 73 75 70 70 6f 72 74 20 70 72 ed to support pr
1620: 6f 63 65 73 73 69 6e 67 20 6f 70 65 72 61 74 69 ocessing operati
1630: 6f 6e 73 20 62 61 73 65 64 20 6f 6e 20 54 6f 70 ons based on Top
1640: 6f 4c 61 79 65 72 73 20 61 6e 64 20 54 6f 70 6f oLayers and Topo
1650: 46 65 61 74 75 65 73 3b 20 77 65 27 6c 6c 20 65 Featues; we'll e
1660: 78 61 6d 69 6e 65 20 6c 61 74 65 72 20 61 6c 6c xamine later all
1670: 20 74 68 65 6d 20 69 6e 20 66 75 6c 6c 20 64 65 them in full de
1680: 74 61 69 6c 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c tail.</li>..</ul
1690: 3e 3c 62 72 3e 3c 62 72 3e 0d 0a 3c 68 72 3e 0d ><br><br>..<hr>.
16a0: 0a 3c 68 32 3e 61 20 71 75 69 63 6b 20 70 72 61 .<h2>a quick pra
16b0: 63 74 69 63 61 6c 20 65 78 65 72 63 69 73 65 3c ctical exercise<
16c0: 2f 68 32 3e 0d 0a 50 72 65 72 65 71 75 69 73 69 /h2>..Prerequisi
16d0: 74 65 73 3a 0d 0a 3c 6f 6c 3e 0d 0a 3c 6c 69 3e tes:..<ol>..<li>
16e0: 64 6f 77 6e 6c 6f 61 64 20 74 68 65 20 73 61 6d download the sam
16f0: 70 6c 65 20 44 42 2d 66 69 6c 65 20 66 72 6f 6d ple DB-file from
1700: 20 3c 61 20 68 72 65 66 3d 22 68 74 74 70 73 3a <a href="https:
1710: 2f 2f 77 77 77 2e 67 61 69 61 2d 67 69 73 2e 69 //www.gaia-gis.i
1720: 74 2f 67 61 69 61 2d 73 69 6e 73 2f 74 6f 70 6f t/gaia-sins/topo
1730: 73 61 6d 70 6c 65 73 2f 74 75 73 63 61 6e 79 2d samples/tuscany-
1740: 63 65 6e 73 75 73 2d 32 30 31 31 2e 37 7a 22 3e census-2011.7z">
1750: 68 65 72 65 3c 2f 61 3e 3c 62 72 3e 0d 0a 49 74 here</a><br>..It
1760: 20 63 6f 6e 74 61 69 6e 73 20 43 65 6e 73 75 73 contains Census
1770: 20 64 61 74 61 20 28 32 30 31 31 29 20 6b 69 6e data (2011) kin
1780: 64 6c 79 20 72 65 6c 65 61 73 65 64 20 62 79 20 dly released by
1790: 49 53 54 41 54 20 75 6e 64 65 72 20 3c 62 3e 43 ISTAT under <b>C
17a0: 43 2d 42 59 3c 2f 62 3e 20 6c 69 63 65 6e 73 65 C-BY</b> license
17b0: 20 74 65 72 6d 73 2e 3c 62 72 3e 0d 0a 54 68 65 terms.<br>..The
17c0: 20 6f 72 69 67 69 6e 61 6c 20 64 61 74 61 73 65 original datase
17d0: 74 73 20 68 61 76 65 20 62 65 65 6e 20 73 6c 69 ts have been sli
17e0: 67 68 74 6c 79 20 72 65 61 72 72 61 6e 67 65 64 ghtly rearranged
17f0: 20 69 6e 20 61 20 6d 6f 72 65 20 63 6f 6e 76 65 in a more conve
1800: 6e 69 65 6e 74 20 66 6f 72 6d 2e 3c 62 72 3e 0d nient form.<br>.
1810: 0a 41 6c 6c 20 67 65 6f 6d 65 74 72 69 65 73 20 .All geometries
1820: 61 72 65 20 69 6e 20 74 68 65 20 3c 62 3e 53 52 are in the <b>SR
1830: 49 44 20 33 32 36 33 32 3c 2f 62 3e 20 28 3c 69 ID 32632</b> (<i
1840: 3e 57 47 53 20 38 34 20 2f 20 55 54 4d 20 7a 6f >WGS 84 / UTM zo
1850: 6e 65 20 33 32 4e 3c 2f 69 3e 29 3a 0d 0a 3c 75 ne 32N</i>):..<u
1860: 6c 3e 0d 0a 3c 6c 69 3e 3c 62 3e 63 6f 6d 75 6e l>..<li><b>comun
1870: 69 3c 2f 62 3e 3a 20 54 75 73 63 61 6e 79 20 4d i</b>: Tuscany M
1880: 75 6e 69 63 69 70 61 6c 69 74 69 65 73 20 2f 20 unicipalities /
1890: 4c 6f 63 61 6c 20 43 6f 75 6e 63 69 6c 73 3c 2f Local Councils</
18a0: 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 70 72 6f 76 li>..<li><b>prov
18b0: 69 6e 63 65 3c 2f 62 3e 3a 20 54 75 73 63 61 6e ince</b>: Tuscan
18c0: 79 20 50 72 6f 76 69 6e 63 65 73 20 2f 20 43 6f y Provinces / Co
18d0: 75 6e 74 69 65 73 3c 2f 6c 69 3e 0d 0a 3c 6c 69 unties</li>..<li
18e0: 3e 3c 62 3e 72 65 67 69 6f 6e 69 3c 2f 62 3e 3a ><b>regioni</b>:
18f0: 20 54 75 73 63 61 6e 79 20 52 65 67 69 6f 6e 20 Tuscany Region
1900: 69 74 73 65 6c 66 3c 2f 6c 69 3e 0d 0a 3c 6c 69 itself</li>..<li
1910: 3e 3c 62 3e 75 6e 69 6f 6e 69 5f 63 6f 6d 3c 2f ><b>unioni_com</
1920: 62 3e 3a 20 55 6e 69 6f 6e 73 20 2f 20 43 6f 6e b>: Unions / Con
1930: 66 65 64 65 72 61 74 69 6f 6e 73 20 62 65 74 77 federations betw
1940: 65 65 6e 20 4d 75 6e 69 63 69 70 61 6c 69 74 69 een Municipaliti
1950: 65 73 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e es</li>..<li><b>
1960: 70 72 6f 76 5f 69 73 74 61 74 32 30 31 31 3c 2f prov_istat2011</
1970: 62 3e 3a 20 61 6e 20 61 6c 74 65 72 6e 61 74 69 b>: an alternati
1980: 76 65 20 50 72 6f 76 69 6e 63 65 73 20 64 61 74 ve Provinces dat
1990: 61 73 65 74 2e 3c 62 72 3e 0d 0a 54 68 69 73 20 aset.<br>..This
19a0: 64 61 74 61 73 65 74 20 69 73 20 6e 6f 74 20 65 dataset is not e
19b0: 78 61 63 74 6c 79 20 69 64 65 6e 74 69 63 61 6c xactly identical
19c0: 20 74 6f 20 3c 62 3e 70 72 6f 76 69 6e 63 65 3c to <b>province<
19d0: 2f 62 3e 20 62 65 63 61 75 73 65 20 69 74 20 68 /b> because it h
19e0: 61 73 20 61 20 64 69 66 66 65 72 65 6e 74 20 6f as a different o
19f0: 72 69 67 69 6e 20 28 49 53 54 41 54 20 2d 20 4e rigin (ISTAT - N
1a00: 61 74 69 6f 6e 61 6c 20 53 74 61 74 69 73 74 69 ational Statisti
1a10: 63 20 41 75 74 68 6f 72 69 74 79 29 3a 20 62 6f c Authority): bo
1a20: 74 68 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 61 th information a
1a30: 74 74 72 69 62 75 74 65 73 20 61 6e 64 20 67 65 ttributes and ge
1a40: 6f 6d 65 74 72 69 65 73 20 61 72 65 20 73 6c 69 ometries are sli
1a50: 67 68 74 6c 79 20 64 69 66 66 65 72 65 6e 74 2e ghtly different.
1a60: 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 3c 2f 6c 69 </li>..</ul></li
1a70: 3e 0d 0a 3c 6c 69 3e 75 6e 63 6f 6d 70 72 65 73 >..<li>uncompres
1a80: 73 20 74 68 65 20 64 6f 77 6e 6c 6f 61 64 65 64 s the downloaded
1a90: 20 64 62 2d 66 69 6c 65 20 28 3c 62 3e 3c 69 3e db-file (<b><i>
1aa0: 74 75 73 63 61 6e 79 2d 61 64 6d 69 6e 2e 73 71 tuscany-admin.sq
1ab0: 6c 69 74 65 3c 2f 69 3e 3c 2f 62 3e 29 2e 3c 2f lite</i></b>).</
1ac0: 6c 69 3e 0d 0a 3c 6c 69 3e 6e 6f 77 20 79 6f 75 li>..<li>now you
1ad0: 20 63 61 6e 20 66 69 6e 61 6c 6c 79 20 73 74 61 can finally sta
1ae0: 72 74 20 61 20 53 70 61 74 69 61 4c 69 74 65 20 rt a SpatiaLite
1af0: 73 65 73 73 69 6f 6e 20 75 73 69 6e 67 20 79 6f session using yo
1b00: 75 72 20 70 72 65 66 65 72 72 65 64 20 53 70 61 ur preferred Spa
1b10: 74 69 61 4c 69 74 65 20 66 72 6f 6e 74 20 65 6e tiaLite front en
1b20: 64 20 74 6f 6f 6c 3a 0d 0a 3c 75 6c 3e 0d 0a 3c d tool:..<ul>..<
1b30: 6c 69 3e 3c 75 3e 41 74 74 65 6e 74 69 6f 6e 3c li><u>Attention<
1b40: 2f 75 3e 3a 20 79 6f 75 20 6d 75 73 74 20 6e 6f /u>: you must no
1b50: 74 20 64 69 72 65 63 74 6c 79 20 63 6f 6e 6e 65 t directly conne
1b60: 63 74 20 74 6f 20 3c 62 3e 3c 69 3e 74 75 73 63 ct to <b><i>tusc
1b70: 61 6e 79 2d 61 64 6d 69 6e 2e 73 71 6c 69 74 65 any-admin.sqlite
1b80: 3c 2f 69 3e 3c 2f 62 3e 3b 20 79 6f 75 20 61 72 </i></b>; you ar
1b90: 65 20 65 78 70 65 63 74 65 64 20 69 6e 73 74 65 e expected inste
1ba0: 61 64 20 74 6f 20 63 6f 6e 6e 65 63 74 20 61 20 ad to connect a
1bb0: 6e 65 77 20 28 65 6d 70 74 79 29 20 44 42 2d 66 new (empty) DB-f
1bc0: 69 6c 65 20 6e 61 6d 65 64 20 3c 62 3e 74 75 73 ile named <b>tus
1bd0: 63 61 6e 79 2d 74 6f 70 6f 2e 73 71 6c 69 74 65 cany-topo.sqlite
1be0: 3c 2f 62 3e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e </b></li>..</ul>
1bf0: 3c 2f 6c 69 3e 0d 0a 3c 2f 6f 6c 3e 0d 0a 0d 0a </li>..</ol>....
1c00: 3c 62 72 3e 3c 62 72 3e 0d 0a 3c 74 61 62 6c 65 <br><br>..<table
1c10: 20 77 69 64 74 68 3d 22 31 30 30 25 22 3e 3c 74 width="100%"><t
1c20: 72 3e 0d 0a 3c 74 64 20 77 69 64 74 68 3d 22 33 r>..<td width="3
1c30: 33 25 22 20 61 6c 69 67 6e 3d 22 6c 65 66 74 22 3%" align="left"
1c40: 3e 3c 61 20 68 72 65 66 3d 22 68 74 74 70 73 3a ><a href="https:
1c50: 2f 2f 77 77 77 2e 67 61 69 61 2d 67 69 73 2e 69 //www.gaia-gis.i
1c60: 74 2f 66 6f 73 73 69 6c 2f 6c 69 62 73 70 61 74 t/fossil/libspat
1c70: 69 61 6c 69 74 65 2f 77 69 6b 69 3f 6e 61 6d 65 ialite/wiki?name
1c80: 3d 74 6f 70 6f 6e 65 2d 61 64 76 61 6e 63 65 64 =topone-advanced
1c90: 22 3e 70 72 65 76 69 6f 75 73 20 70 61 67 65 3c ">previous page<
1ca0: 2f 61 3e 3c 2f 74 64 3e 0d 0a 3c 74 64 20 61 6c /a></td>..<td al
1cb0: 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 3c 61 20 ign="center"><a
1cc0: 68 72 65 66 3d 22 68 74 74 70 73 3a 2f 2f 77 77 href="https://ww
1cd0: 77 2e 67 61 69 61 2d 67 69 73 2e 69 74 2f 66 6f w.gaia-gis.it/fo
1ce0: 73 73 69 6c 2f 6c 69 62 73 70 61 74 69 61 6c 69 ssil/libspatiali
1cf0: 74 65 2f 77 69 6b 69 3f 6e 61 6d 65 3d 6d 69 73 te/wiki?name=mis
1d00: 63 2d 64 6f 63 73 22 3e 62 61 63 6b 20 74 6f 20 c-docs">back to
1d10: 69 6e 64 65 78 3c 2f 61 3e 3c 2f 74 64 3e 0d 0a index</a></td>..
1d20: 3c 74 64 20 77 69 64 74 68 3d 22 33 33 25 22 20 <td width="33%"
1d30: 61 6c 69 67 6e 3d 22 72 69 67 68 74 22 3e 3c 61 align="right"><a
1d40: 20 68 72 65 66 3d 22 68 74 74 70 73 3a 2f 2f 77 href="https://w
1d50: 77 77 2e 67 61 69 61 2d 67 69 73 2e 69 74 2f 66 ww.gaia-gis.it/f
1d60: 6f 73 73 69 6c 2f 6c 69 62 73 70 61 74 69 61 6c ossil/libspatial
1d70: 69 74 65 2f 77 69 6b 69 3f 6e 61 6d 65 3d 74 6f ite/wiki?name=to
1d80: 70 6f 2d 61 64 76 61 6e 63 65 64 22 3e 6e 65 78 po-advanced">nex
1d90: 74 20 70 61 67 65 3c 2f 61 3e 3c 2f 74 64 3e 0d t page</a></td>.
1da0: 0a 3c 2f 74 72 3e 3c 2f 74 61 62 6c 65 3e 0a 5a .</tr></table>.Z
1db0: 20 34 33 32 63 31 65 31 63 65 66 36 37 39 34 38 432c1e1cef67948
1dc0: 37 32 33 63 36 30 30 37 34 30 37 34 64 36 61 35 723c60074074d6a5
1dd0: 30 0a 0.