Wiki page
[switching-to-4.0] by
sandro
2014-08-27 12:32:21.
0000: 44 20 32 30 31 34 2d 30 38 2d 32 37 54 31 32 3a D 2014-08-27T12:
0010: 33 32 3a 32 31 2e 37 31 36 0a 4c 20 73 77 69 74 32:21.716.L swit
0020: 63 68 69 6e 67 2d 74 6f 2d 34 2e 30 0a 50 20 62 ching-to-4.0.P b
0030: 36 39 35 65 66 34 36 62 65 61 65 61 31 39 61 64 695ef46beaea19ad
0040: 35 63 65 64 63 39 37 37 61 34 65 32 32 66 35 32 5cedc977a4e22f52
0050: 33 36 64 64 32 65 31 0a 55 20 73 61 6e 64 72 6f 36dd2e1.U sandro
0060: 0a 57 20 32 32 30 35 33 0a 42 61 63 6b 20 74 6f .W 22053.Back to
0070: 20 3c 61 20 68 72 65 66 3d 22 68 74 74 70 73 3a <a href="https:
0080: 2f 2f 77 77 77 2e 67 61 69 61 2d 67 69 73 2e 69 //www.gaia-gis.i
0090: 74 2f 66 6f 73 73 69 6c 2f 6c 69 62 73 70 61 74 t/fossil/libspat
00a0: 69 61 6c 69 74 65 2f 77 69 6b 69 3f 6e 61 6d 65 ialite/wiki?name
00b0: 3d 34 2e 32 2e 30 2d 64 6f 63 22 3e 6d 61 69 6e =4.2.0-doc">main
00c0: 20 53 70 61 74 69 61 4c 69 74 65 20 57 69 6b 69 SpatiaLite Wiki
00d0: 20 70 61 67 65 3c 2f 61 3e 3c 68 72 3e 3c 62 72 page</a><hr><br
00e0: 3e 0d 0a 3c 68 32 3e 52 65 6c 65 76 61 6e 74 20 >..<h2>Relevant
00f0: 63 68 61 6e 67 65 73 20 69 6e 74 72 6f 64 75 63 changes introduc
0100: 65 64 20 69 6e 20 76 65 72 73 69 6f 6e 20 34 2e ed in version 4.
0110: 30 2e 30 3c 2f 68 32 3e 0d 0a 53 70 61 74 69 61 0.0</h2>..Spatia
0120: 4c 69 74 65 20 56 65 72 73 69 6f 6e 20 34 2e 30 Lite Version 4.0
0130: 2e 30 20 69 6e 74 72 6f 64 75 63 65 73 20 73 65 .0 introduces se
0140: 76 65 72 61 6c 20 72 65 6c 65 76 61 6e 74 20 63 veral relevant c
0150: 68 61 6e 67 65 73 3b 20 6d 61 6e 79 20 6f 66 20 hanges; many of
0160: 74 68 65 73 65 20 6d 61 79 20 70 6f 74 65 6e 74 these may potent
0170: 69 61 6c 6c 79 20 70 6f 73 65 20 73 65 76 65 72 ially pose sever
0180: 65 20 63 72 6f 73 73 2d 76 65 72 73 69 6f 6e 20 e cross-version
0190: 63 6f 6d 70 61 74 69 62 69 6c 69 74 79 20 69 73 compatibility is
01a0: 73 75 65 73 2e 3c 62 72 3e 0d 0a 41 63 63 6f 72 sues.<br>..Accor
01b0: 64 69 6e 67 6c 79 20 74 6f 20 74 68 65 20 61 62 dingly to the ab
01c0: 6f 76 65 20 70 72 65 6d 69 73 65 2c 20 61 20 67 ove premise, a g
01d0: 6f 6f 64 20 63 6f 6d 70 72 65 68 65 6e 73 69 6f ood comprehensio
01e0: 6e 20 6f 66 20 61 6e 79 20 72 65 6c 61 74 65 64 n of any related
01f0: 20 64 65 74 61 69 6c 20 77 69 6c 6c 20 73 75 72 detail will sur
0200: 65 6c 79 20 61 6c 6c 6f 77 20 79 6f 75 20 74 6f ely allow you to
0210: 20 73 75 63 63 65 73 73 66 75 6c 6c 79 20 6d 61 successfully ma
0220: 73 74 65 72 20 61 6e 64 20 72 65 73 6f 6c 76 65 ster and resolve
0230: 20 61 6e 79 20 74 72 61 6e 73 69 74 69 6f 6e 20 any transition
0240: 69 73 73 75 65 2e 3c 62 72 3e 3c 62 72 3e 0d 0a issue.<br><br>..
0250: 3c 62 3e 59 6f 75 20 61 72 65 20 3c 75 3e 3c 69 <b>You are <u><i
0260: 3e 77 61 72 6d 6c 79 20 65 6e 63 6f 75 72 61 67 >warmly encourag
0270: 65 64 3c 2f 69 3e 3c 2f 75 3e 20 74 6f 20 63 61 ed</i></u> to ca
0280: 72 65 66 75 6c 6c 79 20 72 65 61 64 20 74 68 69 refully read thi
0290: 73 20 73 68 6f 72 74 20 6e 6f 74 65 2e 3c 2f 62 s short note.</b
02a0: 3e 3c 62 72 3e 3c 62 72 3e 0d 0a 3c 68 33 3e 43 ><br><br>..<h3>C
02b0: 68 61 6e 67 65 73 20 61 66 66 65 63 74 69 6e 67 hanges affecting
02c0: 20 74 68 65 20 22 3c 69 3e 73 70 61 74 69 61 6c the "<i>spatial
02d0: 5f 72 65 66 5f 73 79 73 3c 2f 69 3e 22 20 4d 65 _ref_sys</i>" Me
02e0: 74 61 64 61 74 61 20 74 61 62 6c 65 3c 2f 68 33 tadata table</h3
02f0: 3e 0d 0a 3c 74 61 62 6c 65 20 77 69 64 74 68 3d >..<table width=
0300: 22 31 30 30 25 22 20 62 67 63 6f 6c 6f 72 3d 22 "100%" bgcolor="
0310: 23 66 66 66 66 65 38 22 20 62 6f 72 64 65 72 3d #ffffe8" border=
0320: 22 31 22 20 63 65 6c 6c 73 70 61 63 69 6e 67 3d "1" cellspacing=
0330: 22 34 22 20 63 65 6c 6c 70 61 64 64 69 6e 67 3d "4" cellpadding=
0340: 22 34 22 3e 0d 0a 3c 74 72 3e 3c 74 64 20 62 67 "4">..<tr><td bg
0350: 63 6f 6c 6f 72 3d 22 23 65 38 65 38 65 38 22 20 color="#e8e8e8"
0360: 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 3c align="center"><
0370: 62 3e 6f 6c 64 20 6c 61 79 6f 75 74 3c 2f 62 3e b>old layout</b>
0380: 3c 62 72 3e 56 65 72 73 69 6f 6e 20 33 2e 31 2e <br>Version 3.1.
0390: 30 3c 62 72 3e 61 6e 64 20 61 6e 79 20 65 61 72 0<br>and any ear
03a0: 6c 69 65 72 3c 2f 74 64 3e 0d 0a 3c 74 64 20 62 lier</td>..<td b
03b0: 67 63 6f 6c 6f 72 3d 22 23 65 38 65 38 65 38 22 gcolor="#e8e8e8"
03c0: 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e align="center">
03d0: 3c 62 3e 6e 65 77 20 6c 61 79 6f 75 74 3c 2f 62 <b>new layout</b
03e0: 3e 3c 62 72 3e 56 65 72 73 69 6f 6e 20 34 2e 30 ><br>Version 4.0
03f0: 2e 30 3c 62 72 3e 61 6e 64 20 61 6e 79 20 73 75 .0<br>and any su
0400: 62 73 65 71 75 65 6e 74 3c 2f 74 64 3e 0d 0a 3c bsequent</td>..<
0410: 74 64 20 62 67 63 6f 6c 6f 72 3d 22 23 65 38 65 td bgcolor="#e8e
0420: 38 65 38 22 20 61 6c 69 67 6e 3d 22 63 65 6e 74 8e8" align="cent
0430: 65 72 22 3e 3c 62 3e 4e 6f 74 65 73 3c 2f 62 3e er"><b>Notes</b>
0440: 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e </td></tr>..<tr>
0450: 3c 74 64 3e 3c 62 3e 3c 69 3e 73 72 73 5f 77 6b <td><b><i>srs_wk
0460: 74 3c 2f 69 3e 3c 62 72 3e 54 45 58 54 3c 2f 62 t</i><br>TEXT</b
0470: 3e 3c 2f 74 64 3e 3c 74 64 3e 3c 62 3e 3c 69 3e ></td><td><b><i>
0480: 73 72 74 65 78 74 3c 2f 69 3e 3c 62 72 3e 54 45 srtext</i><br>TE
0490: 58 54 3c 2f 62 3e 3c 2f 74 64 3e 0d 0a 3c 74 64 XT</b></td>..<td
04a0: 3e 3c 75 6c 3e 0d 0a 3c 6c 69 3e 74 68 69 73 20 ><ul>..<li>this
04b0: 63 6f 6c 75 6d 6e 20 68 61 73 20 73 69 6d 70 6c column has simpl
04c0: 79 20 63 68 61 6e 67 65 64 20 69 74 73 20 6e 61 y changed its na
04d0: 6d 65 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 74 68 me.</li>..<li>th
04e0: 65 20 69 6e 74 65 6e 64 65 64 20 70 61 79 6c 6f e intended paylo
04f0: 61 64 20 61 6c 77 61 79 73 20 69 73 20 74 68 65 ad always is the
0500: 20 73 61 6d 65 20 28 69 2e 65 2e 20 57 4b 54 20 same (i.e. WKT
0510: 73 70 61 74 69 61 6c 20 72 65 66 65 72 65 6e 63 spatial referenc
0520: 65 20 73 79 73 74 65 6d 20 64 65 66 69 6e 69 74 e system definit
0530: 69 6f 6e 29 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e ion).</li>..<li>
0540: 63 68 61 6e 67 69 6e 67 20 74 68 65 20 63 6f 6c changing the col
0550: 75 6d 6e 20 6e 61 6d 65 20 77 61 73 20 73 74 72 umn name was str
0560: 69 63 74 6c 79 20 72 65 71 75 65 73 74 65 64 20 ictly requested
0570: 62 79 20 74 68 65 20 6d 6f 73 74 20 72 65 63 65 by the most rece
0580: 6e 74 20 69 6e 74 65 72 6e 61 74 69 6f 6e 61 6c nt international
0590: 20 73 74 61 6e 64 61 72 64 73 2e 3c 2f 6c 69 3e standards.</li>
05a0: 0d 0a 3c 6c 69 3e 53 70 61 74 69 61 4c 69 74 65 ..<li>SpatiaLite
05b0: 20 69 74 73 65 6c 66 20 6d 61 6b 65 73 20 76 65 itself makes ve
05c0: 72 79 20 6c 69 74 74 6c 65 20 75 73 65 20 6f 66 ry little use of
05d0: 20 74 68 65 73 65 20 63 6f 6c 75 6d 6e 2e 3c 62 these column.<b
05e0: 72 3e 0d 0a 63 75 72 72 65 6e 74 6c 79 20 74 68 r>..currently th
05f0: 65 20 75 6e 69 71 75 65 20 73 63 6f 70 65 20 69 e unique scope i
0600: 73 20 73 75 70 70 6f 72 74 69 6e 67 20 2a 2e 50 s supporting *.P
0610: 52 4a 20 66 69 6c 65 73 20 67 65 6e 65 72 61 74 RJ files generat
0620: 69 6f 6e 20 77 68 65 6e 20 65 78 70 6f 72 74 69 ion when exporti
0630: 6e 67 20 73 6f 6d 65 20 53 68 61 70 65 66 69 6c ng some Shapefil
0640: 65 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 3c 2f e.</li>..</ul></
0650: 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 2f 74 61 62 6c td></tr>..</tabl
0660: 65 3e 3c 62 72 3e 0d 0a 3c 75 3e 50 6c 65 61 73 e><br>..<u>Pleas
0670: 65 20 6e 6f 74 65 20 77 65 6c 6c 3c 2f 75 3e 3a e note well</u>:
0680: 20 74 68 65 72 65 20 69 73 20 61 20 66 75 72 74 there is a furt
0690: 68 65 72 20 72 65 6c 65 76 61 6e 74 20 63 68 61 her relevant cha
06a0: 6e 67 65 20 61 66 66 65 63 74 69 6e 67 20 22 3c nge affecting "<
06b0: 62 3e 3c 69 3e 73 70 61 74 69 61 6c 5f 72 65 66 b><i>spatial_ref
06c0: 5f 73 79 73 3c 2f 69 3e 3c 2f 62 3e 22 20 77 68 _sys</i></b>" wh
06d0: 69 63 68 20 69 73 20 61 62 73 6f 6c 75 74 65 6c ich is absolutel
06e0: 79 20 77 6f 72 74 68 20 74 6f 20 62 65 20 6e 6f y worth to be no
06f0: 74 69 63 65 64 2e 3c 62 72 3e 0d 0a 4e 6f 77 20 ticed.<br>..Now
0700: 61 6e 79 20 53 70 61 74 69 61 4c 69 74 65 20 64 any SpatiaLite d
0710: 61 74 61 62 61 73 65 20 61 6c 77 61 79 73 20 73 atabase always s
0720: 75 70 70 6f 72 74 73 20 74 68 65 20 74 77 6f 20 upports the two
0730: 66 6f 6c 6c 6f 77 69 6e 67 20 53 52 53 20 3c 69 following SRS <i
0740: 3e 69 6d 70 6c 69 63 69 74 3c 2f 69 3e 20 64 65 >implicit</i> de
0750: 66 69 6e 69 74 69 6f 6e 73 3a 3c 62 72 3e 3c 62 finitions:<br><b
0760: 72 3e 0d 0a 3c 74 61 62 6c 65 20 62 67 63 6f 6c r>..<table bgcol
0770: 6f 72 3d 22 23 66 66 66 66 66 66 22 20 62 6f 72 or="#ffffff" bor
0780: 64 65 72 3d 22 31 22 20 63 65 6c 6c 73 70 61 63 der="1" cellspac
0790: 69 6e 67 3d 22 34 22 20 63 65 6c 6c 70 61 64 64 ing="4" cellpadd
07a0: 69 6e 67 3d 22 34 22 3e 0d 0a 3c 74 72 3e 3c 74 ing="4">..<tr><t
07b0: 64 20 62 67 63 6f 6c 6f 72 3d 22 23 65 38 65 38 d bgcolor="#e8e8
07c0: 65 38 22 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 e8" align="cente
07d0: 72 22 3e 3c 62 3e 73 72 69 64 3c 2f 62 3e 3c 2f r"><b>srid</b></
07e0: 74 64 3e 0d 0a 3c 74 64 20 62 67 63 6f 6c 6f 72 td>..<td bgcolor
07f0: 3d 22 23 65 38 65 38 65 38 22 20 61 6c 69 67 6e ="#e8e8e8" align
0800: 3d 22 63 65 6e 74 65 72 22 3e 3c 62 3e 61 75 74 ="center"><b>aut
0810: 68 5f 6e 61 6d 65 3c 2f 62 3e 3c 2f 74 64 3e 0d h_name</b></td>.
0820: 0a 3c 74 64 20 62 67 63 6f 6c 6f 72 3d 22 23 65 .<td bgcolor="#e
0830: 38 65 38 65 38 22 20 61 6c 69 67 6e 3d 22 63 65 8e8e8" align="ce
0840: 6e 74 65 72 22 3e 3c 62 3e 61 75 74 68 5f 73 72 nter"><b>auth_sr
0850: 69 64 3c 2f 62 3e 3c 2f 74 64 3e 0d 0a 3c 74 64 id</b></td>..<td
0860: 20 62 67 63 6f 6c 6f 72 3d 22 23 65 38 65 38 65 bgcolor="#e8e8e
0870: 38 22 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 8" align="center
0880: 22 3e 3c 62 3e 72 65 66 5f 73 79 73 5f 6e 61 6d "><b>ref_sys_nam
0890: 65 3c 2f 62 3e 3c 2f 74 64 3e 0d 0a 3c 74 64 20 e</b></td>..<td
08a0: 62 67 63 6f 6c 6f 72 3d 22 23 65 38 65 38 65 38 bgcolor="#e8e8e8
08b0: 22 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 " align="center"
08c0: 3e 3c 62 3e 70 72 6f 6a 34 74 65 78 74 3c 2f 62 ><b>proj4text</b
08d0: 3e 3c 2f 74 64 3e 0d 0a 3c 74 64 20 62 67 63 6f ></td>..<td bgco
08e0: 6c 6f 72 3d 22 23 65 38 65 38 65 38 22 20 61 6c lor="#e8e8e8" al
08f0: 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 3c 62 3e ign="center"><b>
0900: 73 72 74 65 78 74 3c 2f 62 3e 3c 2f 74 64 3e 3c srtext</b></td><
0910: 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 20 61 6c /tr>..<tr><td al
0920: 69 67 6e 3d 22 72 69 67 68 74 22 3e 2d 31 3c 2f ign="right">-1</
0930: 74 64 3e 3c 74 64 3e 4e 4f 4e 45 3c 2f 74 64 3e td><td>NONE</td>
0940: 0d 0a 3c 74 64 20 61 6c 69 67 6e 3d 22 72 69 67 ..<td align="rig
0950: 68 74 22 3e 2d 31 3c 2f 74 64 3e 3c 74 64 3e 55 ht">-1</td><td>U
0960: 6e 64 65 66 69 6e 65 64 20 2d 20 43 61 72 74 65 ndefined - Carte
0970: 73 69 61 6e 3c 2f 74 64 3e 3c 74 64 3e 3c 2f 74 sian</td><td></t
0980: 64 3e 3c 74 64 3e 55 6e 64 65 66 69 6e 65 64 3c d><td>Undefined<
0990: 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c /td></tr>..<tr><
09a0: 74 64 20 61 6c 69 67 6e 3d 22 72 69 67 68 74 22 td align="right"
09b0: 3e 30 3c 2f 74 64 3e 3c 74 64 3e 4e 4f 4e 45 3c >0</td><td>NONE<
09c0: 2f 74 64 3e 0d 0a 3c 74 64 20 61 6c 69 67 6e 3d /td>..<td align=
09d0: 22 72 69 67 68 74 22 3e 30 3c 2f 74 64 3e 3c 74 "right">0</td><t
09e0: 64 3e 55 6e 64 65 66 69 6e 65 64 20 2d 20 47 65 d>Undefined - Ge
09f0: 6f 67 72 61 70 68 69 63 20 4c 6f 6e 67 2f 4c 61 ographic Long/La
0a00: 74 3c 2f 74 64 3e 3c 74 64 3e 3c 2f 74 64 3e 3c t</td><td></td><
0a10: 74 64 3e 09 55 6e 64 65 66 69 6e 65 64 3c 2f 74 td>.Undefined</t
0a20: 64 3e 3c 2f 74 72 3e 0d 0a 3c 2f 74 61 62 6c 65 d></tr>..</table
0a30: 3e 3c 62 72 3e 3c 75 6c 3e 0d 0a 3c 6c 69 3e 74 ><br><ul>..<li>t
0a40: 68 65 20 66 69 72 73 74 20 6f 6e 65 20 28 3c 62 he first one (<b
0a50: 3e 2d 31 3c 2f 62 3e 29 20 69 64 65 6e 74 69 66 >-1</b>) identif
0a60: 69 65 73 20 61 6e 79 20 3c 69 3e 67 65 6e 65 72 ies any <i>gener
0a70: 69 63 3c 2f 69 3e 2c 20 3c 69 3e 75 6e 71 75 61 ic</i>, <i>unqua
0a80: 6c 69 66 69 65 64 3c 2f 69 3e 20 53 52 53 20 6f lified</i> SRS o
0a90: 66 20 74 68 65 20 3c 62 3e 43 61 72 74 65 73 69 f the <b>Cartesi
0aa0: 61 6e 3c 2f 62 3e 20 74 79 70 65 20 28 69 2e 65 an</b> type (i.e
0ab0: 2e 20 3c 69 3e 70 6c 61 6e 61 72 3c 2f 69 3e 20 . <i>planar</i>
0ac0: 61 6e 64 20 75 73 69 6e 67 20 3c 69 3e 6d 65 74 and using <i>met
0ad0: 72 69 63 3c 2f 69 3e 20 63 6f 6f 72 64 69 6e 61 ric</i> coordina
0ae0: 74 65 73 29 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e tes).</li>..<li>
0af0: 74 68 65 20 73 65 63 6f 6e 64 20 6f 6e 65 20 28 the second one (
0b00: 3c 62 3e 30 3c 2f 62 3e 29 20 6e 6f 77 20 69 64 <b>0</b>) now id
0b10: 65 6e 74 69 66 69 65 73 20 61 6e 79 20 3c 69 3e entifies any <i>
0b20: 67 65 6e 65 72 69 63 3c 2f 69 3e 2c 20 3c 69 3e generic</i>, <i>
0b30: 75 6e 71 75 61 6c 69 66 69 65 64 3c 2f 69 3e 20 unqualified</i>
0b40: 53 52 53 20 6f 66 20 74 68 65 20 3c 62 3e 47 65 SRS of the <b>Ge
0b50: 6f 67 72 61 70 68 69 63 3c 2f 62 3e 20 74 79 70 ographic</b> typ
0b60: 65 20 28 69 2e 65 2e 20 3c 69 3e 73 70 68 65 72 e (i.e. <i>spher
0b70: 69 63 61 6c 3c 2f 69 3e 20 6f 72 20 62 61 73 65 ical</i> or base
0b80: 64 20 6f 6e 20 73 6f 6d 65 20 3c 69 3e 65 6c 6c d on some <i>ell
0b90: 69 70 73 6f 69 64 3c 2f 69 3e 2c 20 61 6e 64 20 ipsoid</i>, and
0ba0: 63 6f 6e 73 65 71 75 65 6e 74 6c 79 20 75 73 69 consequently usi
0bb0: 6e 67 20 63 6f 6f 72 64 69 6e 61 74 65 73 20 65 ng coordinates e
0bc0: 78 70 72 65 73 73 65 64 20 61 73 20 3c 62 3e 6c xpressed as <b>l
0bd0: 6f 6e 67 69 74 75 64 65 3c 2f 62 3e 20 61 6e 64 ongitude</b> and
0be0: 20 3c 62 3e 6c 61 74 69 74 75 64 65 3c 2f 62 3e <b>latitude</b>
0bf0: 20 3c 69 3e 61 6e 67 6c 65 73 3c 2f 69 3e 29 2e <i>angles</i>).
0c00: 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 3c 62 72 3e </li>..</ul><br>
0c10: 0d 0a 3c 75 3e 50 6c 65 61 73 65 20 6e 6f 74 65 ..<u>Please note
0c20: 3c 2f 75 3e 3a 20 6e 6f 77 20 74 68 65 20 3c 69 </u>: now the <i
0c30: 3e 3c 75 3e 64 65 66 61 75 6c 74 20 53 52 49 44 ><u>default SRID
0c40: 3c 2f 75 3e 3c 2f 69 3e 20 69 73 6e 27 74 20 61 </u></i> isn't a
0c50: 6e 79 20 6c 6f 6e 67 65 72 20 61 73 73 75 6d 65 ny longer assume
0c60: 64 20 74 6f 20 62 65 20 3c 62 3e 2d 31 3c 2f 62 d to be <b>-1</b
0c70: 3e 20 61 73 20 69 6e 20 61 6e 79 20 65 61 72 6c > as in any earl
0c80: 69 65 72 20 76 65 72 73 69 6f 6e 2e 3c 62 72 3e ier version.<br>
0c90: 0d 0a 4e 6f 77 20 74 68 65 20 3c 69 3e 64 65 66 ..Now the <i>def
0ca0: 61 75 6c 74 20 53 52 49 44 3c 2f 69 3e 20 69 73 ault SRID</i> is
0cb0: 20 61 6c 77 61 79 73 20 61 73 73 75 6d 65 64 20 always assumed
0cc0: 74 6f 20 62 65 20 3c 62 3e 30 3c 2f 62 3e 2c 20 to be <b>0</b>,
0cd0: 61 63 63 6f 72 64 69 6e 67 6c 79 20 74 6f 20 74 accordingly to t
0ce0: 68 65 20 6d 6f 73 74 20 72 65 63 65 6e 74 20 69 he most recent i
0cf0: 6e 74 65 72 6e 61 74 69 6f 6e 61 6c 20 73 74 61 nternational sta
0d00: 6e 64 61 72 64 20 73 70 65 63 69 66 69 63 61 74 ndard specificat
0d10: 69 6f 6e 73 2e 3c 62 72 3e 3c 62 72 3e 0d 0a 3c ions.<br><br>..<
0d20: 68 72 3e 20 0d 0a 3c 68 33 3e 43 68 61 6e 67 65 hr> ..<h3>Change
0d30: 73 20 61 66 66 65 63 74 69 6e 67 20 74 68 65 20 s affecting the
0d40: 22 3c 69 3e 67 65 6f 6d 65 74 72 79 5f 63 6f 6c "<i>geometry_col
0d50: 75 6d 6e 73 3c 2f 69 3e 22 20 4d 65 74 61 64 61 umns</i>" Metada
0d60: 74 61 20 74 61 62 6c 65 3c 2f 68 33 3e 0d 0a 3c ta table</h3>..<
0d70: 74 61 62 6c 65 20 77 69 64 74 68 3d 22 31 30 30 table width="100
0d80: 25 22 20 62 67 63 6f 6c 6f 72 3d 22 23 66 66 66 %" bgcolor="#fff
0d90: 66 65 38 22 20 62 6f 72 64 65 72 3d 22 31 22 20 fe8" border="1"
0da0: 63 65 6c 6c 73 70 61 63 69 6e 67 3d 22 34 22 20 cellspacing="4"
0db0: 63 65 6c 6c 70 61 64 64 69 6e 67 3d 22 34 22 3e cellpadding="4">
0dc0: 0d 0a 3c 74 72 3e 3c 74 64 20 62 67 63 6f 6c 6f ..<tr><td bgcolo
0dd0: 72 3d 22 23 65 38 65 38 65 38 22 20 61 6c 69 67 r="#e8e8e8" alig
0de0: 6e 3d 22 63 65 6e 74 65 72 22 3e 3c 62 3e 6f 6c n="center"><b>ol
0df0: 64 20 6c 61 79 6f 75 74 3c 2f 62 3e 3c 62 72 3e d layout</b><br>
0e00: 56 65 72 73 69 6f 6e 20 33 2e 31 2e 30 3c 62 72 Version 3.1.0<br
0e10: 3e 61 6e 64 20 61 6e 79 20 65 61 72 6c 69 65 72 >and any earlier
0e20: 3c 2f 74 64 3e 0d 0a 3c 74 64 20 62 67 63 6f 6c </td>..<td bgcol
0e30: 6f 72 3d 22 23 65 38 65 38 65 38 22 20 61 6c 69 or="#e8e8e8" ali
0e40: 67 6e 3d 22 63 65 6e 74 65 72 22 3e 3c 62 3e 6e gn="center"><b>n
0e50: 65 77 20 6c 61 79 6f 75 74 3c 2f 62 3e 3c 62 72 ew layout</b><br
0e60: 3e 56 65 72 73 69 6f 6e 20 34 2e 30 2e 30 3c 62 >Version 4.0.0<b
0e70: 72 3e 61 6e 64 20 61 6e 79 20 73 75 62 73 65 71 r>and any subseq
0e80: 75 65 6e 74 3c 2f 74 64 3e 0d 0a 3c 74 64 20 62 uent</td>..<td b
0e90: 67 63 6f 6c 6f 72 3d 22 23 65 38 65 38 65 38 22 gcolor="#e8e8e8"
0ea0: 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e align="center">
0eb0: 3c 62 3e 4e 6f 74 65 73 3c 2f 62 3e 3c 2f 74 64 <b>Notes</b></td
0ec0: 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e ></tr>..<tr><td>
0ed0: 3c 62 3e 3c 69 3e 74 79 70 65 3c 2f 69 3e 3c 62 <b><i>type</i><b
0ee0: 72 3e 54 45 58 54 3c 2f 62 3e 3c 2f 74 64 3e 3c r>TEXT</b></td><
0ef0: 74 64 3e 3c 62 3e 3c 69 3e 67 65 6f 6d 65 74 72 td><b><i>geometr
0f00: 79 5f 74 79 70 65 3c 2f 69 3e 3c 62 72 3e 49 4e y_type</i><br>IN
0f10: 54 45 47 45 52 3c 2f 62 3e 3c 2f 74 64 3e 0d 0a TEGER</b></td>..
0f20: 3c 74 64 3e 3c 75 6c 3e 0d 0a 3c 6c 69 3e 74 68 <td><ul>..<li>th
0f30: 69 73 20 63 6f 6c 75 6d 6e 20 68 61 73 6e 27 74 is column hasn't
0f40: 20 73 69 6d 70 6c 79 20 63 68 61 6e 67 65 64 20 simply changed
0f50: 69 74 73 20 6e 61 6d 65 2e 3c 62 72 3e 0d 0a 74 its name.<br>..t
0f60: 68 65 20 64 61 74 61 2d 74 79 70 65 20 69 73 20 he data-type is
0f70: 63 68 61 6e 67 65 64 20 61 73 20 77 65 6c 6c 2c changed as well,
0f80: 20 61 6e 64 20 74 68 65 20 77 68 6f 6c 65 20 73 and the whole s
0f90: 65 6d 61 6e 74 69 63 20 69 73 20 63 6f 6d 70 6c emantic is compl
0fa0: 65 74 65 6c 79 20 72 65 76 6f 6c 75 74 69 6f 6e etely revolution
0fb0: 69 7a 65 64 2e 3c 62 72 3e 3c 75 3e 50 6c 65 61 ized.<br><u>Plea
0fc0: 73 65 20 73 65 65 20 62 65 6c 6f 77 3c 2f 75 3e se see below</u>
0fd0: 20 66 6f 72 20 6d 6f 72 65 20 64 65 74 61 69 6c for more detail
0fe0: 73 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 74 68 69 s.</li>..<li>thi
0ff0: 73 20 63 68 61 6e 67 65 20 77 61 73 20 73 74 72 s change was str
1000: 69 63 74 6c 79 20 72 65 71 75 65 73 74 65 64 20 ictly requested
1010: 62 79 20 74 68 65 20 6d 6f 73 74 20 72 65 63 65 by the most rece
1020: 6e 74 20 69 6e 74 65 72 6e 61 74 69 6f 6e 61 6c nt international
1030: 20 73 74 61 6e 64 61 72 64 73 2e 3c 2f 6c 69 3e standards.</li>
1040: 0d 0a 3c 2f 75 6c 3e 3c 2f 74 64 3e 3c 2f 74 72 ..</ul></td></tr
1050: 3e 3c 74 72 3e 3c 74 64 3e 3c 62 3e 3c 69 3e 63 ><tr><td><b><i>c
1060: 6f 6f 72 64 5f 64 69 6d 65 6e 73 69 6f 6e 3c 2f oord_dimension</
1070: 69 3e 3c 62 72 3e 54 45 58 54 3c 2f 62 3e 3c 2f i><br>TEXT</b></
1080: 74 64 3e 3c 74 64 3e 3c 62 3e 3c 69 3e 63 6f 6f td><td><b><i>coo
1090: 72 64 5f 64 69 6d 65 6e 73 69 6f 6e 3c 2f 69 3e rd_dimension</i>
10a0: 3c 62 72 3e 49 4e 54 45 47 45 52 3c 2f 62 3e 3c <br>INTEGER</b><
10b0: 2f 74 64 3e 0d 0a 3c 74 64 3e 3c 75 6c 3e 0d 0a /td>..<td><ul>..
10c0: 3c 6c 69 3e 74 68 69 73 20 63 68 61 6e 67 65 20 <li>this change
10d0: 74 6f 6f 20 77 61 73 20 64 69 63 74 61 74 65 64 too was dictated
10e0: 20 62 79 20 73 74 61 6e 64 61 72 64 20 63 6f 6d by standard com
10f0: 70 6c 69 61 6e 63 65 20 72 65 61 73 6f 6e 73 2e pliance reasons.
1100: 3c 62 72 3e 0d 0a 3c 75 3e 50 6c 65 61 73 65 20 <br>..<u>Please
1110: 6e 6f 74 65 20 77 65 6c 6c 3c 2f 75 3e 3a 20 74 note well</u>: t
1120: 68 69 73 20 76 61 6c 75 65 20 72 65 70 72 65 73 his value repres
1130: 65 6e 74 73 20 6e 6f 77 20 61 6e 20 75 6e 6e 65 ents now an unne
1140: 63 65 73 73 61 72 79 20 72 65 64 75 6e 64 61 6e cessary redundan
1150: 63 79 2c 20 61 6e 64 20 77 69 6c 6c 20 62 65 20 cy, and will be
1160: 61 62 73 6f 6c 75 74 65 6c 79 20 69 67 6e 6f 72 absolutely ignor
1170: 65 64 20 62 79 20 53 70 61 74 69 61 4c 69 74 65 ed by SpatiaLite
1180: 20 69 74 73 65 6c 66 2e 0d 0a 41 6e 79 77 61 79 itself...Anyway
1190: 2c 20 74 68 65 20 65 78 70 65 63 74 65 64 20 76 , the expected v
11a0: 61 6c 75 65 20 77 69 6c 6c 20 62 65 20 65 78 70 alue will be exp
11b0: 6f 73 65 64 20 61 63 63 6f 72 64 69 6e 67 6c 79 osed accordingly
11c0: 20 74 6f 20 73 74 61 6e 64 61 72 64 20 73 70 65 to standard spe
11d0: 63 73 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 3c cs.</li>..</ul><
11e0: 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 2f 74 61 62 /td></tr>..</tab
11f0: 6c 65 3e 0d 0a 3c 68 33 3e 3c 75 3e 6f 6c 64 20 le>..<h3><u>old
1200: 6c 61 79 6f 75 74 3c 2f 75 3e 3c 2f 68 33 3e 3c layout</u></h3><
1210: 75 6c 3e 0d 0a 3c 6c 69 3e 62 6f 74 68 20 3c 62 ul>..<li>both <b
1220: 3e 3c 69 3e 74 79 70 65 3c 2f 69 3e 3c 2f 62 3e ><i>type</i></b>
1230: 20 61 6e 64 20 3c 62 3e 3c 69 3e 63 6f 6f 72 64 and <b><i>coord
1240: 5f 64 69 6d 65 6e 73 69 6f 6e 3c 2f 69 3e 3c 2f _dimension</i></
1250: 62 3e 20 76 61 6c 75 65 73 20 77 65 72 65 20 72 b> values were r
1260: 65 71 75 69 72 65 64 20 69 6e 20 6f 72 64 65 72 equired in order
1270: 20 74 6f 20 66 75 6c 6c 79 20 71 75 61 6c 69 66 to fully qualif
1280: 79 20 61 20 47 65 6f 6d 65 74 72 79 2e 3c 2f 6c y a Geometry.</l
1290: 69 3e 0d 0a 3c 6c 69 3e 65 2e 67 2e 20 61 20 47 i>..<li>e.g. a G
12a0: 65 6f 6d 65 74 72 79 20 64 65 63 6c 61 72 69 6e eometry declarin
12b0: 67 20 3c 62 3e 3c 69 3e 74 79 70 65 3c 2f 69 3e g <b><i>type</i>
12c0: 3c 2f 62 3e 3d 27 4c 49 4e 45 53 54 52 49 4e 47 </b>='LINESTRING
12d0: 27 20 61 6e 64 20 3c 62 3e 3c 69 3e 63 6f 6f 72 ' and <b><i>coor
12e0: 64 5f 64 69 6d 65 6e 73 69 6f 6e 3c 2f 69 3e 3c d_dimension</i><
12f0: 2f 62 3e 3d 27 58 59 27 20 77 61 73 20 61 73 73 /b>='XY' was ass
1300: 75 6d 65 64 20 74 6f 20 62 65 20 61 20 3c 62 3e umed to be a <b>
1310: 4c 49 4e 45 53 54 52 49 4e 47 3c 2f 62 3e 20 28 LINESTRING</b> (
1320: 32 44 29 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 61 2D).</li>..<li>a
1330: 6e 64 20 61 20 47 65 6f 6d 65 74 72 79 20 64 65 nd a Geometry de
1340: 63 6c 61 72 69 6e 67 20 3c 62 3e 3c 69 3e 74 79 claring <b><i>ty
1350: 70 65 3c 2f 69 3e 3c 2f 62 3e 3d 27 4d 55 4c 54 pe</i></b>='MULT
1360: 49 4c 49 4e 45 53 54 52 49 4e 47 27 20 61 6e 64 ILINESTRING' and
1370: 20 3c 62 3e 3c 69 3e 63 6f 6f 72 64 5f 64 69 6d <b><i>coord_dim
1380: 65 6e 73 69 6f 6e 3c 2f 69 3e 3c 2f 62 3e 3d 27 ension</i></b>='
1390: 58 59 5a 4d 27 20 77 61 73 20 61 73 73 75 6d 65 XYZM' was assume
13a0: 64 20 74 6f 20 62 65 20 61 20 3c 62 3e 4d 55 4c d to be a <b>MUL
13b0: 54 49 4c 49 4e 45 53 54 52 49 4e 47 20 5a 4d 3c TILINESTRING ZM<
13c0: 2f 62 3e 20 28 33 44 20 2b 20 4d 65 61 73 75 72 /b> (3D + Measur
13d0: 65 29 2c 20 61 6e 64 20 73 6f 20 6f 6e 2e 3c 2f e), and so on.</
13e0: 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c 68 33 3e li>..</ul>..<h3>
13f0: 3c 75 3e 6e 65 77 20 6c 61 79 6f 75 74 3c 2f 75 <u>new layout</u
1400: 3e 3c 2f 68 33 3e 3c 75 6c 3e 0d 0a 3c 6c 69 3e ></h3><ul>..<li>
1410: 6e 6f 77 20 74 68 65 20 3c 62 3e 3c 69 3e 67 65 now the <b><i>ge
1420: 6f 6d 65 74 72 79 5f 74 79 70 65 3c 2f 69 3e 3c ometry_type</i><
1430: 2f 62 3e 20 76 61 6c 75 65 20 61 6c 6f 6e 65 20 /b> value alone
1440: 63 6f 6e 74 61 69 6e 73 20 61 6e 79 20 69 6e 66 contains any inf
1450: 6f 72 6d 61 74 69 6f 6e 20 72 65 71 75 69 72 65 ormation require
1460: 64 20 69 6e 20 6f 72 64 65 72 20 74 6f 20 66 75 d in order to fu
1470: 6c 6c 79 20 71 75 61 6c 69 66 79 20 74 68 65 20 lly qualify the
1480: 47 65 6f 6d 65 74 72 79 2e 3c 2f 6c 69 3e 0d 0a Geometry.</li>..
1490: 3c 6c 69 3e 73 75 70 70 6f 72 74 65 64 20 76 61 <li>supported va
14a0: 6c 75 65 73 20 66 6f 72 20 3c 62 3e 3c 69 3e 67 lues for <b><i>g
14b0: 65 6f 6d 65 74 72 79 5f 74 79 70 65 3c 2f 69 3e eometry_type</i>
14c0: 3c 2f 62 3e 20 61 72 65 20 61 73 20 66 6f 6c 6c </b> are as foll
14d0: 6f 77 73 3a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 3c 62 ows:<ul>..<li><b
14e0: 3e 30 3c 2f 62 3e 20 63 6f 72 72 65 73 70 6f 6e >0</b> correspon
14f0: 64 73 20 74 6f 20 3c 62 3e 47 45 4f 4d 45 54 52 ds to <b>GEOMETR
1500: 59 20 58 59 3c 2f 62 3e 3c 2f 6c 69 3e 0d 0a 3c Y XY</b></li>..<
1510: 6c 69 3e 3c 62 3e 31 3c 2f 62 3e 20 63 6f 72 72 li><b>1</b> corr
1520: 65 73 70 6f 6e 64 73 20 74 6f 20 3c 62 3e 50 4f esponds to <b>PO
1530: 49 4e 54 20 58 59 3c 2f 62 3e 3c 2f 6c 69 3e 0d INT XY</b></li>.
1540: 0a 3c 6c 69 3e 3c 62 3e 32 3c 2f 62 3e 20 63 6f .<li><b>2</b> co
1550: 72 72 65 73 70 6f 6e 64 73 20 74 6f 20 3c 62 3e rresponds to <b>
1560: 4c 49 4e 45 53 54 52 49 4e 47 20 58 59 3c 2f 62 LINESTRING XY</b
1570: 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 33 ></li>..<li><b>3
1580: 3c 2f 62 3e 20 63 6f 72 72 65 73 70 6f 6e 64 73 </b> corresponds
1590: 20 74 6f 20 3c 62 3e 50 4f 4c 59 47 4f 4e 20 58 to <b>POLYGON X
15a0: 59 3c 2f 62 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e Y</b></li>..<li>
15b0: 3c 62 3e 34 3c 2f 62 3e 20 63 6f 72 72 65 73 70 <b>4</b> corresp
15c0: 6f 6e 64 73 20 74 6f 20 3c 62 3e 4d 55 4c 54 49 onds to <b>MULTI
15d0: 50 4f 49 4e 54 20 58 59 3c 2f 62 3e 3c 2f 6c 69 POINT XY</b></li
15e0: 3e 0d 0a 3c 6c 69 3e 3c 62 3e 35 3c 2f 62 3e 20 >..<li><b>5</b>
15f0: 63 6f 72 72 65 73 70 6f 6e 64 73 20 74 6f 20 3c corresponds to <
1600: 62 3e 4d 55 4c 54 49 4c 49 4e 45 53 54 52 49 4e b>MULTILINESTRIN
1610: 47 20 58 59 3c 2f 62 3e 3c 2f 6c 69 3e 0d 0a 3c G XY</b></li>..<
1620: 6c 69 3e 3c 62 3e 36 3c 2f 62 3e 20 63 6f 72 72 li><b>6</b> corr
1630: 65 73 70 6f 6e 64 73 20 74 6f 20 3c 62 3e 4d 55 esponds to <b>MU
1640: 4c 54 49 50 4f 4c 59 47 4f 4e 20 58 59 3c 2f 62 LTIPOLYGON XY</b
1650: 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 37 ></li>..<li><b>7
1660: 3c 2f 62 3e 20 63 6f 72 72 65 73 70 6f 6e 64 73 </b> corresponds
1670: 20 74 6f 20 3c 62 3e 47 45 4f 4d 45 54 52 59 43 to <b>GEOMETRYC
1680: 4f 4c 4c 45 43 54 49 4f 4e 20 58 59 3c 2f 62 3e OLLECTION XY</b>
1690: 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 31 30 </li>..<li><b>10
16a0: 30 30 3c 2f 62 3e 2c 20 3c 62 3e 31 30 30 31 3c 00</b>, <b>1001<
16b0: 2f 62 3e 2c 20 2e 2e 2e 20 2c 20 3c 62 3e 31 30 /b>, ... , <b>10
16c0: 30 37 3c 2f 62 3e 20 72 65 73 70 65 63 74 69 76 07</b> respectiv
16d0: 65 6c 79 20 63 6f 72 72 65 73 70 6f 6e 64 20 74 ely correspond t
16e0: 6f 20 3c 62 3e 47 45 4f 4d 45 54 52 59 20 58 59 o <b>GEOMETRY XY
16f0: 5a 3c 2f 62 3e 2c 20 3c 62 3e 50 4f 49 4e 54 20 Z</b>, <b>POINT
1700: 58 59 5a 3c 2f 62 3e 2c 20 2e 2e 2e 20 2c 20 3c XYZ</b>, ... , <
1710: 62 3e 47 45 4f 4d 45 54 52 59 43 4f 4c 4c 45 43 b>GEOMETRYCOLLEC
1720: 54 49 4f 4e 20 58 59 5a 3c 2f 62 3e 3c 2f 6c 69 TION XYZ</b></li
1730: 3e 0d 0a 3c 6c 69 3e 3c 62 3e 32 30 30 30 3c 2f >..<li><b>2000</
1740: 62 3e 2c 20 3c 62 3e 32 30 30 31 3c 2f 62 3e 2c b>, <b>2001</b>,
1750: 20 2e 2e 2e 20 2c 20 3c 62 3e 32 30 30 37 3c 2f ... , <b>2007</
1760: 62 3e 20 72 65 73 70 65 63 74 69 76 65 6c 79 20 b> respectively
1770: 63 6f 72 72 65 73 70 6f 6e 64 20 74 6f 20 3c 62 correspond to <b
1780: 3e 47 45 4f 4d 45 54 52 59 20 58 59 4d 3c 2f 62 >GEOMETRY XYM</b
1790: 3e 2c 20 3c 62 3e 50 4f 49 4e 54 20 58 59 4d 3c >, <b>POINT XYM<
17a0: 2f 62 3e 2c 20 2e 2e 2e 20 2c 20 3c 62 3e 47 45 /b>, ... , <b>GE
17b0: 4f 4d 45 54 52 59 43 4f 4c 4c 45 43 54 49 4f 4e OMETRYCOLLECTION
17c0: 20 58 59 4d 3c 2f 62 3e 3c 2f 6c 69 3e 0d 0a 3c XYM</b></li>..<
17d0: 6c 69 3e 3c 62 3e 33 30 30 30 3c 2f 62 3e 2c 20 li><b>3000</b>,
17e0: 3c 62 3e 33 30 30 31 3c 2f 62 3e 2c 20 2e 2e 2e <b>3001</b>, ...
17f0: 20 2c 20 3c 62 3e 33 30 30 37 3c 2f 62 3e 20 72 , <b>3007</b> r
1800: 65 73 70 65 63 74 69 76 65 6c 79 20 63 6f 72 72 espectively corr
1810: 65 73 70 6f 6e 64 20 74 6f 20 3c 62 3e 47 45 4f espond to <b>GEO
1820: 4d 45 54 52 59 20 58 59 5a 4d 3c 2f 62 3e 2c 20 METRY XYZM</b>,
1830: 3c 62 3e 50 4f 49 4e 54 20 58 59 5a 4d 3c 2f 62 <b>POINT XYZM</b
1840: 3e 2c 20 2e 2e 2e 20 2c 20 3c 62 3e 47 45 4f 4d >, ... , <b>GEOM
1850: 45 54 52 59 43 4f 4c 4c 45 43 54 49 4f 4e 20 58 ETRYCOLLECTION X
1860: 59 5a 4d 3c 2f 62 3e 3c 2f 6c 69 3e 0d 0a 3c 2f YZM</b></li>..</
1870: 75 6c 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 74 68 ul></li>..<li>th
1880: 65 20 3c 62 3e 3c 69 3e 63 6f 6f 72 64 5f 64 69 e <b><i>coord_di
1890: 6d 65 6e 73 69 6f 6e 3c 2f 69 3e 3c 2f 62 3e 20 mension</i></b>
18a0: 69 73 20 63 6f 6d 70 6c 65 74 65 6c 79 20 72 65 is completely re
18b0: 64 75 6e 64 61 6e 74 2c 20 61 6e 64 20 64 6f 65 dundant, and doe
18c0: 73 6e 27 74 20 70 72 6f 76 69 64 65 20 61 6e 79 sn't provide any
18d0: 20 66 75 72 74 68 65 72 20 69 6e 66 6f 72 6d 61 further informa
18e0: 74 69 6f 6e 20 61 74 20 61 6c 6c 2e 0d 0a 45 78 tion at all...Ex
18f0: 70 65 63 74 65 64 20 76 61 6c 75 65 73 20 61 72 pected values ar
1900: 65 3a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 3c 62 3e 32 e:<ul>..<li><b>2
1910: 3c 2f 62 3e 20 66 6f 72 20 3c 62 3e 58 59 3c 2f </b> for <b>XY</
1920: 62 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e b></li>..<li><b>
1930: 33 3c 2f 62 3e 20 66 6f 72 20 3c 62 3e 58 59 5a 3</b> for <b>XYZ
1940: 3c 2f 62 3e 20 6f 72 20 3c 62 3e 58 59 4d 3c 2f </b> or <b>XYM</
1950: 62 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e b></li>..<li><b>
1960: 34 3c 2f 62 3e 20 66 6f 72 20 3c 62 3e 58 59 5a 4</b> for <b>XYZ
1970: 4d 3c 2f 62 3e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c M</b></li>..</ul
1980: 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 69 6e 20 6f ></li>..<li>in o
1990: 74 68 65 72 20 77 6f 72 64 73 20 3c 62 3e 3c 69 ther words <b><i
19a0: 3e 67 65 6f 6d 65 74 72 79 5f 74 79 70 65 3c 2f >geometry_type</
19b0: 69 3e 3c 2f 62 3e 20 76 61 6c 75 65 73 20 69 6e i></b> values in
19c0: 20 74 68 65 20 72 61 6e 67 65 20 3c 62 3e 30 3c the range <b>0<
19d0: 2f 62 3e 2c 20 2e 2e 2e 20 2c 20 3c 62 3e 37 3c /b>, ... , <b>7<
19e0: 2f 62 3e 20 6e 65 63 65 73 73 61 72 69 6c 79 20 /b> necessarily
19f0: 69 6d 70 6c 79 20 3c 62 3e 3c 69 3e 63 6f 6f 72 imply <b><i>coor
1a00: 64 5f 64 69 6d 65 6e 73 69 6f 6e 3c 2f 69 3e 3c d_dimension</i><
1a10: 2f 62 3e 3d 3c 62 3e 32 3c 2f 62 3e 2e 3c 2f 6c /b>=<b>2</b>.</l
1a20: 69 3e 0d 0a 3c 6c 69 3e 76 61 6c 75 65 73 20 69 i>..<li>values i
1a30: 6e 20 74 68 65 20 72 61 6e 67 65 20 3c 62 3e 31 n the range <b>1
1a40: 30 30 30 3c 2f 62 3e 2c 20 2e 2e 2e 20 2c 20 3c 000</b>, ... , <
1a50: 62 3e 31 30 30 37 3c 2f 62 3e 20 6f 72 20 3c 62 b>1007</b> or <b
1a60: 3e 32 30 30 30 3c 2f 62 3e 2c 20 2e 2e 2e 20 2c >2000</b>, ... ,
1a70: 20 3c 62 3e 32 30 30 37 3c 2f 62 3e 20 69 6d 70 <b>2007</b> imp
1a80: 6c 79 20 3c 62 3e 3c 69 3e 63 6f 6f 72 64 5f 64 ly <b><i>coord_d
1a90: 69 6d 65 6e 73 69 6f 6e 3c 2f 69 3e 3c 2f 62 3e imension</i></b>
1aa0: 3d 3c 62 3e 33 3c 2f 62 3e 2e 3c 2f 6c 69 3e 0d =<b>3</b>.</li>.
1ab0: 0a 3c 6c 69 3e 61 6e 64 20 66 69 6e 61 6c 6c 79 .<li>and finally
1ac0: 20 76 61 6c 75 65 73 20 69 6e 20 74 68 65 20 72 values in the r
1ad0: 61 6e 67 65 20 3c 62 3e 33 30 30 30 3c 2f 62 3e ange <b>3000</b>
1ae0: 2c 20 2e 2e 2e 20 2c 20 3c 62 3e 33 30 30 37 3c , ... , <b>3007<
1af0: 2f 62 3e 20 61 6c 77 61 79 73 20 69 6d 70 6c 79 /b> always imply
1b00: 20 3c 62 3e 3c 69 3e 63 6f 6f 72 64 5f 64 69 6d <b><i>coord_dim
1b10: 65 6e 73 69 6f 6e 3c 2f 69 3e 3c 2f 62 3e 3d 3c ension</i></b>=<
1b20: 62 3e 34 3c 2f 62 3e 2e 3c 2f 6c 69 3e 0d 0a 3c b>4</b>.</li>..<
1b30: 2f 75 6c 3e 0d 0a 3c 68 33 3e 3c 75 3e 76 65 72 /ul>..<h3><u>ver
1b40: 79 20 69 6d 70 6f 72 74 61 6e 74 20 6e 6f 74 69 y important noti
1b50: 63 65 3c 2f 75 3e 3c 2f 68 33 3e 0d 0a 3c 75 3e ce</u></h3>..<u>
1b60: 50 6c 65 61 73 65 20 6e 6f 74 65 20 77 65 6c 6c Please note well
1b70: 3c 2f 75 3e 3a 20 6e 6f 77 20 62 6f 74 68 20 3c </u>: now both <
1b80: 69 3e 66 5f 74 61 62 6c 65 5f 6e 61 6d 65 3c 2f i>f_table_name</
1b90: 69 3e 20 61 6e 64 20 3c 69 3e 66 5f 67 65 6f 6d i> and <i>f_geom
1ba0: 65 74 72 79 5f 63 6f 6c 75 6d 6e 3c 2f 69 3e 20 etry_column</i>
1bb0: 63 6f 6c 75 6d 6e 73 20 28 61 6e 64 20 61 6e 79 columns (and any
1bc0: 20 73 69 6d 69 6c 61 72 20 63 6f 6c 75 6d 6e 20 similar column
1bd0: 75 73 65 64 20 66 6f 72 20 3c 62 3e 76 69 65 77 used for <b>view
1be0: 73 3c 2f 62 3e 20 61 6e 64 20 3c 62 3e 76 69 72 s</b> and <b>vir
1bf0: 74 75 61 6c 20 74 61 62 6c 65 73 3c 2f 62 3e 20 tual tables</b>
1c00: 6d 65 74 61 64 61 74 61 20 74 61 62 6c 65 73 29 metadata tables)
1c10: 20 61 72 65 20 61 6c 77 61 79 73 20 61 73 73 75 are always assu
1c20: 6d 65 64 20 74 6f 20 62 65 20 65 78 70 72 65 73 med to be expres
1c30: 73 65 64 20 61 73 20 3c 75 3e 3c 62 3e 6c 6f 77 sed as <u><b>low
1c40: 65 72 63 61 73 65 3c 2f 62 3e 3c 2f 75 3e 20 76 ercase</b></u> v
1c50: 61 6c 75 65 73 2e 20 41 6e 64 20 74 68 65 79 20 alues. And they
1c60: 61 72 65 20 65 78 70 65 63 74 65 64 20 6e 6f 74 are expected not
1c70: 20 74 6f 20 63 6f 6e 74 61 69 6e 20 61 6e 79 20 to contain any
1c80: 3c 75 3e 3c 62 3e 73 69 6e 67 6c 65 3c 2f 62 3e <u><b>single</b>
1c90: 3c 2f 75 3e 20 6f 72 20 3c 75 3e 3c 62 3e 64 6f </u> or <u><b>do
1ca0: 75 62 6c 65 20 71 75 6f 74 65 3c 2f 62 3e 3c 2f uble quote</b></
1cb0: 75 3e 20 63 68 61 72 61 63 74 65 72 2e 3c 62 72 u> character.<br
1cc0: 3e 0d 0a 41 20 66 75 6c 6c 20 73 65 74 20 6f 66 >..A full set of
1cd0: 20 54 72 69 67 67 65 72 73 20 65 6e 66 6f 72 63 Triggers enforc
1ce0: 65 73 20 73 75 63 68 20 63 6f 6e 73 74 72 61 69 es such constrai
1cf0: 6e 74 73 3a 20 74 68 69 73 20 69 73 20 6f 62 76 nts: this is obv
1d00: 69 6f 75 73 6c 79 20 69 6e 74 65 6e 64 65 64 20 iously intended
1d10: 61 73 20 61 20 6d 65 61 6e 20 65 66 66 65 63 74 as a mean effect
1d20: 69 76 65 6c 79 20 67 75 61 72 61 6e 74 65 65 69 ively guaranteei
1d30: 6e 67 20 61 20 73 74 72 6f 6e 67 20 72 65 6c 61 ng a strong rela
1d40: 74 69 6f 6e 61 6c 20 63 6f 6e 73 69 73 74 65 6e tional consisten
1d50: 63 79 2e 3c 62 72 3e 0d 0a 57 68 65 6e 20 75 73 cy.<br>..When us
1d60: 69 6e 67 20 74 68 65 20 53 70 61 74 69 61 4c 69 ing the SpatiaLi
1d70: 74 65 27 73 20 6f 77 6e 20 43 20 41 50 49 73 20 te's own C APIs
1d80: 28 6f 72 20 53 51 4c 20 66 75 6e 63 74 69 6f 6e (or SQL function
1d90: 73 29 20 74 68 69 73 20 66 61 63 65 74 20 77 69 s) this facet wi
1da0: 6c 6c 20 62 65 20 74 72 61 6e 73 70 61 72 65 6e ll be transparen
1db0: 74 6c 79 20 68 61 6e 64 6c 65 64 2c 20 62 75 74 tly handled, but
1dc0: 20 74 68 69 73 20 63 6f 75 6c 64 20 62 65 20 61 this could be a
1dd0: 20 73 74 72 6f 6e 67 20 69 73 73 75 65 20 66 6f strong issue fo
1de0: 72 20 74 68 69 72 64 20 70 61 72 74 79 20 63 6f r third party co
1df0: 6d 70 6f 6e 65 6e 74 73 20 61 74 74 65 6d 70 74 mponents attempt
1e00: 69 6e 67 20 74 6f 20 64 69 72 65 63 74 6c 79 20 ing to directly
1e10: 61 63 63 65 73 73 20 74 68 65 20 6d 65 74 61 64 access the metad
1e20: 61 74 61 20 74 61 62 6c 65 73 20 62 79 20 73 6b ata tables by sk
1e30: 69 70 70 69 6e 67 20 74 68 65 20 43 20 41 50 49 ipping the C API
1e40: 73 20 6f 72 20 74 68 65 20 53 51 4c 20 73 75 70 s or the SQL sup
1e50: 70 6f 72 74 69 6e 67 20 66 75 6e 63 74 69 6f 6e porting function
1e60: 73 2e 3c 62 72 3e 3c 62 72 3e 0d 0a 49 6e 20 74 s.<br><br>..In t
1e70: 68 69 73 20 63 61 73 65 20 61 64 6f 70 74 69 6e his case adoptin
1e80: 67 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 g the following
1e90: 61 70 70 72 6f 61 63 68 20 61 73 20 61 20 67 65 approach as a ge
1ea0: 6e 65 72 61 6c 20 72 75 6c 65 20 77 69 6c 6c 20 neral rule will
1eb0: 73 75 72 65 6c 79 20 62 65 20 61 20 67 6f 6f 64 surely be a good
1ec0: 20 73 6f 6c 75 74 69 6f 6e 3a 0d 0a 3c 74 61 62 solution:..<tab
1ed0: 6c 65 20 62 67 63 6f 6c 6f 72 3d 22 23 65 30 65 le bgcolor="#e0e
1ee0: 30 65 30 22 20 63 65 6c 6c 73 70 61 63 69 6e 67 0e0" cellspacing
1ef0: 3d 22 38 22 20 63 65 6c 6c 70 61 64 64 69 6e 67 ="8" cellpadding
1f00: 3d 22 34 22 3e 0d 0a 3c 74 64 3e 0d 0a 49 4e 53 ="4">..<td>..INS
1f10: 45 52 54 20 49 4e 54 4f 20 67 65 6f 6d 65 74 72 ERT INTO geometr
1f20: 79 5f 63 6f 6c 75 6d 6e 73 20 28 66 5f 74 61 62 y_columns (f_tab
1f30: 6c 65 5f 6e 61 6d 65 2c 20 66 5f 67 65 6f 6d 65 le_name, f_geome
1f40: 74 72 79 5f 63 6f 6c 75 6d 6e 2c 20 2e 2e 2e 29 try_column, ...)
1f50: 3c 62 72 3e 0d 0a 56 41 4c 55 45 53 20 28 3c 62 <br>..VALUES (<b
1f60: 3e 4c 6f 77 65 72 3c 2f 62 3e 28 27 4d 79 54 61 >Lower</b>('MyTa
1f70: 62 6c 65 27 29 2c 20 3c 62 3e 4c 6f 77 65 72 3c ble'), <b>Lower<
1f80: 2f 62 3e 28 27 4d 79 47 65 6f 6d 27 29 2c 20 2e /b>('MyGeom'), .
1f90: 2e 29 3b 3c 68 72 3e 0d 0a 53 45 4c 45 43 54 20 .);<hr>..SELECT
1fa0: 2a 3c 62 72 3e 0d 0a 46 52 4f 4d 20 67 65 6f 6d *<br>..FROM geom
1fb0: 65 74 79 5f 63 6f 6c 75 6d 6e 73 3c 62 72 3e 0d ety_columns<br>.
1fc0: 0a 57 48 45 52 45 20 66 5f 74 61 62 6c 65 5f 6e .WHERE f_table_n
1fd0: 61 6d 65 20 3d 20 3c 62 3e 4c 6f 77 65 72 3c 2f ame = <b>Lower</
1fe0: 62 3e 28 27 4d 79 54 61 62 6c 65 27 29 3b 0d 0a b>('MyTable');..
1ff0: 3c 2f 74 64 3e 0d 0a 3c 2f 74 61 62 6c 65 3e 3c </td>..</table><
2000: 62 72 3e 0d 0a 3c 68 72 3e 20 0d 0a 3c 68 33 3e br>..<hr> ..<h3>
2010: 43 68 61 6e 67 65 73 20 61 66 66 65 63 74 69 6e Changes affectin
2020: 67 20 74 68 65 20 22 3c 69 3e 76 69 65 77 73 5f g the "<i>views_
2030: 67 65 6f 6d 65 74 72 79 5f 63 6f 6c 75 6d 6e 73 geometry_columns
2040: 3c 2f 69 3e 22 20 4d 65 74 61 64 61 74 61 20 74 </i>" Metadata t
2050: 61 62 6c 65 3c 2f 68 33 3e 0d 0a 3c 74 61 62 6c able</h3>..<tabl
2060: 65 20 77 69 64 74 68 3d 22 31 30 30 25 22 20 62 e width="100%" b
2070: 67 63 6f 6c 6f 72 3d 22 23 66 66 66 66 65 38 22 gcolor="#ffffe8"
2080: 20 62 6f 72 64 65 72 3d 22 31 22 20 63 65 6c 6c border="1" cell
2090: 73 70 61 63 69 6e 67 3d 22 34 22 20 63 65 6c 6c spacing="4" cell
20a0: 70 61 64 64 69 6e 67 3d 22 34 22 3e 0d 0a 3c 74 padding="4">..<t
20b0: 72 3e 3c 74 64 20 62 67 63 6f 6c 6f 72 3d 22 23 r><td bgcolor="#
20c0: 65 38 65 38 65 38 22 20 61 6c 69 67 6e 3d 22 63 e8e8e8" align="c
20d0: 65 6e 74 65 72 22 3e 3c 62 3e 6f 6c 64 20 6c 61 enter"><b>old la
20e0: 79 6f 75 74 3c 2f 62 3e 3c 62 72 3e 56 65 72 73 yout</b><br>Vers
20f0: 69 6f 6e 20 33 2e 31 2e 30 3c 62 72 3e 61 6e 64 ion 3.1.0<br>and
2100: 20 61 6e 79 20 65 61 72 6c 69 65 72 3c 2f 74 64 any earlier</td
2110: 3e 0d 0a 3c 74 64 20 62 67 63 6f 6c 6f 72 3d 22 >..<td bgcolor="
2120: 23 65 38 65 38 65 38 22 20 61 6c 69 67 6e 3d 22 #e8e8e8" align="
2130: 63 65 6e 74 65 72 22 3e 3c 62 3e 6e 65 77 20 6c center"><b>new l
2140: 61 79 6f 75 74 3c 2f 62 3e 3c 62 72 3e 56 65 72 ayout</b><br>Ver
2150: 73 69 6f 6e 20 34 2e 30 2e 30 3c 62 72 3e 61 6e sion 4.0.0<br>an
2160: 64 20 61 6e 79 20 73 75 62 73 65 71 75 65 6e 74 d any subsequent
2170: 3c 2f 74 64 3e 0d 0a 3c 74 64 20 62 67 63 6f 6c </td>..<td bgcol
2180: 6f 72 3d 22 23 65 38 65 38 65 38 22 20 61 6c 69 or="#e8e8e8" ali
2190: 67 6e 3d 22 63 65 6e 74 65 72 22 3e 3c 62 3e 4e gn="center"><b>N
21a0: 6f 74 65 73 3c 2f 62 3e 3c 2f 74 64 3e 3c 2f 74 otes</b></td></t
21b0: 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 3c 62 3e 3c r>..<tr><td><b><
21c0: 69 3e 6e 2e 61 2e 3c 2f 74 64 3e 3c 74 64 3e 3c i>n.a.</td><td><
21d0: 62 3e 3c 69 3e 72 65 61 64 5f 6f 6e 6c 79 3c 2f b><i>read_only</
21e0: 69 3e 3c 62 72 3e 49 4e 54 45 47 45 52 3c 2f 62 i><br>INTEGER</b
21f0: 3e 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 3c 75 6c 3e ></td>..<td><ul>
2200: 0d 0a 3c 6c 69 3e 6e 65 77 20 69 6e 74 72 6f 64 ..<li>new introd
2210: 75 63 74 69 6f 6e 3b 20 6e 6f 77 20 53 70 61 74 uction; now Spat
2220: 69 61 4c 69 74 65 20 73 75 70 70 6f 72 74 73 20 iaLite supports
2230: 3c 61 20 68 72 65 66 3d 22 68 74 74 70 73 3a 2f <a href="https:/
2240: 2f 77 77 77 2e 67 61 69 61 2d 67 69 73 2e 69 74 /www.gaia-gis.it
2250: 2f 66 6f 73 73 69 6c 2f 6c 69 62 73 70 61 74 69 /fossil/libspati
2260: 61 6c 69 74 65 2f 77 69 6b 69 3f 6e 61 6d 65 3d alite/wiki?name=
2270: 77 72 69 74 61 62 6c 65 2d 76 69 65 77 22 3e 55 writable-view">U
2280: 70 64 61 74 61 62 6c 65 20 56 69 65 77 73 3c 2f pdatable Views</
2290: 61 3e 2c 20 73 6f 20 77 65 20 63 61 6e 6e 6f 74 a>, so we cannot
22a0: 20 61 73 73 75 6d 65 20 61 6e 79 20 6c 6f 6e 67 assume any long
22b0: 65 72 20 74 68 61 74 20 61 6c 6c 20 76 69 65 77 er that all view
22c0: 73 20 61 72 65 20 6e 65 63 65 73 73 61 72 69 6c s are necessaril
22d0: 79 20 6f 66 20 74 68 65 20 3c 69 3e 72 65 61 64 y of the <i>read
22e0: 2d 6f 6e 6c 79 3c 2f 69 3e 20 74 79 70 65 2e 3c -only</i> type.<
22f0: 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 3c 2f 74 64 3e /li>..</ul></td>
2300: 3c 2f 74 72 3e 0d 0a 3c 2f 74 61 62 6c 65 3e 3c </tr>..</table><
2310: 62 72 3e 0d 0a 3c 68 72 3e 20 0d 0a 3c 68 33 3e br>..<hr> ..<h3>
2320: 43 68 61 6e 67 65 73 20 61 66 66 65 63 74 69 6e Changes affectin
2330: 67 20 74 68 65 20 22 3c 69 3e 76 69 72 74 73 5f g the "<i>virts_
2340: 67 65 6f 6d 65 74 72 79 5f 63 6f 6c 75 6d 6e 73 geometry_columns
2350: 3c 2f 69 3e 22 20 4d 65 74 61 64 61 74 61 20 74 </i>" Metadata t
2360: 61 62 6c 65 3c 2f 68 33 3e 0d 0a 3c 74 61 62 6c able</h3>..<tabl
2370: 65 20 77 69 64 74 68 3d 22 31 30 30 25 22 20 62 e width="100%" b
2380: 67 63 6f 6c 6f 72 3d 22 23 66 66 66 66 65 38 22 gcolor="#ffffe8"
2390: 20 62 6f 72 64 65 72 3d 22 31 22 20 63 65 6c 6c border="1" cell
23a0: 73 70 61 63 69 6e 67 3d 22 34 22 20 63 65 6c 6c spacing="4" cell
23b0: 70 61 64 64 69 6e 67 3d 22 34 22 3e 0d 0a 3c 74 padding="4">..<t
23c0: 72 3e 3c 74 64 20 62 67 63 6f 6c 6f 72 3d 22 23 r><td bgcolor="#
23d0: 65 38 65 38 65 38 22 20 61 6c 69 67 6e 3d 22 63 e8e8e8" align="c
23e0: 65 6e 74 65 72 22 3e 3c 62 3e 6f 6c 64 20 6c 61 enter"><b>old la
23f0: 79 6f 75 74 3c 2f 62 3e 3c 62 72 3e 56 65 72 73 yout</b><br>Vers
2400: 69 6f 6e 20 33 2e 31 2e 30 3c 62 72 3e 61 6e 64 ion 3.1.0<br>and
2410: 20 61 6e 79 20 65 61 72 6c 69 65 72 3c 2f 74 64 any earlier</td
2420: 3e 0d 0a 3c 74 64 20 62 67 63 6f 6c 6f 72 3d 22 >..<td bgcolor="
2430: 23 65 38 65 38 65 38 22 20 61 6c 69 67 6e 3d 22 #e8e8e8" align="
2440: 63 65 6e 74 65 72 22 3e 3c 62 3e 6e 65 77 20 6c center"><b>new l
2450: 61 79 6f 75 74 3c 2f 62 3e 3c 62 72 3e 56 65 72 ayout</b><br>Ver
2460: 73 69 6f 6e 20 34 2e 30 2e 30 3c 62 72 3e 61 6e sion 4.0.0<br>an
2470: 64 20 61 6e 79 20 73 75 62 73 65 71 75 65 6e 74 d any subsequent
2480: 3c 2f 74 64 3e 0d 0a 3c 74 64 20 62 67 63 6f 6c </td>..<td bgcol
2490: 6f 72 3d 22 23 65 38 65 38 65 38 22 20 61 6c 69 or="#e8e8e8" ali
24a0: 67 6e 3d 22 63 65 6e 74 65 72 22 3e 3c 62 3e 4e gn="center"><b>N
24b0: 6f 74 65 73 3c 2f 62 3e 3c 2f 74 64 3e 3c 2f 74 otes</b></td></t
24c0: 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 3c 62 3e 3c r>..<tr><td><b><
24d0: 69 3e 74 79 70 65 3c 2f 69 3e 3c 62 72 3e 54 45 i>type</i><br>TE
24e0: 58 54 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 3e 3c XT</b></td><td><
24f0: 62 3e 3c 69 3e 67 65 6f 6d 65 74 72 79 5f 74 79 b><i>geometry_ty
2500: 70 65 3c 2f 69 3e 3c 62 72 3e 49 4e 54 45 47 45 pe</i><br>INTEGE
2510: 52 3c 2f 62 3e 3c 2f 74 64 3e 0d 0a 3c 74 64 3e R</b></td>..<td>
2520: 3c 75 6c 3e 0d 0a 3c 6c 69 3e 65 78 61 63 74 6c <ul>..<li>exactl
2530: 79 20 63 6f 72 72 65 73 70 6f 6e 64 69 6e 67 20 y corresponding
2540: 74 6f 20 74 68 65 20 73 61 6d 65 20 63 6f 6c 75 to the same colu
2550: 6d 6e 20 69 6e 20 3c 62 3e 3c 69 3e 67 65 6f 6d mn in <b><i>geom
2560: 65 74 72 79 5f 63 6f 6c 75 6d 6e 73 3c 2f 69 3e etry_columns</i>
2570: 3c 2f 62 3e 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c </b>.</li>..</ul
2580: 3e 3c 2f 74 64 3e 3c 2f 74 72 3e 3c 74 72 3e 3c ></td></tr><tr><
2590: 74 64 3e 3c 62 3e 3c 69 3e 6e 2e 61 2e 3c 2f 74 td><b><i>n.a.</t
25a0: 64 3e 3c 74 64 3e 3c 62 3e 3c 69 3e 63 6f 6f 72 d><td><b><i>coor
25b0: 64 5f 64 69 6d 65 6e 73 69 6f 6e 3c 2f 69 3e 3c d_dimension</i><
25c0: 62 72 3e 49 4e 54 45 47 45 52 3c 2f 62 3e 3c 2f br>INTEGER</b></
25d0: 74 64 3e 0d 0a 3c 74 64 3e 3c 75 6c 3e 0d 0a 3c td>..<td><ul>..<
25e0: 6c 69 3e 6e 65 77 20 69 6e 74 72 6f 64 75 63 74 li>new introduct
25f0: 69 6f 6e 3b 20 6d 61 69 6e 6c 79 20 6a 75 73 74 ion; mainly just
2600: 69 66 69 65 64 20 69 6e 20 6f 72 64 65 72 20 74 ified in order t
2610: 6f 20 62 65 20 66 75 6c 6c 79 20 73 79 6d 6d 65 o be fully symme
2620: 74 72 69 63 20 77 69 74 68 20 3c 62 3e 3c 69 3e tric with <b><i>
2630: 67 65 6f 6d 65 74 72 79 5f 63 6f 6c 75 6d 6e 73 geometry_columns
2640: 3c 2f 69 3e 3c 2f 62 3e 2e 3c 2f 6c 69 3e 0d 0a </i></b>.</li>..
2650: 3c 2f 75 6c 3e 3c 2f 74 64 3e 3c 2f 74 72 3e 0d </ul></td></tr>.
2660: 0a 3c 2f 74 61 62 6c 65 3e 3c 62 72 3e 0d 0a 3c .</table><br>..<
2670: 68 72 3e 0d 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 hr>..<h3><a name
2680: 3d 22 6d 65 74 61 64 61 74 61 22 3e 4d 65 74 61 ="metadata">Meta
2690: 64 61 74 61 3c 2f 61 3e 20 61 6e 64 20 73 74 61 data</a> and sta
26a0: 74 69 73 74 69 63 20 69 6e 66 6f 73 20 61 76 61 tistic infos ava
26b0: 69 6c 61 62 6c 65 20 69 6e 20 34 2e 30 2e 30 3c ilable in 4.0.0<
26c0: 2f 68 33 3e 0d 0a 56 65 72 73 69 6f 6e 20 34 2e /h3>..Version 4.
26d0: 30 2e 30 20 6e 6f 77 20 73 75 70 70 6f 72 74 73 0.0 now supports
26e0: 20 61 20 72 69 63 68 65 72 20 73 65 74 20 6f 66 a richer set of
26f0: 20 6d 65 74 61 64 61 74 61 20 61 6e 64 20 73 74 metadata and st
2700: 61 74 69 73 74 69 63 73 20 69 6e 66 6f 72 6d 61 atistics informa
2710: 74 69 6f 6e 20 73 75 70 70 6f 72 74 69 6e 67 20 tion supporting
2720: 53 70 61 74 69 61 6c 20 54 61 62 6c 65 73 2e 3c Spatial Tables.<
2730: 62 72 3e 0d 0a 59 6f 75 20 63 61 6e 20 6c 65 61 br>..You can lea
2740: 72 6e 20 6d 6f 72 65 20 61 62 6f 75 74 20 74 68 rn more about th
2750: 69 73 20 74 6f 70 69 63 20 62 79 20 72 65 61 64 is topic by read
2760: 69 6e 67 20 74 68 69 73 20 3c 61 20 68 72 65 66 ing this <a href
2770: 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 67 61 ="https://www.ga
2780: 69 61 2d 67 69 73 2e 69 74 2f 66 6f 73 73 69 6c ia-gis.it/fossil
2790: 2f 6c 69 62 73 70 61 74 69 61 6c 69 74 65 2f 77 /libspatialite/w
27a0: 69 6b 69 3f 6e 61 6d 65 3d 6d 65 74 61 64 61 74 iki?name=metadat
27b0: 61 2d 34 2e 30 22 3e 57 69 6b 69 20 70 61 67 65 a-4.0">Wiki page
27c0: 3c 2f 61 3e 3c 62 72 3e 3c 62 72 3e 0d 0a 41 20 </a><br><br>..A
27d0: 63 6c 6f 73 65 6c 79 20 72 65 6c 61 74 65 64 20 closely related
27e0: 3c 61 20 6e 61 6d 65 3d 22 73 71 6c 6c 6f 67 22 <a name="sqllog"
27f0: 3e 74 6f 70 69 63 3c 2f 61 3e 20 28 61 6c 74 68 >topic</a> (alth
2800: 6f 75 67 68 20 6e 6f 74 20 62 65 69 6e 67 20 6d ough not being m
2810: 65 74 61 64 61 74 61 20 6f 72 20 73 74 61 74 69 etadata or stati
2820: 63 73 20 69 6e 66 6f 73 20 61 74 20 61 6c 6c 2c cs infos at all,
2830: 20 73 74 72 69 63 74 6c 79 20 73 70 65 61 6b 69 strictly speaki
2840: 6e 67 29 20 69 73 20 74 68 65 20 62 72 61 6e 64 ng) is the brand
2850: 20 6e 65 77 20 3c 62 3e 53 51 4c 20 4c 6f 67 3c new <b>SQL Log<
2860: 2f 62 3e 20 66 61 63 69 6c 69 74 79 3a 20 79 6f /b> facility: yo
2870: 75 20 63 61 6e 20 6c 65 61 72 6e 20 6d 6f 72 65 u can learn more
2880: 20 6f 6e 20 74 68 69 73 20 62 79 20 72 65 61 64 on this by read
2890: 69 6e 67 20 74 68 69 73 20 3c 61 20 68 72 65 66 ing this <a href
28a0: 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 67 61 ="https://www.ga
28b0: 69 61 2d 67 69 73 2e 69 74 2f 66 6f 73 73 69 6c ia-gis.it/fossil
28c0: 2f 6c 69 62 73 70 61 74 69 61 6c 69 74 65 2f 77 /libspatialite/w
28d0: 69 6b 69 3f 6e 61 6d 65 3d 53 51 4c 20 4c 6f 67 iki?name=SQL Log
28e0: 22 3e 57 69 6b 69 20 70 61 67 65 3c 2f 61 3e 3c ">Wiki page</a><
28f0: 62 72 3e 3c 62 72 3e 0d 0a 3c 68 72 3e 0d 0a 3c br><br>..<hr>..<
2900: 68 33 3e 43 68 61 6e 67 65 73 20 61 66 66 65 63 h3>Changes affec
2910: 74 69 6e 67 20 74 68 65 20 56 69 72 74 75 61 6c ting the Virtual
2920: 53 70 61 74 69 61 6c 49 6e 64 65 78 20 69 6e 74 SpatialIndex int
2930: 65 72 66 61 63 65 3c 2f 68 33 3e 0d 0a 56 65 72 erface</h3>..Ver
2940: 73 69 6f 6e 20 34 2e 30 2e 30 20 69 73 20 6e 6f sion 4.0.0 is no
2950: 77 20 61 62 6c 65 20 74 6f 20 64 69 72 65 63 74 w able to direct
2960: 6c 79 20 61 63 63 65 73 73 20 61 20 53 70 61 74 ly access a Spat
2970: 69 61 6c 20 49 6e 64 65 78 20 73 75 70 70 6f 72 ial Index suppor
2980: 74 69 6e 67 20 61 20 53 70 61 74 69 61 6c 20 56 ting a Spatial V
2990: 69 65 77 2e 20 49 6d 61 67 69 6e 65 20 61 20 56 iew. Imagine a V
29a0: 69 65 77 20 64 65 66 69 6e 65 64 20 61 73 20 66 iew defined as f
29b0: 6f 6c 6c 6f 77 73 3a 3c 62 72 3e 3c 62 72 3e 0d ollows:<br><br>.
29c0: 0a 3c 74 61 62 6c 65 20 62 6f 72 64 65 72 3d 22 .<table border="
29d0: 31 22 20 62 67 63 6f 6c 6f 72 3d 22 23 65 38 65 1" bgcolor="#e8e
29e0: 38 65 38 22 20 63 65 6c 6c 73 70 61 63 69 6e 67 8e8" cellspacing
29f0: 3d 22 34 22 20 63 65 6c 6c 70 61 64 64 69 6e 67 ="4" cellpadding
2a00: 3d 22 34 22 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 43 ="4">..<tr><td>C
2a10: 52 45 41 54 45 20 54 41 42 4c 45 20 67 72 6f 75 REATE TABLE grou
2a20: 70 73 20 28 3c 62 72 3e 0d 0a 26 6e 62 73 70 3b ps (<br>..
2a30: 26 6e 62 73 70 3b 26 6e 62 73 70 3b 26 6e 62 73 &nbs
2a40: 70 3b 67 72 6f 75 70 5f 69 64 20 49 4e 54 45 47 p;group_id INTEG
2a50: 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 20 41 ER PRIMARY KEY A
2a60: 55 54 4f 49 4e 43 52 45 4d 45 4e 54 2c 3c 62 72 UTOINCREMENT,<br
2a70: 3e 0d 0a 26 6e 62 73 70 3b 26 6e 62 73 70 3b 26 >.. &
2a80: 6e 62 73 70 3b 26 6e 62 73 70 3b 67 72 6f 75 70 nbsp; group
2a90: 5f 6e 61 6d 65 20 54 45 58 54 20 4e 4f 54 20 4e _name TEXT NOT N
2aa0: 55 4c 4c 29 3b 3c 2f 74 64 3e 3c 2f 74 72 3e 0d ULL);</td></tr>.
2ab0: 0a 3c 74 72 3e 3c 74 64 3e 43 52 45 41 54 45 20 .<tr><td>CREATE
2ac0: 54 41 42 4c 45 20 69 74 65 6d 73 20 28 3c 62 72 TABLE items (<br
2ad0: 3e 0d 0a 26 6e 62 73 70 3b 26 6e 62 73 70 3b 26 >.. &
2ae0: 6e 62 73 70 3b 26 6e 62 73 70 3b 69 74 65 6d 5f nbsp; item_
2af0: 69 64 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 id INTEGER PRIMA
2b00: 52 59 20 4b 45 59 20 41 55 54 4f 49 4e 43 52 45 RY KEY AUTOINCRE
2b10: 4d 45 4e 54 2c 3c 62 72 3e 0d 0a 26 6e 62 73 70 MENT,<br>.. 
2b20: 3b 26 6e 62 73 70 3b 26 6e 62 73 70 3b 26 6e 62 ; &nb
2b30: 73 70 3b 67 72 6f 75 70 5f 69 64 20 49 4e 54 45 sp;group_id INTE
2b40: 47 45 52 20 4e 4f 54 20 4e 55 4c 4c 2c 3c 62 72 GER NOT NULL,<br
2b50: 3e 0d 0a 26 6e 62 73 70 3b 26 6e 62 73 70 3b 26 >.. &
2b60: 6e 62 73 70 3b 26 6e 62 73 70 3b 69 74 65 6d 5f nbsp; item_
2b70: 6e 61 6d 65 20 54 45 58 54 20 4e 4f 54 20 4e 55 name TEXT NOT NU
2b80: 4c 4c 2c 3c 62 72 3e 0d 0a 26 6e 62 73 70 3b 26 LL,<br>.. &
2b90: 6e 62 73 70 3b 26 6e 62 73 70 3b 26 6e 62 73 70 nbsp;  
2ba0: 3b 43 4f 4e 53 54 52 41 49 4e 54 20 66 6b 5f 69 ;CONSTRAINT fk_i
2bb0: 74 65 6d 20 46 4f 52 45 49 47 4e 20 4b 45 59 20 tem FOREIGN KEY
2bc0: 28 67 72 6f 75 70 5f 69 64 29 20 52 45 46 45 52 (group_id) REFER
2bd0: 45 4e 43 45 53 20 67 72 6f 75 70 73 20 28 67 72 ENCES groups (gr
2be0: 6f 75 70 5f 69 64 29 29 3b 3c 2f 74 64 3e 3c 2f oup_id));</td></
2bf0: 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 0d 0a 53 tr>..<tr><td>..S
2c00: 45 4c 45 43 54 20 41 64 64 47 65 6f 6d 65 74 72 ELECT AddGeometr
2c10: 79 43 6f 6c 75 6d 6e 28 27 69 74 65 6d 73 27 2c yColumn('items',
2c20: 20 27 67 65 6f 6d 27 2c 20 34 33 32 36 2c 20 27 'geom', 4326, '
2c30: 50 4f 49 4e 54 27 2c 20 27 58 59 27 29 3b 3c 2f POINT', 'XY');</
2c40: 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 td></tr>..<tr><t
2c50: 64 3e 0d 0a 53 45 4c 45 43 54 20 43 72 65 61 74 d>..SELECT Creat
2c60: 65 53 70 61 74 69 61 6c 49 6e 64 65 78 28 27 69 eSpatialIndex('i
2c70: 74 65 6d 73 27 2c 20 27 67 65 6f 6d 27 29 3b 3c tems', 'geom');<
2c80: 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c /td></tr>..<tr><
2c90: 74 64 3e 0d 0a 43 52 45 41 54 45 20 56 49 45 57 td>..CREATE VIEW
2ca0: 20 69 74 65 6d 73 5f 76 69 65 77 20 41 53 3c 62 items_view AS<b
2cb0: 72 3e 0d 0a 53 45 4c 45 43 54 20 69 2e 52 4f 57 r>..SELECT i.ROW
2cc0: 49 44 20 41 53 20 52 4f 57 49 44 2c 20 69 2e 69 ID AS ROWID, i.i
2cd0: 74 65 6d 5f 69 64 20 41 53 20 69 74 65 6d 5f 69 tem_id AS item_i
2ce0: 64 2c 20 69 2e 69 74 65 6d 5f 6e 61 6d 65 20 41 d, i.item_name A
2cf0: 53 20 69 74 65 6d 5f 6e 61 6d 65 2c 20 69 2e 67 S item_name, i.g
2d00: 72 6f 75 70 5f 69 64 20 41 53 20 67 72 6f 75 70 roup_id AS group
2d10: 5f 69 64 2c 20 67 2e 67 72 6f 75 70 5f 6e 61 6d _id, g.group_nam
2d20: 65 20 41 53 20 67 72 6f 75 70 5f 6e 61 6d 65 2c e AS group_name,
2d30: 20 69 2e 67 65 6f 6d 20 41 53 20 47 65 6f 6d 65 i.geom AS Geome
2d40: 74 72 79 3c 62 72 3e 0d 0a 46 52 4f 4d 20 69 74 try<br>..FROM it
2d50: 65 6d 73 20 41 53 20 69 3c 62 72 3e 0d 0a 4a 4f ems AS i<br>..JO
2d60: 49 4e 20 67 72 6f 75 70 73 20 41 53 20 67 20 4f IN groups AS g O
2d70: 4e 20 28 67 2e 67 72 6f 75 70 5f 69 64 20 3d 20 N (g.group_id =
2d80: 69 2e 67 72 6f 75 70 5f 69 64 29 3b 20 0d 0a 3c i.group_id); ..<
2d90: 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c /td></tr>..<tr><
2da0: 74 64 3e 0d 0a 49 4e 53 45 52 54 20 49 4e 54 4f td>..INSERT INTO
2db0: 20 76 69 65 77 73 5f 67 65 6f 6d 65 74 72 79 5f views_geometry_
2dc0: 63 6f 6c 75 6d 6e 73 20 28 76 69 65 77 5f 6e 61 columns (view_na
2dd0: 6d 65 2c 20 76 69 65 77 5f 67 65 6f 6d 65 74 72 me, view_geometr
2de0: 79 2c 20 76 69 65 77 5f 72 6f 77 69 64 2c 20 66 y, view_rowid, f
2df0: 5f 74 61 62 6c 65 5f 6e 61 6d 65 2c 20 66 5f 67 _table_name, f_g
2e00: 65 6f 6d 65 74 72 79 5f 63 6f 6c 75 6d 6e 2c 20 eometry_column,
2e10: 72 65 61 64 5f 6f 6e 6c 79 29 3c 62 72 3e 0d 0a read_only)<br>..
2e20: 56 41 4c 55 45 53 20 28 27 69 74 65 6d 73 5f 76 VALUES ('items_v
2e30: 69 65 77 27 2c 20 27 47 65 6f 6d 65 74 72 79 27 iew', 'Geometry'
2e40: 2c 20 27 52 4f 57 49 44 27 2c 20 27 69 74 65 6d , 'ROWID', 'item
2e50: 73 27 2c 20 27 67 65 6f 6d 27 2c 20 31 29 3b 0d s', 'geom', 1);.
2e60: 0a 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 2f 74 .</td></tr>..</t
2e70: 61 62 6c 65 3e 3c 62 72 3e 0d 0a 57 68 65 6e 20 able><br>..When
2e80: 75 73 69 6e 67 20 76 65 72 73 69 6f 6e 20 34 2e using version 4.
2e90: 30 2e 30 20 62 6f 74 68 20 74 68 65 20 66 6f 6c 0.0 both the fol
2ea0: 6c 6f 77 69 6e 67 20 53 70 61 74 69 61 6c 20 71 lowing Spatial q
2eb0: 75 65 72 69 65 73 20 61 72 65 20 65 78 61 63 74 ueries are exact
2ec0: 6c 79 20 65 71 75 69 76 61 6c 65 6e 74 2c 20 61 ly equivalent, a
2ed0: 6e 64 20 74 61 6b 65 20 66 75 6c 6c 20 70 72 6f nd take full pro
2ee0: 66 69 74 20 66 72 6f 6d 20 74 68 65 20 53 70 61 fit from the Spa
2ef0: 74 69 61 6c 20 49 6e 64 65 78 3a 3c 62 72 3e 3c tial Index:<br><
2f00: 62 72 3e 0d 0a 3c 74 61 62 6c 65 20 62 6f 72 64 br>..<table bord
2f10: 65 72 3d 22 31 22 20 63 65 6c 6c 73 70 61 63 69 er="1" cellspaci
2f20: 6e 67 3d 22 34 22 20 63 65 6c 6c 70 61 64 64 69 ng="4" cellpaddi
2f30: 6e 67 3d 22 34 22 3e 0d 0a 3c 74 72 3e 3c 74 64 ng="4">..<tr><td
2f40: 3e 69 6e 64 69 72 65 63 74 6c 79 20 61 63 63 65 >indirectly acce
2f50: 73 73 69 6e 67 20 74 68 65 20 54 61 62 6c 65 27 ssing the Table'
2f60: 73 20 53 70 61 74 69 61 6c 20 49 6e 64 65 78 3c s Spatial Index<
2f70: 62 72 3e 28 61 73 20 61 6c 72 65 61 64 79 20 73 br>(as already s
2f80: 75 70 70 6f 72 74 69 6e 67 20 6f 6e 20 65 61 72 upporting on ear
2f90: 6c 69 65 72 20 76 65 72 73 69 6f 6e 73 29 3c 2f lier versions)</
2fa0: 74 64 3e 0d 0a 3c 74 64 20 62 67 63 6f 6c 6f 72 td>..<td bgcolor
2fb0: 3d 22 23 65 38 65 38 65 38 22 3e 0d 0a 53 45 4c ="#e8e8e8">..SEL
2fc0: 45 43 54 20 2a 3c 62 72 3e 0d 0a 46 52 4f 4d 20 ECT *<br>..FROM
2fd0: 69 74 65 6d 73 5f 76 69 65 77 3c 62 72 3e 0d 0a items_view<br>..
2fe0: 57 48 45 52 45 20 52 4f 57 49 44 20 49 4e 20 28 WHERE ROWID IN (
2ff0: 3c 62 72 3e 0d 0a 26 6e 62 73 70 3b 26 6e 62 73 <br>.. &nbs
3000: 70 3b 26 6e 62 73 70 3b 26 6e 62 73 70 3b 53 45 p; SE
3010: 4c 45 43 54 20 52 4f 57 49 44 3c 62 72 3e 0d 0a LECT ROWID<br>..
3020: 26 6e 62 73 70 3b 26 6e 62 73 70 3b 26 6e 62 73 &nbs
3030: 70 3b 26 6e 62 73 70 3b 46 52 4f 4d 20 53 70 61 p; FROM Spa
3040: 74 69 61 6c 49 6e 64 65 78 3c 62 72 3e 0d 0a 26 tialIndex<br>..&
3050: 6e 62 73 70 3b 26 6e 62 73 70 3b 26 6e 62 73 70 nbsp;  
3060: 3b 26 6e 62 73 70 3b 57 48 45 52 45 20 66 5f 74 ; WHERE f_t
3070: 61 62 6c 65 5f 6e 61 6d 65 20 3d 20 27 3c 62 3e able_name = '<b>
3080: 69 74 65 6d 73 3c 2f 62 3e 27 20 41 4e 44 20 66 items</b>' AND f
3090: 5f 67 65 6f 6d 65 74 72 79 5f 63 6f 6c 75 6d 6e _geometry_column
30a0: 20 3d 20 27 3c 62 3e 67 65 6f 6d 3c 2f 62 3e 27 = '<b>geom</b>'
30b0: 20 41 4e 44 3c 62 72 3e 0d 0a 26 6e 62 73 70 3b AND<br>..
30c0: 26 6e 62 73 70 3b 26 6e 62 73 70 3b 26 6e 62 73 &nbs
30d0: 70 3b 26 6e 62 73 70 3b 26 6e 62 73 70 3b 26 6e p; &n
30e0: 62 73 70 3b 26 6e 62 73 70 3b 73 65 61 72 63 68 bsp; search
30f0: 5f 66 72 61 6d 65 20 3d 20 42 75 69 6c 64 4d 62 _frame = BuildMb
3100: 72 28 31 31 2c 20 34 32 2c 20 31 32 2c 20 34 33 r(11, 42, 12, 43
3110: 2c 20 34 33 32 36 29 0d 0a 29 3b 0d 0a 3c 2f 74 , 4326)..);..</t
3120: 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 d></tr>..<tr><td
3130: 3e 64 69 72 65 63 74 6c 79 20 61 63 63 65 73 73 >directly access
3140: 69 6e 67 20 74 68 65 20 56 69 65 77 27 73 20 53 ing the View's S
3150: 70 61 74 69 61 6c 20 49 6e 64 65 78 3c 62 72 3e patial Index<br>
3160: 28 6e 65 77 20 66 65 61 74 75 72 65 20 69 6e 74 (new feature int
3170: 72 6f 64 75 63 65 64 20 69 6e 20 34 2e 30 2e 30 roduced in 4.0.0
3180: 29 3c 2f 74 64 3e 0d 0a 3c 74 64 20 62 67 63 6f )</td>..<td bgco
3190: 6c 6f 72 3d 22 23 65 38 65 38 65 38 22 3e 0d 0a lor="#e8e8e8">..
31a0: 53 45 4c 45 43 54 20 2a 3c 62 72 3e 0d 0a 46 52 SELECT *<br>..FR
31b0: 4f 4d 20 69 74 65 6d 73 5f 76 69 65 77 3c 62 72 OM items_view<br
31c0: 3e 0d 0a 57 48 45 52 45 20 52 4f 57 49 44 20 49 >..WHERE ROWID I
31d0: 4e 20 28 3c 62 72 3e 0d 0a 26 6e 62 73 70 3b 26 N (<br>.. &
31e0: 6e 62 73 70 3b 26 6e 62 73 70 3b 26 6e 62 73 70 nbsp;  
31f0: 3b 53 45 4c 45 43 54 20 52 4f 57 49 44 3c 62 72 ;SELECT ROWID<br
3200: 3e 0d 0a 26 6e 62 73 70 3b 26 6e 62 73 70 3b 26 >.. &
3210: 6e 62 73 70 3b 26 6e 62 73 70 3b 46 52 4f 4d 20 nbsp; FROM
3220: 53 70 61 74 69 61 6c 49 6e 64 65 78 3c 62 72 3e SpatialIndex<br>
3230: 0d 0a 26 6e 62 73 70 3b 26 6e 62 73 70 3b 26 6e .. &n
3240: 62 73 70 3b 26 6e 62 73 70 3b 57 48 45 52 45 20 bsp; WHERE
3250: 66 5f 74 61 62 6c 65 5f 6e 61 6d 65 20 3d 20 27 f_table_name = '
3260: 3c 62 3e 69 74 65 6d 73 5f 76 69 65 77 3c 2f 62 <b>items_view</b
3270: 3e 27 20 41 4e 44 20 66 5f 67 65 6f 6d 65 74 72 >' AND f_geometr
3280: 79 5f 63 6f 6c 75 6d 6e 20 3d 20 27 3c 62 3e 47 y_column = '<b>G
3290: 65 6f 6d 65 74 72 79 3c 2f 62 3e 27 20 41 4e 44 eometry</b>' AND
32a0: 3c 62 72 3e 0d 0a 26 6e 62 73 70 3b 26 6e 62 73 <br>.. &nbs
32b0: 70 3b 26 6e 62 73 70 3b 26 6e 62 73 70 3b 26 6e p; &n
32c0: 62 73 70 3b 26 6e 62 73 70 3b 26 6e 62 73 70 3b bsp;
32d0: 26 6e 62 73 70 3b 73 65 61 72 63 68 5f 66 72 61 search_fra
32e0: 6d 65 20 3d 20 42 75 69 6c 64 4d 62 72 28 31 31 me = BuildMbr(11
32f0: 2c 20 34 32 2c 20 31 32 2c 20 34 33 2c 20 34 33 , 42, 12, 43, 43
3300: 32 36 29 0d 0a 29 3b 0d 0a 3c 2f 74 64 3e 3c 2f 26)..);..</td></
3310: 74 72 3e 0d 0a 3c 2f 74 61 62 6c 65 3e 3c 62 72 tr>..</table><br
3320: 3e 0d 0a 3c 68 72 3e 0d 0a 3c 68 33 3e 43 68 61 >..<hr>..<h3>Cha
3330: 6e 67 65 73 20 61 66 66 65 63 74 69 6e 67 20 53 nges affecting S
3340: 70 61 74 69 61 6c 20 53 51 4c 20 46 75 6e 63 74 patial SQL Funct
3350: 69 6f 6e 73 3c 2f 68 33 3e 0d 0a 3c 75 6c 3e 0d ions</h3>..<ul>.
3360: 0a 3c 6c 69 3e 3c 62 3e 3c 69 3e 49 6e 69 74 53 .<li><b><i>InitS
3370: 70 61 74 69 61 6c 4d 65 74 61 44 61 74 61 3c 2f patialMetaData</
3380: 69 3e 28 29 3c 2f 62 3e 20 74 68 69 73 20 53 51 i>()</b> this SQ
3390: 4c 20 66 75 6e 63 74 69 6f 6e 20 68 61 73 20 74 L function has t
33a0: 68 65 20 73 61 6d 65 20 69 64 65 6e 74 69 63 61 he same identica
33b0: 6c 20 73 69 67 6e 61 74 75 72 65 20 61 73 20 62 l signature as b
33c0: 65 66 6f 72 65 2e 20 41 6e 79 77 61 79 20 6f 6e efore. Anyway on
33d0: 20 76 65 72 73 69 6f 6e 20 34 2e 30 2e 30 20 61 version 4.0.0 a
33e0: 6c 6c 20 4d 65 74 61 64 61 74 61 20 74 61 62 6c ll Metadata tabl
33f0: 65 73 20 77 69 6c 6c 20 62 65 20 63 72 65 61 74 es will be creat
3400: 65 64 20 61 63 63 6f 72 64 69 6e 67 6c 79 20 74 ed accordingly t
3410: 6f 20 74 68 65 20 6c 61 74 65 73 74 20 73 70 65 o the latest spe
3420: 63 69 66 69 63 61 74 69 6f 6e 20 28 69 2e 65 2e cification (i.e.
3430: 20 74 68 65 20 6f 6e 65 20 65 78 70 6c 61 69 6e the one explain
3440: 65 64 20 6f 6e 20 74 68 69 73 20 64 6f 63 75 6d ed on this docum
3450: 65 6e 74 29 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e ent).</li>..<li>
3460: 3c 62 3e 3c 69 3e 43 68 65 63 6b 53 70 61 74 69 <b><i>CheckSpati
3470: 61 6c 4d 65 74 61 44 61 74 61 3c 2f 69 3e 28 29 alMetaData</i>()
3480: 3c 2f 62 3e 20 75 6e 63 68 61 6e 67 65 64 20 73 </b> unchanged s
3490: 69 67 6e 61 74 75 72 65 2c 20 62 75 74 20 6e 6f ignature, but no
34a0: 77 20 72 65 74 75 72 6e 20 64 69 66 66 65 72 65 w return differe
34b0: 6e 74 20 72 65 73 75 6c 74 73 3a 3c 75 6c 3e 0d nt results:<ul>.
34c0: 0a 3c 6c 69 3e 3c 62 3e 30 3c 2f 62 3e 20 6e 6f .<li><b>0</b> no
34d0: 20 76 61 6c 69 64 20 53 70 61 74 69 61 6c 20 4d valid Spatial M
34e0: 65 74 61 64 61 74 61 20 74 61 62 6c 65 73 20 77 etadata tables w
34f0: 65 72 65 20 69 64 65 6e 74 69 66 69 65 64 2e 3c ere identified.<
3500: 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 31 3c 2f /li>..<li><b>1</
3510: 62 3e 20 3c 69 3e 3c 75 3e 6c 65 67 61 63 79 3c b> <i><u>legacy<
3520: 2f 75 3e 3c 2f 69 3e 20 4d 65 64 61 74 61 74 61 /u></i> Medatata
3530: 20 74 61 62 6c 65 73 20 77 65 72 65 20 69 64 65 tables were ide
3540: 6e 74 69 66 69 65 64 20 28 69 2e 65 2e 20 63 72 ntified (i.e. cr
3550: 65 61 74 65 64 20 62 79 20 76 65 72 73 69 6f 6e eated by version
3560: 20 33 2e 31 2e 30 20 6f 72 20 61 6e 79 20 65 61 3.1.0 or any ea
3570: 72 6c 69 65 72 29 2e 3c 2f 6c 69 3e 0d 0a 3c 6c rlier).</li>..<l
3580: 69 3e 3c 62 3e 32 3c 2f 62 3e 20 3c 69 3e 3c 75 i><b>2</b> <i><u
3590: 3e 46 44 4f 2f 4f 47 52 3c 2f 75 3e 3c 2f 69 3e >FDO/OGR</u></i>
35a0: 20 4d 65 74 61 64 61 74 61 20 74 61 62 6c 65 73 Metadata tables
35b0: 20 77 65 72 65 20 69 64 65 6e 74 69 66 69 65 64 were identified
35c0: 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 33 .</li>..<li><b>3
35d0: 3c 2f 62 3e 20 3c 69 3e 3c 75 3e 63 75 72 72 65 </b> <i><u>curre
35e0: 6e 74 3c 2f 75 3e 3c 2f 69 3e 20 4d 65 64 61 74 nt</u></i> Medat
35f0: 61 74 61 20 74 61 62 6c 65 73 20 77 65 72 65 20 ata tables were
3600: 69 64 65 6e 74 69 66 69 65 64 20 28 69 2e 65 2e identified (i.e.
3610: 20 63 72 65 61 74 65 64 20 62 79 20 76 65 72 73 created by vers
3620: 69 6f 6e 20 34 2e 30 2e 30 20 6f 72 20 61 6e 79 ion 4.0.0 or any
3630: 20 73 75 62 73 65 71 75 65 6e 74 29 2e 3c 2f 6c subsequent).</l
3640: 69 3e 0d 0a 3c 2f 75 6c 3e 3c 2f 6c 69 3e 0d 0a i>..</ul></li>..
3650: 3c 6c 69 3e 74 77 6f 20 66 75 72 74 68 65 72 20 <li>two further
3660: 66 75 6e 63 74 69 6f 6e 73 20 61 72 65 20 6e 6f functions are no
3670: 77 20 61 76 61 69 6c 61 62 6c 65 2c 20 73 70 65 w available, spe
3680: 63 69 66 69 63 61 6c 6c 79 20 73 75 70 70 6f 72 cifically suppor
3690: 74 69 6e 67 20 56 69 72 74 75 61 6c 53 68 61 70 ting VirtualShap
36a0: 65 73 3a 20 3c 62 3e 3c 69 3e 52 65 67 69 73 74 es: <b><i>Regist
36b0: 65 72 56 69 72 74 75 61 6c 47 65 6f 6d 65 74 72 erVirtualGeometr
36c0: 79 3c 2f 69 3e 28 29 3c 2f 62 3e 20 61 6e 64 20 y</i>()</b> and
36d0: 3c 62 3e 3c 69 3e 44 72 6f 70 56 69 72 74 75 61 <b><i>DropVirtua
36e0: 6c 47 65 6f 6d 65 74 72 79 3c 2f 69 3e 28 29 3c lGeometry</i>()<
36f0: 2f 62 3e 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c /b>.</li>..<li><
3700: 62 3e 3c 69 3e 55 70 64 61 74 65 4c 61 79 65 72 b><i>UpdateLayer
3710: 53 74 61 74 69 73 74 69 63 73 3c 2f 69 3e 28 29 Statistics</i>()
3720: 3c 2f 62 3e 20 77 6f 72 6b 73 20 65 78 61 63 74 </b> works exact
3730: 6c 79 20 61 73 20 62 65 66 6f 72 65 3b 20 62 75 ly as before; bu
3740: 74 20 69 66 20 76 65 72 73 69 6f 6e 20 34 2e 30 t if version 4.0
3750: 2e 30 20 4d 65 74 61 64 61 74 61 20 61 72 65 20 .0 Metadata are
3760: 64 65 74 65 63 74 65 64 20 61 20 72 69 63 68 65 detected a riche
3770: 72 20 73 65 74 20 6f 66 20 73 74 61 74 69 73 74 r set of statist
3780: 69 63 61 6c 20 69 6e 66 6f 73 20 69 73 20 67 65 ical infos is ge
3790: 6e 65 72 61 74 65 64 2c 20 61 6e 64 20 61 20 66 nerated, and a f
37a0: 75 72 74 68 65 72 20 6f 70 74 69 6d 69 7a 61 74 urther optimizat
37b0: 69 6f 6e 20 69 73 20 6e 6f 77 20 69 6e 74 72 6f ion is now intro
37c0: 64 75 63 65 64 2c 20 61 76 6f 69 64 69 6e 67 20 duced, avoiding
37d0: 74 6f 20 72 65 63 61 6c 63 75 6c 61 74 65 20 61 to recalculate a
37e0: 6e 79 20 73 74 69 6c 6c 20 76 61 6c 69 64 20 73 ny still valid s
37f0: 74 61 74 69 73 74 69 63 20 69 6e 66 6f 20 28 62 tatistic info (b
3800: 79 20 65 76 61 6c 75 61 74 69 6e 67 20 74 68 65 y evaluating the
3810: 20 61 70 70 72 6f 70 72 69 61 74 65 20 3c 69 3e appropriate <i>
3820: 74 69 6d 65 73 74 61 6d 70 3c 2f 69 3e 20 76 61 timestamp</i> va
3830: 6c 75 65 73 29 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 lues).</li>..</u
3840: 6c 3e 3c 62 72 3e 0d 0a 41 6e 79 20 6f 74 68 65 l><br>..Any othe
3850: 72 20 53 51 4c 20 66 75 6e 63 74 69 6f 6e 20 68 r SQL function h
3860: 61 73 20 74 68 65 20 73 61 6d 65 20 69 64 65 6e as the same iden
3870: 74 69 63 61 6c 20 73 69 67 6e 61 74 75 72 65 20 tical signature
3880: 61 73 20 62 65 66 6f 72 65 2c 20 61 6e 64 20 77 as before, and w
3890: 69 6c 6c 20 3c 69 3e 61 75 74 6f 6d 61 67 69 63 ill <i>automagic
38a0: 61 6c 6c 79 3c 2f 69 3e 20 64 65 74 65 63 74 20 ally</i> detect
38b0: 74 68 65 20 61 63 74 75 61 6c 20 66 6f 72 6d 61 the actual forma
38c0: 74 20 6f 66 20 4d 65 74 61 64 61 74 61 20 74 61 t of Metadata ta
38d0: 62 6c 65 73 2c 20 74 68 75 73 20 63 6f 6e 73 65 bles, thus conse
38e0: 71 75 65 6e 74 6c 79 20 61 70 70 6c 79 69 6e 67 quently applying
38f0: 20 74 68 65 20 61 70 70 72 6f 70 72 69 61 74 65 the appropriate
3900: 20 61 63 74 69 6f 6e 73 3a 3c 75 6c 3e 0d 0a 3c actions:<ul>..<
3910: 6c 69 3e 3c 62 3e 3c 69 3e 41 64 64 47 65 6f 6d li><b><i>AddGeom
3920: 65 74 72 79 43 6f 6c 75 6d 6e 3c 2f 69 3e 28 29 etryColumn</i>()
3930: 3c 2f 62 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c </b></li>..<li><
3940: 62 3e 3c 69 3e 44 69 73 63 61 72 64 47 65 6f 6d b><i>DiscardGeom
3950: 65 74 72 79 43 6f 6c 75 6d 6e 3c 2f 69 3e 28 29 etryColumn</i>()
3960: 3c 2f 62 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c </b></li>..<li><
3970: 62 3e 3c 69 3e 52 65 63 6f 76 65 72 47 65 6f 6d b><i>RecoverGeom
3980: 65 74 72 79 43 6f 6c 75 6d 6e 3c 2f 69 3e 28 29 etryColumn</i>()
3990: 3c 2f 62 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c </b></li>..<li><
39a0: 62 3e 3c 69 3e 43 72 65 61 74 65 53 70 61 74 69 b><i>CreateSpati
39b0: 61 6c 49 6e 64 65 78 3c 2f 69 3e 28 29 3c 2f 62 alIndex</i>()</b
39c0: 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 3c ></li>..<li><b><
39d0: 69 3e 44 69 73 61 62 6c 65 53 70 61 74 69 61 6c i>DisableSpatial
39e0: 49 6e 64 65 78 3c 2f 69 3e 28 29 3c 2f 62 3e 3c Index</i>()</b><
39f0: 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 3c 69 3e /li>..<li><b><i>
3a00: 52 65 63 6f 76 65 72 53 70 61 74 69 61 6c 49 6e RecoverSpatialIn
3a10: 64 65 78 3c 2f 69 3e 28 29 3c 2f 62 3e 3c 2f 6c dex</i>()</b></l
3a20: 69 3e 0d 0a 3c 6c 69 3e 2e 2e 2e 20 61 6e 64 20 i>..<li>... and
3a30: 73 6f 20 6f 6e 20 2e 2e 2e 3c 2f 6c 69 3e 0d 0a so on ...</li>..
3a40: 3c 2f 75 6c 3e 3c 62 72 3e 0d 0a 3c 75 3e 50 6c </ul><br>..<u>Pl
3a50: 65 61 73 65 20 6e 6f 74 65 3c 2f 75 3e 3a 20 61 ease note</u>: a
3a60: 6e 79 20 53 70 61 74 69 61 6c 20 53 51 4c 20 66 ny Spatial SQL f
3a70: 75 6e 63 74 69 6f 6e 20 63 72 65 61 74 69 6e 67 unction creating
3a80: 20 61 20 6e 65 77 20 47 65 6f 6d 65 74 72 79 20 a new Geometry
3a90: 28 65 2e 67 2e 20 3c 62 3e 3c 69 3e 53 54 5f 47 (e.g. <b><i>ST_G
3aa0: 65 6f 6d 46 72 6f 6d 54 65 78 74 3c 2f 69 3e 28 eomFromText</i>(
3ab0: 29 3c 2f 62 3e 20 61 6e 64 20 66 72 69 65 6e 64 )</b> and friend
3ac0: 73 29 20 77 69 6c 6c 20 6e 6f 77 20 61 73 73 75 s) will now assu
3ad0: 6d 65 20 3c 62 3e 53 52 49 44 20 3d 20 30 3c 2f me <b>SRID = 0</
3ae0: 62 3e 20 69 66 20 6e 6f 20 53 52 49 44 20 76 61 b> if no SRID va
3af0: 6c 75 65 20 77 61 73 20 65 78 70 6c 69 63 69 74 lue was explicit
3b00: 6c 79 20 73 70 65 63 69 66 69 65 64 2e 0d 0a 3c ly specified...<
3b10: 68 34 3e 49 6d 70 6f 72 74 61 6e 74 20 6e 6f 74 h4>Important not
3b20: 69 63 65 3c 2f 68 34 3e 0d 0a 54 68 65 72 65 20 ice</h4>..There
3b30: 69 73 20 61 20 73 6d 61 6c 6c 20 63 68 61 6e 67 is a small chang
3b40: 65 20 61 66 66 65 63 74 69 6e 67 20 62 6f 74 68 e affecting both
3b50: 20 3c 62 3e 3c 69 3e 41 64 64 47 65 6f 6d 65 74 <b><i>AddGeomet
3b60: 72 79 43 6f 6c 75 6d 6e 3c 2f 69 3e 3c 2f 62 3e ryColumn</i></b>
3b70: 20 61 6e 64 20 3c 62 3e 3c 69 3e 52 65 63 6f 76 and <b><i>Recov
3b80: 65 72 47 65 6f 6d 65 74 72 79 43 6f 6c 75 6d 6e erGeometryColumn
3b90: 3c 2f 69 3e 3c 2f 62 3e 3b 20 6e 6f 77 20 74 68 </i></b>; now th
3ba0: 65 20 3c 62 3e 63 6f 6f 72 64 5f 64 69 6d 65 6e e <b>coord_dimen
3bb0: 73 69 6f 6e 3c 2f 62 3e 20 61 72 67 75 6d 65 6e sion</b> argumen
3bc0: 74 20 69 73 20 63 6f 6e 73 69 64 65 72 65 64 20 t is considered
3bd0: 61 6e 20 6f 70 74 69 6f 6e 61 6c 20 6f 6e 65 2e an optional one.
3be0: 20 41 6e 79 77 61 79 20 74 68 65 20 3c 69 3e 3c Anyway the <i><
3bf0: 75 3e 6f 6c 64 20 73 79 6e 74 61 78 3c 2f 75 3e u>old syntax</u>
3c00: 3c 2f 69 3e 20 73 75 70 70 6f 72 74 65 64 20 62 </i> supported b
3c10: 79 20 70 72 65 76 69 6f 73 20 76 65 72 73 69 6f y previos versio
3c20: 6e 73 20 69 73 20 73 74 69 6c 6c 20 63 6f 6e 73 ns is still cons
3c30: 69 64 65 72 65 64 20 74 6f 20 62 65 20 66 75 6c idered to be ful
3c40: 6c 79 20 76 61 6c 69 64 2e 3c 62 72 3e 0d 0a 54 ly valid.<br>..T
3c50: 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 74 61 62 he following tab
3c60: 6c 65 20 65 6e 75 6d 65 72 61 74 65 73 20 61 6c le enumerates al
3c70: 6c 20 74 68 65 20 6c 65 67 61 6c 20 64 65 63 6c l the legal decl
3c80: 61 72 61 74 69 6f 6e 73 20 61 63 63 65 70 74 65 arations accepte
3c90: 64 20 62 79 20 76 65 72 73 69 6f 6e 20 34 2e 30 d by version 4.0
3ca0: 2e 30 20 61 6e 64 20 61 73 73 75 6d 65 64 20 74 .0 and assumed t
3cb0: 6f 20 62 65 20 65 78 61 63 74 6c 79 20 65 71 75 o be exactly equ
3cc0: 69 76 61 6c 65 6e 74 20 28 6f 6e 6c 79 20 74 68 ivalent (only th
3cd0: 65 20 50 4f 49 4e 54 20 63 61 73 65 20 69 73 20 e POINT case is
3ce0: 73 68 6f 77 6e 2c 20 62 75 74 20 79 6f 75 20 63 shown, but you c
3cf0: 61 6e 20 65 61 73 69 6c 79 20 65 78 70 61 6e 64 an easily expand
3d00: 20 74 68 69 73 20 73 63 68 65 6d 61 20 74 6f 20 this schema to
3d10: 61 6e 79 20 6f 74 68 65 72 20 47 65 6f 6d 65 74 any other Geomet
3d20: 72 79 20 54 79 70 65 29 2e 3c 62 72 3e 0d 0a 3c ry Type).<br>..<
3d30: 75 3e 50 6c 65 61 73 65 20 6e 6f 74 65 3c 2f 75 u>Please note</u
3d40: 3e 3a 20 74 68 65 20 3c 69 3e 6e 65 77 20 73 79 >: the <i>new sy
3d50: 6e 74 61 78 3c 2f 69 3e 20 69 6e 74 72 6f 64 75 ntax</i> introdu
3d60: 63 65 64 20 62 79 20 76 65 72 73 69 6f 6e 20 34 ced by version 4
3d70: 2e 30 2e 30 20 69 73 20 72 65 70 72 65 73 65 6e .0.0 is represen
3d80: 74 65 64 20 61 73 20 3c 62 3e 62 6f 6c 64 3c 2f ted as <b>bold</
3d90: 62 3e 2e 20 54 68 65 20 3c 69 3e 6f 6c 64 20 73 b>. The <i>old s
3da0: 79 6e 74 61 78 3c 2f 69 3e 20 61 6c 72 65 61 64 yntax</i> alread
3db0: 79 20 73 75 70 70 6f 72 74 65 64 20 62 79 20 65 y supported by e
3dc0: 61 72 6c 69 65 72 20 76 65 72 73 69 6f 6e 73 20 arlier versions
3dd0: 69 73 20 69 6e 20 3c 69 3e 69 74 61 6c 69 63 3c is in <i>italic<
3de0: 2f 69 3e 2e 3c 62 72 3e 3c 62 72 3e 0d 0a 3c 74 /i>.<br><br>..<t
3df0: 61 62 6c 65 20 62 67 63 6f 6c 6f 72 3d 22 23 66 able bgcolor="#f
3e00: 66 66 66 65 38 22 20 63 65 6c 6c 73 70 61 63 69 fffe8" cellspaci
3e10: 6e 67 3d 22 34 22 20 63 65 6c 6c 70 61 64 64 69 ng="4" cellpaddi
3e20: 6e 67 3d 22 38 22 3e 0d 0a 3c 74 72 3e 3c 74 64 ng="8">..<tr><td
3e30: 20 72 6f 77 73 70 61 6e 3d 22 34 22 3e 3c 62 3e rowspan="4"><b>
3e40: 50 4f 49 4e 54 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 POINT</b></td><t
3e50: 64 3e 32 44 2c 20 3c 62 3e 58 59 3c 2f 62 3e 3c d>2D, <b>XY</b><
3e60: 2f 74 64 3e 3c 74 64 3e 3c 69 3e 41 64 64 47 65 /td><td><i>AddGe
3e70: 6f 6d 65 74 72 79 43 6f 6c 75 6d 6e 28 27 74 62 ometryColumn('tb
3e80: 6c 27 2c 20 27 67 65 6f 6d 27 2c 20 34 33 32 36 l', 'geom', 4326
3e90: 2c 20 27 50 4f 49 4e 54 27 2c 20 32 29 3b 3c 62 , 'POINT', 2);<b
3ea0: 72 3e 0d 0a 41 64 64 47 65 6f 6d 65 74 72 79 43 r>..AddGeometryC
3eb0: 6f 6c 75 6d 6e 28 27 74 62 6c 27 2c 20 27 67 65 olumn('tbl', 'ge
3ec0: 6f 6d 27 2c 20 34 33 32 36 2c 20 27 50 4f 49 4e om', 4326, 'POIN
3ed0: 54 27 2c 20 27 58 59 27 29 3c 2f 69 3e 3c 62 72 T', 'XY')</i><br
3ee0: 3e 0d 0a 3c 62 3e 41 64 64 47 65 6f 6d 65 74 72 >..<b>AddGeometr
3ef0: 79 43 6f 6c 75 6d 6e 28 27 74 62 6c 27 2c 20 27 yColumn('tbl', '
3f00: 67 65 6f 6d 27 2c 20 34 33 32 36 2c 20 27 50 4f geom', 4326, 'PO
3f10: 49 4e 54 27 29 3b 3c 2f 62 3e 3c 2f 74 64 3e 3c INT');</b></td><
3f20: 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 33 44 /tr>..<tr><td>3D
3f30: 2c 20 3c 62 3e 58 59 5a 3c 2f 62 3e 3c 2f 74 64 , <b>XYZ</b></td
3f40: 3e 3c 74 64 3e 3c 69 3e 41 64 64 47 65 6f 6d 65 ><td><i>AddGeome
3f50: 74 72 79 43 6f 6c 75 6d 6e 28 27 74 62 6c 27 2c tryColumn('tbl',
3f60: 20 27 67 65 6f 6d 27 2c 20 34 33 32 36 2c 20 27 'geom', 4326, '
3f70: 50 4f 49 4e 54 27 2c 20 33 29 3b 3c 62 72 3e 0d POINT', 3);<br>.
3f80: 0a 41 64 64 47 65 6f 6d 65 74 72 79 43 6f 6c 75 .AddGeometryColu
3f90: 6d 6e 28 27 74 62 6c 27 2c 20 27 67 65 6f 6d 27 mn('tbl', 'geom'
3fa0: 2c 20 34 33 32 36 2c 20 27 50 4f 49 4e 54 27 2c , 4326, 'POINT',
3fb0: 20 27 58 59 5a 27 29 3c 2f 69 3e 3c 62 72 3e 0d 'XYZ')</i><br>.
3fc0: 0a 3c 62 3e 41 64 64 47 65 6f 6d 65 74 72 79 43 .<b>AddGeometryC
3fd0: 6f 6c 75 6d 6e 28 27 74 62 6c 27 2c 20 27 67 65 olumn('tbl', 'ge
3fe0: 6f 6d 27 2c 20 34 33 32 36 2c 20 27 50 4f 49 4e om', 4326, 'POIN
3ff0: 54 5a 27 29 3c 62 72 3e 0d 0a 41 64 64 47 65 6f TZ')<br>..AddGeo
4000: 6d 65 74 72 79 43 6f 6c 75 6d 6e 28 27 74 62 6c metryColumn('tbl
4010: 27 2c 20 27 67 65 6f 6d 27 2c 20 34 33 32 36 2c ', 'geom', 4326,
4020: 20 27 50 4f 49 4e 54 5a 27 2c 20 33 29 3b 3c 62 'POINTZ', 3);<b
4030: 72 3e 0d 0a 41 64 64 47 65 6f 6d 65 74 72 79 43 r>..AddGeometryC
4040: 6f 6c 75 6d 6e 28 27 74 62 6c 27 2c 20 27 67 65 olumn('tbl', 'ge
4050: 6f 6d 27 2c 20 34 33 32 36 2c 20 27 50 4f 49 4e om', 4326, 'POIN
4060: 54 5a 27 2c 20 27 58 59 5a 27 29 3b 3c 2f 62 3e TZ', 'XYZ');</b>
4070: 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e </td></tr>..<tr>
4080: 3c 74 64 3e 32 44 20 2b 20 6d 65 61 73 75 72 65 <td>2D + measure
4090: 2c 20 3c 62 3e 58 59 4d 3c 2f 62 3e 3c 2f 74 64 , <b>XYM</b></td
40a0: 3e 3c 74 64 3e 3c 69 3e 41 64 64 47 65 6f 6d 65 ><td><i>AddGeome
40b0: 74 72 79 43 6f 6c 75 6d 6e 28 27 74 62 6c 27 2c tryColumn('tbl',
40c0: 20 27 67 65 6f 6d 27 2c 20 34 33 32 36 2c 20 27 'geom', 4326, '
40d0: 50 4f 49 4e 54 27 2c 20 27 58 59 4d 27 29 3b 3c POINT', 'XYM');<
40e0: 2f 69 3e 3c 62 72 3e 0d 0a 3c 62 3e 41 64 64 47 /i><br>..<b>AddG
40f0: 65 6f 6d 65 74 72 79 43 6f 6c 75 6d 6e 28 27 74 eometryColumn('t
4100: 62 6c 27 2c 20 27 67 65 6f 6d 27 2c 20 34 33 32 bl', 'geom', 432
4110: 36 2c 20 27 50 4f 49 4e 54 4d 27 29 3b 3c 62 72 6, 'POINTM');<br
4120: 3e 0d 0a 41 64 64 47 65 6f 6d 65 74 72 79 43 6f >..AddGeometryCo
4130: 6c 75 6d 6e 28 27 74 62 6c 27 2c 20 27 67 65 6f lumn('tbl', 'geo
4140: 6d 27 2c 20 34 33 32 36 2c 20 27 50 4f 49 4e 54 m', 4326, 'POINT
4150: 4d 27 2c 20 27 58 59 4d 27 29 3b 3c 2f 62 3e 3c M', 'XYM');</b><
4160: 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c /td></tr>..<tr><
4170: 74 64 3e 33 44 20 2b 20 6d 65 61 73 75 72 65 2c td>3D + measure,
4180: 20 3c 62 3e 58 59 5a 4d 3c 2f 62 3e 3c 2f 74 64 <b>XYZM</b></td
4190: 3e 3c 74 64 3e 3c 69 3e 41 64 64 47 65 6f 6d 65 ><td><i>AddGeome
41a0: 74 72 79 43 6f 6c 75 6d 6e 28 27 74 62 6c 27 2c tryColumn('tbl',
41b0: 20 27 67 65 6f 6d 27 2c 20 34 33 32 36 2c 20 27 'geom', 4326, '
41c0: 50 4f 49 4e 54 27 2c 20 34 29 3b 3c 2f 69 3e 3c POINT', 4);</i><
41d0: 62 72 3e 0d 0a 3c 69 3e 41 64 64 47 65 6f 6d 65 br>..<i>AddGeome
41e0: 74 72 79 43 6f 6c 75 6d 6e 28 27 74 62 6c 27 2c tryColumn('tbl',
41f0: 20 27 67 65 6f 6d 27 2c 20 34 33 32 36 2c 20 27 'geom', 4326, '
4200: 50 4f 49 4e 54 27 2c 20 27 58 59 5a 4d 27 29 3c POINT', 'XYZM')<
4210: 2f 69 3e 3c 62 72 3e 0d 0a 3c 62 3e 41 64 64 47 /i><br>..<b>AddG
4220: 65 6f 6d 65 74 72 79 43 6f 6c 75 6d 6e 28 27 74 eometryColumn('t
4230: 62 6c 27 2c 20 27 67 65 6f 6d 27 2c 20 34 33 32 bl', 'geom', 432
4240: 36 2c 20 27 50 4f 49 4e 54 5a 4d 27 29 3b 3c 62 6, 'POINTZM');<b
4250: 72 3e 0d 0a 41 64 64 47 65 6f 6d 65 74 72 79 43 r>..AddGeometryC
4260: 6f 6c 75 6d 6e 28 27 74 62 6c 27 2c 20 27 67 65 olumn('tbl', 'ge
4270: 6f 6d 27 2c 20 34 33 32 36 2c 20 27 50 4f 49 4e om', 4326, 'POIN
4280: 54 5a 4d 27 2c 20 34 29 3b 3c 62 72 3e 0d 0a 41 TZM', 4);<br>..A
4290: 64 64 47 65 6f 6d 65 74 72 79 43 6f 6c 75 6d 6e ddGeometryColumn
42a0: 28 27 74 62 6c 27 2c 20 27 67 65 6f 6d 27 2c 20 ('tbl', 'geom',
42b0: 34 33 32 36 2c 20 27 50 4f 49 4e 54 5a 4d 27 2c 4326, 'POINTZM',
42c0: 20 27 58 59 5a 4d 27 29 3b 3c 2f 62 3e 3c 2f 74 'XYZM');</b></t
42d0: 64 3e 3c 2f 74 72 3e 0d 0a 3c 2f 74 61 62 6c 65 d></tr>..</table
42e0: 3e 3c 62 72 3e 0d 0a 3c 68 33 3e 43 6f 6e 63 6c ><br>..<h3>Concl
42f0: 75 73 69 6f 6e 3c 2f 68 33 3e 0d 0a 57 68 65 6e usion</h3>..When
4300: 20 75 73 69 6e 67 20 61 6e 79 20 61 70 70 72 6f using any appro
4310: 70 72 69 61 74 65 20 53 70 61 74 69 61 6c 20 53 priate Spatial S
4320: 51 4c 20 66 75 6e 63 74 69 6f 6e 20 74 68 65 20 QL function the
4330: 74 72 61 6e 73 69 74 69 6f 6e 20 74 6f 77 61 72 transition towar
4340: 64 20 76 65 72 73 69 6f 6e 20 34 2e 30 2e 30 20 d version 4.0.0
4350: 77 69 6c 6c 20 62 65 20 61 62 73 6f 6c 75 74 65 will be absolute
4360: 6c 79 20 73 6d 6f 6f 74 68 20 61 6e 64 20 70 61 ly smooth and pa
4370: 69 6e 6c 65 73 73 3a 3c 75 6c 3e 0d 0a 3c 6c 69 inless:<ul>..<li
4380: 3e 61 6e 79 20 6e 65 77 20 44 42 20 63 72 65 61 >any new DB crea
4390: 74 65 64 20 62 79 20 76 65 72 73 69 6f 6e 20 34 ted by version 4
43a0: 2e 30 2e 30 20 77 69 6c 6c 20 73 75 70 70 6f 72 .0.0 will suppor
43b0: 74 20 74 68 65 20 6e 65 77 20 4d 65 74 61 64 61 t the new Metada
43c0: 74 61 20 74 61 62 6c 65 73 2e 3c 2f 6c 69 3e 0d ta tables.</li>.
43d0: 0a 3c 6c 69 3e 61 63 63 65 73 73 69 6e 67 20 61 .<li>accessing a
43e0: 6e 79 20 65 78 69 73 74 69 6e 67 20 44 42 20 63 ny existing DB c
43f0: 72 65 61 74 65 64 20 62 79 20 61 6e 79 20 70 72 reated by any pr
4400: 65 76 69 6f 75 73 20 76 65 72 73 69 6f 6e 20 77 evious version w
4410: 69 6c 6c 20 72 61 69 73 65 20 6e 6f 20 65 72 72 ill raise no err
4420: 6f 72 73 20 61 74 20 61 6c 6c 2c 20 62 65 63 61 ors at all, beca
4430: 75 73 65 20 3c 62 3e 6c 69 62 73 70 61 74 69 61 use <b>libspatia
4440: 6c 69 74 65 20 34 2e 30 2e 30 3c 2f 62 3e 20 69 lite 4.0.0</b> i
4450: 73 20 66 75 6c 6c 79 20 63 61 70 61 62 6c 65 20 s fully capable
4460: 74 6f 20 74 72 61 6e 73 70 61 72 65 6e 74 6c 79 to transparently
4470: 20 68 61 6e 64 6c 65 20 74 68 65 20 6f 6c 64 65 handle the olde
4480: 73 74 20 4d 65 74 61 64 61 74 61 20 74 61 62 6c st Metadata tabl
4490: 65 73 20 61 73 20 61 70 70 72 6f 70 72 69 61 74 es as appropriat
44a0: 65 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 72 61 74 e.</li>..<li>rat
44b0: 68 65 72 20 6f 62 76 69 6f 75 73 6c 79 2c 20 6e her obviously, n
44c0: 6f 20 70 72 65 76 69 6f 75 73 20 76 65 72 73 69 o previous versi
44d0: 6f 6e 20 28 65 61 72 6c 69 65 72 20 74 68 61 6e on (earlier than
44e0: 20 34 2e 30 2e 30 29 20 77 69 6c 6c 20 62 65 20 4.0.0) will be
44f0: 61 62 6c 65 20 74 6f 20 68 61 6e 64 6c 65 20 61 able to handle a
4500: 6e 79 20 44 42 20 63 72 65 61 74 65 64 20 62 79 ny DB created by
4510: 20 76 65 72 73 69 6f 6e 20 34 2e 30 2e 30 3c 2f version 4.0.0</
4520: 6c 69 3e 0d 0a 3c 6c 69 3e 62 75 74 20 6f 6e 20 li>..<li>but on
4530: 74 68 65 20 6f 74 68 65 72 20 77 61 79 20 61 6e the other way an
4540: 79 20 70 72 65 76 69 6f 75 73 20 76 65 72 73 69 y previous versi
4550: 6f 6e 20 77 69 6c 6c 20 73 74 69 6c 6c 20 62 65 on will still be
4560: 20 61 62 6c 65 20 74 6f 20 68 61 6e 64 6c 65 20 able to handle
4570: 61 6e 79 20 44 42 20 74 6f 75 63 68 65 64 20 62 any DB touched b
4580: 79 20 76 65 72 73 69 6f 6e 20 34 2e 30 2e 30 2c y version 4.0.0,
4590: 20 69 66 20 74 68 65 20 44 42 20 77 61 73 20 6f if the DB was o
45a0: 72 69 67 69 6e 61 6c 6c 79 20 63 72 65 61 74 65 riginally create
45b0: 64 20 75 73 69 6e 67 20 61 6e 20 65 61 72 6c 69 d using an earli
45c0: 65 72 20 76 65 72 73 69 6f 6e 2c 20 61 6e 64 20 er version, and
45d0: 74 68 75 73 20 70 72 69 6d 65 64 20 61 63 63 6f thus primed acco
45e0: 72 64 69 6e 67 6c 79 20 74 6f 20 3c 69 3e 6c 65 rdingly to <i>le
45f0: 67 61 63 79 20 4d 65 74 61 64 61 74 61 3c 2f 69 gacy Metadata</i
4600: 3e 20 73 70 65 63 69 66 69 63 61 74 69 6f 6e 73 > specifications
4610: 2e 3c 62 72 3e 3c 62 3e 6c 69 62 73 70 61 74 69 .<br><b>libspati
4620: 61 6c 69 74 65 20 34 2e 30 2e 30 3c 2f 62 3e 20 alite 4.0.0</b>
4630: 63 61 72 65 66 75 6c 6c 79 20 61 76 6f 69 64 73 carefully avoids
4640: 20 74 6f 20 70 6f 6c 6c 75 74 65 20 69 6e 20 61 to pollute in a
4650: 6e 79 20 77 61 79 20 61 6e 20 65 78 69 73 74 69 ny way an existi
4660: 6e 67 20 44 42 20 28 3c 69 3e 69 66 20 74 68 69 ng DB (<i>if thi
4670: 73 20 61 63 74 75 61 6c 6c 79 20 68 61 70 70 65 s actually happe
4680: 6e 73 20 69 74 20 73 68 6f 75 6c 64 20 62 65 20 ns it should be
4690: 63 6f 6e 73 69 64 65 72 65 64 20 61 73 20 61 20 considered as a
46a0: 3c 62 3e 73 65 72 69 6f 75 73 20 62 75 67 3c 2f <b>serious bug</
46b0: 62 3e 2c 20 61 6e 64 20 73 68 6f 75 6c 64 20 62 b>, and should b
46c0: 65 20 69 6d 6d 65 64 69 61 74 65 6c 79 20 72 65 e immediately re
46d0: 70 6f 72 74 65 64 20 61 73 6b 69 6e 67 20 66 6f ported asking fo
46e0: 72 20 61 6e 79 20 72 65 71 75 69 72 65 64 20 63 r any required c
46f0: 6f 72 72 65 63 74 69 76 65 20 61 63 74 69 6f 6e orrective action
4700: 3c 2f 69 3e 29 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 </i>).</li>..</u
4710: 6c 3e 3c 62 72 3e 0d 0a 3c 68 72 3e 0d 0a 3c 68 l><br>..<hr>..<h
4720: 33 3e 3c 61 20 6e 61 6d 65 3d 22 63 6f 6e 76 65 3><a name="conve
4730: 72 74 22 3e 54 68 65 20 3c 69 3e 73 70 61 74 69 rt">The <i>spati
4740: 61 6c 69 74 65 5f 63 6f 6e 76 65 72 74 3c 2f 69 alite_convert</i
4750: 3e 20 43 4c 49 20 74 6f 6f 6c 3c 2f 61 3e 3c 2f > CLI tool</a></
4760: 68 33 3e 0d 0a 49 6e 20 6f 72 64 65 72 20 74 6f h3>..In order to
4770: 20 65 6e 73 75 72 65 20 61 73 20 66 61 72 20 61 ensure as far a
4780: 73 20 70 6f 73 73 69 62 6c 65 20 61 20 73 6d 6f s possible a smo
4790: 6f 74 68 20 61 6e 64 20 70 61 69 6e 6c 65 73 73 oth and painless
47a0: 20 74 72 61 6e 73 69 74 69 6f 6e 20 62 65 74 77 transition betw
47b0: 65 65 6e 20 64 69 66 66 65 72 65 6e 74 20 76 65 een different ve
47c0: 72 73 69 6f 6e 73 2c 20 61 20 66 75 72 74 68 65 rsions, a furthe
47d0: 72 20 43 4c 49 20 74 6f 6f 6c 20 69 73 20 6e 6f r CLI tool is no
47e0: 77 20 73 75 70 70 6f 72 74 65 64 2e 3c 62 72 3e w supported.<br>
47f0: 3c 62 72 3e 0d 0a 3c 75 3e 53 79 6e 74 61 78 3c <br>..<u>Syntax<
4800: 2f 75 3e 3a 0d 0a 3c 62 3e 73 70 61 74 69 61 6c /u>:..<b>spatial
4810: 69 74 65 5f 63 6f 6e 76 65 72 74 20 2d 64 20 3c ite_convert -d <
4820: 2f 62 3e 3c 69 3e 64 62 5f 70 61 74 68 6e 61 6d /b><i>db_pathnam
4830: 65 3c 2f 69 3e 3c 62 3e 20 2d 76 20 3c 2f 62 3e e</i><b> -v </b>
4840: 3c 69 3e 34 3c 2f 69 3e 3c 62 72 3e 3c 62 72 3e <i>4</i><br><br>
4850: 0d 0a 45 78 65 63 75 74 69 6e 67 20 74 68 69 73 ..Executing this
4860: 20 63 6f 6d 6d 61 6e 64 20 77 69 6c 6c 20 70 65 command will pe
4870: 72 66 6f 72 6d 20 74 68 65 20 66 6f 6c 6c 6f 77 rform the follow
4880: 69 6e 67 20 61 63 74 69 6f 6e 73 3a 3c 75 6c 3e ing actions:<ul>
4890: 0d 0a 3c 6c 69 3e 74 68 65 20 65 78 61 63 74 20 ..<li>the exact
48a0: 74 79 70 65 20 6f 66 20 4d 65 74 61 64 61 74 61 type of Metadata
48b0: 20 74 61 62 6c 65 73 20 77 69 6c 6c 20 62 65 20 tables will be
48c0: 69 64 65 6e 74 69 66 69 65 64 2e 3c 2f 6c 69 3e identified.</li>
48d0: 0d 0a 3c 6c 69 3e 69 66 20 76 61 6c 69 64 20 3c ..<li>if valid <
48e0: 69 3e 6c 65 67 61 63 79 20 4d 65 74 61 64 61 74 i>legacy Metadat
48f0: 61 20 74 61 62 6c 65 73 3c 2f 69 3e 20 77 69 6c a tables</i> wil
4900: 6c 20 62 65 20 64 65 74 65 63 74 65 64 2c 20 74 l be detected, t
4910: 68 65 6e 20 74 68 65 79 27 6c 6c 20 62 65 20 64 hen they'll be d
4920: 72 6f 70 70 65 64 20 61 6e 64 20 72 65 70 6c 61 ropped and repla
4930: 63 65 64 20 62 79 20 74 68 65 20 63 6f 72 72 65 ced by the corre
4940: 73 70 6f 6e 64 69 6e 67 20 74 61 62 6c 65 73 20 sponding tables
4950: 72 65 71 75 69 72 65 64 20 62 79 20 76 65 72 73 required by vers
4960: 69 6f 6e 20 34 2e 30 2e 30 3c 2f 6c 69 3e 0d 0a ion 4.0.0</li>..
4970: 3c 6c 69 3e 3c 75 3e 50 6c 65 61 73 65 20 6e 6f <li><u>Please no
4980: 74 65 3c 2f 75 3e 3a 20 74 68 69 73 20 69 73 6e te</u>: this isn
4990: 27 74 20 61 20 44 42 20 63 6f 70 79 2c 20 62 75 't a DB copy, bu
49a0: 74 20 69 73 20 61 6e 20 3c 69 3e 69 6e 2d 6c 69 t is an <i>in-li
49b0: 65 75 3c 2f 69 3e 20 63 6f 6e 76 65 72 73 69 6f eu</i> conversio
49c0: 6e 2e 3c 62 72 3e 0d 0a 54 68 69 73 20 70 72 61 n.<br>..This pra
49d0: 63 74 69 63 61 6c 6c 79 20 6d 65 61 6e 73 20 74 ctically means t
49e0: 68 61 74 20 65 76 65 6e 20 69 6e 20 74 68 65 20 hat even in the
49f0: 63 61 73 65 20 6f 66 20 73 6f 6d 65 20 68 75 67 case of some hug
4a00: 65 20 73 69 7a 65 64 20 44 42 2c 20 61 20 76 65 e sized DB, a ve
4a10: 72 79 20 73 68 6f 72 74 20 74 69 6d 65 20 77 69 ry short time wi
4a20: 6c 6c 20 62 65 20 72 65 71 75 69 72 65 64 2c 20 ll be required,
4a30: 62 65 63 61 75 73 65 20 6f 6e 6c 79 20 74 68 65 because only the
4a40: 20 4d 65 74 61 64 61 74 61 20 74 61 62 6c 65 73 Metadata tables
4a50: 20 77 69 6c 6c 20 62 65 20 61 66 66 65 63 74 65 will be affecte
4a60: 64 20 62 79 20 74 68 65 20 63 6f 6e 76 65 72 73 d by the convers
4a70: 69 6f 6e 2e 3c 62 72 3e 0d 0a 54 68 65 20 77 68 ion.<br>..The wh
4a80: 6f 6c 65 20 63 6f 6e 76 65 72 73 69 6f 6e 20 77 ole conversion w
4a90: 69 6c 6c 20 62 65 20 61 62 73 6f 6c 75 74 65 6c ill be absolutel
4aa0: 79 20 73 61 66 65 2c 20 62 65 63 61 75 73 65 20 y safe, because
4ab0: 77 69 6c 6c 20 62 65 20 63 6f 6e 66 69 6e 65 64 will be confined
4ac0: 20 77 69 74 68 69 6e 20 61 20 73 69 6e 67 6c 65 within a single
4ad0: 20 3c 69 3e 54 72 61 6e 73 61 63 74 69 6f 6e 3c <i>Transaction<
4ae0: 2f 69 3e 3a 20 69 6e 20 74 68 65 20 77 6f 72 73 /i>: in the wors
4af0: 74 20 63 61 73 65 20 28 73 6f 6d 65 20 65 78 63 t case (some exc
4b00: 65 70 74 69 6f 6e 61 6c 20 61 6e 64 20 75 6e 65 eptional and une
4b10: 78 70 65 63 74 65 64 20 65 72 72 6f 72 29 20 79 xpected error) y
4b20: 6f 75 20 73 74 69 6c 6c 20 67 65 74 20 62 61 63 ou still get bac
4b30: 6b 20 74 68 65 20 6f 72 69 67 69 6e 61 6c 20 44 k the original D
4b40: 42 20 61 62 73 6f 6c 75 74 65 6c 79 20 75 6e 61 B absolutely una
4b50: 66 66 65 63 74 65 64 20 62 79 20 61 6e 79 20 63 ffected by any c
4b60: 68 61 6e 67 65 20 61 74 20 61 6c 6c 2e 3c 2f 6c hange at all.</l
4b70: 69 3e 0d 0a 3c 2f 75 6c 3e 3c 62 72 3e 0d 0a 3c i>..</ul><br>..<
4b80: 62 3e 73 70 61 74 69 61 6c 69 74 65 5f 63 6f 6e b>spatialite_con
4b90: 76 65 72 74 20 2d 64 20 3c 2f 62 3e 3c 69 3e 64 vert -d </b><i>d
4ba0: 62 5f 70 61 74 68 6e 61 6d 65 3c 2f 69 3e 3c 62 b_pathname</i><b
4bb0: 3e 20 2d 76 20 3c 2f 62 3e 3c 69 3e 33 3c 2f 69 > -v </b><i>3</i
4bc0: 3e 3c 62 72 3e 0d 0a 3c 62 3e 73 70 61 74 69 61 ><br>..<b>spatia
4bd0: 6c 69 74 65 5f 63 6f 6e 76 65 72 74 20 2d 64 20 lite_convert -d
4be0: 3c 2f 62 3e 3c 69 3e 64 62 5f 70 61 74 68 6e 61 </b><i>db_pathna
4bf0: 6d 65 3c 2f 69 3e 3c 62 3e 20 2d 76 20 3c 2f 62 me</i><b> -v </b
4c00: 3e 3c 69 3e 32 3c 2f 69 3e 3c 62 72 3e 3c 62 72 ><i>2</i><br><br
4c10: 3e 0d 0a 43 6f 6e 76 65 72 73 69 6f 6e 20 77 69 >..Conversion wi
4c20: 6c 6c 20 77 6f 72 6b 20 74 68 65 20 6f 70 70 6f ll work the oppo
4c30: 73 69 74 65 20 77 61 79 20 61 73 20 77 65 6c 6c site way as well
4c40: 3a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 69 66 20 76 61 :<ul>..<li>if va
4c50: 6c 69 64 20 3c 69 3e 34 2e 30 2e 30 20 4d 65 74 lid <i>4.0.0 Met
4c60: 61 64 61 74 61 20 74 61 62 6c 65 73 3c 2f 69 3e adata tables</i>
4c70: 20 77 69 6c 6c 20 62 65 20 64 65 74 65 63 74 65 will be detecte
4c80: 64 2c 20 74 68 65 6e 20 74 68 65 79 27 6c 6c 20 d, then they'll
4c90: 62 65 20 64 72 6f 70 70 65 64 20 61 6e 64 20 72 be dropped and r
4ca0: 65 70 6c 61 63 65 64 20 62 79 20 74 68 65 20 63 eplaced by the c
4cb0: 6f 72 72 65 73 70 6f 6e 64 69 6e 67 20 74 61 62 orresponding tab
4cc0: 6c 65 73 20 72 65 71 75 69 72 65 64 20 62 79 20 les required by
4cd0: 73 6f 6d 65 20 70 72 65 76 69 6f 75 73 20 76 65 some previous ve
4ce0: 72 73 69 6f 6e 2e 3c 62 72 3e 0d 0a 42 6f 74 68 rsion.<br>..Both
4cf0: 20 76 65 72 73 69 6f 6e 20 33 2e 78 2e 78 20 28 version 3.x.x (
4d00: 3c 62 3e 2d 76 20 33 3c 2f 62 3e 29 20 61 6e 64 <b>-v 3</b>) and
4d10: 20 76 65 72 73 69 6f 6e 20 32 2e 33 2e 31 20 28 version 2.3.1 (
4d20: 3c 62 3e 2d 76 20 32 3c 2f 62 3e 29 20 61 72 65 <b>-v 2</b>) are
4d30: 20 73 75 70 70 6f 72 74 65 64 2e 20 3c 2f 6c 69 supported. </li
4d40: 3e 0d 0a 3c 6c 69 3e 54 68 69 73 20 61 6c 6c 6f >..<li>This allo
4d50: 77 73 20 79 6f 75 20 74 6f 20 72 65 63 6f 76 65 ws you to recove
4d60: 72 20 61 20 44 42 20 70 65 72 66 65 63 74 6c 79 r a DB perfectly
4d70: 20 75 73 61 62 6c 65 20 62 79 20 61 6e 79 20 6f usable by any o
4d80: 74 68 65 72 20 65 61 72 6c 69 65 72 20 76 65 72 ther earlier ver
4d90: 73 69 6f 6e 2c 20 65 76 65 6e 20 77 68 65 6e 20 sion, even when
4da0: 74 68 65 20 6f 72 69 67 69 6e 61 6c 20 44 42 20 the original DB
4db0: 77 61 73 20 61 63 74 75 61 6c 6c 79 20 63 72 65 was actually cre
4dc0: 61 74 65 64 20 75 73 69 6e 67 20 76 65 72 73 69 ated using versi
4dd0: 6f 6e 20 34 2e 30 2e 30 3c 2f 6c 69 3e 0d 0a 3c on 4.0.0</li>..<
4de0: 6c 69 3e 52 61 74 68 65 72 20 6f 62 76 69 6f 75 li>Rather obviou
4df0: 73 6c 79 20 79 6f 75 20 63 61 6e 20 75 73 65 20 sly you can use
4e00: 3c 62 3e 73 70 61 74 69 61 6c 69 74 65 5f 63 6f <b>spatialite_co
4e10: 6e 76 65 72 74 3c 2f 62 3e 20 69 6e 20 6f 72 64 nvert</b> in ord
4e20: 65 72 20 74 6f 20 63 6f 6e 76 65 72 74 20 61 6e er to convert an
4e30: 79 20 44 42 20 62 65 74 77 65 65 6e 20 76 65 72 y DB between ver
4e40: 73 69 6f 6e 20 32 2e 33 2e 31 20 61 6e 64 20 33 sion 2.3.1 and 3
4e50: 2e 78 2e 78 20 61 73 20 77 65 6c 6c 20 28 62 6f .x.x as well (bo
4e60: 74 68 20 64 69 72 65 63 74 69 6f 6e 73 29 2e 3c th directions).<
4e70: 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 75 3e 4b 6e 6f /li>..<li><u>Kno
4e80: 77 6e 20 6c 69 6d 69 74 73 3c 2f 75 3e 3a 20 61 wn limits</u>: a
4e90: 20 44 42 20 63 61 6e 20 62 65 20 63 6f 6e 76 65 DB can be conve
4ea0: 72 74 65 64 20 74 6f 20 76 65 72 73 69 6f 6e 20 rted to version
4eb0: 32 2e 33 2e 31 20 6f 6e 6c 79 20 69 66 20 69 74 2.3.1 only if it
4ec0: 20 75 6e 69 71 75 65 6c 79 20 63 6f 6e 74 61 69 uniquely contai
4ed0: 6e 73 20 32 44 20 58 59 20 47 65 6f 6d 65 74 72 ns 2D XY Geometr
4ee0: 69 65 73 2c 20 62 65 63 61 75 73 65 20 76 65 72 ies, because ver
4ef0: 73 69 6f 6e 20 32 2e 33 2e 31 20 77 61 73 20 63 sion 2.3.1 was c
4f00: 6f 6d 70 6c 65 74 65 6c 79 20 75 6e 61 62 6c 65 ompletely unable
4f10: 20 74 6f 20 68 61 6e 64 6c 65 20 33 44 20 47 65 to handle 3D Ge
4f20: 6f 6d 65 74 72 69 65 73 2e 3c 2f 6c 69 3e 0d 0a ometries.</li>..
4f30: 3c 2f 75 6c 3e 3c 62 72 3e 0d 0a 3c 68 72 3e 0d </ul><br>..<hr>.
4f40: 0a 3c 68 33 3e 43 68 61 6e 67 65 73 20 61 66 66 .<h3>Changes aff
4f50: 65 63 74 69 6e 67 20 47 55 49 20 61 6e 64 20 43 ecting GUI and C
4f60: 4c 49 20 74 6f 6f 6c 73 3c 2f 68 33 3e 0d 0a 59 LI tools</h3>..Y
4f70: 6f 75 20 63 61 6e 20 6c 65 61 72 6e 20 6d 6f 72 ou can learn mor
4f80: 65 20 61 62 6f 75 74 20 74 68 69 73 20 74 6f 70 e about this top
4f90: 69 63 20 62 79 20 72 65 61 64 69 6e 67 20 74 68 ic by reading th
4fa0: 69 73 20 3c 61 20 68 72 65 66 3d 22 68 74 74 70 is <a href="http
4fb0: 73 3a 2f 2f 77 77 77 2e 67 61 69 61 2d 67 69 73 s://www.gaia-gis
4fc0: 2e 69 74 2f 66 6f 73 73 69 6c 2f 6c 69 62 73 70 .it/fossil/libsp
4fd0: 61 74 69 61 6c 69 74 65 2f 77 69 6b 69 3f 6e 61 atialite/wiki?na
4fe0: 6d 65 3d 74 6f 6f 6c 73 2d 34 2e 30 22 3e 57 69 me=tools-4.0">Wi
4ff0: 6b 69 20 70 61 67 65 3c 2f 61 3e 3c 62 72 3e 3c ki page</a><br><
5000: 62 72 3e 0d 0a 3c 68 72 3e 0d 0a 3c 68 33 3e 4e br>..<hr>..<h3>N
5010: 65 77 20 53 70 61 74 69 61 6c 20 53 51 4c 20 66 ew Spatial SQL f
5020: 75 6e 63 74 69 6f 6e 73 20 73 75 70 70 6f 72 74 unctions support
5030: 69 6e 67 20 3c 61 20 6e 61 6d 65 3d 22 74 65 73 ing <a name="tes
5040: 73 65 6c 6c 61 74 69 6f 6e 73 22 3e 74 65 73 73 sellations">tess
5050: 65 6c 6c 61 74 69 6f 6e 73 3c 2f 61 3e 3c 2f 68 ellations</a></h
5060: 33 3e 0d 0a 59 6f 75 20 63 61 6e 20 6c 65 61 72 3>..You can lear
5070: 6e 20 6d 6f 72 65 20 61 62 6f 75 74 20 74 68 69 n more about thi
5080: 73 20 74 6f 70 69 63 20 62 79 20 72 65 61 64 69 s topic by readi
5090: 6e 67 20 74 68 69 73 20 3c 61 20 68 72 65 66 3d ng this <a href=
50a0: 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 67 61 69 "https://www.gai
50b0: 61 2d 67 69 73 2e 69 74 2f 66 6f 73 73 69 6c 2f a-gis.it/fossil/
50c0: 6c 69 62 73 70 61 74 69 61 6c 69 74 65 2f 77 69 libspatialite/wi
50d0: 6b 69 3f 6e 61 6d 65 3d 74 65 73 73 65 6c 61 74 ki?name=tesselat
50e0: 69 6f 6e 73 2d 34 2e 30 22 3e 57 69 6b 69 20 70 ions-4.0">Wiki p
50f0: 61 67 65 3c 2f 61 3e 3c 62 72 3e 3c 62 72 3e 0d age</a><br><br>.
5100: 0a 3c 68 72 3e 0d 0a 3c 68 33 3e 4e 65 77 20 53 .<hr>..<h3>New S
5110: 70 61 74 69 61 6c 20 53 51 4c 20 66 75 6e 63 74 patial SQL funct
5120: 69 6f 6e 73 20 62 61 73 65 64 20 6f 6e 20 3c 61 ions based on <a
5130: 20 6e 61 6d 65 3d 22 6c 69 62 6c 77 67 65 6f 6d name="liblwgeom
5140: 22 3e 6c 69 62 6c 77 67 65 6f 6d 3c 2f 61 3e 3c ">liblwgeom</a><
5150: 2f 68 33 3e 0d 0a 3c 62 3e 3c 69 3e 6c 69 62 6c /h3>..<b><i>libl
5160: 77 67 65 6f 6d 3c 2f 69 3e 3c 2f 62 3e 20 69 73 wgeom</i></b> is
5170: 20 61 6e 20 6f 70 65 6e 20 73 6f 75 72 63 65 20 an open source
5180: 6c 69 62 72 61 72 79 20 64 65 76 65 6c 6f 70 65 library develope
5190: 64 20 69 6e 20 43 20 6c 61 6e 67 75 61 67 65 2c d in C language,
51a0: 20 61 6e 64 20 72 65 6c 65 61 73 65 64 20 75 6e and released un
51b0: 64 65 72 20 74 68 65 20 47 50 4c 76 32 20 6c 69 der the GPLv2 li
51c0: 63 65 6e 73 65 20 74 65 72 6d 73 2e 0d 0a 54 68 cense terms...Th
51d0: 69 73 20 6c 69 62 72 61 72 79 20 77 61 73 20 69 is library was i
51e0: 6e 69 74 69 61 6c 6c 79 20 69 6e 74 65 6e 64 65 nitially intende
51f0: 64 20 73 69 6d 70 6c 79 20 61 73 20 74 68 65 20 d simply as the
5200: 67 65 6e 65 72 69 63 20 67 65 6f 6d 65 74 72 79 generic geometry
5210: 20 68 61 6e 64 6c 69 6e 67 20 73 65 63 74 69 6f handling sectio
5220: 6e 20 6f 66 20 50 6f 73 74 47 49 53 2e 3c 62 72 n of PostGIS.<br
5230: 3e 0d 0a 41 6e 79 77 61 79 2c 20 73 74 61 72 74 >..Anyway, start
5240: 69 6e 67 20 73 69 6e 63 65 20 50 6f 73 74 47 49 ing since PostGI
5250: 53 20 32 2e 30 2c 20 3c 69 3e 6c 69 62 6c 77 67 S 2.0, <i>liblwg
5260: 65 6f 6d 3c 2f 69 3e 20 69 73 20 6e 6f 77 20 69 eom</i> is now i
5270: 6e 73 74 61 6c 6c 65 64 20 61 73 20 61 20 73 65 nstalled as a se
5280: 6c 66 2d 73 74 61 6e 64 69 6e 67 20 6c 69 62 72 lf-standing libr
5290: 61 72 79 2e 0d 0a 49 6e 20 6f 74 68 65 72 20 77 ary...In other w
52a0: 6f 72 64 73 3a 20 50 6f 73 74 47 49 53 20 64 65 ords: PostGIS de
52b0: 70 65 6e 64 73 20 6f 6e 20 3c 69 3e 6c 69 62 6c pends on <i>libl
52c0: 77 67 65 6f 6d 3c 2f 69 3e 2c 20 62 75 74 20 3c wgeom</i>, but <
52d0: 69 3e 6c 69 62 6c 77 67 65 6f 6d 3c 2f 69 3e 20 i>liblwgeom</i>
52e0: 64 6f 65 73 6e 27 74 20 64 65 70 65 6e 64 73 20 doesn't depends
52f0: 61 74 20 61 6c 6c 20 6f 6e 20 50 6f 73 74 47 49 at all on PostGI
5300: 53 2e 3c 62 72 3e 0d 0a 53 6f 20 61 6e 79 20 6f S.<br>..So any o
5310: 74 68 65 72 20 6f 70 65 6e 20 73 6f 75 72 63 65 ther open source
5320: 20 73 6f 66 74 77 61 72 65 20 63 61 6e 20 6e 6f software can no
5330: 77 20 66 72 65 65 6c 79 20 72 65 2d 75 73 65 20 w freely re-use
5340: 6d 61 6e 79 20 69 6e 74 65 72 65 73 74 69 6e 67 many interesting
5350: 20 6d 65 74 68 6f 64 73 20 69 6d 70 6c 65 6d 65 methods impleme
5360: 6e 74 65 64 20 69 6e 20 3c 69 3e 6c 69 62 6c 77 nted in <i>liblw
5370: 67 65 6f 6d 3c 2f 69 3e 2e 3c 62 72 3e 3c 62 72 geom</i>.<br><br
5380: 3e 0d 0a 59 6f 75 20 63 61 6e 20 6c 65 61 72 6e >..You can learn
5390: 20 6d 6f 72 65 20 61 62 6f 75 74 20 74 68 69 73 more about this
53a0: 20 74 6f 70 69 63 20 62 79 20 72 65 61 64 69 6e topic by readin
53b0: 67 20 74 68 69 73 20 3c 61 20 68 72 65 66 3d 22 g this <a href="
53c0: 68 74 74 70 73 3a 2f 2f 77 77 77 2e 67 61 69 61 https://www.gaia
53d0: 2d 67 69 73 2e 69 74 2f 66 6f 73 73 69 6c 2f 6c -gis.it/fossil/l
53e0: 69 62 73 70 61 74 69 61 6c 69 74 65 2f 77 69 6b ibspatialite/wik
53f0: 69 3f 6e 61 6d 65 3d 6c 69 62 6c 77 67 65 6f 6d i?name=liblwgeom
5400: 2d 34 2e 30 22 3e 57 69 6b 69 20 70 61 67 65 3c -4.0">Wiki page<
5410: 2f 61 3e 3c 62 72 3e 3c 62 72 3e 0d 0a 3c 68 72 /a><br><br>..<hr
5420: 3e 0d 0a 3c 68 33 3e 43 6f 6e 6e 65 63 74 69 6e >..<h3>Connectin
5430: 67 20 53 70 61 74 69 61 4c 69 74 65 20 74 6f 20 g SpatiaLite to
5440: 74 68 65 20 6d 6f 73 74 20 65 78 6f 74 65 72 69 the most exoteri
5450: 63 20 64 61 74 61 73 6f 75 72 63 65 73 20 75 73 c datasources us
5460: 69 6e 67 20 3c 61 20 6e 61 6d 65 3d 22 76 69 72 ing <a name="vir
5470: 74 75 61 6c 6f 67 72 22 3e 56 69 72 74 75 61 6c tualogr">Virtual
5480: 4f 47 52 3c 2f 61 3e 3c 2f 68 33 3e 0d 0a 59 6f OGR</a></h3>..Yo
5490: 75 20 63 61 6e 20 6c 65 61 72 6e 20 6d 6f 72 65 u can learn more
54a0: 20 61 62 6f 75 74 20 74 68 69 73 20 74 6f 70 69 about this topi
54b0: 63 20 62 79 20 72 65 61 64 69 6e 67 20 74 68 69 c by reading thi
54c0: 73 20 3c 61 20 68 72 65 66 3d 22 68 74 74 70 73 s <a href="https
54d0: 3a 2f 2f 77 77 77 2e 67 61 69 61 2d 67 69 73 2e ://www.gaia-gis.
54e0: 69 74 2f 66 6f 73 73 69 6c 2f 6c 69 62 73 70 61 it/fossil/libspa
54f0: 74 69 61 6c 69 74 65 2f 77 69 6b 69 3f 6e 61 6d tialite/wiki?nam
5500: 65 3d 56 69 72 74 75 61 6c 4f 47 52 22 3e 57 69 e=VirtualOGR">Wi
5510: 6b 69 20 70 61 67 65 3c 2f 61 3e 3c 62 72 3e 3c ki page</a><br><
5520: 62 72 3e 0d 0a 3c 68 72 3e 0d 0a 3c 68 33 3e 43 br>..<hr>..<h3>C
5530: 6f 6d 70 61 72 61 74 69 76 65 20 42 65 6e 63 68 omparative Bench
5540: 6d 61 72 6b 3a 20 74 68 65 20 3c 61 20 6e 61 6d mark: the <a nam
5550: 65 3d 22 62 65 6e 63 68 6d 61 6b 2d 34 2e 30 22 e="benchmak-4.0"
5560: 3e 43 6c 69 70 70 69 6e 67 20 43 6f 6e 74 65 73 >Clipping Contes
5570: 74 3c 2f 61 3e 3c 2f 68 33 3e 0d 0a 59 6f 75 20 t</a></h3>..You
5580: 63 61 6e 20 6c 65 61 72 6e 20 6d 6f 72 65 20 61 can learn more a
5590: 62 6f 75 74 20 74 68 69 73 20 74 6f 70 69 63 20 bout this topic
55a0: 62 79 20 72 65 61 64 69 6e 67 20 74 68 69 73 20 by reading this
55b0: 3c 61 20 68 72 65 66 3d 22 68 74 74 70 73 3a 2f <a href="https:/
55c0: 2f 77 77 77 2e 67 61 69 61 2d 67 69 73 2e 69 74 /www.gaia-gis.it
55d0: 2f 66 6f 73 73 69 6c 2f 6c 69 62 73 70 61 74 69 /fossil/libspati
55e0: 61 6c 69 74 65 2f 77 69 6b 69 3f 6e 61 6d 65 3d alite/wiki?name=
55f0: 62 65 6e 63 68 6d 61 72 6b 2d 34 2e 30 22 3e 57 benchmark-4.0">W
5600: 69 6b 69 20 70 61 67 65 3c 2f 61 3e 3c 62 72 3e iki page</a><br>
5610: 3c 62 72 3e 3c 68 72 3e 3c 62 72 3e 0d 0a 42 61 <br><hr><br>..Ba
5620: 63 6b 20 74 6f 20 3c 61 20 68 72 65 66 3d 22 68 ck to <a href="h
5630: 74 74 70 73 3a 2f 2f 77 77 77 2e 67 61 69 61 2d ttps://www.gaia-
5640: 67 69 73 2e 69 74 2f 66 6f 73 73 69 6c 2f 6c 69 gis.it/fossil/li
5650: 62 73 70 61 74 69 61 6c 69 74 65 2f 77 69 6b 69 bspatialite/wiki
5660: 3f 6e 61 6d 65 3d 34 2e 32 2e 30 2d 64 6f 63 22 ?name=4.2.0-doc"
5670: 3e 6d 61 69 6e 20 53 70 61 74 69 61 4c 69 74 65 >main SpatiaLite
5680: 20 57 69 6b 69 20 70 61 67 65 3c 2f 61 3e 0a 5a Wiki page</a>.Z
5690: 20 37 30 31 38 31 61 35 66 63 30 32 65 31 36 65 70181a5fc02e16e
56a0: 33 38 35 30 31 62 61 39 39 35 34 64 37 61 61 36 38501ba9954d7aa6
56b0: 32 0a 2.