Wiki page
[benchmark-4.0] by
sandro
2012-11-10 12:23:37.
0000: 44 20 32 30 31 32 2d 31 31 2d 31 30 54 31 32 3a D 2012-11-10T12:
0010: 32 33 3a 33 37 2e 35 36 34 0a 4c 20 62 65 6e 63 23:37.564.L benc
0020: 68 6d 61 72 6b 2d 34 2e 30 0a 50 20 64 66 37 33 hmark-4.0.P df73
0030: 38 66 61 65 37 35 36 65 30 39 66 36 63 63 34 62 8fae756e09f6cc4b
0040: 34 62 61 39 64 61 36 66 61 37 37 33 33 39 30 62 4ba9da6fa773390b
0050: 63 31 31 61 0a 55 20 73 61 6e 64 72 6f 0a 57 20 c11a.U sandro.W
0060: 31 33 33 33 31 0a 3c 68 32 3e 42 65 6e 63 68 6d 13331.<h2>Benchm
0070: 61 72 63 6b 20 28 61 6b 61 20 22 63 6f 6d 70 61 arck (aka "compa
0080: 72 69 6e 67 20 61 70 70 6c 65 73 20 61 6e 64 20 ring apples and
0090: 6f 72 61 6e 67 65 73 22 29 3c 2f 68 32 3e 0d 0a oranges")</h2>..
00a0: 42 61 63 6b 20 74 6f 20 3c 61 20 68 72 65 66 3d Back to <a href=
00b0: 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 67 61 69 "https://www.gai
00c0: 61 2d 67 69 73 2e 69 74 2f 66 6f 73 73 69 6c 2f a-gis.it/fossil/
00d0: 6c 69 62 73 70 61 74 69 61 6c 69 74 65 2f 77 69 libspatialite/wi
00e0: 6b 69 3f 6e 61 6d 65 3d 73 77 69 74 63 68 69 6e ki?name=switchin
00f0: 67 2d 74 6f 2d 34 2e 30 23 76 69 72 74 75 61 6c g-to-4.0#virtual
0100: 6f 67 72 22 3e 6d 61 69 6e 20 70 61 67 65 3c 2f ogr">main page</
0110: 61 3e 0d 0a 3c 68 32 3e 49 6e 74 72 6f 64 75 63 a>..<h2>Introduc
0120: 74 69 6f 6e 3c 2f 68 32 3e 0d 0a 54 6f 64 61 79 tion</h2>..Today
0130: 20 49 27 76 65 20 63 61 73 75 61 6c 6c 79 20 72 I've casually r
0140: 65 61 64 20 74 68 69 73 20 3c 61 20 68 72 65 66 ead this <a href
0150: 3d 22 68 74 74 70 3a 2f 2f 67 66 6f 73 73 2e 62 ="http://gfoss.b
0160: 6c 6f 67 73 70 6f 74 2e 69 74 2f 32 30 31 32 2f logspot.it/2012/
0170: 31 31 2f 61 72 63 67 69 73 2d 76 73 2d 71 67 69 11/arcgis-vs-qgi
0180: 73 2d 65 74 63 2d 63 6c 69 70 70 69 6e 67 2d 63 s-etc-clipping-c
0190: 6f 6e 74 65 73 74 2e 68 74 6d 6c 22 3e 62 6c 6f ontest.html">blo
01a0: 67 20 70 61 67 65 3c 2f 61 3e 3b 20 6d 61 6e 79 g page</a>; many
01b0: 20 74 68 61 6e 6b 73 20 74 6f 20 6d 79 20 64 65 thanks to my de
01c0: 61 72 20 66 72 69 65 6e 64 20 4d 61 72 6b 75 73 ar friend Markus
01d0: 20 4e 65 74 65 6c 65 72 20 28 74 68 65 20 6d 61 Neteler (the ma
01e0: 69 6e 74 61 69 6e 65 72 20 6f 66 20 47 52 41 53 intainer of GRAS
01f0: 53 20 47 49 53 29 20 66 6f 72 20 70 6f 69 6e 74 S GIS) for point
0200: 69 6e 67 20 6d 79 20 61 74 74 65 6e 74 69 6f 6e ing my attention
0210: 20 6f 6e 20 74 68 69 73 20 74 6f 70 69 63 2e 3c on this topic.<
0220: 62 72 3e 0d 0a 54 68 65 20 6f 72 69 67 69 6e 61 br>..The origina
0230: 6c 20 3c 62 3e 43 6c 69 70 70 69 6e 67 20 43 6f l <b>Clipping Co
0240: 6e 74 65 73 74 3c 2f 62 3e 20 73 69 6d 70 6c 79 ntest</b> simply
0250: 20 63 6f 6d 70 61 72 65 64 20 73 65 76 65 72 61 compared severa
0260: 6c 20 70 6f 70 75 6c 61 72 20 44 65 73 6b 79 6f l popular Deskyo
0270: 70 20 47 49 53 20 28 41 72 63 47 69 73 2c 20 51 p GIS (ArcGis, Q
0280: 47 49 53 2c 20 67 76 53 49 47 2c 20 47 52 41 53 GIS, gvSIG, GRAS
0290: 53 20 61 6e 64 20 6f 74 68 65 72 73 29 2c 20 62 S and others), b
02a0: 75 74 20 74 68 65 72 65 20 77 61 73 20 61 6e 20 ut there was an
02b0: 6f 62 76 69 6f 75 73 20 6f 6d 69 73 73 69 6f 6e obvious omission
02c0: 2e 3c 62 72 3e 0d 0a 4e 6f 20 53 70 61 74 69 61 .<br>..No Spatia
02d0: 6c 20 44 42 4d 53 20 77 61 73 20 63 6f 6e 73 69 l DBMS was consi
02e0: 64 65 72 65 64 20 61 74 20 61 6c 6c 2e 20 28 3c dered at all. (<
02f0: 69 3e 74 6f 6f 20 62 61 64 3b 20 61 20 72 65 61 i>too bad; a rea
0300: 6c 6c 79 20 65 6d 62 61 72 72 61 73 73 69 6e 67 lly embarrassing
0310: 20 6f 6d 69 73 73 69 6f 6e 3c 2f 69 3e 29 3c 62 omission</i>)<b
0320: 72 3e 3c 62 72 3e 0d 0a 41 66 74 65 72 20 61 6c r><br>..After al
0330: 6c 20 61 20 3c 62 3e 43 6c 69 70 70 69 6e 67 20 l a <b>Clipping
0340: 43 6f 6e 74 65 73 74 3c 2f 62 3e 20 73 6f 75 6e Contest</b> soun
0350: 64 73 20 6d 6f 72 65 20 6c 69 6b 65 20 61 20 70 ds more like a p
0360: 75 72 65 20 64 61 74 61 2d 70 72 6f 63 65 73 73 ure data-process
0370: 69 6e 67 20 70 72 6f 62 6c 65 6d 20 74 68 61 6e ing problem than
0380: 20 6c 69 6b 65 20 61 20 74 79 70 69 63 61 6c 20 like a typical
0390: 47 49 53 2f 47 55 49 20 70 72 6f 62 6c 65 6d 2c GIS/GUI problem,
03a0: 20 73 6f 20 69 74 27 73 20 70 72 6f 62 61 62 6c so it's probabl
03b0: 79 20 75 73 65 66 75 6c 20 69 6e 74 72 6f 64 75 y useful introdu
03c0: 63 69 6e 67 20 73 6f 6d 65 20 53 70 61 74 69 61 cing some Spatia
03d0: 6c 20 44 42 4d 53 20 69 6e 74 6f 20 74 68 69 73 l DBMS into this
03e0: 20 43 6f 6e 74 65 73 74 2e 0d 0a 54 68 69 73 20 Contest...This
03f0: 77 61 73 20 6d 79 20 66 69 72 73 74 20 74 68 6f was my first tho
0400: 75 67 68 74 20 77 68 69 6c 65 20 72 65 61 64 69 ught while readi
0410: 6e 67 20 74 68 65 20 62 65 6e 63 68 6d 61 72 6b ng the benchmark
0420: 20 72 65 70 6f 72 74 2c 20 73 6f 20 49 20 64 75 report, so I du
0430: 6c 79 20 73 74 61 72 74 65 64 20 70 72 65 70 61 ly started prepa
0440: 72 69 6e 67 20 6d 79 20 6f 77 6e 20 74 65 73 74 ring my own test
0450: 62 65 64 20 62 61 73 65 64 20 6f 6e 20 53 70 61 bed based on Spa
0460: 74 69 61 4c 69 74 65 20 28 3c 69 3e 42 54 57 20 tiaLite (<i>BTW
0470: 49 27 6d 20 67 6f 69 6e 67 20 74 6f 20 72 65 6c I'm going to rel
0480: 65 61 73 65 20 74 68 65 20 6e 65 77 20 76 65 72 ease the new ver
0490: 73 69 6f 6e 20 34 2e 30 2e 30 20 69 6e 20 74 68 sion 4.0.0 in th
04a0: 65 20 76 65 72 79 20 6e 65 78 74 20 64 61 79 73 e very next days
04b0: 2c 20 73 6f 20 61 66 74 65 72 20 61 6c 6c 20 70 , so after all p
04c0: 65 72 66 6f 72 6d 69 6e 67 20 73 6f 6d 65 20 66 erforming some f
04d0: 75 72 74 68 65 72 20 74 65 73 74 20 69 73 20 73 urther test is s
04e0: 75 72 65 6c 79 20 77 65 6c 63 6f 6d 65 3c 2f 69 urely welcome</i
04f0: 3e 29 2e 0d 0a 3c 68 32 3e 54 65 73 74 20 63 6f >)...<h2>Test co
0500: 6e 66 69 67 75 72 61 74 69 6f 6e 3c 2f 68 32 3e nfiguration</h2>
0510: 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 49 6e 74 65 ..<ul>..<li>Inte
0520: 6c 20 43 6f 72 65 20 69 35 20 33 2e 34 36 20 47 l Core i5 3.46 G
0530: 48 7a 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 34 20 47 Hz</li>..<li>4 G
0540: 42 20 52 41 4d 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e B RAM</li>..<li>
0550: 57 69 6e 64 6f 77 73 20 37 20 36 34 20 62 69 74 Windows 7 64 bit
0560: 20 28 70 68 79 73 69 63 61 6c 29 3c 2f 6c 69 3e (physical)</li>
0570: 0d 0a 3c 6c 69 3e 44 65 62 69 61 6e 20 53 71 75 ..<li>Debian Squ
0580: 65 65 7a 65 20 33 32 20 62 69 74 20 28 76 69 72 eeze 32 bit (vir
0590: 74 75 61 6c 20 6d 61 63 68 69 6e 65 29 3c 2f 6c tual machine)</l
05a0: 69 3e 0d 0a 3c 2f 75 6c 3e 3c 62 72 3e 0d 0a 49 i>..</ul><br>..I
05b0: 20 74 65 73 74 65 64 20 62 6f 74 68 20 57 69 6e tested both Win
05c0: 64 6f 77 73 20 61 6e 64 20 44 65 62 69 61 6e 20 dows and Debian
05d0: 6f 6e 20 74 68 65 20 73 61 6d 65 20 68 61 72 64 on the same hard
05e0: 77 61 72 65 2e 0d 0a 54 68 65 20 6d 65 61 73 75 ware...The measu
05f0: 72 65 64 20 74 69 6d 69 6e 67 73 20 61 72 65 20 red timings are
0600: 72 61 74 68 65 72 20 73 69 6d 69 6c 61 72 3b 20 rather similar;
0610: 61 6e 79 77 61 79 20 4c 69 6e 75 78 20 70 65 72 anyway Linux per
0620: 66 6f 72 6d 65 64 20 73 6c 69 67 68 74 6c 79 20 formed slightly
0630: 62 65 74 74 65 72 20 74 68 61 6e 20 74 68 65 20 better than the
0640: 6e 61 74 69 76 65 20 57 69 6e 64 6f 77 73 20 73 native Windows s
0650: 79 73 74 65 6d 20 28 6d 6f 72 65 20 6f 72 20 6c ystem (more or l
0660: 65 73 73 2c 20 62 79 20 61 20 31 30 25 20 2d 20 ess, by a 10% -
0670: 32 30 25 20 66 61 63 74 6f 72 29 2e 3c 62 72 3e 20% factor).<br>
0680: 0d 0a 54 68 69 73 20 69 73 20 6e 6f 74 20 61 74 ..This is not at
0690: 20 61 6c 6c 20 73 75 72 70 72 69 73 69 6e 67 20 all surprising
06a0: 66 6f 72 20 6d 65 2c 20 62 65 63 61 75 73 65 20 for me, because
06b0: 74 68 69 73 20 74 72 65 6e 64 20 73 65 65 6d 73 this trend seems
06c0: 20 74 6f 20 62 65 20 63 6f 6e 73 74 61 6e 74 6c to be constantl
06d0: 79 20 76 65 72 69 66 69 65 64 20 65 61 63 68 20 y verified each
06e0: 74 69 6d 65 20 49 20 6d 61 6e 61 67 65 20 73 6f time I manage so
06f0: 6d 65 20 63 6f 6d 70 61 72 61 74 69 76 65 20 62 me comparative b
0700: 65 6e 63 68 6d 61 72 6b 2e 0d 0a 56 65 72 79 20 enchmark...Very
0710: 6f 66 74 65 6e 20 4c 69 6e 75 78 20 69 73 20 61 often Linux is a
0720: 20 62 65 73 74 20 70 65 72 66 6f 72 6d 65 72 20 best performer
0730: 74 68 61 6e 20 57 69 6e 64 6f 77 73 2c 20 65 76 than Windows, ev
0740: 65 6e 20 77 68 65 6e 20 72 75 6e 6e 69 6e 67 20 en when running
0750: 61 73 20 61 20 56 69 72 74 75 61 6c 20 4d 61 63 as a Virtual Mac
0760: 68 69 6e 65 20 6f 6e 20 74 68 65 20 74 6f 70 20 hine on the top
0770: 6f 66 20 61 20 70 68 79 73 69 63 61 6c 20 57 69 of a physical Wi
0780: 6e 64 6f 77 73 20 73 79 73 74 65 6d 2e 0d 0a 51 ndows system...Q
0790: 75 69 74 65 20 70 61 72 61 64 6f 78 69 63 61 6c uite paradoxical
07a0: 2c 20 62 75 74 20 69 6e 64 69 73 70 75 74 61 62 , but indisputab
07b0: 6c 79 20 74 72 75 65 20 61 6e 64 20 6f 62 6a 65 ly true and obje
07c0: 63 74 69 76 65 6c 79 20 76 65 72 69 66 69 65 64 ctively verified
07d0: 20 6d 61 6e 79 20 74 69 6d 65 73 2e 0d 0a 3c 68 many times...<h
07e0: 32 3e 54 68 65 20 73 61 6d 70 6c 65 20 64 61 74 2>The sample dat
07f0: 61 73 65 74 3c 2f 68 32 3e 0d 0a 49 27 76 65 20 aset</h2>..I've
0800: 73 69 6d 70 6c 79 20 64 6f 77 6e 6c 6f 61 64 65 simply downloade
0810: 64 20 74 68 65 20 73 61 6d 65 20 69 64 65 6e 74 d the same ident
0820: 69 63 61 6c 20 3c 61 20 68 72 65 66 3d 22 68 74 ical <a href="ht
0830: 74 70 3a 2f 2f 77 77 77 2e 64 6f 6e 6d 65 6c 74 tp://www.donmelt
0840: 7a 2e 63 6f 6d 2f 5f 66 69 6c 65 73 2f 43 6f 6e z.com/_files/Con
0850: 74 6f 75 72 43 6c 69 70 54 65 73 74 2e 7a 69 70 tourClipTest.zip
0860: 22 3e 73 61 6d 70 6c 65 20 64 61 74 61 73 65 74 ">sample dataset
0870: 3c 2f 61 3e 20 61 6c 72 65 61 64 79 20 75 73 65 </a> already use
0880: 64 20 66 6f 72 20 61 6c 6c 20 6f 74 68 65 72 20 d for all other
0890: 74 65 73 74 73 20 72 65 70 6f 72 74 65 64 20 69 tests reported i
08a0: 6e 20 74 68 65 20 43 6c 69 70 70 69 6e 67 20 43 n the Clipping C
08b0: 6f 6e 74 65 73 74 2e 3c 62 72 3e 0d 0a 56 65 72 ontest.<br>..Ver
08c0: 79 20 73 68 6f 72 74 6c 79 20 73 61 69 64 3a 20 y shortly said:
08d0: 69 74 27 73 20 61 20 72 65 61 6c 6c 79 20 68 75 it's a really hu
08e0: 67 65 20 73 65 74 20 6f 66 20 3c 62 3e 43 6f 6e ge set of <b>Con
08f0: 74 6f 75 72 20 4c 69 6e 65 73 3c 2f 62 3e 20 28 tour Lines</b> (
0900: 74 68 65 20 75 6e 63 6f 6d 70 72 65 73 73 65 64 the uncompressed
0910: 20 53 68 61 70 65 66 69 6c 65 20 69 73 20 61 62 Shapefile is ab
0920: 6f 75 74 20 3c 62 3e 31 2c 33 20 47 42 3c 2f 62 out <b>1,3 GB</b
0930: 3e 29 3c 62 72 3e 3c 62 72 3e 0d 0a 3c 74 61 62 >)<br><br>..<tab
0940: 6c 65 20 63 65 6c 6c 73 70 61 63 69 6e 67 3d 22 le cellspacing="
0950: 36 22 20 63 65 6c 6c 70 61 64 64 69 6e 67 3d 22 6" cellpadding="
0960: 36 22 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 3c 68 33 6">..<tr><td><h3
0970: 3e 46 69 67 2e 20 31 3c 2f 68 33 3e 0d 0a 54 68 >Fig. 1</h3>..Th
0980: 69 73 20 6f 6e 65 20 69 73 20 74 68 65 20 6f 72 is one is the or
0990: 69 67 69 6e 61 6c 20 73 65 74 20 6f 66 20 43 6f iginal set of Co
09a0: 6e 74 6f 75 72 20 4c 69 6e 65 73 20 74 6f 20 62 ntour Lines to b
09b0: 65 20 63 6c 69 70 70 65 64 2e 3c 2f 74 64 3e 0d e clipped.</td>.
09c0: 0a 3c 74 64 3e 3c 69 6d 67 20 62 6f 72 64 65 72 .<td><img border
09d0: 3d 22 31 22 20 73 72 63 3d 22 68 74 74 70 3a 2f ="1" src="http:/
09e0: 2f 77 77 77 2e 67 61 69 61 2d 67 69 73 2e 69 74 /www.gaia-gis.it
09f0: 2f 67 61 69 61 2d 73 69 6e 73 2f 76 69 72 74 75 /gaia-sins/virtu
0a00: 61 6c 6f 67 72 2f 63 6c 69 70 2d 30 2e 70 6e 67 alogr/clip-0.png
0a10: 22 20 61 6c 74 3d 22 6f 72 69 67 69 6e 61 6c 20 " alt="original
0a20: 64 61 74 61 73 65 74 22 3e 3c 2f 74 64 3e 3c 2f dataset"></td></
0a30: 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 3c 68 33 tr>..<tr><td><h3
0a40: 3e 46 69 67 2e 20 32 3c 2f 68 33 3e 0d 0a 54 68 >Fig. 2</h3>..Th
0a50: 69 73 20 69 73 20 74 68 65 20 66 69 6e 61 6c 20 is is the final
0a60: 72 65 73 75 6c 74 20 6f 66 20 74 68 65 20 63 6c result of the cl
0a70: 69 70 70 69 6e 67 20 6f 70 65 72 61 74 69 6f 6e ipping operation
0a80: 2e 3c 75 6c 3e 0d 0a 3c 6c 69 3e 74 68 65 20 53 .<ul>..<li>the S
0a90: 74 75 64 79 20 41 72 65 61 20 62 6f 75 6e 64 61 tudy Area bounda
0aa0: 72 79 20 28 70 6f 6c 79 67 6f 6e 29 20 69 73 20 ry (polygon) is
0ab0: 72 65 70 72 65 73 65 6e 74 65 64 20 69 6e 20 72 represented in r
0ac0: 65 64 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 74 68 ed.</li>..<li>th
0ad0: 65 20 43 6f 6e 74 6f 75 72 20 4c 69 6e 65 73 20 e Contour Lines
0ae0: 61 72 65 20 72 65 70 72 65 73 65 6e 74 65 64 20 are represented
0af0: 69 6e 20 64 61 72 6b 20 62 6c 75 65 2e 3c 2f 6c in dark blue.</l
0b00: 69 3e 0d 0a 3c 6c 69 3e 74 68 65 20 61 7a 75 72 i>..<li>the azur
0b10: 65 20 72 65 63 74 61 6e 67 6c 65 20 6d 61 72 6b e rectangle mark
0b20: 73 20 74 68 65 20 64 65 74 61 69 6c 20 61 72 65 s the detail are
0b30: 61 20 73 68 6f 77 6e 20 69 6e 20 74 68 65 20 6e a shown in the n
0b40: 65 78 74 20 66 69 67 75 72 65 2e 3c 2f 6c 69 3e ext figure.</li>
0b50: 20 0d 0a 3c 2f 75 6c 3e 3c 2f 74 64 3e 0d 0a 3c ..</ul></td>..<
0b60: 74 64 3e 3c 69 6d 67 20 62 6f 72 64 65 72 3d 22 td><img border="
0b70: 31 22 20 73 72 63 3d 22 68 74 74 70 3a 2f 2f 77 1" src="http://w
0b80: 77 77 2e 67 61 69 61 2d 67 69 73 2e 69 74 2f 67 ww.gaia-gis.it/g
0b90: 61 69 61 2d 73 69 6e 73 2f 76 69 72 74 75 61 6c aia-sins/virtual
0ba0: 6f 67 72 2f 63 6c 69 70 2d 31 2e 70 6e 67 22 20 ogr/clip-1.png"
0bb0: 61 6c 74 3d 22 63 6c 69 70 70 65 64 22 3e 3c 2f alt="clipped"></
0bc0: 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 td></tr>..<tr><t
0bd0: 64 3e 3c 68 33 3e 46 69 67 2e 20 33 3c 2f 68 33 d><h3>Fig. 3</h3
0be0: 3e 54 68 69 73 20 69 73 20 61 20 6d 61 67 6e 69 >This is a magni
0bf0: 66 69 65 64 20 64 65 74 61 69 6c 20 6f 66 20 74 fied detail of t
0c00: 68 65 20 53 74 75 64 79 20 41 72 65 61 20 61 6e he Study Area an
0c10: 64 20 43 6c 69 70 70 65 64 20 43 6f 6e 74 6f 75 d Clipped Contou
0c20: 72 20 4c 69 6e 65 73 2e 3c 62 72 3e 3c 62 72 3e r Lines.<br><br>
0c30: 0d 0a 41 73 20 79 6f 75 20 63 61 6e 20 65 61 73 ..As you can eas
0c40: 69 6c 79 20 6e 6f 74 69 63 65 20 74 68 65 72 65 ily notice there
0c50: 20 61 72 65 20 6c 6f 74 73 20 6f 66 20 43 6f 6e are lots of Con
0c60: 74 6f 75 72 20 4c 69 6e 65 73 2c 20 61 6e 64 20 tour Lines, and
0c70: 65 61 63 68 20 4c 69 6e 65 20 68 61 73 20 6d 61 each Line has ma
0c80: 6e 79 20 76 65 72 74 65 78 65 73 2e 3c 62 72 3e ny vertexes.<br>
0c90: 3c 62 72 3e 0d 0a 54 68 69 73 20 6f 6e 65 20 69 <br>..This one i
0ca0: 73 20 61 20 72 61 74 68 65 72 20 63 6f 6d 70 6c s a rather compl
0cb0: 65 78 20 70 72 6f 62 6c 65 6d 20 74 6f 20 62 65 ex problem to be
0cc0: 20 72 65 73 6f 6c 76 65 64 3a 20 61 6e 64 20 69 resolved: and i
0cd0: 74 20 73 75 72 65 6c 79 20 72 65 70 72 65 73 65 t surely represe
0ce0: 6e 74 73 20 61 20 74 68 6f 72 6f 75 67 68 20 61 nts a thorough a
0cf0: 6e 64 20 76 65 72 79 20 64 65 6d 61 6e 64 69 6e nd very demandin
0d00: 67 20 74 65 73 74 2e 3c 2f 74 64 3e 0d 0a 3c 74 g test.</td>..<t
0d10: 64 3e 3c 69 6d 67 20 62 6f 72 64 65 72 3d 22 31 d><img border="1
0d20: 22 20 73 72 63 3d 22 68 74 74 70 3a 2f 2f 77 77 " src="http://ww
0d30: 77 2e 67 61 69 61 2d 67 69 73 2e 69 74 2f 67 61 w.gaia-gis.it/ga
0d40: 69 61 2d 73 69 6e 73 2f 76 69 72 74 75 61 6c 6f ia-sins/virtualo
0d50: 67 72 2f 63 6c 69 70 2d 32 2e 70 6e 67 22 20 61 gr/clip-2.png" a
0d60: 6c 74 3d 22 6c 6f 61 64 5f 65 78 74 65 6e 73 69 lt="load_extensi
0d70: 6f 6e 22 3e 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a on"></td></tr>..
0d80: 3c 2f 74 61 62 6c 65 3e 0d 0a 3c 68 32 3e 54 68 </table>..<h2>Th
0d90: 65 20 53 70 61 74 69 61 6c 20 53 51 4c 20 61 70 e Spatial SQL ap
0da0: 70 72 6f 61 63 68 3c 2f 68 32 3e 0d 0a 54 68 69 proach</h2>..Thi
0db0: 73 20 69 73 20 61 20 70 75 72 65 20 64 61 74 61 s is a pure data
0dc0: 2d 70 72 6f 63 65 73 73 69 6e 67 20 61 70 70 72 -processing appr
0dd0: 6f 61 63 68 3b 20 77 65 27 6c 6c 20 75 73 65 20 oach; we'll use
0de0: 74 68 65 20 6d 6f 73 74 20 63 6c 61 73 73 69 63 the most classic
0df0: 61 6c 20 3c 62 3e 3c 69 3e 53 70 61 74 69 61 6c al <b><i>Spatial
0e00: 20 49 73 20 4e 6f 74 20 53 70 65 63 69 61 6c 3c Is Not Special<
0e10: 2f 69 3e 3c 2f 62 3e 20 6d 65 74 68 6f 64 6f 6c /i></b> methodol
0e20: 6f 67 79 2c 20 69 2e 65 2e 20 77 65 27 6c 6c 20 ogy, i.e. we'll
0e30: 67 6f 20 70 65 72 66 6f 72 6d 69 6e 67 20 74 68 go performing th
0e40: 65 20 3c 62 3e 43 6c 69 70 70 69 6e 67 20 43 6f e <b>Clipping Co
0e50: 6e 74 65 73 74 3c 2f 62 3e 20 65 78 61 63 74 6c ntest</b> exactl
0e60: 79 20 61 73 20 69 66 20 69 74 20 77 61 73 20 61 y as if it was a
0e70: 20 74 72 69 76 69 61 6c 20 6f 72 64 69 6e 61 72 trivial ordinar
0e80: 79 20 53 51 4c 20 71 75 65 72 79 20 70 65 72 66 y SQL query perf
0e90: 6f 72 6d 65 64 20 6f 6e 20 62 65 68 61 6c 66 20 ormed on behalf
0ea0: 6f 66 20 70 6c 61 69 6e 20 67 65 6e 65 72 69 63 of plain generic
0eb0: 20 64 61 74 61 2e 0d 0a 57 65 27 6c 6c 20 6e 6f data...We'll no
0ec0: 74 20 75 73 65 20 61 74 20 61 6c 6c 20 61 6e 79 t use at all any
0ed0: 20 47 49 53 2d 73 70 65 63 69 66 69 63 20 66 72 GIS-specific fr
0ee0: 69 6c 6c 2c 20 61 6e 64 20 77 65 27 6c 6c 20 73 ill, and we'll s
0ef0: 69 6d 70 6c 79 20 75 73 65 20 61 20 63 6f 75 70 imply use a coup
0f00: 6c 65 20 6f 66 20 53 70 61 74 69 61 6c 20 53 51 le of Spatial SQ
0f10: 4c 20 66 75 6e 63 74 69 6f 6e 73 20 77 68 65 72 L functions wher
0f20: 65 20 73 74 72 69 63 74 6c 79 20 72 65 71 75 69 e strictly requi
0f30: 72 65 64 2e 0d 0a 28 3c 69 3e 42 54 57 20 69 74 red...(<i>BTW it
0f40: 27 73 20 61 20 67 6f 6f 64 20 6f 70 70 6f 72 74 's a good opport
0f50: 75 6e 69 74 79 20 74 6f 20 69 6e 74 72 6f 64 75 unity to introdu
0f60: 63 65 20 66 65 77 20 62 61 73 69 63 20 63 6f 6e ce few basic con
0f70: 63 65 70 74 73 20 61 62 6f 75 74 20 53 70 61 74 cepts about Spat
0f80: 69 61 6c 20 53 51 4c 3c 2f 69 3e 29 2e 3c 62 72 ial SQL</i>).<br
0f90: 3e 0d 0a 4c 65 74 27 73 20 67 6f 20 2e 2e 2e 0d >..Let's go ....
0fa0: 0a 3c 68 34 3e 50 72 65 70 61 72 69 6e 67 20 74 .<h4>Preparing t
0fb0: 68 65 20 53 51 4c 20 73 63 72 69 70 74 3c 2f 68 he SQL script</h
0fc0: 34 3e 0d 0a 3c 76 65 72 62 61 74 69 6d 3e 0d 0a 4>..<verbatim>..
0fd0: 2d 2d 0d 0a 2d 2d 20 53 51 4c 20 73 63 72 69 70 --..-- SQL scrip
0fe0: 74 20 70 65 72 66 6f 72 6d 69 6e 67 20 74 68 65 t performing the
0ff0: 20 43 6c 69 70 70 69 6e 67 20 43 6f 6e 74 65 73 Clipping Contes
1000: 74 0d 0a 2d 2d 20 54 61 72 67 65 74 20 44 42 4d t..-- Target DBM
1010: 53 3a 20 53 51 4c 69 74 65 20 77 69 74 68 20 53 S: SQLite with S
1020: 70 61 74 69 61 4c 69 74 65 20 65 78 74 65 6e 73 patiaLite extens
1030: 69 6f 6e 0d 0a 2d 2d 0d 0a 0d 0a 53 45 4c 45 43 ion..--....SELEC
1040: 54 20 44 61 74 65 54 69 6d 65 28 27 6e 6f 77 27 T DateTime('now'
1050: 29 2c 20 27 4c 6f 61 64 69 6e 67 20 74 68 65 20 ), 'Loading the
1060: 53 74 75 64 79 41 72 65 61 20 53 48 50 27 3b 0d StudyArea SHP';.
1070: 0a 2d 2d 0d 0a 2d 2d 20 6c 6f 61 64 69 6e 67 20 .--..-- loading
1080: 74 68 65 20 53 74 75 64 79 41 72 65 61 20 53 68 the StudyArea Sh
1090: 61 70 65 66 69 6c 65 20 69 6e 74 6f 20 74 68 65 apefile into the
10a0: 20 44 42 0d 0a 2d 2d 0d 0a 2e 6c 6f 61 64 73 68 DB..--...loadsh
10b0: 70 20 53 74 75 64 79 41 72 65 61 31 4d 69 6c 65 p StudyArea1Mile
10c0: 42 75 66 66 65 72 20 53 74 75 64 79 41 72 65 61 Buffer StudyArea
10d0: 31 4d 69 6c 65 42 75 66 66 65 72 20 43 50 31 32 1MileBuffer CP12
10e0: 35 32 20 32 32 36 30 20 47 65 6f 6d 65 74 72 79 52 2260 Geometry
10f0: 20 49 64 20 50 4f 4c 59 47 4f 4e 20 32 64 20 6e Id POLYGON 2d n
1100: 6f 20 6e 6f 5f 73 70 61 74 69 61 6c 5f 69 6e 64 o no_spatial_ind
1110: 65 78 0d 0a 0d 0a 53 45 4c 45 43 54 20 44 61 74 ex....SELECT Dat
1120: 65 54 69 6d 65 28 27 6e 6f 77 27 29 2c 20 27 4c eTime('now'), 'L
1130: 6f 61 64 69 6e 67 20 74 68 65 20 43 6f 6e 74 6f oading the Conto
1140: 75 72 73 20 53 48 50 27 3b 0d 0a 2d 2d 0d 0a 2d urs SHP';..--..-
1150: 2d 20 6c 6f 61 64 69 6e 67 20 74 68 65 20 43 6f - loading the Co
1160: 6e 74 6f 75 72 20 53 68 61 70 65 66 69 6c 65 20 ntour Shapefile
1170: 69 6e 74 6f 20 74 68 65 20 44 42 0d 0a 2d 2d 0d into the DB..--.
1180: 0a 2e 6c 6f 61 64 73 68 70 20 43 6f 6e 74 6f 75 ..loadshp Contou
1190: 72 73 32 30 46 74 20 43 6f 6e 74 6f 75 72 73 32 rs20Ft Contours2
11a0: 30 46 74 20 43 50 31 32 35 32 20 32 32 36 30 20 0Ft CP1252 2260
11b0: 47 65 6f 6d 65 74 72 79 20 49 64 20 4c 49 4e 45 Geometry Id LINE
11c0: 53 54 52 49 4e 47 20 32 64 20 6e 6f 20 77 69 74 STRING 2d no wit
11d0: 68 5f 73 70 61 74 69 61 6c 5f 69 6e 64 65 78 0d h_spatial_index.
11e0: 0a 0d 0a 53 45 4c 45 43 54 20 44 61 74 65 54 69 ...SELECT DateTi
11f0: 6d 65 28 27 6e 6f 77 27 29 2c 20 27 43 6c 69 70 me('now'), 'Clip
1200: 70 69 6e 67 20 2e 2e 2e 20 70 6c 65 61 73 65 20 ping ... please
1210: 77 61 69 74 27 3b 0d 0a 2d 2d 0d 0a 2d 2d 20 63 wait';..--..-- c
1220: 72 65 61 74 69 6e 67 20 61 20 6e 65 77 20 74 61 reating a new ta
1230: 62 6c 65 20 63 6f 6e 74 61 69 6e 69 6e 67 20 74 ble containing t
1240: 68 65 20 43 6c 69 70 70 65 64 20 43 6f 6e 74 6f he Clipped Conto
1250: 75 72 73 0d 0a 2d 2d 0d 0a 43 52 45 41 54 45 20 urs..--..CREATE
1260: 54 41 42 4c 45 20 43 6f 6e 74 6f 75 72 73 32 30 TABLE Contours20
1270: 46 74 43 6c 69 70 70 65 64 20 41 53 0d 0a 53 45 FtClipped AS..SE
1280: 4c 45 43 54 20 63 2e 49 64 20 41 53 20 49 64 2c LECT c.Id AS Id,
1290: 20 63 2e 4f 42 4a 45 43 54 49 44 20 41 53 20 4f c.OBJECTID AS O
12a0: 42 4a 45 43 54 49 44 2c 20 0d 0a 20 20 63 2e 43 BJECTID, .. c.C
12b0: 6f 6e 74 6f 75 72 20 41 53 20 43 6f 6e 74 6f 75 ontour AS Contou
12c0: 72 2c 20 63 2e 53 68 61 70 65 5f 4c 65 6e 67 20 r, c.Shape_Leng
12d0: 41 53 20 53 68 61 70 65 5f 4c 65 6e 67 2c 0d 0a AS Shape_Leng,..
12e0: 20 20 43 61 73 74 54 6f 4d 75 6c 74 69 4c 69 6e CastToMultiLin
12f0: 65 73 74 72 69 6e 67 28 53 54 5f 49 6e 74 65 72 estring(ST_Inter
1300: 73 65 63 74 69 6f 6e 28 0d 0a 20 20 20 20 20 20 section(..
1310: 63 2e 47 65 6f 6d 65 74 72 79 2c 20 61 2e 47 65 c.Geometry, a.Ge
1320: 6f 6d 65 74 72 79 29 29 20 41 53 20 47 65 6f 6d ometry)) AS Geom
1330: 65 74 72 79 0d 0a 46 52 4f 4d 20 43 6f 6e 74 6f etry..FROM Conto
1340: 75 72 73 32 30 46 74 20 41 53 20 63 2c 20 53 74 urs20Ft AS c, St
1350: 75 64 79 41 72 65 61 31 4d 69 6c 65 42 75 66 66 udyArea1MileBuff
1360: 65 72 20 41 53 20 61 0d 0a 57 48 45 52 45 20 63 er AS a..WHERE c
1370: 2e 52 4f 57 49 44 20 49 4e 20 28 0d 0a 20 20 20 .ROWID IN (..
1380: 20 53 45 4c 45 43 54 20 52 4f 57 49 44 20 0d 0a SELECT ROWID ..
1390: 20 20 20 20 46 52 4f 4d 20 53 70 61 74 69 61 6c FROM Spatial
13a0: 49 6e 64 65 78 0d 0a 20 20 20 20 57 48 45 52 45 Index.. WHERE
13b0: 20 66 5f 74 61 62 6c 65 5f 6e 61 6d 65 20 3d 20 f_table_name =
13c0: 27 43 6f 6e 74 6f 75 72 73 32 30 46 74 27 20 0d 'Contours20Ft' .
13d0: 0a 20 20 20 20 20 20 20 20 41 4e 44 20 73 65 61 . AND sea
13e0: 72 63 68 5f 66 72 61 6d 65 20 3d 20 61 2e 47 65 rch_frame = a.Ge
13f0: 6f 6d 65 74 72 79 0d 0a 29 3b 0d 0a 0d 0a 53 45 ometry..);....SE
1400: 4c 45 43 54 20 44 61 74 65 54 69 6d 65 28 27 6e LECT DateTime('n
1410: 6f 77 27 29 2c 20 27 64 65 6c 65 74 69 6e 67 20 ow'), 'deleting
1420: 4e 55 4c 4c 20 47 65 6f 6d 65 74 72 69 65 73 27 NULL Geometries'
1430: 3b 0d 0a 2d 2d 0d 0a 2d 2d 20 63 6c 65 61 6e 20 ;..--..-- clean
1440: 75 70 0d 0a 2d 2d 20 64 65 6c 65 74 69 6e 67 20 up..-- deleting
1450: 61 6e 79 20 4e 55 4c 4c 20 47 65 6f 6d 65 74 72 any NULL Geometr
1460: 79 20 66 72 6f 6d 20 43 6c 69 70 70 65 64 20 43 y from Clipped C
1470: 6f 6e 74 6f 75 72 73 0d 0a 2d 2d 0d 0a 44 45 4c ontours..--..DEL
1480: 45 54 45 20 46 52 4f 4d 20 43 6f 6e 74 6f 75 72 ETE FROM Contour
1490: 73 32 30 46 74 43 6c 69 70 70 65 64 20 0d 0a 57 s20FtClipped ..W
14a0: 48 45 52 45 20 47 65 6f 6d 65 74 72 79 20 49 53 HERE Geometry IS
14b0: 20 4e 55 4c 4c 3b 0d 0a 0d 0a 53 45 4c 45 43 54 NULL;....SELECT
14c0: 20 44 61 74 65 54 69 6d 65 28 27 6e 6f 77 27 29 DateTime('now')
14d0: 2c 20 27 72 65 63 6f 76 65 72 69 6e 67 20 61 20 , 'recovering a
14e0: 67 65 6e 75 69 6e 65 20 47 65 6f 6d 65 74 72 79 genuine Geometry
14f0: 20 63 6f 6c 75 6d 6e 27 3b 0d 0a 2d 2d 0d 0a 2d column';..--..-
1500: 2d 20 72 65 63 6f 76 65 72 69 6e 67 20 61 20 67 - recovering a g
1510: 65 6e 75 69 6e 65 20 47 65 6f 6d 65 74 72 79 20 enuine Geometry
1520: 43 6f 6c 75 6d 6e 20 28 43 6c 69 70 70 65 64 20 Column (Clipped
1530: 43 6f 6e 74 6f 75 72 73 29 0d 0a 2d 2d 2d 0d 0a Contours)..---..
1540: 53 45 4c 45 43 54 20 52 65 63 6f 76 65 72 47 65 SELECT RecoverGe
1550: 6f 6d 65 74 72 79 43 6f 6c 75 6d 6e 28 27 43 6f ometryColumn('Co
1560: 6e 74 6f 75 72 73 32 30 46 74 43 6c 69 70 70 65 ntours20FtClippe
1570: 64 27 2c 20 27 47 65 6f 6d 65 74 72 79 27 2c 20 d', 'Geometry',
1580: 32 32 36 30 2c 20 27 4d 55 4c 54 49 4c 49 4e 45 2260, 'MULTILINE
1590: 53 54 52 49 4e 47 27 2c 20 32 29 3b 0d 0a 0d 0a STRING', 2);....
15a0: 53 45 4c 45 43 54 20 44 61 74 65 54 69 6d 65 28 SELECT DateTime(
15b0: 27 6e 6f 77 27 29 2c 20 27 63 72 65 61 74 69 6e 'now'), 'creatin
15c0: 67 20 74 68 65 20 53 70 61 74 69 61 6c 20 49 6e g the Spatial In
15d0: 64 65 78 27 3b 0d 0a 2d 2d 0d 0a 2d 2d 20 63 72 dex';..--..-- cr
15e0: 65 61 74 69 6e 67 20 61 20 53 70 61 74 69 61 6c eating a Spatial
15f0: 20 28 49 6e 64 65 78 20 73 75 70 70 6f 72 74 69 (Index supporti
1600: 6e 67 20 43 6c 69 70 70 65 64 20 43 6f 6e 74 6f ng Clipped Conto
1610: 75 72 73 29 0d 0a 2d 2d 0d 0a 53 45 4c 45 43 54 urs)..--..SELECT
1620: 20 43 72 65 61 74 65 53 70 61 74 69 61 6c 49 6e CreateSpatialIn
1630: 64 65 78 28 27 43 6f 6e 74 6f 75 72 73 32 30 46 dex('Contours20F
1640: 74 43 6c 69 70 70 65 64 27 2c 20 27 47 65 6f 6d tClipped', 'Geom
1650: 65 74 72 79 27 29 3b 0d 0a 0d 0a 0d 0a 53 45 4c etry');......SEL
1660: 45 43 54 20 44 61 74 65 54 69 6d 65 28 27 6e 6f ECT DateTime('no
1670: 77 27 29 2c 20 27 61 6c 6c 20 64 6f 6e 65 20 2e w'), 'all done .
1680: 2e 2e 20 71 75 69 74 74 69 6e 67 27 3b 0d 0a 2d .. quitting';..-
1690: 2d 0d 0a 2d 2d 20 65 6e 64 20 6a 6f 62 0d 0a 2d -..-- end job..-
16a0: 2d 0d 0a 3c 2f 76 65 72 62 61 74 69 6d 3e 0d 0a -..</verbatim>..
16b0: 44 6f 6e 27 74 20 62 65 20 66 6f 75 6c 65 64 3b Don't be fouled;
16c0: 20 63 6f 6d 70 6c 65 78 69 74 79 20 69 73 20 6d complexity is m
16d0: 6f 72 65 20 61 70 70 61 72 65 6e 74 20 74 68 61 ore apparent tha
16e0: 6e 20 72 65 61 6c 2e 20 54 68 65 20 66 6f 6c 6c n real. The foll
16f0: 6f 77 69 6e 67 20 69 73 20 61 20 71 75 69 63 6b owing is a quick
1700: 20 65 78 70 6c 61 6e 61 74 69 6f 6e 20 6f 66 20 explanation of
1710: 74 68 65 20 73 74 65 70 20 62 79 20 73 74 65 70 the step by step
1720: 20 70 72 6f 63 65 73 73 20 64 65 66 69 6e 65 64 process defined
1730: 20 62 79 20 74 68 65 20 61 62 6f 76 65 20 53 51 by the above SQ
1740: 4c 20 73 63 72 69 70 74 2e 0d 0a 3c 74 61 62 6c L script...<tabl
1750: 65 20 63 65 6c 6c 73 70 61 63 69 6e 67 3d 22 36 e cellspacing="6
1760: 22 20 63 65 6c 6c 70 61 64 64 69 6e 67 3d 22 36 " cellpadding="6
1770: 22 3e 0d 0a 3c 74 72 3e 3c 74 64 20 62 67 63 6f ">..<tr><td bgco
1780: 6c 6f 72 3d 22 23 66 34 66 34 66 34 22 3e 3c 62 lor="#f4f4f4"><b
1790: 3e 2e 6c 6f 61 64 73 68 70 3c 2f 62 3e 20 3c 69 >.loadshp</b> <i
17a0: 3e 70 61 72 61 6d 65 74 65 72 73 3c 2f 69 3e 3c >parameters</i><
17b0: 2f 74 64 3e 0d 0a 3c 74 64 3e 3c 68 33 3e 53 74 /td>..<td><h3>St
17c0: 65 70 20 23 31 3c 2f 68 33 3e 0d 0a 73 69 6d 70 ep #1</h3>..simp
17d0: 6c 79 20 61 20 3c 62 3e 64 6f 74 20 6d 61 63 72 ly a <b>dot macr
17e0: 6f 20 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 75 6e o command</b> un
17f0: 64 65 72 73 74 6f 6f 64 20 62 79 20 74 68 65 20 derstood by the
1800: 53 70 61 74 69 61 4c 69 74 65 20 66 72 6f 6e 74 SpatiaLite front
1810: 2d 65 6e 64 20 74 6f 6f 6c 2c 20 61 6c 6c 6f 77 -end tool, allow
1820: 69 6e 67 20 74 6f 20 64 69 72 65 63 74 6c 79 20 ing to directly
1830: 69 6d 70 6f 72 74 20 61 6e 20 65 78 74 65 72 6e import an extern
1840: 61 6c 20 53 68 61 70 65 66 69 6c 65 20 69 6e 74 al Shapefile int
1850: 6f 20 61 20 63 6f 72 72 65 73 70 6f 6e 64 69 6e o a correspondin
1860: 67 20 53 70 61 74 69 61 6c 20 54 61 62 6c 65 20 g Spatial Table
1870: 77 69 74 68 69 6e 20 74 68 65 20 44 42 2e 3c 2f within the DB.</
1880: 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 td></tr>..<tr><t
1890: 64 3e 3c 76 65 72 62 61 74 69 6d 3e 0d 0a 43 52 d><verbatim>..CR
18a0: 45 41 54 45 20 54 41 42 4c 45 20 43 6f 6e 74 6f EATE TABLE Conto
18b0: 75 72 73 32 30 46 74 43 6c 69 70 70 65 64 20 41 urs20FtClipped A
18c0: 53 0d 0a 53 45 4c 45 43 54 20 63 2e 49 64 20 41 S..SELECT c.Id A
18d0: 53 20 49 64 2c 20 63 2e 4f 42 4a 45 43 54 49 44 S Id, c.OBJECTID
18e0: 20 41 53 20 4f 42 4a 45 43 54 49 44 2c 20 0d 0a AS OBJECTID, ..
18f0: 20 20 63 2e 43 6f 6e 74 6f 75 72 20 41 53 20 43 c.Contour AS C
1900: 6f 6e 74 6f 75 72 2c 20 63 2e 53 68 61 70 65 5f ontour, c.Shape_
1910: 4c 65 6e 67 20 41 53 20 53 68 61 70 65 5f 4c 65 Leng AS Shape_Le
1920: 6e 67 2c 0d 0a 20 20 43 61 73 74 54 6f 4d 75 6c ng,.. CastToMul
1930: 74 69 4c 69 6e 65 73 74 72 69 6e 67 28 53 54 5f tiLinestring(ST_
1940: 49 6e 74 65 72 73 65 63 74 69 6f 6e 28 0d 0a 20 Intersection(..
1950: 20 20 20 20 20 63 2e 47 65 6f 6d 65 74 72 79 2c c.Geometry,
1960: 20 61 2e 47 65 6f 6d 65 74 72 79 29 29 20 41 53 a.Geometry)) AS
1970: 20 47 65 6f 6d 65 74 72 79 0d 0a 46 52 4f 4d 20 Geometry..FROM
1980: 43 6f 6e 74 6f 75 72 73 32 30 46 74 20 41 53 20 Contours20Ft AS
1990: 63 2c 20 53 74 75 64 79 41 72 65 61 31 4d 69 6c c, StudyArea1Mil
19a0: 65 42 75 66 66 65 72 20 41 53 20 61 0d 0a 57 48 eBuffer AS a..WH
19b0: 45 52 45 20 63 2e 52 4f 57 49 44 20 49 4e 20 28 ERE c.ROWID IN (
19c0: 0d 0a 20 20 20 20 53 45 4c 45 43 54 20 52 4f 57 .. SELECT ROW
19d0: 49 44 20 0d 0a 20 20 20 20 46 52 4f 4d 20 53 70 ID .. FROM Sp
19e0: 61 74 69 61 6c 49 6e 64 65 78 0d 0a 20 20 20 20 atialIndex..
19f0: 57 48 45 52 45 20 66 5f 74 61 62 6c 65 5f 6e 61 WHERE f_table_na
1a00: 6d 65 20 3d 20 27 43 6f 6e 74 6f 75 72 73 32 30 me = 'Contours20
1a10: 46 74 27 20 0d 0a 20 20 20 20 20 20 20 20 41 4e Ft' .. AN
1a20: 44 20 73 65 61 72 63 68 5f 66 72 61 6d 65 20 3d D search_frame =
1a30: 20 61 2e 47 65 6f 6d 65 74 72 79 0d 0a 29 3b 0d a.Geometry..);.
1a40: 0a 3c 2f 76 65 72 62 61 74 69 6d 3e 3c 2f 74 64 .</verbatim></td
1a50: 3e 0d 0a 3c 74 64 3e 3c 68 33 3e 53 74 65 70 20 >..<td><h3>Step
1a60: 23 32 3c 2f 68 33 3e 0d 0a 74 68 69 73 20 73 69 #2</h3>..this si
1a70: 6e 67 6c 65 20 53 51 4c 20 71 75 65 72 79 20 70 ngle SQL query p
1a80: 65 72 66 6f 72 6d 73 20 61 6c 6c 20 74 68 65 20 erforms all the
1a90: 61 63 74 75 61 6c 20 43 6c 69 70 70 69 6e 67 20 actual Clipping
1aa0: 74 61 73 6b 2e 3c 62 72 3e 0d 0a 3c 62 3e 53 54 task.<br>..<b>ST
1ab0: 5f 49 6e 74 65 72 73 65 63 74 69 6f 6e 28 29 3c _Intersection()<
1ac0: 2f 62 3e 20 69 73 20 61 20 53 70 61 74 69 61 6c /b> is a Spatial
1ad0: 20 53 51 4c 20 66 75 6e 63 74 69 6f 6e 20 63 6f SQL function co
1ae0: 6d 70 75 74 69 6e 67 20 74 68 65 20 69 6e 74 65 mputing the inte
1af0: 72 73 65 63 74 69 6f 6e 20 62 65 74 77 65 65 6e rsection between
1b00: 20 74 68 65 20 3c 62 3e 53 74 75 64 79 20 41 72 the <b>Study Ar
1b10: 65 61 3c 2f 62 3e 20 28 3c 69 3e 70 6f 6c 79 67 ea</b> (<i>polyg
1b20: 6f 6e 3c 2f 69 3e 29 20 61 6e 64 20 65 61 63 68 on</i>) and each
1b30: 20 3c 62 3e 43 6f 6e 74 6f 75 72 20 4c 69 6e 65 <b>Contour Line
1b40: 3c 2f 62 3e 20 28 3c 69 3e 6c 69 6e 65 73 74 72 </b> (<i>linestr
1b50: 69 6e 67 3c 2f 69 3e 29 2e 20 54 68 65 20 72 65 ing</i>). The re
1b60: 74 75 72 6e 65 64 20 72 65 73 75 6c 74 20 63 6f turned result co
1b70: 75 6c 64 20 62 65 3a 3c 75 6c 3e 0d 0a 3c 6c 69 uld be:<ul>..<li
1b80: 3e 61 20 4c 69 6e 65 73 74 72 69 6e 67 20 6f 72 >a Linestring or
1b90: 20 61 20 4d 75 6c 74 69 4c 69 6e 65 73 74 72 69 a MultiLinestri
1ba0: 6e 67 20 28 64 65 70 65 6e 64 69 6e 67 20 6f 6e ng (depending on
1bb0: 20 74 68 65 20 73 70 65 63 69 66 69 63 20 73 68 the specific sh
1bc0: 61 70 65 20 6f 66 20 62 6f 74 68 20 67 65 6f 6d ape of both geom
1bd0: 65 74 72 69 65 73 29 3c 2f 6c 69 3e 0d 0a 3c 6c etries)</li>..<l
1be0: 69 3e 61 20 4e 55 4c 4c 20 28 69 2e 65 2e 20 3c i>a NULL (i.e. <
1bf0: 2f 69 3e 61 62 73 6f 6c 75 74 65 6c 79 20 6e 6f /i>absolutely no
1c00: 74 68 69 6e 67 3c 2f 69 3e 29 20 69 66 20 74 68 thing</i>) if th
1c10: 65 20 43 6f 6e 74 6f 75 72 20 4c 69 6e 65 20 61 e Contour Line a
1c20: 6e 64 20 74 68 65 20 53 74 75 64 79 20 41 72 65 nd the Study Are
1c30: 61 20 64 6f 20 6e 6f 74 20 69 6e 74 65 72 73 65 a do not interse
1c40: 63 74 20 61 74 20 61 6c 6c 2e 3c 2f 6c 69 3e 0d ct at all.</li>.
1c50: 0a 3c 6c 69 3e 3c 62 3e 43 61 73 74 54 6f 4d 75 .<li><b>CastToMu
1c60: 6c 74 69 4c 69 6e 65 73 74 72 69 6e 67 28 29 3c ltiLinestring()<
1c70: 2f 62 3e 20 73 69 6d 70 6c 79 20 69 73 20 61 20 /b> simply is a
1c80: 3c 75 3e 3c 69 3e 63 61 73 74 20 6f 70 65 72 61 <u><i>cast opera
1c90: 74 6f 72 3c 2f 69 3e 3c 2f 75 3e 20 65 6e 73 75 tor</i></u> ensu
1ca0: 72 69 6e 67 20 74 68 61 74 20 61 6c 6c 20 72 65 ring that all re
1cb0: 74 75 72 6e 65 64 20 67 65 6f 6d 65 74 72 69 65 turned geometrie
1cc0: 73 20 77 69 6c 6c 20 62 65 20 6f 66 20 74 68 65 s will be of the
1cd0: 20 73 61 6d 65 20 74 79 70 65 2e 3c 2f 6c 69 3e same type.</li>
1ce0: 0d 0a 3c 6c 69 3e 74 68 65 20 69 6e 6e 65 72 20 ..<li>the inner
1cf0: 73 75 62 2d 71 75 65 72 79 20 3c 62 3e 53 45 4c sub-query <b>SEL
1d00: 45 43 54 20 52 4f 57 49 44 20 46 52 4f 4d 20 53 ECT ROWID FROM S
1d10: 70 61 74 69 61 6c 49 6e 64 65 78 20 2e 2e 2e 3c patialIndex ...<
1d20: 2f 62 3e 20 69 73 20 73 69 6d 70 6c 79 20 69 6e /b> is simply in
1d30: 74 65 6e 64 65 64 20 74 6f 20 61 63 63 65 73 73 tended to access
1d40: 20 74 68 65 20 53 70 61 74 69 61 6c 20 49 6e 64 the Spatial Ind
1d50: 65 78 20 73 75 70 70 6f 72 74 69 6e 67 20 74 68 ex supporting th
1d60: 65 20 43 6f 6e 74 6f 75 72 20 4c 69 6e 65 73 2c e Contour Lines,
1d70: 20 73 6f 20 74 6f 20 73 70 65 65 64 20 75 70 20 so to speed up
1d80: 74 68 65 20 77 68 6f 6c 65 20 71 75 65 72 79 2e the whole query.
1d90: 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 43 52 </li>..<li><b>CR
1da0: 45 41 54 45 20 54 41 42 4c 45 20 43 6f 6e 74 6f EATE TABLE Conto
1db0: 75 72 73 32 30 46 74 43 6c 69 70 70 65 64 20 41 urs20FtClipped A
1dc0: 53 3c 2f 62 3e 20 73 69 6d 70 6c 79 20 69 6e 74 S</b> simply int
1dd0: 65 6e 64 73 20 74 68 61 74 20 74 68 65 20 72 65 ends that the re
1de0: 73 75 6c 74 73 65 74 20 72 65 74 75 72 6e 65 64 sultset returned
1df0: 20 62 79 20 74 68 69 73 20 53 51 4c 20 71 75 65 by this SQL que
1e00: 72 79 20 68 61 73 20 74 6f 20 62 65 20 70 65 72 ry has to be per
1e10: 6d 61 6e 65 6e 74 6c 79 20 73 61 76 65 64 20 69 manently saved i
1e20: 6e 74 6f 20 79 65 74 20 61 6e 6f 74 68 65 72 20 nto yet another
1e30: 74 61 62 6c 65 20 28 74 6f 20 62 65 20 63 72 65 table (to be cre
1e40: 61 74 65 64 20 6f 6e 20 74 68 65 20 66 6c 79 29 ated on the fly)
1e50: 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 3c 62 72 .</li>..</ul><br
1e60: 3e 0d 0a 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c >..</td></tr>..<
1e70: 74 72 3e 3c 74 64 3e 3c 76 65 72 62 61 74 69 6d tr><td><verbatim
1e80: 3e 0d 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 43 >..DELETE FROM C
1e90: 6f 6e 74 6f 75 72 73 32 30 46 74 43 6c 69 70 70 ontours20FtClipp
1ea0: 65 64 20 0d 0a 57 48 45 52 45 20 47 65 6f 6d 65 ed ..WHERE Geome
1eb0: 74 72 79 20 49 53 20 4e 55 4c 4c 3b 0d 0a 3c 2f try IS NULL;..</
1ec0: 76 65 72 62 61 74 69 6d 3e 3c 2f 74 64 3e 0d 0a verbatim></td>..
1ed0: 3c 74 64 3e 3c 68 33 3e 53 74 65 70 20 23 33 3c <td><h3>Step #3<
1ee0: 2f 68 33 3e 0d 0a 6a 75 73 74 20 61 20 73 74 75 /h3>..just a stu
1ef0: 70 69 64 20 70 6f 73 74 2d 70 72 6f 63 65 73 73 pid post-process
1f00: 69 6e 67 20 73 74 65 70 3b 20 74 68 65 20 70 72 ing step; the pr
1f10: 65 76 69 6f 75 73 20 71 75 65 72 79 20 68 61 73 evious query has
1f20: 20 73 75 72 65 6c 79 20 67 65 6e 65 72 61 74 65 surely generate
1f30: 64 20 6d 61 6e 79 20 4e 55 4c 4c 20 67 65 6f 6d d many NULL geom
1f40: 65 74 72 69 65 73 2c 20 61 6e 64 20 77 65 27 6c etries, and we'l
1f50: 6c 20 6e 6f 77 20 67 65 74 20 72 69 64 20 6f 66 l now get rid of
1f60: 20 61 6c 6c 20 74 68 65 6d 2e 3c 2f 6c 69 3e 0d all them.</li>.
1f70: 0a 3c 2f 75 6c 3e 3c 62 72 3e 0d 0a 3c 2f 74 64 .</ul><br>..</td
1f80: 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e ></tr>..<tr><td>
1f90: 3c 76 65 72 62 61 74 69 6d 3e 0d 0a 53 45 4c 45 <verbatim>..SELE
1fa0: 43 54 20 52 65 63 6f 76 65 72 47 65 6f 6d 65 74 CT RecoverGeomet
1fb0: 72 79 43 6f 6c 75 6d 6e 28 27 43 6f 6e 74 6f 75 ryColumn('Contou
1fc0: 72 73 32 30 46 74 43 6c 69 70 70 65 64 27 2c 20 rs20FtClipped',
1fd0: 27 47 65 6f 6d 65 74 72 79 27 2c 20 0d 0a 20 20 'Geometry', ..
1fe0: 20 20 32 32 36 30 2c 20 27 4d 55 4c 54 49 4c 49 2260, 'MULTILI
1ff0: 4e 45 53 54 52 49 4e 47 27 2c 20 32 29 3b 0d 0a NESTRING', 2);..
2000: 53 45 4c 45 43 54 20 43 72 65 61 74 65 53 70 61 SELECT CreateSpa
2010: 74 69 61 6c 49 6e 64 65 78 28 27 43 6f 6e 74 6f tialIndex('Conto
2020: 75 72 73 32 30 46 74 43 6c 69 70 70 65 64 27 2c urs20FtClipped',
2030: 20 27 47 65 6f 6d 65 74 72 79 27 29 3b 0d 0a 3c 'Geometry');..<
2040: 2f 76 65 72 62 61 74 69 6d 3e 3c 2f 74 64 3e 0d /verbatim></td>.
2050: 0a 3c 74 64 3e 3c 68 33 3e 53 74 65 70 20 23 34 .<td><h3>Step #4
2060: 3c 2f 68 33 3e 0d 0a 74 68 65 20 76 65 72 79 20 </h3>..the very
2070: 66 69 6e 61 6c 20 70 6f 73 74 2d 70 72 6f 63 65 final post-proce
2080: 73 73 69 6e 67 20 73 74 65 70 3a 20 74 72 61 6e ssing step: tran
2090: 73 66 6f 72 6d 69 6e 67 20 74 68 65 20 74 61 62 sforming the tab
20a0: 6c 65 20 63 6f 6e 74 61 69 6e 69 6e 67 20 61 6c le containing al
20b0: 6c 20 43 6c 69 70 70 65 64 20 43 6f 6e 74 6f 75 l Clipped Contou
20c0: 72 20 4c 69 6e 65 73 20 69 6e 74 6f 20 61 20 67 r Lines into a g
20d0: 65 6e 75 69 6e 65 20 53 70 61 74 69 61 6c 20 54 enuine Spatial T
20e0: 61 62 6c 65 20 73 75 70 70 6f 72 74 65 64 20 62 able supported b
20f0: 79 20 69 74 73 20 6f 77 6e 20 53 70 61 74 69 61 y its own Spatia
2100: 6c 20 49 6e 64 65 78 2e 3c 2f 6c 69 3e 0d 0a 3c l Index.</li>..<
2110: 2f 75 6c 3e 3c 62 72 3e 0d 0a 3c 2f 74 64 3e 3c /ul><br>..</td><
2120: 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 3c 76 /tr>..<tr><td><v
2130: 65 72 62 61 74 69 6d 3e 0d 0a 53 45 4c 45 43 54 erbatim>..SELECT
2140: 20 44 61 74 65 54 69 6d 65 28 27 6e 6f 77 27 29 DateTime('now')
2150: 2c 20 27 73 6f 6d 65 20 6d 65 73 73 61 67 65 27 , 'some message'
2160: 3b 0d 0a 3c 2f 76 65 72 62 61 74 69 6d 3e 3c 2f ;..</verbatim></
2170: 74 64 3e 0d 0a 3c 74 64 3e 3c 68 33 3e 6d 65 61 td>..<td><h3>mea
2180: 73 75 72 69 6e 67 20 74 68 65 20 74 69 6d 65 3c suring the time<
2190: 2f 68 33 3e 74 68 69 73 20 73 69 6d 70 6c 79 20 /h3>this simply
21a0: 69 73 20 61 20 77 65 69 72 64 20 53 51 4c 20 74 is a weird SQL t
21b0: 72 69 63 6b 3b 20 77 65 27 6c 6c 20 71 75 65 72 rick; we'll quer
21c0: 79 20 74 68 65 20 73 79 73 74 65 6d 20 63 6c 6f y the system clo
21d0: 63 6b 20 69 6d 6d 65 64 69 61 74 65 6c 79 20 62 ck immediately b
21e0: 65 66 6f 72 65 20 61 6e 64 20 61 66 74 65 72 20 efore and after
21f0: 70 65 72 66 6f 72 6d 69 6e 67 20 65 61 63 68 20 performing each
2200: 73 74 65 70 2c 20 73 6f 20 74 6f 20 67 65 74 20 step, so to get
2210: 66 75 6c 6c 20 74 72 61 63 65 20 6f 66 20 74 68 full trace of th
2220: 65 20 63 6f 72 72 65 73 70 6f 6e 64 69 6e 67 20 e corresponding
2230: 74 69 6d 69 6e 67 73 2e 3c 2f 6c 69 3e 0d 0a 3c timings.</li>..<
2240: 2f 75 6c 3e 3c 62 72 3e 0d 0a 3c 2f 74 64 3e 3c /ul><br>..</td><
2250: 2f 74 72 3e 0d 0a 3c 2f 74 61 62 6c 65 3e 0d 0a /tr>..</table>..
2260: 3c 68 34 3e 42 72 69 6e 67 69 6e 67 20 74 68 69 <h4>Bringing thi
2270: 6e 67 73 20 74 6f 20 61 20 68 65 61 64 3a 20 72 ngs to a head: r
2280: 75 6e 6e 69 6e 67 20 74 68 65 20 74 65 73 74 3c unning the test<
2290: 2f 68 34 3e 0d 0a 3c 76 65 72 62 61 74 69 6d 3e /h4>..<verbatim>
22a0: 0d 0a 23 20 73 70 61 74 69 61 6c 69 74 65 20 6d ..# spatialite m
22b0: 79 5f 74 65 73 74 2e 73 71 6c 69 74 65 20 3c 20 y_test.sqlite <
22c0: 74 65 73 74 2e 73 71 6c 0d 0a 0d 0a 53 70 61 74 test.sql....Spat
22d0: 69 61 4c 69 74 65 20 76 65 72 73 69 6f 6e 20 2e iaLite version .
22e0: 2e 3a 20 34 2e 30 2e 30 2d 52 43 32 09 53 75 70 .: 4.0.0-RC2.Sup
22f0: 70 6f 72 74 65 64 20 45 78 74 65 6e 73 69 6f 6e ported Extension
2300: 73 3a 0d 0a 09 2d 20 27 56 69 72 74 75 61 6c 53 s:...- 'VirtualS
2310: 68 61 70 65 27 09 5b 64 69 72 65 63 74 20 53 68 hape'.[direct Sh
2320: 61 70 65 66 69 6c 65 20 61 63 63 65 73 73 5d 0d apefile access].
2330: 0a 09 2d 20 27 56 69 72 74 75 61 6c 44 62 66 27 ..- 'VirtualDbf'
2340: 09 09 5b 64 69 72 65 63 74 20 44 42 46 20 61 63 ..[direct DBF ac
2350: 63 65 73 73 5d 0d 0a 09 2d 20 27 56 69 72 74 75 cess]...- 'Virtu
2360: 61 6c 58 4c 27 09 09 5b 64 69 72 65 63 74 20 58 alXL'..[direct X
2370: 4c 53 20 61 63 63 65 73 73 5d 0d 0a 09 2d 20 27 LS access]...- '
2380: 56 69 72 74 75 61 6c 54 65 78 74 27 09 09 5b 64 VirtualText'..[d
2390: 69 72 65 63 74 20 43 53 56 2f 54 58 54 20 61 63 irect CSV/TXT ac
23a0: 63 65 73 73 5d 0d 0a 09 2d 20 27 56 69 72 74 75 cess]...- 'Virtu
23b0: 61 6c 4e 65 74 77 6f 72 6b 27 09 5b 44 69 6a 6b alNetwork'.[Dijk
23c0: 73 74 72 61 20 73 68 6f 72 74 65 73 74 20 70 61 stra shortest pa
23d0: 74 68 5d 0d 0a 09 2d 20 27 52 54 72 65 65 27 09 th]...- 'RTree'.
23e0: 09 5b 53 70 61 74 69 61 6c 20 49 6e 64 65 78 20 .[Spatial Index
23f0: 2d 20 52 2a 54 72 65 65 5d 0d 0a 09 2d 20 27 4d - R*Tree]...- 'M
2400: 62 72 43 61 63 68 65 27 09 09 5b 53 70 61 74 69 brCache'..[Spati
2410: 61 6c 20 49 6e 64 65 78 20 2d 20 4d 42 52 20 63 al Index - MBR c
2420: 61 63 68 65 5d 0d 0a 09 2d 20 27 56 69 72 74 75 ache]...- 'Virtu
2430: 61 6c 53 70 61 74 69 61 6c 49 6e 64 65 78 27 09 alSpatialIndex'.
2440: 5b 52 2a 54 72 65 65 20 6d 65 74 61 68 61 6e 64 [R*Tree metahand
2450: 6c 65 72 5d 0d 0a 09 2d 20 27 56 69 72 74 75 61 ler]...- 'Virtua
2460: 6c 46 44 4f 27 09 09 5b 46 44 4f 2d 4f 47 52 20 lFDO'..[FDO-OGR
2470: 69 6e 74 65 72 6f 70 65 72 61 62 69 6c 69 74 79 interoperability
2480: 5d 0d 0a 09 2d 20 27 53 70 61 74 69 61 4c 69 74 ]...- 'SpatiaLit
2490: 65 27 09 09 5b 53 70 61 74 69 61 6c 20 53 51 4c e'..[Spatial SQL
24a0: 20 2d 20 4f 47 43 5d 0d 0a 50 52 4f 4a 2e 34 20 - OGC]..PROJ.4
24b0: 76 65 72 73 69 6f 6e 20 2e 2e 2e 2e 2e 2e 3a 20 version ......:
24c0: 52 65 6c 2e 20 34 2e 37 2e 31 2c 20 32 33 20 53 Rel. 4.7.1, 23 S
24d0: 65 70 74 65 6d 62 65 72 20 32 30 30 39 0d 0a 47 eptember 2009..G
24e0: 45 4f 53 20 76 65 72 73 69 6f 6e 20 2e 2e 2e 2e EOS version ....
24f0: 2e 2e 2e 2e 3a 20 33 2e 32 2e 30 2d 43 41 50 49 ....: 3.2.0-CAPI
2500: 2d 31 2e 36 2e 30 0d 0a 0d 0a 32 30 31 32 2d 31 -1.6.0....2012-1
2510: 31 2d 31 30 20 30 30 3a 30 33 3a 35 32 7c 4c 6f 1-10 00:03:52|Lo
2520: 61 64 69 6e 67 20 74 68 65 20 53 74 75 64 79 41 ading the StudyA
2530: 72 65 61 20 53 48 50 0d 0a 32 30 31 32 2d 31 31 rea SHP..2012-11
2540: 2d 31 30 20 30 30 3a 30 33 3a 35 32 7c 4c 6f 61 -10 00:03:52|Loa
2550: 64 69 6e 67 20 74 68 65 20 43 6f 6e 74 6f 75 72 ding the Contour
2560: 73 20 53 48 50 0d 0a 32 30 31 32 2d 31 31 2d 31 s SHP..2012-11-1
2570: 30 20 30 30 3a 30 34 3a 35 34 7c 43 6c 69 70 70 0 00:04:54|Clipp
2580: 69 6e 67 20 2e 2e 2e 20 70 6c 65 61 73 65 20 77 ing ... please w
2590: 61 69 74 0d 0a 32 30 31 32 2d 31 31 2d 31 30 20 ait..2012-11-10
25a0: 30 30 3a 30 37 3a 33 31 7c 64 65 6c 65 74 69 6e 00:07:31|deletin
25b0: 67 20 4e 55 4c 4c 20 47 65 6f 6d 65 74 72 69 65 g NULL Geometrie
25c0: 73 0d 0a 32 30 31 32 2d 31 31 2d 31 30 20 30 30 s..2012-11-10 00
25d0: 3a 30 37 3a 33 33 7c 72 65 63 6f 76 65 72 69 6e :07:33|recoverin
25e0: 67 20 61 20 67 65 6e 75 69 6e 65 20 47 65 6f 6d g a genuine Geom
25f0: 65 74 72 79 20 63 6f 6c 75 6d 6e 0d 0a 32 30 31 etry column..201
2600: 32 2d 31 31 2d 31 30 20 30 30 3a 30 37 3a 33 34 2-11-10 00:07:34
2610: 7c 63 72 65 61 74 69 6e 67 20 74 68 65 20 53 70 |creating the Sp
2620: 61 74 69 61 6c 20 49 6e 64 65 78 0d 0a 32 30 31 atial Index..201
2630: 32 2d 31 31 2d 31 30 20 30 30 3a 30 37 3a 33 36 2-11-10 00:07:36
2640: 7c 61 6c 6c 20 64 6f 6e 65 20 2e 2e 2e 20 71 75 |all done ... qu
2650: 69 74 74 69 6e 67 0d 0a 23 0d 0a 3c 2f 76 65 72 itting..#..</ver
2660: 62 61 74 69 6d 3e 0d 0a 3c 68 32 3e 46 69 6e 61 batim>..<h2>Fina
2670: 6c 20 63 6f 6e 73 69 64 65 72 61 74 69 6f 6e 73 l considerations
2680: 3c 2f 68 32 3e 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 </h2>..<ul>..<li
2690: 3e 54 68 65 20 77 68 6f 6c 65 20 70 72 6f 63 65 >The whole proce
26a0: 73 73 20 74 6f 6f 6b 20 6c 65 73 73 20 74 68 61 ss took less tha
26b0: 6e 20 3c 62 3e 34 20 6d 69 6e 75 74 65 73 3c 2f n <b>4 minutes</
26c0: 62 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 41 62 6f b></li>..<li>Abo
26d0: 75 74 20 3c 62 3e 31 20 6d 69 6e 75 74 65 3c 2f ut <b>1 minute</
26e0: 62 3e 20 77 61 73 20 73 70 65 6e 74 20 6c 6f 61 b> was spent loa
26f0: 64 69 6e 67 20 74 68 65 20 53 68 61 70 65 66 69 ding the Shapefi
2700: 6c 65 73 20 61 6e 64 20 62 75 69 6c 64 69 6e 67 les and building
2710: 20 74 68 65 20 73 75 70 70 6f 72 74 69 6e 67 20 the supporting
2720: 53 70 61 74 69 61 6c 20 49 6e 64 65 78 3c 2f 6c Spatial Index</l
2730: 69 3e 0d 0a 3c 6c 69 3e 4c 65 73 73 20 74 68 61 i>..<li>Less tha
2740: 6e 20 3c 62 3e 31 30 20 73 65 63 6f 6e 64 73 3c n <b>10 seconds<
2750: 2f 62 3e 20 77 65 72 65 20 73 70 65 6e 74 20 70 /b> were spent p
2760: 65 72 66 6f 72 6d 69 6e 67 20 70 6f 73 74 2d 70 erforming post-p
2770: 72 6f 63 65 73 73 69 6e 67 20 73 74 65 70 73 2e rocessing steps.
2780: 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 54 68 65 20 68 </li>..<li>The h
2790: 61 72 64 2d 63 6f 72 65 20 70 72 6f 62 6c 65 6d ard-core problem
27a0: 20 69 74 73 65 6c 66 20 28 67 65 6e 65 72 61 74 itself (generat
27b0: 69 6e 67 20 61 20 43 6c 69 70 70 65 64 20 73 65 ing a Clipped se
27c0: 74 20 6f 66 20 43 6f 6e 74 6f 75 72 20 4c 69 6e t of Contour Lin
27d0: 65 73 29 20 74 6f 6f 6b 20 61 62 6f 75 74 20 3c es) took about <
27e0: 62 3e 32 20 6d 69 6e 75 74 65 73 20 61 6e 64 20 b>2 minutes and
27f0: 68 61 6c 66 3c 2f 62 3e 2e 3c 2f 6c 69 3e 0d 0a half</b>.</li>..
2800: 3c 2f 75 6c 3e 3c 62 72 3e 0d 0a 3c 75 3e 50 6c </ul><br>..<u>Pl
2810: 65 61 73 65 20 6e 6f 74 65 3c 2f 75 3e 3a 20 74 ease note</u>: t
2820: 68 69 73 20 3c 62 3e 43 6c 69 70 70 69 6e 67 20 his <b>Clipping
2830: 43 6f 6e 74 65 73 74 3c 2f 62 3e 20 72 65 61 6c Contest</b> real
2840: 6c 79 20 69 73 20 6c 69 6b 65 20 3c 62 3e 63 6f ly is like <b>co
2850: 6d 70 61 72 69 6e 67 20 61 70 70 6c 65 73 20 61 mparing apples a
2860: 6e 64 20 6f 72 61 6e 67 65 73 3c 2f 62 3e 2e 0d nd oranges</b>..
2870: 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 74 68 65 20 43 .<ul>..<li>the C
2880: 50 55 73 20 75 73 65 64 20 74 6f 20 61 63 74 75 PUs used to actu
2890: 61 6c 6c 79 20 72 75 6e 20 74 68 65 20 74 65 73 ally run the tes
28a0: 74 73 20 61 72 65 20 6f 66 20 64 69 66 66 65 72 ts are of differ
28b0: 65 6e 74 20 67 65 6e 65 72 61 74 69 6f 6e 73 2c ent generations,
28c0: 20 61 6e 64 20 6f 62 76 69 6f 75 73 6c 79 20 68 and obviously h
28d0: 61 76 65 20 64 69 66 66 65 72 65 6e 74 20 69 6e ave different in
28e0: 74 72 69 6e 73 69 63 20 73 70 65 65 64 73 2e 3c trinsic speeds.<
28f0: 2f 6c 69 3e 0d 0a 3c 6c 69 3e 69 74 27 73 20 6e /li>..<li>it's n
2900: 6f 74 20 61 74 20 61 6c 6c 20 63 6c 65 61 72 6c ot at all clearl
2910: 79 20 73 74 61 74 65 64 20 69 66 20 74 68 65 20 y stated if the
2920: 44 65 73 6b 74 6f 70 20 47 49 53 20 61 70 70 73 Desktop GIS apps
2930: 20 70 65 72 6d 61 6e 65 6e 74 6c 79 20 73 61 76 permanently sav
2940: 65 64 20 74 68 65 20 43 6c 69 70 70 65 64 20 43 ed the Clipped C
2950: 6f 6e 74 6f 75 72 20 4c 69 6e 65 73 20 73 6f 6d ontour Lines som
2960: 65 77 68 65 72 65 20 6f 72 20 6e 6f 74 2e 20 41 ewhere or not. A
2970: 6e 64 20 69 74 27 73 20 6e 6f 74 20 61 74 20 61 nd it's not at a
2980: 6c 6c 20 63 6c 65 61 72 20 77 68 69 63 68 20 6b ll clear which k
2990: 69 6e 64 20 6f 66 20 64 61 74 61 20 73 74 6f 72 ind of data stor
29a0: 61 67 65 20 74 68 65 79 20 75 73 65 64 20 28 64 age they used (d
29b0: 69 72 65 63 74 6c 79 20 61 63 63 65 73 73 69 6e irectly accessin
29c0: 67 20 74 68 65 20 64 69 73 6b 2d 62 61 73 65 64 g the disk-based
29d0: 20 53 68 61 70 65 66 69 6c 65 73 20 3f 20 6c 6f Shapefiles ? lo
29e0: 61 64 69 6e 67 20 61 6c 6c 20 74 68 65 20 73 74 ading all the st
29f0: 75 66 66 20 69 6e 20 6d 65 6d 6f 72 79 20 3f 20 uff in memory ?
2a00: 73 6f 6d 65 20 6f 74 68 65 72 20 6b 69 6e 64 20 some other kind
2a10: 6f 66 20 70 72 6f 70 65 72 6c 79 20 73 74 72 75 of properly stru
2a20: 63 74 75 72 65 64 20 64 69 73 6b 2d 62 61 73 65 ctured disk-base
2a30: 64 20 73 74 6f 72 61 67 65 2c 20 6d 61 79 20 62 d storage, may b
2a40: 65 20 74 65 6d 70 6f 72 61 72 79 20 61 6e 64 20 e temporary and
2a50: 74 72 61 6e 73 69 65 6e 74 20 3f 29 3c 2f 6c 69 transient ?)</li
2a60: 3e 0d 0a 3c 6c 69 3e 74 68 65 20 61 6d 6f 75 6e >..<li>the amoun
2a70: 74 20 6f 66 20 61 76 61 69 6c 61 62 6c 65 20 52 t of available R
2a80: 41 4d 20 69 73 20 61 62 73 6f 6c 75 74 65 6c 79 AM is absolutely
2a90: 20 6e 6f 74 20 72 65 6c 65 76 61 6e 74 3b 20 74 not relevant; t
2aa0: 68 69 73 20 43 6f 6e 74 65 73 74 20 63 6f 75 6c his Contest coul
2ab0: 64 20 65 76 65 6e 74 75 61 6c 6c 79 20 62 65 6e d eventually ben
2ac0: 65 66 69 74 20 66 72 6f 6d 20 61 20 66 61 73 74 efit from a fast
2ad0: 65 72 20 43 50 55 2c 20 62 75 74 20 74 68 65 20 er CPU, but the
2ae0: 72 65 71 75 69 72 65 64 20 6d 65 6d 6f 72 79 20 required memory
2af0: 66 6f 6f 74 70 72 69 6e 74 20 69 73 20 6d 69 6e footprint is min
2b00: 69 6d 61 6c 20 28 6a 75 73 74 20 66 65 77 20 68 imal (just few h
2b10: 75 6e 64 72 65 64 74 68 20 4d 42 20 69 6e 20 74 undredth MB in t
2b20: 68 65 20 53 70 61 74 69 61 4c 69 74 65 27 73 20 he SpatiaLite's
2b30: 63 61 73 65 29 2e 0d 0a 43 6f 6e 73 75 6d 69 6e case)...Consumin
2b40: 67 20 68 75 67 65 20 61 6d 6f 75 6e 74 73 20 6f g huge amounts o
2b50: 66 20 52 41 4d 20 64 6f 65 73 6e 27 74 20 6c 6f f RAM doesn't lo
2b60: 6f 6b 73 20 61 74 20 61 6c 6c 20 61 20 77 69 73 oks at all a wis
2b70: 65 20 73 6f 6c 75 74 69 6f 6e 2c 20 61 6e 64 20 e solution, and
2b80: 69 73 6e 27 74 20 61 74 20 61 6c 6c 20 73 74 72 isn't at all str
2b90: 69 63 74 6c 79 20 72 65 71 75 69 72 65 64 20 69 ictly required i
2ba0: 6e 20 74 68 69 73 20 73 70 65 63 69 66 69 63 20 n this specific
2bb0: 63 61 73 65 2e 20 57 68 65 6e 20 73 75 63 68 20 case. When such
2bc0: 61 20 63 6f 6e 64 69 74 69 6f 6e 20 65 6d 65 72 a condition emer
2bd0: 67 65 73 20 74 68 69 73 20 77 69 6c 6c 20 70 72 ges this will pr
2be0: 6f 62 61 62 6c 79 20 6d 65 61 6e 20 74 68 61 74 obably mean that
2bf0: 20 73 6f 6d 65 20 3c 75 3e 3c 69 3e 62 61 72 62 some <u><i>barb
2c00: 61 72 69 63 20 62 72 75 74 65 2d 66 6f 72 63 65 aric brute-force
2c10: 3c 2f 69 3e 3c 2f 75 3e 20 64 61 74 61 20 61 63 </i></u> data ac
2c20: 63 65 73 73 20 73 74 72 61 74 65 67 79 20 68 61 cess strategy ha
2c30: 73 20 62 65 65 6e 20 62 61 64 6c 79 20 61 64 6f s been badly ado
2c40: 70 74 65 64 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e pted.</li>..<li>
2c50: 61 64 6f 70 74 69 6e 67 20 73 6f 6d 65 20 6b 69 adopting some ki
2c60: 6e 64 20 6f 66 20 70 61 72 61 6c 6c 65 6c 20 70 nd of parallel p
2c70: 72 6f 63 65 73 73 69 6e 67 20 77 69 6c 6c 20 6f rocessing will o
2c80: 62 76 69 6f 75 73 6c 79 20 69 6e 74 72 6f 64 75 bviously introdu
2c90: 63 65 20 61 20 6e 6f 74 69 63 65 61 62 6c 65 20 ce a noticeable
2ca0: 70 65 72 66 6f 72 6d 61 6e 63 65 20 62 6f 6f 73 performance boos
2cb0: 74 20 28 53 70 61 74 69 61 4c 69 74 65 20 69 73 t (SpatiaLite is
2cc0: 20 73 69 6e 67 6c 65 20 74 68 72 65 61 64 65 64 single threaded
2cd0: 3b 20 73 6f 20 75 73 69 6e 67 20 61 20 71 75 61 ; so using a qua
2ce0: 64 2d 63 6f 72 65 20 70 72 6f 63 65 73 73 6f 72 d-core processor
2cf0: 20 68 61 64 20 61 62 73 6f 6c 75 74 65 6c 79 20 had absolutely
2d00: 6e 6f 20 65 66 66 65 63 74 20 61 74 20 61 6c 6c no effect at all
2d10: 29 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a ).</li>..</ul>..
2d20: 3c 68 34 3e 57 68 61 74 20 61 72 65 20 77 65 20 <h4>What are we
2d30: 6d 65 61 73 75 72 69 6e 67 2c 20 72 65 61 6c 6c measuring, reall
2d40: 79 20 3f 3c 2f 68 34 3e 0d 0a 3c 75 6c 3e 0d 0a y ?</h4>..<ul>..
2d50: 3c 6c 69 3e 6d 61 6e 79 20 47 46 4f 53 53 20 69 <li>many GFOSS i
2d60: 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 20 28 mplementations (
2d70: 51 47 49 53 2c 20 50 6f 73 74 47 49 53 2c 20 53 QGIS, PostGIS, S
2d80: 70 61 74 69 61 4c 69 74 65 29 20 61 72 65 20 62 patiaLite) are b
2d90: 61 73 65 64 20 6f 6e 20 3c 61 20 68 72 65 66 3d ased on <a href=
2da0: 22 68 74 74 70 3a 2f 2f 74 72 61 63 2e 6f 73 67 "http://trac.osg
2db0: 65 6f 2e 6f 72 67 2f 67 65 6f 73 2f 22 3e 47 45 eo.org/geos/">GE
2dc0: 4f 53 3c 2f 61 3e 3b 20 73 6f 20 61 6e 79 20 6d OS</a>; so any m
2dd0: 65 61 73 75 72 65 64 20 74 69 6d 65 20 65 66 66 easured time eff
2de0: 65 63 74 69 76 65 6c 79 20 72 65 70 72 65 73 65 ectively represe
2df0: 6e 74 73 20 74 68 65 20 69 6e 74 72 69 6e 73 69 nts the intrinsi
2e00: 63 20 65 66 66 69 63 69 65 6e 63 79 20 6f 66 20 c efficiency of
2e10: 47 45 4f 53 20 6d 75 63 68 20 6d 6f 72 65 20 74 GEOS much more t
2e20: 68 61 6e 20 74 68 65 20 65 66 66 69 63 69 65 6e han the efficien
2e30: 63 79 20 6f 66 20 74 68 65 20 74 6f 70 2d 6c 65 cy of the top-le
2e40: 76 65 6c 20 61 70 70 6c 69 63 61 74 69 6f 6e 20 vel application
2e50: 69 74 73 65 6c 66 2e 0d 0a 49 66 20 61 20 64 69 itself...If a di
2e60: 66 66 65 72 65 6e 63 65 20 65 78 69 73 74 73 20 fference exists
2e70: 62 65 74 77 65 65 6e 20 64 69 66 66 65 72 65 6e between differen
2e80: 74 20 47 45 4f 53 2d 62 61 73 65 64 20 61 70 70 t GEOS-based app
2e90: 73 2c 20 74 68 69 73 20 69 73 20 73 69 6d 70 6c s, this is simpl
2ea0: 79 20 77 68 65 6e 20 74 68 65 20 74 6f 70 2d 6c y when the top-l
2eb0: 65 76 65 6c 20 61 70 70 73 20 62 61 64 6c 79 20 evel apps badly
2ec0: 69 6e 74 72 6f 64 75 63 65 73 20 73 6f 6d 65 20 introduces some
2ed0: 66 75 72 74 68 65 72 20 6f 76 65 72 68 65 61 64 further overhead
2ee0: 20 74 68 75 73 20 72 65 64 75 63 69 6e 67 20 74 thus reducing t
2ef0: 68 65 20 6f 76 65 72 61 6c 6c 20 65 66 66 69 63 he overall effic
2f00: 69 65 6e 63 79 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 iency.</li>..<li
2f10: 3e 6f 74 68 65 72 20 47 46 4f 53 53 20 4a 61 76 >other GFOSS Jav
2f20: 61 20 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e a implementation
2f30: 73 20 28 67 76 53 49 47 2c 20 4f 70 65 6e 4a 75 s (gvSIG, OpenJu
2f40: 6d 70 2c 20 75 44 49 47 29 20 61 72 65 20 62 61 mp, uDIG) are ba
2f50: 73 65 64 20 6f 6e 20 3c 61 20 68 72 65 66 3d 22 sed on <a href="
2f60: 68 74 74 70 3a 2f 2f 77 77 77 2e 76 69 76 69 64 http://www.vivid
2f70: 73 6f 6c 75 74 69 6f 6e 73 2e 63 6f 6d 2f 6a 74 solutions.com/jt
2f80: 73 2f 6a 74 73 68 6f 6d 65 2e 68 74 6d 22 3e 4a s/jtshome.htm">J
2f90: 54 53 3c 2f 61 3e 3b 20 62 75 74 20 47 45 4f 53 TS</a>; but GEOS
2fa0: 20 73 69 6d 70 6c 79 20 69 73 20 61 20 74 72 61 simply is a tra
2fb0: 6e 73 70 6f 73 69 74 69 6f 6e 20 69 6e 20 43 2b nsposition in C+
2fc0: 2b 20 6f 66 20 74 68 65 20 6f 72 69 67 69 6e 61 + of the origina
2fd0: 6c 20 4a 61 76 61 2d 62 61 73 65 64 4a 54 53 2c l Java-basedJTS,
2fe0: 20 74 68 65 20 75 6e 64 65 72 6c 61 79 69 6e 67 the underlaying
2ff0: 20 61 6c 67 6f 72 69 74 68 6d 73 20 61 72 65 20 algorithms are
3000: 65 78 61 63 74 6c 79 20 74 68 65 20 73 61 6d 65 exactly the same
3010: 20 66 6f 72 20 62 6f 74 68 20 6c 69 62 72 61 72 for both librar
3020: 69 65 73 2e 0d 0a 53 6f 2c 20 72 6f 75 67 68 6c ies...So, roughl
3030: 79 20 73 70 65 61 6b 69 6e 67 2c 20 61 6c 6c 20 y speaking, all
3040: 47 46 4f 53 53 20 61 70 70 6c 69 63 61 74 69 6f GFOSS applicatio
3050: 6e 73 20 28 62 6f 74 68 20 43 2c 20 43 2b 2b 20 ns (both C, C++
3060: 61 6e 64 20 4a 61 76 61 29 20 61 66 74 65 72 20 and Java) after
3070: 61 6c 6c 20 61 72 65 20 62 61 73 65 64 20 6f 6e all are based on
3080: 20 74 68 65 20 74 6f 70 20 6f 66 20 74 68 65 20 the top of the
3090: 73 61 6d 65 20 62 61 73 65 2d 6c 65 76 65 6c 20 same base-level
30a0: 61 6c 67 6f 72 69 74 68 6d 73 2e 0d 0a 41 6e 64 algorithms...And
30b0: 20 6e 6f 74 20 61 74 20 61 6c 6c 20 73 75 72 70 not at all surp
30c0: 72 69 73 69 6e 67 6c 79 20 61 6c 6c 20 6d 65 61 risingly all mea
30d0: 73 75 72 65 64 20 74 69 6d 69 6e 67 73 20 61 72 sured timings ar
30e0: 65 20 71 75 69 74 65 20 65 78 61 63 74 6c 79 20 e quite exactly
30f0: 74 68 65 20 73 61 6d 65 2e 3c 2f 6c 69 3e 0d 0a the same.</li>..
3100: 3c 6c 69 3e 77 69 74 68 20 74 68 65 20 72 65 6d <li>with the rem
3110: 61 72 6b 61 62 6c 65 20 65 78 63 65 70 74 69 6f arkable exceptio
3120: 6e 20 6f 66 20 47 52 41 53 53 20 47 49 53 3b 20 n of GRASS GIS;
3130: 74 68 69 73 20 6f 6e 65 20 61 64 6f 70 74 73 20 this one adopts
3140: 61 6e 20 6f 72 69 67 69 6e 61 6c 20 61 70 70 72 an original appr
3150: 6f 61 63 68 20 6f 66 20 69 74 73 20 6f 77 6e 2c oach of its own,
3160: 20 62 65 69 6e 67 20 62 61 73 65 64 20 6f 6e 20 being based on
3170: 61 20 63 6f 6e 63 65 70 74 75 61 6c 6c 79 20 64 a conceptually d
3180: 69 66 66 65 72 65 6e 74 20 47 65 6f 6d 65 74 72 ifferent Geometr
3190: 79 20 6d 6f 64 65 6c 20 28 74 6f 70 6f 6c 6f 67 y model (topolog
31a0: 79 20 76 73 20 73 69 6d 70 6c 65 20 66 65 61 74 y vs simple feat
31b0: 75 72 65 73 29 2e 0d 0a 41 6e 79 77 61 79 2c 20 ures)...Anyway,
31c0: 69 6e 20 74 68 69 73 20 63 61 73 65 20 74 6f 6f in this case too
31d0: 20 74 69 6d 69 6e 67 73 20 61 72 65 20 76 65 72 timings are ver
31e0: 79 20 73 69 6d 69 6c 61 72 20 74 6f 20 74 68 65 y similar to the
31f0: 20 6f 74 68 65 72 73 2e 3c 2f 6c 69 3e 0d 0a 3c others.</li>..<
3200: 6c 69 3e 49 4d 48 4f 20 69 74 27 73 20 61 20 67 li>IMHO it's a g
3210: 6f 6f 64 20 64 65 6d 6f 6e 73 74 72 61 74 69 6f ood demonstratio
3220: 6e 20 74 68 61 74 20 77 65 20 68 61 76 65 20 63 n that we have c
3230: 6f 6d 70 6c 65 73 73 69 76 65 6c 79 20 72 65 61 omplessively rea
3240: 63 68 65 64 20 74 68 65 20 62 65 73 74 20 70 6f ched the best po
3250: 73 73 69 62 6c 65 20 65 66 66 69 63 69 65 6e 63 ssible efficienc
3260: 79 20 66 6f 72 20 74 68 69 73 20 6b 69 6e 64 20 y for this kind
3270: 6f 66 20 70 72 6f 62 6c 65 6d 73 2e 20 41 6e 64 of problems. And
3280: 20 74 68 61 74 20 6f 70 65 6e 6e 65 73 73 20 63 that openness c
3290: 6f 6d 62 69 6e 65 64 20 77 69 74 68 20 63 6f 6c ombined with col
32a0: 6c 61 62 6f 72 61 74 69 6f 6e 2f 63 6f 6d 70 65 laboration/compe
32b0: 74 69 74 69 6f 6e 20 62 65 74 77 65 65 6e 20 6d tition between m
32c0: 61 6e 79 20 64 69 66 66 65 72 65 6e 74 20 69 6e any different in
32d0: 64 65 70 65 6e 64 65 6e 74 20 70 72 6f 6a 65 63 dependent projec
32e0: 74 73 20 61 6c 77 61 79 73 20 6c 65 61 64 73 20 ts always leads
32f0: 74 6f 20 67 6f 6f 64 2c 20 72 6f 62 75 73 74 20 to good, robust
3300: 61 6e 64 20 65 66 66 69 63 69 65 6e 74 20 73 6f and efficient so
3310: 66 74 77 61 72 65 2e 3c 2f 6c 69 3e 0d 0a 3c 6c ftware.</li>..<l
3320: 69 3e 6d 61 6e 79 20 70 72 6f 70 72 69 65 74 61 i>many proprieta
3330: 72 79 20 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f ry implementatio
3340: 6e 73 20 6c 6f 6f 6b 73 20 74 6f 20 62 65 20 65 ns looks to be e
3350: 6d 62 61 72 72 61 73 73 61 6e 67 6c 79 20 6c 65 mbarrassangly le
3360: 73 73 20 65 66 66 69 63 69 65 6e 74 2e 0d 0a 41 ss efficient...A
3370: 20 73 61 64 20 64 65 6d 6f 6e 73 74 72 61 74 69 sad demonstrati
3380: 6f 6e 20 74 68 61 74 20 61 20 64 65 76 65 6c 6f on that a develo
3390: 70 6d 65 6e 74 20 70 6f 6c 69 63 79 20 62 61 73 pment policy bas
33a0: 65 64 20 6f 6e 20 63 6c 6f 73 65 64 6e 65 73 73 ed on closedness
33b0: 20 61 6e 64 20 73 65 63 72 65 63 79 20 76 65 72 and secrecy ver
33c0: 79 20 64 69 66 66 69 63 75 6c 74 6c 79 20 70 61 y difficultly pa
33d0: 79 73 20 6f 6e 20 6c 6f 6e 67 20 74 65 72 6d 20 ys on long term
33e0: 70 65 72 69 6f 64 73 2e 3c 2f 6c 69 3e 0d 0a 3c periods.</li>..<
33f0: 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c 62 72 /li>..</ul>..<br
3400: 3e 3c 68 72 3e 0d 0a 42 61 63 6b 20 74 6f 20 3c ><hr>..Back to <
3410: 61 20 68 72 65 66 3d 22 68 74 74 70 73 3a 2f 2f a href="https://
3420: 77 77 77 2e 67 61 69 61 2d 67 69 73 2e 69 74 2f www.gaia-gis.it/
3430: 66 6f 73 73 69 6c 2f 6c 69 62 73 70 61 74 69 61 fossil/libspatia
3440: 6c 69 74 65 2f 77 69 6b 69 3f 6e 61 6d 65 3d 73 lite/wiki?name=s
3450: 77 69 74 63 68 69 6e 67 2d 74 6f 2d 34 2e 30 23 witching-to-4.0#
3460: 76 69 72 74 75 61 6c 6f 67 72 22 3e 6d 61 69 6e virtualogr">main
3470: 20 70 61 67 65 3c 2f 61 3e 0a 5a 20 34 34 37 31 page</a>.Z 4471
3480: 31 37 33 30 65 61 65 37 62 62 31 63 66 37 35 64 1730eae7bb1cf75d
3490: 36 34 62 33 37 33 63 63 65 64 30 64 0a 64b373cced0d.