Hex Artifact Content
Not logged in

Artifact d58fb3a802e01efc38cef7d978be63a4b3361a63:

Wiki page [Affine Transform] by sandro 2015-05-02 14:42:19.
0000: 44 20 32 30 31 35 2d 30 35 2d 30 32 54 31 34 3a  D 2015-05-02T14:
0010: 34 32 3a 31 39 2e 39 38 33 0a 4c 20 41 66 66 69  42:19.983.L Affi
0020: 6e 65 5c 73 54 72 61 6e 73 66 6f 72 6d 0a 50 20  ne\sTransform.P 
0030: 61 62 35 65 65 64 63 61 38 31 32 62 64 34 36 31  ab5eedca812bd461
0040: 62 36 61 65 62 65 33 64 30 66 64 31 63 61 34 31  b6aebe3d0fd1ca41
0050: 34 39 63 37 36 37 64 64 0a 55 20 73 61 6e 64 72  49c767dd.U sandr
0060: 6f 0a 57 20 31 34 38 33 32 0a 3c 61 20 68 72 65  o.W 14832.<a hre
0070: 66 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 67  f="https://www.g
0080: 61 69 61 2d 67 69 73 2e 69 74 2f 66 6f 73 73 69  aia-gis.it/fossi
0090: 6c 2f 6c 69 62 73 70 61 74 69 61 6c 69 74 65 2f  l/libspatialite/
00a0: 77 69 6b 69 3f 6e 61 6d 65 3d 34 2e 32 2e 30 2d  wiki?name=4.2.0-
00b0: 64 6f 63 22 3e 62 61 63 6b 3c 2f 61 3e 0d 0a 3c  doc">back</a>..<
00c0: 68 32 3e 41 66 66 69 6e 65 20 54 72 61 6e 73 66  h2>Affine Transf
00d0: 6f 72 6d 61 74 69 6f 6e 73 3c 2f 68 32 3e 0d 0a  ormations</h2>..
00e0: 53 74 61 72 74 69 6e 67 20 73 69 6e 63 65 20 76  Starting since v
00f0: 65 72 73 69 6f 6e 20 3c 62 3e 34 2e 33 2e 30 3c  ersion <b>4.3.0<
0100: 2f 62 3e 20 53 70 61 74 69 61 4c 69 74 65 20 73  /b> SpatiaLite s
0110: 75 70 70 6f 72 74 73 20 73 65 76 65 72 61 6c 20  upports several 
0120: 6e 65 77 20 53 51 4c 20 66 75 6e 63 74 69 6f 6e  new SQL function
0130: 73 20 62 61 73 65 64 20 6f 6e 20 3c 61 20 68 72  s based on <a hr
0140: 65 66 3d 22 68 74 74 70 3a 2f 2f 65 6e 2e 77 69  ef="http://en.wi
0150: 6b 69 70 65 64 69 61 2e 6f 72 67 2f 77 69 6b 69  kipedia.org/wiki
0160: 2f 41 66 66 69 6e 65 5f 74 72 61 6e 73 66 6f 72  /Affine_transfor
0170: 6d 61 74 69 6f 6e 22 3e 61 66 66 69 6e 65 20 74  mation">affine t
0180: 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 73 3c 2f  ransformations</
0190: 61 3e 3b 20 75 6e 64 65 72 73 74 61 6e 64 69 6e  a>; understandin
01a0: 67 20 61 6c 6c 20 74 68 65 20 75 6e 64 65 72 6c  g all the underl
01b0: 61 79 69 6e 67 20 6d 61 74 68 65 6d 61 74 69 63  aying mathematic
01c0: 73 20 63 6f 75 6c 64 20 65 61 73 69 6c 79 20 62  s could easily b
01d0: 65 20 61 20 72 61 74 68 65 72 20 64 69 66 66 69  e a rather diffi
01e0: 63 75 6c 74 20 74 61 73 6b 2c 20 6d 6f 72 65 20  cult task, more 
01f0: 6e 6f 74 61 62 6c 79 20 69 66 20 79 6f 75 20 68  notably if you h
0200: 61 76 65 20 61 62 73 6f 6c 75 74 65 6c 79 20 6e  ave absolutely n
0210: 6f 20 66 61 6d 69 6c 69 61 72 69 74 79 20 77 69  o familiarity wi
0220: 74 68 20 74 68 69 73 20 6b 69 6e 64 20 6f 66 20  th this kind of 
0230: 6f 70 65 72 61 74 69 6f 6e 73 2e 3c 62 72 3e 0d  operations.<br>.
0240: 0a 53 6f 20 77 65 27 6c 6c 20 73 74 61 72 74 20  .So we'll start 
0250: 73 6d 6f 6f 74 68 6c 79 20 62 79 20 69 6e 74 72  smoothly by intr
0260: 6f 64 75 63 69 6e 67 20 66 69 72 73 74 20 61 20  oducing first a 
0270: 76 65 72 79 20 73 69 6d 70 6c 65 20 70 72 61 63  very simple prac
0280: 74 69 63 61 6c 20 65 78 61 6d 70 6c 65 20 62 61  tical example ba
0290: 73 65 64 20 6f 6e 20 6b 69 6e 64 20 6f 66 20 61  sed on kind of a
02a0: 20 6a 6f 6b 65 20 61 62 6f 75 74 20 74 68 65 20   joke about the 
02b0: 67 65 6f 67 72 61 70 68 79 20 6f 66 20 49 74 61  geography of Ita
02c0: 6c 79 20 61 6e 64 20 53 69 63 69 6c 79 2e 0d 0a  ly and Sicily...
02d0: 3c 68 32 3e 46 61 6e 63 79 20 47 65 6f 67 72 61  <h2>Fancy Geogra
02e0: 70 79 20 61 6e 64 20 61 6d 75 73 69 6e 67 20 4d  py and amusing M
02f0: 61 74 68 3c 2f 68 32 3e 0d 0a 3c 74 61 62 6c 65  ath</h2>..<table
0300: 20 62 6f 72 64 65 72 3d 22 31 22 20 63 65 6c 6c   border="1" cell
0310: 73 70 61 63 69 6e 67 3d 22 34 22 20 63 65 6c 6c  spacing="4" cell
0320: 70 61 64 64 69 6e 67 3d 22 38 22 3e 0d 0a 3c 74  padding="8">..<t
0330: 72 3e 3c 74 64 3e 0d 0a 3c 68 33 3e 50 72 65 66  r><td>..<h3>Pref
0340: 61 63 65 3c 2f 68 33 3e 0d 0a 4c 6f 6f 6b 69 6e  ace</h3>..Lookin
0350: 67 20 74 6f 20 61 20 6d 61 70 20 6f 66 20 49 74  g to a map of It
0360: 61 6c 79 20 69 74 20 61 70 70 65 61 72 73 20 6f  aly it appears o
0370: 62 76 69 6f 75 73 20 61 74 20 66 69 72 73 74 20  bvious at first 
0380: 67 6c 61 6e 63 65 20 74 68 61 74 20 53 69 63 69  glance that Sici
0390: 6c 79 20 69 73 20 6c 6f 63 61 74 65 64 20 69 6e  ly is located in
03a0: 20 61 20 76 65 72 79 20 69 6e 63 6f 6e 76 65 6e   a very inconven
03b0: 69 65 6e 74 20 70 6f 73 69 74 69 6f 6e 3a 0d 0a  ient position:..
03c0: 3c 6f 6c 3e 0d 0a 3c 6c 69 3e 53 69 63 69 63 6c  <ol>..<li>Sicicl
03d0: 79 20 69 73 20 70 6c 61 63 65 64 20 74 6f 6f 20  y is placed too 
03e0: 66 61 72 20 53 6f 75 74 68 20 61 6e 64 20 74 6f  far South and to
03f0: 6f 20 6d 75 63 68 20 63 6c 6f 73 65 20 74 6f 20  o much close to 
0400: 4e 6f 72 74 68 20 41 66 72 69 63 61 3b 20 74 68  North Africa; th
0410: 69 73 20 69 6d 70 6c 69 65 73 20 61 6e 20 75 6e  is implies an un
0420: 70 6c 65 61 73 61 6e 74 20 74 6f 72 72 69 64 20  pleasant torrid 
0430: 73 75 6d 6d 65 72 2c 20 61 6e 64 20 69 6e 20 74  summer, and in t
0440: 75 72 6e 20 74 68 69 73 20 70 6f 73 65 73 20 73  urn this poses s
0450: 65 76 65 72 65 20 6c 69 6d 69 74 61 74 69 6f 6e  evere limitation
0460: 73 20 74 6f 20 61 67 72 69 63 6f 6c 74 75 72 61  s to agricoltura
0470: 6c 20 61 63 74 69 76 69 74 69 65 73 2e 3c 2f 6c  l activities.</l
0480: 69 3e 0d 0a 3c 6c 69 3e 54 68 65 20 3c 61 20 68  i>..<li>The <a h
0490: 72 65 66 3d 22 68 74 74 70 3a 2f 2f 65 6e 2e 77  ref="http://en.w
04a0: 69 6b 69 70 65 64 69 61 2e 6f 72 67 2f 77 69 6b  ikipedia.org/wik
04b0: 69 2f 53 74 72 61 69 74 5f 6f 66 5f 4d 65 73 73  i/Strait_of_Mess
04c0: 69 6e 61 22 3e 53 74 72 61 69 74 20 6f 66 20 4d  ina">Strait of M
04d0: 65 73 73 69 6e 61 3c 2f 61 3e 20 69 73 20 65 78  essina</a> is ex
04e0: 61 67 67 65 72 61 74 65 64 6c 79 20 6e 61 72 72  aggeratedly narr
04f0: 6f 77 2c 20 74 68 75 73 20 70 6f 73 69 6e 67 20  ow, thus posing 
0500: 73 65 76 65 72 65 20 73 65 63 75 72 69 74 79 20  severe security 
0510: 72 69 73 6b 73 20 74 6f 20 74 68 65 20 6e 61 76  risks to the nav
0520: 69 67 61 74 69 6f 6e 20 6f 66 20 63 61 70 69 74  igation of capit
0530: 61 6c 20 73 68 69 70 73 20 61 6e 64 20 73 75 70  al ships and sup
0540: 65 72 74 61 6e 6b 65 72 73 2e 3c 62 72 3e 0d 0a  ertankers.<br>..
0550: 45 76 65 6e 20 77 6f 72 73 74 2c 20 66 72 6f 6d  Even worst, from
0560: 20 74 69 6d 65 20 74 6f 20 74 69 6d 65 20 73 6f   time to time so
0570: 6d 65 20 63 72 61 7a 79 20 70 6f 6c 69 74 69 63  me crazy politic
0580: 69 61 6e 20 73 74 72 6f 6e 67 6c 79 20 61 64 76  ian strongly adv
0590: 6f 63 61 74 65 73 20 74 68 65 20 76 65 72 79 20  ocates the very 
05a0: 73 74 75 70 69 64 20 69 64 65 61 20 74 6f 20 62  stupid idea to b
05b0: 75 69 6c 64 20 61 6e 20 69 6e 63 72 65 64 69 62  uild an incredib
05c0: 6c 79 20 63 6f 73 74 6c 79 20 3c 61 20 68 72 65  ly costly <a hre
05d0: 66 3d 22 68 74 74 70 3a 2f 2f 65 6e 2e 77 69 6b  f="http://en.wik
05e0: 69 70 65 64 69 61 2e 6f 72 67 2f 77 69 6b 69 2f  ipedia.org/wiki/
05f0: 53 74 72 61 69 74 5f 6f 66 5f 4d 65 73 73 69 6e  Strait_of_Messin
0600: 61 5f 42 72 69 64 67 65 22 3e 62 72 69 64 67 65  a_Bridge">bridge
0610: 20 63 72 6f 73 73 69 6e 67 20 74 68 65 20 53 74   crossing the St
0620: 72 61 69 74 3c 2f 61 3e 2c 20 63 6f 6d 70 6c 65  rait</a>, comple
0630: 74 65 6c 79 20 6f 76 65 72 6c 6f 6f 6b 69 6e 67  tely overlooking
0640: 20 74 68 65 20 76 65 72 79 20 68 69 67 68 20 73   the very high s
0650: 65 69 73 6d 69 63 61 6c 20 72 69 73 6b 20 6f 66  eismical risk of
0660: 20 74 68 69 73 20 64 69 73 74 72 69 63 74 20 61   this district a
0670: 6e 64 20 70 75 72 70 6f 73 65 6c 79 20 66 6f 72  nd purposely for
0680: 67 65 74 74 69 6e 67 20 74 6f 20 72 65 6d 65 6d  getting to remem
0690: 62 65 72 20 74 68 61 74 20 69 6e 20 31 39 30 38  ber that in 1908
06a0: 20 62 6f 74 68 20 74 6f 77 6e 73 20 6f 66 20 3c   both towns of <
06b0: 61 20 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f 65  a href="http://e
06c0: 6e 2e 77 69 6b 69 70 65 64 69 61 2e 6f 72 67 2f  n.wikipedia.org/
06d0: 77 69 6b 69 2f 31 39 30 38 5f 4d 65 73 73 69 6e  wiki/1908_Messin
06e0: 61 5f 65 61 72 74 68 71 75 61 6b 65 22 3e 4d 65  a_earthquake">Me
06f0: 73 73 69 6e 61 20 61 6e 64 20 52 65 67 67 69 6f  ssina and Reggio
0700: 20 43 61 6c 61 62 72 69 61 3c 2f 61 3e 20 77 65   Calabria</a> we
0710: 72 65 20 63 6f 6d 70 6c 65 74 65 6c 79 20 64 65  re completely de
0720: 73 74 72 6f 79 65 64 20 62 79 20 61 6e 20 65 61  stroyed by an ea
0730: 72 74 68 71 75 61 6b 65 20 66 6f 6c 6c 6f 77 65  rthquake followe
0740: 64 20 62 79 20 61 20 74 73 75 6e 61 6d 69 2e 3c  d by a tsunami.<
0750: 62 72 3e 0d 0a 4d 6f 72 65 20 74 68 61 6e 20 31  br>..More than 1
0760: 30 30 2c 30 30 30 20 70 65 6f 70 6c 65 73 20 6c  00,000 peoples l
0770: 6f 73 74 20 74 68 65 69 72 20 6c 69 76 65 73 2c  ost their lives,
0780: 20 61 6e 64 20 69 74 20 77 61 73 20 6f 6e 65 20   and it was one 
0790: 6f 66 20 74 68 65 20 6d 6f 73 74 20 66 72 69 67  of the most frig
07a0: 68 74 65 6e 69 6e 67 20 6e 61 74 75 72 61 6c 20  htening natural 
07b0: 64 69 73 61 73 74 65 72 73 20 72 65 67 69 73 74  disasters regist
07c0: 65 72 65 64 20 69 6e 20 45 75 72 6f 70 65 20 64  ered in Europe d
07d0: 75 72 69 6e 67 20 6d 6f 64 65 72 6e 20 74 69 6d  uring modern tim
07e0: 65 73 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 6f 6c 3e 0d  es.</li>..</ol>.
07f0: 0a 53 6f 20 77 65 27 6c 6c 20 69 6d 6d 65 64 69  .So we'll immedi
0800: 61 74 65 6c 79 20 73 74 61 72 74 20 61 20 63 61  ately start a ca
0810: 73 65 20 73 74 75 64 79 20 69 6e 74 65 6e 64 65  se study intende
0820: 64 20 74 6f 20 69 64 65 6e 74 69 66 79 20 61 20  d to identify a 
0830: 70 6f 73 73 69 62 6c 65 20 61 6c 74 65 72 6e 61  possible alterna
0840: 74 69 76 65 20 6c 6f 63 61 74 69 6f 6e 20 66 6f  tive location fo
0850: 72 20 53 69 63 69 6c 79 2e 3c 62 72 3e 0d 0a 49  r Sicily.<br>..I
0860: 6e 63 69 64 65 6e 74 61 6c 6c 79 20 77 65 27 6c  ncidentally we'l
0870: 6c 20 75 73 65 20 74 68 65 20 6e 65 77 20 53 51  l use the new SQ
0880: 4c 20 66 75 6e 63 74 69 6f 6e 73 20 62 61 73 65  L functions base
0890: 64 20 6f 6e 20 41 66 66 69 6e 65 20 54 72 61 6e  d on Affine Tran
08a0: 73 66 6f 72 6d 61 74 69 6f 6e 73 20 66 6f 72 20  sformations for 
08b0: 74 68 69 73 20 74 61 73 6b 2e 3c 62 72 3e 0d 0a  this task.<br>..
08c0: 4c 65 74 27 73 20 67 6f 20 6f 6e 2e 20 20 0d 0a  Let's go on.  ..
08d0: 3c 2f 74 64 3e 3c 74 64 3e 0d 0a 3c 69 6d 67 20  </td><td>..<img 
08e0: 73 72 63 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77  src="https://www
08f0: 2e 67 61 69 61 2d 67 69 73 2e 69 74 2f 67 61 69  .gaia-gis.it/gai
0900: 61 2d 73 69 6e 73 2f 61 66 66 69 6e 65 2d 70 69  a-sins/affine-pi
0910: 63 73 2f 73 69 63 69 6c 79 5f 30 2e 70 6e 67 22  cs/sicily_0.png"
0920: 20 61 6c 74 3d 22 77 66 73 2d 31 22 20 62 6f 72   alt="wfs-1" bor
0930: 64 65 72 3d 22 31 22 3e 0d 0a 3c 2f 74 64 3e 3c  der="1">..</td><
0940: 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 0d 0a  /tr>..<tr><td>..
0950: 3c 68 33 3e 53 74 65 70 20 23 31 3a 20 74 72 61  <h3>Step #1: tra
0960: 6e 73 6c 61 74 69 6e 67 20 53 69 63 69 6c 79 20  nslating Sicily 
0970: 69 6e 74 6f 20 61 20 6d 6f 72 65 20 63 6f 6e 76  into a more conv
0980: 65 6e 69 65 6e 74 20 70 6f 73 69 74 69 6f 6e 3c  enient position<
0990: 2f 68 33 3e 0d 0a 54 68 65 72 65 20 69 73 20 70  /h3>..There is p
09a0: 6c 65 6e 74 79 20 6f 66 20 66 72 65 65 20 72 6f  lenty of free ro
09b0: 6f 6d 20 69 6e 20 74 68 65 20 6c 6f 77 65 72 20  om in the lower 
09c0: 54 79 72 72 68 65 6e 69 61 6e 20 53 65 61 2c 20  Tyrrhenian Sea, 
09d0: 73 6f 20 77 65 27 6c 6c 20 73 74 61 72 74 20 62  so we'll start b
09e0: 79 20 61 70 70 6c 79 69 6e 67 20 61 20 3c 61 20  y applying a <a 
09f0: 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f 65 6e 2e  href="http://en.
0a00: 77 69 6b 69 70 65 64 69 61 2e 6f 72 67 2f 77 69  wikipedia.org/wi
0a10: 6b 69 2f 54 72 61 6e 73 6c 61 74 69 6f 6e 5f 25  ki/Translation_%
0a20: 32 38 67 65 6f 6d 65 74 72 79 25 32 39 22 3e 74  28geometry%29">t
0a30: 72 61 6e 73 6c 61 74 69 6f 6e 3c 2f 61 3e 3a 20  ranslation</a>: 
0a40: 74 68 69 73 20 70 72 61 63 74 69 63 61 6c 6c 79  this practically
0a50: 20 6d 65 61 6e 73 20 61 64 64 69 6e 67 20 28 6f   means adding (o
0a60: 72 20 73 75 62 63 74 72 61 63 74 69 6e 67 29 20  r subctracting) 
0a70: 61 20 63 6f 6e 73 74 61 6e 74 20 76 61 6c 75 65  a constant value
0a80: 20 74 6f 20 74 68 65 20 63 6f 6f 72 64 69 6e 61   to the coordina
0a90: 74 65 73 20 6f 6e 20 62 6f 74 68 20 3c 62 3e 78  tes on both <b>x
0aa0: 3c 2f 62 3e 20 61 6e 64 20 3c 62 3e 79 3c 2f 62  </b> and <b>y</b
0ab0: 3e 20 61 78 65 73 2e 3c 62 72 3e 0d 0a 41 66 74  > axes.<br>..Aft
0ac0: 65 72 20 61 20 76 65 72 79 20 71 75 69 63 6b 20  er a very quick 
0ad0: 65 78 61 6d 69 6e 61 74 69 6f 6e 20 6d 6f 76 69  examination movi
0ae0: 6e 67 20 53 69 63 69 6c 79 20 3c 62 3e 31 35 30  ng Sicily <b>150
0af0: 20 6b 6d 3c 2f 62 3e 20 28 69 2e 65 2e 20 3c 62   km</b> (i.e. <b
0b00: 3e 31 35 30 2c 30 30 30 20 6d 3c 2f 62 3e 29 20  >150,000 m</b>) 
0b10: 77 65 73 74 77 61 72 64 73 20 61 6e 64 20 3c 62  westwards and <b
0b20: 3e 31 35 30 20 6b 6d 3c 2f 62 3e 20 6e 6f 72 74  >150 km</b> nort
0b30: 68 77 61 72 64 73 20 73 65 65 6d 73 20 74 6f 20  hwards seems to 
0b40: 62 65 20 61 6e 20 61 62 73 6f 6c 75 74 65 6c 79  be an absolutely
0b50: 20 72 65 61 73 6f 6e 61 62 6c 65 20 63 68 6f 69   reasonable choi
0b60: 63 65 2e 3c 62 72 3e 0d 0a 53 6f 20 75 73 69 6e  ce.<br>..So usin
0b70: 67 20 74 68 65 20 41 66 66 69 6e 65 20 54 72 61  g the Affine Tra
0b80: 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 53 51 4c 20  nsformation SQL 
0b90: 66 75 6e 63 74 69 6f 6e 73 20 77 65 27 6c 6c 20  functions we'll 
0ba0: 77 72 69 74 65 20 74 68 65 20 66 6f 6c 6c 6f 77  write the follow
0bb0: 69 6e 67 20 53 51 4c 20 73 74 61 74 65 6d 65 6e  ing SQL statemen
0bc0: 74 3a 0d 0a 3c 76 65 72 62 61 74 69 6d 3e 0d 0a  t:..<verbatim>..
0bd0: 43 52 45 41 54 45 20 54 41 42 4c 45 20 73 69 63  CREATE TABLE sic
0be0: 69 6c 69 61 5f 31 20 41 53 0d 0a 53 45 4c 45 43  ilia_1 AS..SELEC
0bf0: 54 20 63 6f 64 5f 72 65 67 2c 20 0d 0a 20 20 20  T cod_reg, ..   
0c00: 41 54 4d 5f 54 72 61 6e 73 66 6f 72 6d 28 67 65  ATM_Transform(ge
0c10: 6f 6d 65 74 72 79 2c 0d 0a 20 20 20 20 20 20 41  ometry,..      A
0c20: 54 4d 5f 43 72 65 61 74 65 54 72 61 6e 73 6c 61  TM_CreateTransla
0c30: 74 65 28 2d 31 35 30 30 30 30 2c 20 31 35 30 30  te(-150000, 1500
0c40: 30 30 29 29 20 41 53 20 67 65 6f 6d 0d 0a 46 52  00)) AS geom..FR
0c50: 4f 4d 20 73 69 63 69 6c 69 61 5f 30 3b 0d 0a 53  OM sicilia_0;..S
0c60: 45 4c 45 43 54 20 52 65 63 6f 76 65 72 47 65 6f  ELECT RecoverGeo
0c70: 6d 65 74 72 79 43 6f 6c 75 6d 6e 28 27 73 69 63  metryColumn('sic
0c80: 69 6c 69 61 5f 31 27 2c 20 27 67 65 6f 6d 27 2c  ilia_1', 'geom',
0c90: 20 33 32 36 33 32 2c 20 27 4d 55 4c 54 49 50 4f   32632, 'MULTIPO
0ca0: 4c 59 47 4f 4e 27 2c 20 27 58 59 27 29 3b 0d 0a  LYGON', 'XY');..
0cb0: 3c 2f 76 65 72 62 61 74 69 6d 3e 20 0d 0a 3c 62  </verbatim> ..<b
0cc0: 3e 52 65 6d 61 72 6b 73 3c 2f 62 3e 3a 0d 0a 3c  >Remarks</b>:..<
0cd0: 75 6c 3e 0d 0a 3c 6c 69 3e 61 6c 6c 20 61 66 66  ul>..<li>all aff
0ce0: 69 6e 65 20 74 72 61 6e 73 66 6f 72 6d 61 74 69  ine transformati
0cf0: 6f 6e 20 72 65 6c 61 74 65 64 20 53 51 4c 20 66  on related SQL f
0d00: 75 6e 63 74 69 6f 6e 20 6e 61 6d 65 73 20 73 74  unction names st
0d10: 61 72 74 20 77 69 74 68 20 61 6e 20 3c 62 3e 41  art with an <b>A
0d20: 54 4d 5f 3c 2f 62 3e 20 70 72 65 66 69 78 3a 20  TM_</b> prefix: 
0d30: 74 68 69 73 20 73 69 6d 70 6c 79 20 73 74 61 6e  this simply stan
0d40: 64 73 20 66 6f 72 20 3c 69 3e 3c 62 3e 3c 75 3e  ds for <i><b><u>
0d50: 41 3c 2f 75 3e 3c 2f 62 3e 66 66 69 6e 65 20 3c  A</u></b>ffine <
0d60: 62 3e 3c 75 3e 54 3c 2f 75 3e 3c 2f 62 3e 72 61  b><u>T</u></b>ra
0d70: 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 3c 62 3e 3c  nsformation <b><
0d80: 75 3e 4d 3c 2f 75 3e 3c 2f 62 3e 61 74 72 69 78  u>M</u></b>atrix
0d90: 3c 2f 69 3e 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e  </i>.</li>..<li>
0da0: 3c 62 3e 41 54 4d 5f 54 72 61 6e 73 66 6f 72 6d  <b>ATM_Transform
0db0: 28 29 3c 2f 62 3e 20 69 73 20 76 65 72 79 20 73  ()</b> is very s
0dc0: 69 6d 69 6c 61 72 20 74 6f 20 3c 62 3e 53 54 5f  imilar to <b>ST_
0dd0: 54 72 61 6e 73 66 6f 72 6d 28 29 3c 2f 62 3e 3b  Transform()</b>;
0de0: 20 74 68 65 20 6d 6f 73 74 20 6f 62 76 69 6f 75   the most obviou
0df0: 73 20 64 69 66 66 65 72 65 6e 63 65 20 69 73 20  s difference is 
0e00: 69 6e 20 74 68 61 74 20 61 6c 6c 20 74 72 61 6e  in that all tran
0e10: 73 66 6f 72 6d 61 74 69 6f 6e 20 61 72 67 75 6d  sformation argum
0e20: 65 6e 74 73 20 61 72 65 20 6e 6f 77 20 65 78 70  ents are now exp
0e30: 65 63 74 65 64 20 74 6f 20 62 65 20 70 61 73 73  ected to be pass
0e40: 65 64 20 75 6e 64 65 72 20 74 68 65 20 66 6f 72  ed under the for
0e50: 6d 20 6f 66 20 61 6e 20 61 70 70 72 6f 70 72 69  m of an appropri
0e60: 61 74 65 20 3c 62 3e 42 4c 4f 42 2d 73 65 72 69  ate <b>BLOB-seri
0e70: 61 6c 69 7a 65 64 3c 2f 62 3e 20 41 66 66 69 6e  alized</b> Affin
0e80: 65 20 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e  e Transformation
0e90: 20 4d 61 74 72 69 78 2e 3c 2f 6c 69 3e 0d 0a 3c   Matrix.</li>..<
0ea0: 6c 69 3e 3c 62 3e 41 54 4d 5f 43 72 65 61 74 65  li><b>ATM_Create
0eb0: 54 72 61 6e 73 6c 61 74 65 28 29 3c 2f 62 3e 20  Translate()</b> 
0ec0: 73 69 6d 70 6c 79 20 69 73 20 61 6e 20 53 51 4c  simply is an SQL
0ed0: 20 66 75 6e 63 74 69 6f 6e 20 72 65 74 75 72 6e   function return
0ee0: 69 6e 67 20 61 20 3c 62 3e 42 4c 4f 42 2d 73 65  ing a <b>BLOB-se
0ef0: 72 69 61 6c 69 7a 65 64 3c 2f 62 3e 20 41 66 66  rialized</b> Aff
0f00: 69 6e 65 20 54 72 61 6e 73 66 6f 72 6d 61 74 69  ine Transformati
0f10: 6f 6e 20 4d 61 74 72 69 78 2e 3c 62 72 3e 0d 0a  on Matrix.<br>..
0f20: 54 68 65 20 42 4c 4f 42 2d 4d 61 74 72 69 78 20  The BLOB-Matrix 
0f30: 77 69 6c 6c 20 62 65 20 69 6e 69 74 69 61 6c 69  will be initiali
0f40: 7a 65 64 20 73 6f 20 74 6f 20 72 65 70 72 65 73  zed so to repres
0f50: 65 6e 74 20 61 20 73 69 6d 70 6c 65 20 3c 62 3e  ent a simple <b>
0f60: 32 44 20 54 72 61 6e 73 6c 61 74 65 3c 2f 62 3e  2D Translate</b>
0f70: 20 61 63 63 6f 72 64 69 6e 67 6c 79 20 74 6f 20   accordingly to 
0f80: 3c 62 3e 28 74 78 2c 20 74 79 29 3c 2f 62 3e 20  <b>(tx, ty)</b> 
0f90: 61 72 67 75 6d 65 6e 74 73 2e 3c 62 72 3e 0d 0a  arguments.<br>..
0fa0: 59 6f 75 20 63 6f 75 6c 64 20 65 76 65 6e 74 75  You could eventu
0fb0: 61 6c 6c 79 20 64 65 66 69 6e 65 20 61 20 63 6f  ally define a co
0fc0: 6d 70 6c 65 74 65 20 3c 62 3e 33 44 20 54 72 61  mplete <b>3D Tra
0fd0: 6e 73 6c 61 74 65 3c 2f 62 3e 20 62 79 20 70 61  nslate</b> by pa
0fe0: 73 73 69 6e 67 20 3c 62 3e 28 74 78 2c 20 74 79  ssing <b>(tx, ty
0ff0: 2c 20 74 7a 29 3c 2f 62 3e 20 61 72 67 75 6d 65  , tz)</b> argume
1000: 6e 74 73 2c 20 62 75 74 20 74 68 69 73 20 69 73  nts, but this is
1010: 6e 27 74 20 73 74 72 69 63 74 6c 79 20 72 65 71  n't strictly req
1020: 75 69 72 65 64 20 69 6e 20 6f 75 72 20 63 75 72  uired in our cur
1030: 72 65 6e 74 20 65 78 61 6d 70 6c 65 2e 0d 0a 3c  rent example...<
1040: 2f 75 6c 3e 0d 0a 3c 2f 74 64 3e 3c 74 64 3e 0d  /ul>..</td><td>.
1050: 0a 3c 69 6d 67 20 73 72 63 3d 22 68 74 74 70 73  .<img src="https
1060: 3a 2f 2f 77 77 77 2e 67 61 69 61 2d 67 69 73 2e  ://www.gaia-gis.
1070: 69 74 2f 67 61 69 61 2d 73 69 6e 73 2f 61 66 66  it/gaia-sins/aff
1080: 69 6e 65 2d 70 69 63 73 2f 73 69 63 69 6c 79 5f  ine-pics/sicily_
1090: 31 2e 70 6e 67 22 20 61 6c 74 3d 22 77 66 73 2d  1.png" alt="wfs-
10a0: 31 22 20 62 6f 72 64 65 72 3d 22 31 22 3e 0d 0a  1" border="1">..
10b0: 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e  </td></tr>..<tr>
10c0: 3c 74 64 3e 0d 0a 3c 68 33 3e 53 74 65 70 20 23  <td>..<h3>Step #
10d0: 32 3a 20 72 6f 74 61 74 69 6e 67 20 53 69 63 69  2: rotating Sici
10e0: 6c 79 20 73 6f 20 74 6f 20 67 65 74 20 61 20 6e  ly so to get a n
10f0: 69 63 65 20 68 6f 72 69 7a 6f 6e 74 61 6c 20 61  ice horizontal a
1100: 6c 69 67 6e 65 6d 65 6e 74 3c 2f 68 33 3e 0d 0a  lignement</h3>..
1110: 41 6c 69 67 6e 69 6e 67 20 74 68 65 20 73 6f 75  Aligning the sou
1120: 74 68 65 72 6e 20 73 68 6f 72 65 73 20 6f 66 20  thern shores of 
1130: 53 69 63 69 6c 79 20 74 6f 20 61 6e 20 61 6c 6d  Sicily to an alm
1140: 6f 73 74 20 68 6f 72 69 7a 6f 6e 74 61 6c 20 6c  ost horizontal l
1150: 69 6e 65 20 77 69 6c 6c 20 73 75 72 65 6c 79 20  ine will surely 
1160: 6c 65 61 64 20 74 6f 20 61 20 6d 6f 72 65 20 6e  lead to a more n
1170: 69 63 65 6c 79 20 6f 72 64 65 72 65 64 20 6c 61  icely ordered la
1180: 79 6f 75 74 3a 20 73 6f 20 77 65 20 68 61 76 65  yout: so we have
1190: 20 6e 6f 77 20 74 6f 20 61 70 70 6c 79 20 61 20   now to apply a 
11a0: 3c 61 20 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f  <a href="http://
11b0: 65 6e 2e 77 69 6b 69 70 65 64 69 61 2e 6f 72 67  en.wikipedia.org
11c0: 2f 77 69 6b 69 2f 52 6f 74 61 74 69 6f 6e 5f 25  /wiki/Rotation_%
11d0: 32 38 6d 61 74 68 65 6d 61 74 69 63 73 25 32 39  28mathematics%29
11e0: 22 3e 63 6f 75 6e 74 65 72 63 6c 6f 63 6b 77 69  ">counterclockwi
11f0: 73 65 20 72 6f 74 61 74 69 6f 6e 3c 2f 61 3e 20  se rotation</a> 
1200: 6f 66 20 61 62 6f 75 74 20 3c 62 3e 32 35 2e 30  of about <b>25.0
1210: 20 64 65 67 72 65 65 73 3c 2f 62 3e 2e 3c 62 72   degrees</b>.<br
1220: 3e 0d 0a 54 68 61 6e 6b 73 20 74 6f 20 41 66 66  >..Thanks to Aff
1230: 69 6e 65 20 54 72 61 6e 73 66 6f 72 6d 61 74 69  ine Transformati
1240: 6f 6e 73 2c 20 77 65 20 63 61 6e 20 63 6f 6d 62  ons, we can comb
1250: 69 6e 65 20 62 6f 74 68 20 74 68 65 20 70 72 65  ine both the pre
1260: 76 69 6f 75 73 20 74 72 61 6e 73 6c 61 74 69 6f  vious translatio
1270: 6e 20 61 6e 64 20 74 68 65 20 63 75 72 72 65 6e  n and the curren
1280: 74 20 72 6f 74 61 74 69 6f 6e 20 69 6e 74 6f 20  t rotation into 
1290: 61 20 73 69 6e 67 6c 65 20 6d 6f 76 65 6d 65 6e  a single movemen
12a0: 74 20 28 61 20 73 6f 20 63 61 6c 6c 65 64 20 3c  t (a so called <
12b0: 62 3e 72 6f 74 6f 74 72 61 6e 73 6c 61 74 69 6f  b>rototranslatio
12c0: 6e 3c 2f 62 3e 29 2e 3c 62 72 3e 0d 0a 57 65 20  n</b>).<br>..We 
12d0: 73 69 6d 70 6c 79 20 68 61 76 65 20 74 6f 20 65  simply have to e
12e0: 78 65 63 75 74 65 20 74 68 65 20 66 6f 6c 6c 6f  xecute the follo
12f0: 77 69 6e 67 20 53 51 4c 20 73 74 61 74 65 6d 65  wing SQL stateme
1300: 6e 74 3a 0d 0a 3c 76 65 72 62 61 74 69 6d 3e 43  nt:..<verbatim>C
1310: 52 45 41 54 45 20 54 41 42 4c 45 20 73 69 63 69  REATE TABLE sici
1320: 6c 69 61 5f 32 20 41 53 0d 0a 53 45 4c 45 43 54  lia_2 AS..SELECT
1330: 20 63 6f 64 5f 72 65 67 2c 20 0d 0a 20 20 20 41   cod_reg, ..   A
1340: 54 4d 5f 54 72 61 6e 73 66 6f 72 6d 28 67 65 6f  TM_Transform(geo
1350: 6d 65 74 72 79 2c 0d 0a 20 20 20 20 20 20 41 54  metry,..      AT
1360: 4d 5f 54 72 61 6e 73 6c 61 74 65 28 2d 31 35 30  M_Translate(-150
1370: 30 30 30 2c 20 31 35 30 30 30 30 2c 0d 0a 20 20  000, 150000,..  
1380: 20 20 20 20 20 20 20 41 54 4d 5f 54 72 61 6e 73         ATM_Trans
1390: 6c 61 74 65 28 63 78 2c 20 63 79 2c 0d 0a 20 20  late(cx, cy,..  
13a0: 20 20 20 20 20 20 20 20 20 20 41 54 4d 5f 52 6f            ATM_Ro
13b0: 74 61 74 65 28 32 35 2c 0d 0a 20 20 20 20 20 20  tate(25,..      
13c0: 20 20 20 20 20 20 20 20 20 41 54 4d 5f 43 72 65           ATM_Cre
13d0: 61 74 65 54 72 61 6e 73 6c 61 74 65 28 2d 63 78  ateTranslate(-cx
13e0: 2c 20 2d 63 79 29 29 29 29 29 20 41 53 20 67 65  , -cy))))) AS ge
13f0: 6f 6d 0d 0a 46 52 4f 4d 20 28 53 45 4c 45 43 54  om..FROM (SELECT
1400: 20 63 6f 64 5f 72 65 67 2c 20 53 54 5f 58 28 63   cod_reg, ST_X(c
1410: 65 6e 74 72 6f 69 64 29 20 41 53 20 63 78 2c 20  entroid) AS cx, 
1420: 53 54 5f 59 28 63 65 6e 74 72 6f 69 64 29 20 41  ST_Y(centroid) A
1430: 53 20 63 79 2c 20 67 65 6f 6d 65 74 72 79 0d 0a  S cy, geometry..
1440: 20 20 20 20 20 20 46 52 4f 4d 20 28 53 45 4c 45        FROM (SELE
1450: 43 54 20 63 6f 64 5f 72 65 67 2c 20 53 54 5f 43  CT cod_reg, ST_C
1460: 65 6e 74 72 6f 69 64 28 67 65 6f 6d 65 74 72 79  entroid(geometry
1470: 29 20 41 53 20 63 65 6e 74 72 6f 69 64 2c 20 67  ) AS centroid, g
1480: 65 6f 6d 65 74 72 79 20 0d 0a 20 20 20 20 20 20  eometry ..      
1490: 20 20 20 20 20 20 46 52 4f 4d 20 73 69 63 69 6c        FROM sicil
14a0: 69 61 5f 30 29 20 41 53 20 67 31 0d 0a 29 20 41  ia_0) AS g1..) A
14b0: 53 20 67 32 3b 0d 0a 53 45 4c 45 43 54 20 52 65  S g2;..SELECT Re
14c0: 63 6f 76 65 72 47 65 6f 6d 65 74 72 79 43 6f 6c  coverGeometryCol
14d0: 75 6d 6e 28 27 73 69 63 69 6c 69 61 5f 32 27 2c  umn('sicilia_2',
14e0: 20 27 67 65 6f 6d 27 2c 20 33 32 36 33 32 2c 20   'geom', 32632, 
14f0: 27 4d 55 4c 54 49 50 4f 4c 59 47 4f 4e 27 2c 20  'MULTIPOLYGON', 
1500: 27 58 59 27 29 3b 0d 0a 3c 2f 76 65 72 62 61 74  'XY');..</verbat
1510: 69 6d 3e 20 20 0d 0a 3c 62 3e 52 65 6d 61 72 6b  im>  ..<b>Remark
1520: 73 3c 2f 62 3e 3a 0d 0a 3c 75 6c 3e 0d 0a 3c 6c  s</b>:..<ul>..<l
1530: 69 3e 63 6f 72 72 65 63 74 6c 79 20 68 61 6e 64  i>correctly hand
1540: 6c 69 6e 67 20 52 6f 74 61 74 69 6f 6e 20 69 73  ling Rotation is
1550: 20 72 61 74 68 65 72 20 63 6f 6d 70 6c 65 78 2e   rather complex.
1560: 0d 0a 41 6e 79 20 72 6f 74 61 74 69 6f 6e 20 77  ..Any rotation w
1570: 69 6c 6c 20 61 6c 77 61 79 73 20 69 6d 70 6c 79  ill always imply
1580: 20 61 20 3c 62 3e 66 69 78 65 64 20 63 65 6e 74   a <b>fixed cent
1590: 65 72 20 70 6f 69 6e 74 3c 2f 62 3e 2c 20 61 6e  er point</b>, an
15a0: 64 20 62 79 20 64 65 66 61 75 6c 74 20 74 68 69  d by default thi
15b0: 73 20 69 73 20 65 78 61 63 74 6c 79 20 70 6c 61  s is exactly pla
15c0: 63 65 64 20 61 74 20 74 68 65 20 63 6f 6f 72 64  ced at the coord
15d0: 69 6e 61 74 65 73 20 6f 72 69 67 69 6e 3a 20 3c  inates origin: <
15e0: 62 3e 28 30 2c 20 30 29 3c 2f 62 3e 20 28 69 6e  b>(0, 0)</b> (in
15f0: 20 74 68 65 20 3c 62 3e 32 44 3c 2f 62 3e 20 63   the <b>2D</b> c
1600: 61 73 65 29 20 6f 72 20 3c 62 3e 28 30 2c 20 30  ase) or <b>(0, 0
1610: 2c 20 30 29 3c 2f 62 3e 20 28 69 6e 20 74 68 65  , 0)</b> (in the
1620: 20 3c 62 3e 33 44 3c 2f 62 3e 20 63 61 73 65 29   <b>3D</b> case)
1630: 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 73 6f 20 61  .</li>..<li>so a
1640: 20 76 65 72 79 20 6e 61 69 76 65 20 61 74 74 65   very naive atte
1650: 6d 70 74 20 74 6f 20 64 69 72 65 63 74 6c 79 20  mpt to directly 
1660: 69 6e 76 6f 6b 65 20 3c 62 3e 41 54 4d 5f 52 6f  invoke <b>ATM_Ro
1670: 74 61 74 65 28 32 35 29 3c 2f 62 3e 20 77 69 6c  tate(25)</b> wil
1680: 6c 20 73 69 6d 70 6c 79 20 72 65 6c 6f 63 61 74  l simply relocat
1690: 65 20 53 69 63 69 6c 79 20 69 6e 20 53 6f 75 74  e Sicily in Sout
16a0: 68 65 72 6e 20 53 70 61 69 6e 2c 20 61 6e 64 20  hern Spain, and 
16b0: 74 68 69 73 20 61 62 73 6f 6c 75 74 65 6c 79 20  this absolutely 
16c0: 69 73 6e 27 74 20 6f 75 72 20 69 6e 74 65 6e 74  isn't our intent
16d0: 69 6f 6e 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 77  ion.</li>..<li>w
16e0: 68 61 74 20 77 65 20 72 65 61 6c 6c 79 20 6e 65  hat we really ne
16f0: 65 64 20 69 73 20 61 20 6d 6f 72 65 20 63 6f 6d  ed is a more com
1700: 70 6c 65 78 20 73 65 71 75 65 6e 63 65 20 6f 66  plex sequence of
1710: 20 63 68 61 69 6e 65 64 20 74 72 61 6e 73 66 6f   chained transfo
1720: 72 6d 61 74 69 6f 6e 73 3a 0d 0a 3c 6f 6c 3e 0d  rmations:..<ol>.
1730: 0a 3c 6c 69 3e 77 65 27 6c 6c 20 73 74 61 72 74  .<li>we'll start
1740: 20 66 69 72 73 74 20 62 79 20 63 72 65 61 74 69   first by creati
1750: 6e 67 20 61 20 6e 65 77 20 3c 62 3e 42 4c 4f 42  ng a new <b>BLOB
1760: 2d 4d 61 74 69 78 3c 2f 62 3e 20 69 6e 74 65 6e  -Matix</b> inten
1770: 64 65 64 20 74 6f 20 72 65 6c 6f 63 61 74 65 20  ded to relocate 
1780: 53 69 63 69 6c 79 27 73 20 3c 61 20 68 72 65 66  Sicily's <a href
1790: 3d 22 68 74 74 70 3a 2f 2f 65 6e 2e 77 69 6b 69  ="http://en.wiki
17a0: 70 65 64 69 61 2e 6f 72 67 2f 77 69 6b 69 2f 43  pedia.org/wiki/C
17b0: 65 6e 74 72 6f 69 64 22 3e 63 65 6e 74 72 6f 69  entroid">centroi
17c0: 64 3c 2f 61 3e 20 65 78 61 63 74 6c 79 20 6f 6e  d</a> exactly on
17d0: 20 74 68 65 20 63 6f 6f 72 64 69 6e 61 74 65 73   the coordinates
17e0: 20 6f 72 69 67 69 6e 3a 20 3c 62 3e 41 54 4d 5f   origin: <b>ATM_
17f0: 43 72 65 61 74 65 54 72 61 6e 73 6c 61 74 65 28  CreateTranslate(
1800: 2d 63 78 2c 20 2d 63 79 29 3c 2f 62 3e 3c 2f 6c  -cx, -cy)</b></l
1810: 69 3e 20 0d 0a 3c 6c 69 3e 6e 6f 77 20 77 65 20  i> ..<li>now we 
1820: 63 61 6e 20 73 61 66 65 6c 79 20 63 68 61 69 6e  can safely chain
1830: 20 74 68 65 20 69 6e 74 65 6e 64 65 64 20 52 6f   the intended Ro
1840: 74 61 74 69 6f 6e 20 69 6e 74 6f 20 74 68 65 20  tation into the 
1850: 6f 76 65 72 61 6c 6c 20 74 72 61 6e 73 66 6f 72  overall transfor
1860: 6d 61 74 69 6f 6e 20 73 74 61 63 6b 3a 20 3c 62  mation stack: <b
1870: 3e 41 54 4d 5f 52 6f 74 61 74 65 28 32 35 2c 20  >ATM_Rotate(25, 
1880: 61 74 6d 2d 62 6c 6f 62 29 3c 2f 62 3e 3c 2f 6c  atm-blob)</b></l
1890: 69 3e 0d 0a 3c 6c 69 3e 61 66 74 65 72 20 61 70  i>..<li>after ap
18a0: 70 6c 79 69 6e 67 20 74 68 65 20 52 6f 74 61 74  plying the Rotat
18b0: 69 6f 6e 20 77 65 20 6e 6f 77 20 68 61 76 65 20  ion we now have 
18c0: 74 6f 20 72 65 6c 6f 63 61 74 65 20 53 69 63 69  to relocate Sici
18d0: 6c 79 20 69 6e 20 69 74 73 20 69 6e 69 74 69 61  ly in its initia
18e0: 6c 20 70 6f 73 69 74 69 6f 6e 3a 20 3c 62 3e 41  l position: <b>A
18f0: 54 4d 5f 54 72 61 6e 73 6c 61 74 65 28 63 78 2c  TM_Translate(cx,
1900: 20 63 79 2c 20 61 74 6d 2d 62 6c 6f 62 29 3c 2f   cy, atm-blob)</
1910: 62 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 61 6e 64  b></li>..<li>and
1920: 20 66 69 6e 61 6c 6c 79 20 77 65 27 6c 6c 20 61   finally we'll a
1930: 70 70 6c 79 20 74 68 65 20 54 72 61 6e 73 6c 61  pply the Transla
1940: 74 69 6f 6e 20 69 6e 74 65 6e 64 65 64 20 74 6f  tion intended to
1950: 20 72 65 70 6f 73 69 74 69 6f 6e 20 53 69 63 69   reposition Sici
1960: 6c 79 20 77 65 73 74 77 61 72 64 73 20 61 6e 64  ly westwards and
1970: 20 6e 6f 74 68 77 61 72 64 73 3a 20 3c 62 3e 41   nothwards: <b>A
1980: 54 4d 5f 54 72 61 6e 73 6c 61 74 65 28 2d 31 35  TM_Translate(-15
1990: 30 30 30 30 2c 20 31 35 30 30 30 30 2c 20 61 74  0000, 150000, at
19a0: 6d 2d 62 6c 6f 62 29 3c 2f 62 3e 3c 62 72 3e 0d  m-blob)</b><br>.
19b0: 0a 3c 69 3e 77 65 27 76 65 20 75 73 65 64 20 74  .<i>we've used t
19c0: 77 6f 20 73 65 70 61 72 61 74 65 20 74 72 61 6e  wo separate tran
19d0: 73 6c 61 74 69 6f 6e 73 20 73 69 6d 70 6c 79 20  slations simply 
19e0: 66 6f 72 20 64 69 64 61 63 74 69 63 20 63 6c 61  for didactic cla
19f0: 72 69 74 79 3a 20 77 65 20 63 6f 75 6c 64 20 65  rity: we could e
1a00: 61 73 69 6c 79 20 6d 65 72 67 65 20 62 6f 74 68  asily merge both
1a10: 20 74 68 65 6d 20 69 6e 74 6f 20 61 20 73 69 6e   them into a sin
1a20: 67 6c 65 20 74 72 61 6e 73 6c 61 74 69 6f 6e 3a  gle translation:
1a30: 3c 62 72 3e 20 41 54 4d 5f 54 72 61 6e 73 6c 61  <br> ATM_Transla
1a40: 74 65 28 63 78 20 2d 20 31 35 30 30 30 30 2c 20  te(cx - 150000, 
1a50: 63 79 20 2b 20 31 35 30 30 30 30 2c 20 61 74 6d  cy + 150000, atm
1a60: 2d 62 6c 6f 62 29 3c 2f 69 3e 3c 2f 6c 69 3e 0d  -blob)</i></li>.
1a70: 0a 3c 6c 69 3e 74 68 69 73 20 77 61 79 20 3c 62  .<li>this way <b
1a80: 3e 41 54 4d 5f 54 72 61 6e 73 66 6f 72 6d 28 29  >ATM_Transform()
1a90: 3c 2f 62 3e 20 77 69 6c 6c 20 72 65 63 65 69 76  </b> will receiv
1aa0: 65 20 74 68 65 20 66 69 6e 61 6c 20 3c 62 3e 42  e the final <b>B
1ab0: 4c 4f 42 2d 4d 61 74 72 69 78 3c 2f 62 3e 20 72  LOB-Matrix</b> r
1ac0: 65 73 75 6c 74 69 6e 67 20 62 79 20 63 68 61 69  esulting by chai
1ad0: 6e 69 6e 67 20 61 6c 6c 20 74 68 65 20 61 62 6f  ning all the abo
1ae0: 76 65 20 74 72 61 6e 73 66 6f 72 6d 61 74 69 6f  ve transformatio
1af0: 6e 20 73 74 65 70 73 20 69 6e 20 74 68 65 20 63  n steps in the c
1b00: 6f 72 72 65 63 74 20 73 65 71 75 65 6e 63 65 2e  orrect sequence.
1b10: 3c 2f 6c 69 3e 0d 0a 3c 2f 6f 6c 3e 3c 2f 6c 69  </li>..</ol></li
1b20: 3e 0d 0a 3c 6c 69 3e 3c 62 3e 3c 75 3e 56 65 72  >..<li><b><u>Ver
1b30: 79 20 69 6d 70 6f 72 74 61 6e 74 20 6e 6f 74 69  y important noti
1b40: 63 65 3c 2f 75 3e 3c 2f 62 3e 3a 20 41 66 66 69  ce</u></b>: Affi
1b50: 6e 65 20 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f  ne Transformatio
1b60: 6e 73 20 3c 75 3e 61 72 65 20 6e 6f 74 20 63 6f  ns <u>are not co
1b70: 6d 6d 75 74 61 74 69 76 65 3c 2f 75 3e 3a 20 74  mmutative</u>: t
1b80: 68 65 20 72 65 6c 61 74 69 76 65 20 6f 72 64 65  he relative orde
1b90: 72 20 6f 66 20 73 75 62 73 65 71 75 65 6e 74 20  r of subsequent 
1ba0: 6f 70 65 72 61 74 69 6f 6e 73 20 69 6e 20 61 20  operations in a 
1bb0: 63 6f 6d 70 6c 65 78 20 74 72 61 6e 73 66 6f 72  complex transfor
1bc0: 6d 61 74 69 6f 6e 20 63 68 61 69 6e 20 73 68 6f  mation chain sho
1bd0: 75 6c 64 20 61 6c 77 61 79 73 20 62 65 20 76 65  uld always be ve
1be0: 72 79 20 63 61 72 65 66 75 6c 6c 79 20 63 6f 6e  ry carefully con
1bf0: 73 69 64 65 72 65 64 2e 3c 2f 6c 69 3e 0d 0a 3c  sidered.</li>..<
1c00: 6c 69 3e 61 6c 6c 20 74 68 65 20 3c 62 3e 46 52  li>all the <b>FR
1c10: 4f 4d 20 28 53 45 4c 45 43 54 20 2e 2e 2e 20 46  OM (SELECT ... F
1c20: 52 4f 4d 20 28 53 45 4c 45 43 54 20 2e 2e 2e 29  ROM (SELECT ...)
1c30: 20 41 53 20 67 31 29 20 41 53 20 67 32 3c 2f 62   AS g1) AS g2</b
1c40: 3e 20 73 74 75 66 66 20 73 69 6d 70 6c 79 20 69  > stuff simply i
1c50: 73 20 61 20 72 61 74 68 65 72 20 74 72 69 76 69  s a rather trivi
1c60: 61 6c 20 53 51 4c 20 74 72 69 63 6b 20 62 61 73  al SQL trick bas
1c70: 65 64 20 6f 6e 20 74 77 6f 20 6e 65 73 74 65 64  ed on two nested
1c80: 20 73 75 62 2d 71 75 65 72 69 65 73 2e 3c 62 72   sub-queries.<br
1c90: 3e 0d 0a 69 74 27 73 20 69 6e 64 65 6e 74 65 64  >..it's indented
1ca0: 20 73 63 6f 70 65 20 73 69 6d 70 6c 79 20 69 73   scope simply is
1cb0: 20 61 76 6f 69 64 69 6e 67 20 74 6f 20 63 61 6c   avoiding to cal
1cc0: 6c 20 74 6f 6f 20 6d 61 6e 79 20 74 69 6d 65 73  l too many times
1cd0: 20 53 54 5f 43 65 6e 74 72 6f 69 64 28 29 2c 20   ST_Centroid(), 
1ce0: 53 54 5f 58 28 29 20 61 6e 64 20 53 54 5f 59 28  ST_X() and ST_Y(
1cf0: 29 20 69 6e 20 6f 72 64 65 72 20 74 6f 20 67 65  ) in order to ge
1d00: 74 20 74 68 65 20 63 65 6e 74 72 6f 69 64 20 63  t the centroid c
1d10: 6f 6f 72 64 69 6e 61 74 65 73 2e 3c 2f 6c 69 3e  oordinates.</li>
1d20: 0d 0a 3c 2f 75 6c 3e 0d 0a 3c 2f 74 64 3e 3c 74  ..</ul>..</td><t
1d30: 64 3e 0d 0a 3c 69 6d 67 20 73 72 63 3d 22 68 74  d>..<img src="ht
1d40: 74 70 73 3a 2f 2f 77 77 77 2e 67 61 69 61 2d 67  tps://www.gaia-g
1d50: 69 73 2e 69 74 2f 67 61 69 61 2d 73 69 6e 73 2f  is.it/gaia-sins/
1d60: 61 66 66 69 6e 65 2d 70 69 63 73 2f 73 69 63 69  affine-pics/sici
1d70: 6c 79 5f 32 2e 70 6e 67 22 20 61 6c 74 3d 22 77  ly_2.png" alt="w
1d80: 66 73 2d 31 22 20 62 6f 72 64 65 72 3d 22 31 22  fs-1" border="1"
1d90: 3e 0d 0a 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c  >..</td></tr>..<
1da0: 74 72 3e 3c 74 64 3e 0d 0a 3c 68 33 3e 53 74 65  tr><td>..<h3>Ste
1db0: 70 20 23 33 3a 20 69 6e 66 6c 61 74 69 6e 67 20  p #3: inflating 
1dc0: 61 6e 64 20 72 65 73 68 61 70 69 6e 67 20 53 69  and reshaping Si
1dd0: 63 69 6c 79 3c 2f 68 33 3e 0d 0a 41 6e 20 69 6e  cily</h3>..An in
1de0: 63 72 65 61 73 65 64 20 73 75 72 66 61 63 65 20  creased surface 
1df0: 69 73 20 73 75 72 65 6c 79 20 77 65 6c 63 6f 6d  is surely welcom
1e00: 65 2c 20 62 65 63 61 75 73 65 20 69 74 20 61 75  e, because it au
1e10: 74 6f 6d 61 74 69 63 61 6c 6c 79 20 69 6d 70 6c  tomatically impl
1e20: 69 65 73 20 6d 6f 72 65 20 61 67 72 69 63 75 6c  ies more agricul
1e30: 74 75 72 61 6c 20 6c 61 6e 64 73 3a 20 6f 6e 20  tural lands: on 
1e40: 74 68 65 20 6f 74 68 65 72 20 68 61 6e 64 20 73  the other hand s
1e50: 68 6f 72 74 65 6e 69 6e 67 20 61 20 6c 69 74 74  hortening a litt
1e60: 6c 65 20 62 69 74 20 74 68 65 20 6c 65 6e 67 74  le bit the lengt
1e70: 68 20 6f 66 20 74 68 65 20 73 6f 75 74 68 65 72  h of the souther
1e80: 6e 20 63 6f 61 73 74 6c 69 6e 65 20 77 69 6c 6c  n coastline will
1e90: 20 73 75 72 65 6c 79 20 66 61 63 69 6c 69 74 61   surely facilita
1ea0: 74 65 20 6d 6f 62 69 6c 69 74 79 20 61 6e 64 20  te mobility and 
1eb0: 63 6f 6d 6d 75 6e 69 63 61 74 69 6f 6e 73 2e 3c  communications.<
1ec0: 62 72 3e 0d 0a 53 6f 20 77 65 27 6c 6c 20 6e 6f  br>..So we'll no
1ed0: 77 20 61 70 70 6c 79 20 61 20 3c 61 20 68 72 65  w apply a <a hre
1ee0: 66 3d 22 68 74 74 70 3a 2f 2f 65 6e 2e 77 69 6b  f="http://en.wik
1ef0: 69 70 65 64 69 61 2e 6f 72 67 2f 77 69 6b 69 2f  ipedia.org/wiki/
1f00: 53 63 61 6c 69 6e 67 5f 25 32 38 67 65 6f 6d 65  Scaling_%28geome
1f10: 74 72 79 25 32 39 22 3e 73 63 61 6c 69 6e 67 3c  try%29">scaling<
1f20: 2f 61 3e 20 74 72 61 6e 73 66 6f 72 6d 61 74 69  /a> transformati
1f30: 6f 6e 20 75 73 69 6e 67 20 74 77 6f 20 64 69 66  on using two dif
1f40: 66 65 72 65 6e 74 20 76 61 6c 75 65 73 3a 20 3c  ferent values: <
1f50: 62 3e 73 78 3d 30 2e 39 3c 2f 62 3e 20 61 6e 64  b>sx=0.9</b> and
1f60: 20 3c 62 3e 73 79 3d 31 2e 33 3c 2f 62 3e 2e 3c   <b>sy=1.3</b>.<
1f70: 62 72 3e 0d 0a 4f 6e 63 65 20 61 67 61 69 6e 2c  br>..Once again,
1f80: 20 41 66 66 69 6e 65 20 54 72 61 6e 73 66 6f 72   Affine Transfor
1f90: 6d 61 74 69 6f 6e 73 20 65 6e 61 62 6c 65 20 75  mations enable u
1fa0: 73 20 74 6f 20 63 6f 6d 62 69 6e 65 20 61 6c 74  s to combine alt
1fb0: 6f 67 65 74 68 65 72 20 62 6f 74 68 20 74 72 61  ogether both tra
1fc0: 6e 73 6c 61 74 65 2c 20 72 6f 74 61 74 65 20 61  nslate, rotate a
1fd0: 6e 64 20 73 63 61 6c 65 20 69 6e 74 6f 20 61 20  nd scale into a 
1fe0: 73 69 6e 67 6c 65 20 74 72 61 6e 73 66 6f 72 6d  single transform
1ff0: 61 74 69 6f 6e 2e 3c 62 72 3e 0d 0a 54 68 69 73  ation.<br>..This
2000: 20 69 73 20 74 68 65 20 63 6f 72 72 65 73 70 6f   is the correspo
2010: 6e 64 69 6e 67 20 53 51 4c 20 73 74 61 74 65 6d  nding SQL statem
2020: 65 6e 74 3a 0d 0a 3c 76 65 72 62 61 74 69 6d 3e  ent:..<verbatim>
2030: 0d 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 73  ..CREATE TABLE s
2040: 69 63 69 6c 69 61 5f 33 20 41 53 0d 0a 53 45 4c  icilia_3 AS..SEL
2050: 45 43 54 20 63 6f 64 5f 72 65 67 2c 20 0d 0a 20  ECT cod_reg, .. 
2060: 20 20 41 54 4d 5f 54 72 61 6e 73 66 6f 72 6d 28    ATM_Transform(
2070: 67 65 6f 6d 65 74 72 79 2c 0d 0a 20 20 20 20 20  geometry,..     
2080: 20 41 54 4d 5f 54 72 61 6e 73 6c 61 74 65 28 2d   ATM_Translate(-
2090: 31 35 30 30 30 30 2c 20 31 35 30 30 30 30 2c 0d  150000, 150000,.
20a0: 0a 20 20 20 20 20 20 20 20 20 41 54 4d 5f 54 72  .         ATM_Tr
20b0: 61 6e 73 6c 61 74 65 28 63 78 2c 20 63 79 2c 0d  anslate(cx, cy,.
20c0: 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 54 4d  .            ATM
20d0: 5f 53 63 61 6c 65 28 30 2e 39 2c 20 31 2e 33 2c  _Scale(0.9, 1.3,
20e0: 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20  ..              
20f0: 20 41 54 4d 5f 52 6f 74 61 74 65 28 32 35 2c 0d   ATM_Rotate(25,.
2100: 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20  .               
2110: 20 20 20 41 54 4d 5f 43 72 65 61 74 65 54 72 61     ATM_CreateTra
2120: 6e 73 6c 61 74 65 28 2d 63 78 2c 20 2d 63 79 29  nslate(-cx, -cy)
2130: 29 29 29 29 29 20 41 53 20 67 65 6f 6d 0d 0a 46  ))))) AS geom..F
2140: 52 4f 4d 20 28 53 45 4c 45 43 54 20 63 6f 64 5f  ROM (SELECT cod_
2150: 72 65 67 2c 20 53 54 5f 58 28 63 65 6e 74 72 6f  reg, ST_X(centro
2160: 69 64 29 20 41 53 20 63 78 2c 20 53 54 5f 59 28  id) AS cx, ST_Y(
2170: 63 65 6e 74 72 6f 69 64 29 20 41 53 20 63 79 2c  centroid) AS cy,
2180: 20 67 65 6f 6d 65 74 72 79 0d 0a 20 20 20 20 20   geometry..     
2190: 20 46 52 4f 4d 20 28 53 45 4c 45 43 54 20 63 6f   FROM (SELECT co
21a0: 64 5f 72 65 67 2c 20 53 54 5f 43 65 6e 74 72 6f  d_reg, ST_Centro
21b0: 69 64 28 67 65 6f 6d 65 74 72 79 29 20 41 53 20  id(geometry) AS 
21c0: 63 65 6e 74 72 6f 69 64 2c 20 67 65 6f 6d 65 74  centroid, geomet
21d0: 72 79 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20  ry ..           
21e0: 20 46 52 4f 4d 20 73 69 63 69 6c 69 61 5f 30 29   FROM sicilia_0)
21f0: 20 41 53 20 67 31 0d 0a 29 20 41 53 20 67 32 3b   AS g1..) AS g2;
2200: 0d 0a 53 45 4c 45 43 54 20 52 65 63 6f 76 65 72  ..SELECT Recover
2210: 47 65 6f 6d 65 74 72 79 43 6f 6c 75 6d 6e 28 27  GeometryColumn('
2220: 73 69 63 69 6c 69 61 5f 33 27 2c 20 27 67 65 6f  sicilia_3', 'geo
2230: 6d 27 2c 20 33 32 36 33 32 2c 20 27 4d 55 4c 54  m', 32632, 'MULT
2240: 49 50 4f 4c 59 47 4f 4e 27 2c 20 27 58 59 27 29  IPOLYGON', 'XY')
2250: 3b 0d 0a 3c 2f 76 65 72 62 61 74 69 6d 3e 20 0d  ;..</verbatim> .
2260: 0a 3c 62 3e 52 65 6d 61 72 6b 73 3c 2f 62 3e 3a  .<b>Remarks</b>:
2270: 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 74 68 65 72  ..<ul>..<li>ther
2280: 65 20 69 73 20 6e 6f 74 68 69 6e 67 20 72 65 61  e is nothing rea
2290: 6c 6c 79 20 6e 65 77 20 69 6e 20 74 68 69 73 3a  lly new in this:
22a0: 20 77 65 27 6c 6c 20 73 69 6d 70 6c 79 20 63 68   we'll simply ch
22b0: 61 69 6e 20 79 65 74 20 61 6e 6f 74 68 65 72 20  ain yet another 
22c0: 74 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 69  transformation i
22d0: 6e 20 74 68 65 20 61 70 70 72 6f 70 72 69 61 74  n the appropriat
22e0: 65 20 73 65 71 75 65 6e 63 65 20 6f 72 64 65 72  e sequence order
22f0: 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 41  .</li>..<li><b>A
2300: 54 4d 5f 53 63 61 6c 65 28 73 78 2c 20 73 79 29  TM_Scale(sx, sy)
2310: 3c 2f 62 3e 20 69 73 20 69 6e 74 65 6e 64 65 64  </b> is intended
2320: 20 66 6f 72 20 74 68 65 20 73 69 6d 70 6c 65 72   for the simpler
2330: 20 3c 62 3e 32 44 3c 2f 62 3e 20 63 61 73 65 2e   <b>2D</b> case.
2340: 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 69 6e 20 74 68  </li>..<li>in th
2350: 65 20 6d 6f 72 65 20 67 65 6e 65 72 61 6c 20 3c  e more general <
2360: 62 3e 33 44 3c 2f 62 3e 20 63 61 73 65 20 79 6f  b>3D</b> case yo
2370: 75 20 63 61 6e 20 69 6e 76 6f 6b 65 20 3c 62 3e  u can invoke <b>
2380: 41 54 4d 5f 53 63 61 6c 65 28 73 78 2c 20 73 79  ATM_Scale(sx, sy
2390: 2c 20 73 7a 29 3c 2f 62 3e 3c 2f 6c 69 3e 0d 0a  , sz)</b></li>..
23a0: 3c 2f 75 6c 3e 0d 0a 3c 2f 74 64 3e 3c 74 64 3e  </ul>..</td><td>
23b0: 0d 0a 3c 69 6d 67 20 73 72 63 3d 22 68 74 74 70  ..<img src="http
23c0: 73 3a 2f 2f 77 77 77 2e 67 61 69 61 2d 67 69 73  s://www.gaia-gis
23d0: 2e 69 74 2f 67 61 69 61 2d 73 69 6e 73 2f 61 66  .it/gaia-sins/af
23e0: 66 69 6e 65 2d 70 69 63 73 2f 73 69 63 69 6c 79  fine-pics/sicily
23f0: 5f 33 2e 70 6e 67 22 20 61 6c 74 3d 22 77 66 73  _3.png" alt="wfs
2400: 2d 31 22 20 62 6f 72 64 65 72 3d 22 31 22 3e 0d  -1" border="1">.
2410: 0a 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72  .</td></tr>..<tr
2420: 3e 3c 74 64 3e 0d 0a 3c 68 33 3e 53 74 65 70 20  ><td>..<h3>Step 
2430: 23 34 3a 20 66 69 6e 61 6c 20 74 6f 75 63 68 3a  #4: final touch:
2440: 20 72 65 66 6c 65 63 74 69 6e 67 20 53 69 63 69   reflecting Sici
2450: 6c 79 3c 2f 68 33 3e 0d 0a 41 20 72 65 66 6c 65  ly</h3>..A refle
2460: 63 74 65 64 20 53 69 63 69 6c 79 20 70 72 65 73  cted Sicily pres
2470: 65 6e 74 73 20 6d 61 6e 79 20 69 6e 74 65 72 65  ents many intere
2480: 73 74 69 6e 67 20 61 64 76 61 6e 74 61 67 65 73  sting advantages
2490: 3a 20 77 65 27 6c 6c 20 65 78 61 6d 69 6e 65 20  : we'll examine 
24a0: 61 6c 6c 20 74 68 65 6d 20 69 6e 20 66 75 6c 6c  all them in full
24b0: 20 64 65 74 61 69 6c 20 69 6e 20 6f 75 72 20 73   detail in our s
24c0: 74 75 64 79 20 63 6f 6e 63 6c 75 73 69 6f 6e 73  tudy conclusions
24d0: 2e 3c 62 72 3e 0d 0a 53 6f 20 77 65 27 6c 6c 20  .<br>..So we'll 
24e0: 6e 6f 77 20 61 70 70 6c 79 20 61 20 66 69 6e 61  now apply a fina
24f0: 6c 20 3c 61 20 68 72 65 66 3d 68 74 74 70 3a 2f  l <a href=http:/
2500: 2f 65 6e 2e 77 69 6b 69 70 65 64 69 61 2e 6f 72  /en.wikipedia.or
2510: 67 2f 77 69 6b 69 2f 52 65 66 6c 65 63 74 69 6f  g/wiki/Reflectio
2520: 6e 5f 25 32 38 6d 61 74 68 65 6d 61 74 69 63 73  n_%28mathematics
2530: 25 32 39 22 3e 72 65 66 6c 65 63 74 69 6f 6e 3c  %29">reflection<
2540: 2f 61 3e 20 74 72 61 6e 73 66 6f 72 6d 61 74 69  /a> transformati
2550: 6f 6e 3b 20 74 68 69 73 20 73 69 6d 70 6c 79 20  on; this simply 
2560: 63 6f 72 72 65 73 70 6f 6e 64 73 20 74 6f 20 61  corresponds to a
2570: 20 3c 62 3e 31 38 30 20 64 65 67 72 65 65 73 3c   <b>180 degrees<
2580: 2f 62 3e 20 72 6f 74 61 74 69 6f 6e 20 61 72 6f  /b> rotation aro
2590: 75 6e 64 20 74 68 65 20 3c 62 3e 59 20 61 78 69  und the <b>Y axi
25a0: 73 3c 2f 62 3e 2e 3c 62 72 3e 0d 0a 41 6e 64 20  s</b>.<br>..And 
25b0: 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 69 73  the following is
25c0: 20 74 68 65 20 66 69 6e 61 6c 20 53 51 4c 20 73   the final SQL s
25d0: 74 61 74 65 6d 65 6e 74 20 61 70 70 6c 79 69 6e  tatement applyin
25e0: 67 20 61 6c 6c 20 74 68 65 20 61 62 6f 76 65 20  g all the above 
25f0: 74 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 73 20  transformations 
2600: 69 6e 20 61 20 73 69 6e 67 6c 65 20 73 68 6f 74  in a single shot
2610: 3a 0d 0a 3c 76 65 72 62 61 74 69 6d 3e 43 52 45  :..<verbatim>CRE
2620: 41 54 45 20 54 41 42 4c 45 20 73 69 63 69 6c 69  ATE TABLE sicili
2630: 61 5f 32 20 41 53 0d 0a 43 52 45 41 54 45 20 54  a_2 AS..CREATE T
2640: 41 42 4c 45 20 73 69 63 69 6c 69 61 5f 34 20 41  ABLE sicilia_4 A
2650: 53 0d 0a 53 45 4c 45 43 54 20 63 6f 64 5f 72 65  S..SELECT cod_re
2660: 67 2c 20 0d 0a 20 20 20 41 54 4d 5f 54 72 61 6e  g, ..   ATM_Tran
2670: 73 66 6f 72 6d 28 67 65 6f 6d 65 74 72 79 2c 0d  sform(geometry,.
2680: 0a 20 20 20 20 20 20 41 54 4d 5f 54 72 61 6e 73  .      ATM_Trans
2690: 6c 61 74 65 28 2d 31 35 30 30 30 30 2c 20 31 35  late(-150000, 15
26a0: 30 30 30 30 2c 0d 0a 20 20 20 20 20 20 20 20 20  0000,..         
26b0: 41 54 4d 5f 54 72 61 6e 73 6c 61 74 65 28 63 78  ATM_Translate(cx
26c0: 2c 20 63 79 2c 0d 0a 20 20 20 20 20 20 20 20 20  , cy,..         
26d0: 20 20 20 41 54 4d 5f 59 52 6f 6c 6c 28 31 38 30     ATM_YRoll(180
26e0: 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20  ,..             
26f0: 20 20 41 54 4d 5f 53 63 61 6c 65 28 30 2e 39 2c    ATM_Scale(0.9,
2700: 20 31 2e 33 2c 0d 0a 20 20 20 20 20 20 20 20 20   1.3,..         
2710: 20 20 20 20 20 20 20 20 20 41 54 4d 5f 52 6f 74           ATM_Rot
2720: 61 74 65 28 32 35 2c 0d 0a 20 20 20 20 20 20 20  ate(25,..       
2730: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 54                AT
2740: 4d 5f 43 72 65 61 74 65 54 72 61 6e 73 6c 61 74  M_CreateTranslat
2750: 65 28 2d 63 78 2c 20 2d 63 79 29 29 29 29 29 29  e(-cx, -cy))))))
2760: 29 20 41 53 20 67 65 6f 6d 0d 0a 46 52 4f 4d 20  ) AS geom..FROM 
2770: 28 53 45 4c 45 43 54 20 63 6f 64 5f 72 65 67 2c  (SELECT cod_reg,
2780: 20 53 54 5f 58 28 63 65 6e 74 72 6f 69 64 29 20   ST_X(centroid) 
2790: 41 53 20 63 78 2c 20 53 54 5f 59 28 63 65 6e 74  AS cx, ST_Y(cent
27a0: 72 6f 69 64 29 20 41 53 20 63 79 2c 20 67 65 6f  roid) AS cy, geo
27b0: 6d 65 74 72 79 0d 0a 20 20 20 20 20 20 46 52 4f  metry..      FRO
27c0: 4d 20 28 53 45 4c 45 43 54 20 63 6f 64 5f 72 65  M (SELECT cod_re
27d0: 67 2c 20 53 54 5f 43 65 6e 74 72 6f 69 64 28 67  g, ST_Centroid(g
27e0: 65 6f 6d 65 74 72 79 29 20 41 53 20 63 65 6e 74  eometry) AS cent
27f0: 72 6f 69 64 2c 20 67 65 6f 6d 65 74 72 79 20 0d  roid, geometry .
2800: 0a 20 20 20 20 20 20 20 20 20 20 20 20 46 52 4f  .            FRO
2810: 4d 20 73 69 63 69 6c 69 61 5f 30 29 20 41 53 20  M sicilia_0) AS 
2820: 67 31 0d 0a 29 20 41 53 20 67 32 3b 0d 0a 53 45  g1..) AS g2;..SE
2830: 4c 45 43 54 20 52 65 63 6f 76 65 72 47 65 6f 6d  LECT RecoverGeom
2840: 65 74 72 79 43 6f 6c 75 6d 6e 28 27 73 69 63 69  etryColumn('sici
2850: 6c 69 61 5f 34 27 2c 20 27 67 65 6f 6d 27 2c 20  lia_4', 'geom', 
2860: 33 32 36 33 32 2c 20 27 4d 55 4c 54 49 50 4f 4c  32632, 'MULTIPOL
2870: 59 47 4f 4e 27 2c 20 27 58 59 27 29 3b 0d 0a 3c  YGON', 'XY');..<
2880: 2f 76 65 72 62 61 74 69 6d 3e 20 0d 0a 3c 62 3e  /verbatim> ..<b>
2890: 52 65 6d 61 72 6b 73 3c 2f 62 3e 3a 0d 0a 3c 75  Remarks</b>:..<u
28a0: 6c 3e 0d 0a 3c 6c 69 3e 74 68 65 72 65 20 61 72  l>..<li>there ar
28b0: 65 20 73 65 76 65 72 61 6c 20 70 6f 73 73 69 62  e several possib
28c0: 6c 65 20 72 6f 74 61 74 69 6f 6e 73 20 73 75 70  le rotations sup
28d0: 70 6f 72 74 65 64 20 62 79 20 41 66 66 69 6e 65  ported by Affine
28e0: 20 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 3a   Transformation:
28f0: 0d 0a 3c 6f 6c 3e 0d 0a 3c 6c 69 3e 3c 62 3e 41  ..<ol>..<li><b>A
2900: 54 4d 5f 52 6f 74 61 74 65 28 29 3c 2f 62 3e 20  TM_Rotate()</b> 
2910: 61 6c 77 61 79 73 20 69 6e 74 65 6e 64 73 20 61  always intends a
2920: 20 3c 62 3e 32 44 3c 2f 62 3e 20 72 6f 74 61 74   <b>2D</b> rotat
2930: 69 6f 6e 2c 20 69 2e 65 2e 20 61 20 72 6f 74 61  ion, i.e. a rota
2940: 74 69 6f 6e 20 63 65 6e 74 65 72 65 64 20 61 72  tion centered ar
2950: 6f 75 6e 64 20 74 68 65 20 3c 62 3e 5a 20 61 78  ound the <b>Z ax
2960: 69 73 3c 2f 62 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69  is</b></li>..<li
2970: 3e 49 6e 20 74 68 65 20 6d 6f 72 65 20 67 65 6e  >In the more gen
2980: 65 72 61 6c 20 3c 62 3e 33 44 3c 2f 62 3e 20 63  eral <b>3D</b> c
2990: 61 73 65 20 74 68 65 72 65 20 61 72 65 20 74 68  ase there are th
29a0: 72 65 65 20 70 6f 73 73 69 62 6c 65 20 72 6f 74  ree possible rot
29b0: 61 74 69 6f 6e 73 2c 20 6f 6e 65 20 66 6f 72 20  ations, one for 
29c0: 65 61 63 68 20 61 78 69 73 2e 3c 2f 6c 69 3e 0d  each axis.</li>.
29d0: 0a 3c 6c 69 3e 74 68 65 20 63 6f 72 72 65 73 70  .<li>the corresp
29e0: 6f 6e 64 69 6e 67 20 53 51 4c 20 66 75 6e 63 74  onding SQL funct
29f0: 69 6f 6e 73 20 61 72 65 3a 20 3c 62 3e 41 54 4d  ions are: <b>ATM
2a00: 5f 58 52 6f 6c 6c 28 61 6e 67 6c 65 29 3c 2f 62  _XRoll(angle)</b
2a10: 3e 2c 20 3c 62 3e 41 54 4d 5f 59 52 6f 6c 6c 28  >, <b>ATM_YRoll(
2a20: 61 6e 67 6c 65 29 3c 2f 62 3e 20 61 6e 64 20 3c  angle)</b> and <
2a30: 62 3e 41 54 4d 5f 5a 52 6f 6c 6c 28 61 6e 67 6c  b>ATM_ZRoll(angl
2a40: 65 29 3c 2f 62 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69  e)</b></li>..<li
2a50: 3e 3c 69 3e 3c 75 3e 4e 6f 74 65 3c 2f 75 3e 3a  ><i><u>Note</u>:
2a60: 20 41 54 4d 5f 5a 52 6f 6c 6c 28 29 20 61 6e 64   ATM_ZRoll() and
2a70: 20 41 54 4d 5f 52 6f 74 61 74 65 28 29 20 73 69   ATM_Rotate() si
2a80: 6d 70 6c 79 20 61 72 65 20 74 77 6f 20 64 69 66  mply are two dif
2a90: 66 65 72 65 6e 74 20 61 6c 69 61 73 2d 6e 61 6d  ferent alias-nam
2aa0: 65 73 20 66 6f 72 20 74 68 65 20 73 61 6d 65 20  es for the same 
2ab0: 69 64 65 6e 74 69 63 61 6c 20 53 51 4c 20 66 75  identical SQL fu
2ac0: 6e 63 74 69 6f 6e 3c 2f 69 3e 2e 3c 2f 6c 69 3e  nction</i>.</li>
2ad0: 0d 0a 3c 2f 6f 6c 3e 3c 2f 6c 69 3e 0d 0a 3c 2f  ..</ol></li>..</
2ae0: 75 6c 3e 0d 0a 3c 2f 74 64 3e 3c 74 64 3e 0d 0a  ul>..</td><td>..
2af0: 3c 69 6d 67 20 73 72 63 3d 22 68 74 74 70 73 3a  <img src="https:
2b00: 2f 2f 77 77 77 2e 67 61 69 61 2d 67 69 73 2e 69  //www.gaia-gis.i
2b10: 74 2f 67 61 69 61 2d 73 69 6e 73 2f 61 66 66 69  t/gaia-sins/affi
2b20: 6e 65 2d 70 69 63 73 2f 73 69 63 69 6c 79 5f 34  ne-pics/sicily_4
2b30: 2e 70 6e 67 22 20 61 6c 74 3d 22 77 66 73 2d 31  .png" alt="wfs-1
2b40: 22 20 62 6f 72 64 65 72 3d 22 31 22 3e 0d 0a 3c  " border="1">..<
2b50: 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c  /td></tr>..<tr><
2b60: 74 64 3e 0d 0a 3c 68 33 3e 46 69 6e 61 6c 20 63  td>..<h3>Final c
2b70: 6f 6e 73 69 64 65 72 61 74 69 6f 6e 73 3c 2f 68  onsiderations</h
2b80: 33 3e 0d 0a 3c 6f 6c 3e 0d 0a 3c 6c 69 3e 3c 62  3>..<ol>..<li><b
2b90: 3e 41 67 72 69 63 75 6c 74 75 72 65 3c 2f 62 3e  >Agriculture</b>
2ba0: 3a 20 61 66 74 65 72 20 69 74 73 20 72 65 6c 6f  : after its relo
2bb0: 63 61 74 69 6f 6e 20 53 69 63 69 6c 79 20 77 69  cation Sicily wi
2bc0: 6c 6c 20 67 61 69 6e 20 6d 75 63 68 20 6d 6f 72  ll gain much mor
2bd0: 65 20 61 67 72 69 63 75 6c 74 75 72 61 6c 20 6c  e agricultural l
2be0: 61 6e 64 20 61 6e 64 20 77 69 6c 6c 20 65 6e 6a  and and will enj
2bf0: 6f 79 20 61 20 6d 6f 72 65 20 66 61 76 6f 75 72  oy a more favour
2c00: 61 62 6c 65 20 63 6c 69 6d 61 74 65 3a 20 73 74  able climate: st
2c10: 69 6c 6c 20 73 75 6e 6e 79 20 61 6e 64 20 77 61  ill sunny and wa
2c20: 72 6d 20 62 75 74 20 6d 75 63 68 20 6c 65 73 73  rm but much less
2c30: 20 61 72 69 64 2e 3c 62 72 3e 0d 0a 54 68 69 73   arid.<br>..This
2c40: 20 77 69 6c 6c 20 63 65 72 74 61 69 6e 6c 79 20   will certainly 
2c50: 73 74 61 72 74 20 61 20 6e 6f 74 69 63 65 61 62  start a noticeab
2c60: 6c 65 20 64 65 76 65 6c 6f 70 6d 65 6e 74 20 6f  le development o
2c70: 66 20 6d 61 6e 79 20 65 63 6f 6e 6f 6d 69 63 20  f many economic 
2c80: 61 63 74 69 76 69 74 69 65 73 2c 20 62 6f 74 68  activities, both
2c90: 20 64 69 72 65 63 74 20 61 6e 64 20 69 6e 64 69   direct and indi
2ca0: 72 65 63 74 6c 79 20 64 65 72 69 76 65 64 2e 3c  rectly derived.<
2cb0: 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 54 72 61  /li>..<li><b>Tra
2cc0: 6e 73 70 6f 72 74 61 74 69 6f 6e 20 73 79 73 74  nsportation syst
2cd0: 65 6d 73 3c 2f 62 3e 3a 20 74 68 65 20 73 75 67  ems</b>: the sug
2ce0: 67 65 73 74 65 64 20 6e 65 77 20 6c 61 79 6f 75  gested new layou
2cf0: 74 20 66 6f 72 20 74 68 65 20 4c 6f 77 65 72 20  t for the Lower 
2d00: 54 79 72 72 68 65 6e 69 61 6e 20 53 65 61 20 73  Tyrrhenian Sea s
2d10: 74 72 6f 6e 67 6c 79 20 66 61 63 69 6c 69 74 61  trongly facilita
2d20: 74 65 73 20 74 68 65 20 64 65 76 65 6c 6f 70 6d  tes the developm
2d30: 65 6e 74 20 6f 66 20 6d 61 72 69 74 69 6d 65 20  ent of maritime 
2d40: 74 72 61 6e 73 70 6f 72 74 73 2e 20 53 69 63 69  transports. Sici
2d50: 6c 79 20 63 6f 75 6c 64 20 6e 65 77 20 62 65 63  ly could new bec
2d60: 6f 6d 65 20 74 68 65 20 63 65 6e 74 72 61 6c 20  ome the central 
2d70: 68 75 62 20 6f 66 20 61 20 68 69 67 68 6c 79 20  hub of a highly 
2d80: 65 66 66 69 63 69 65 6e 74 20 6e 65 74 77 6f 72  efficient networ
2d90: 6b 20 6f 66 20 68 69 67 68 2d 73 70 65 65 64 20  k of high-speed 
2da0: 61 6e 64 20 68 69 67 68 2d 66 72 65 71 75 65 6e  and high-frequen
2db0: 63 79 20 66 65 72 72 79 20 63 6f 6e 6e 65 63 74  cy ferry connect
2dc0: 69 6f 6e 73 3a 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69  ions:..<ul>..<li
2dd0: 3e 50 61 6c 65 72 6d 6f 20 77 69 6c 6c 20 6e 6f  >Palermo will no
2de0: 77 20 64 69 72 65 63 74 6c 79 20 66 61 63 65 20  w directly face 
2df0: 4e 61 70 6c 65 73 3b 20 43 69 76 69 74 61 76 65  Naples; Civitave
2e00: 63 63 68 69 61 20 28 52 6f 6d 65 29 20 73 65 65  cchia (Rome) see
2e10: 6d 73 20 74 6f 20 62 65 20 61 20 73 65 63 6f 6e  ms to be a secon
2e20: 64 20 6f 62 76 69 6f 75 73 20 74 65 72 6d 69 6e  d obvious termin
2e30: 61 6c 20 66 6f 72 20 64 69 72 65 63 74 20 63 6f  al for direct co
2e40: 6e 6e 65 63 74 69 6f 6e 73 20 6c 65 61 64 69 6e  nnections leadin
2e50: 67 20 74 6f 20 43 65 6e 74 72 61 6c 20 49 74 61  g to Central Ita
2e60: 6c 79 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 4d 65  ly.</li>..<li>Me
2e70: 73 73 69 6e 61 20 77 69 6c 6c 20 61 63 71 75 69  ssina will acqui
2e80: 72 65 20 61 20 64 65 63 69 73 69 76 65 20 73 74  re a decisive st
2e90: 72 61 74 65 67 69 63 20 72 6f 6c 65 2c 20 61 6e  rategic role, an
2ea0: 64 20 77 69 6c 6c 20 62 65 63 6f 6d 65 20 74 68  d will become th
2eb0: 65 20 74 65 72 6d 69 6e 61 6c 20 66 6f 72 20 66  e terminal for f
2ec0: 65 72 72 79 20 63 6f 6e 6e 65 63 74 69 6f 6e 73  erry connections
2ed0: 20 6c 65 61 64 69 6e 67 20 74 6f 20 43 69 76 69   leading to Civi
2ee0: 74 61 76 65 63 63 68 69 61 2c 20 4c 65 67 68 6f  tavecchia, Legho
2ef0: 72 6e 20 61 6e 64 20 47 65 6e 6f 61 2e 3c 2f 6c  rn and Genoa.</l
2f00: 69 3e 0d 0a 3c 6c 69 3e 41 20 6c 65 73 73 20 72  i>..<li>A less r
2f10: 65 6c 65 76 61 6e 74 20 28 62 75 74 20 61 6e 79  elevant (but any
2f20: 77 61 79 20 69 6e 74 65 72 65 73 74 69 6e 67 29  way interesting)
2f30: 20 66 65 72 72 79 20 6c 69 6e 6b 20 77 69 6c 6c   ferry link will
2f40: 20 6a 6f 69 6e 20 54 72 61 70 61 6e 69 20 61 6e   join Trapani an
2f50: 64 20 52 65 67 67 69 6f 20 43 61 6c 61 62 72 69  d Reggio Calabri
2f60: 61 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 53 61 72  a.</li>..<li>Sar
2f70: 64 69 6e 69 61 20 77 69 6c 6c 20 73 74 72 6f 6e  dinia will stron
2f80: 67 6c 79 20 62 65 6e 65 66 69 74 20 66 72 6f 6d  gly benefit from
2f90: 20 74 68 65 20 6e 65 77 20 6c 61 79 6f 75 74 3b   the new layout;
2fa0: 20 43 61 67 6c 69 61 72 69 20 77 69 6c 6c 20 62   Cagliari will b
2fb0: 65 20 64 69 72 65 63 74 6c 79 20 63 6f 6e 6e 65  e directly conne
2fc0: 63 74 65 64 20 74 6f 20 53 79 72 61 63 75 73 65  cted to Syracuse
2fd0: 20 28 6f 72 20 6d 61 79 20 62 65 20 41 75 67 75   (or may be Augu
2fe0: 73 74 61 29 2c 20 61 6e 64 20 4f 6c 62 69 61 20  sta), and Olbia 
2ff0: 74 6f 20 4d 65 73 73 69 6e 61 2e 3c 62 72 3e 54  to Messina.<br>T
3000: 68 69 73 20 6d 65 61 6e 73 20 64 65 66 69 6e 69  his means defini
3010: 74 65 6c 79 20 62 72 65 61 6b 69 6e 67 20 74 68  tely breaking th
3020: 65 20 73 65 63 75 6c 61 72 20 69 6e 73 75 6c 61  e secular insula
3030: 74 69 6f 6e 20 6f 66 20 53 61 72 64 69 6e 69 61  tion of Sardinia
3040: 2c 20 74 68 61 74 20 77 69 6c 6c 20 6e 6f 77 20  , that will now 
3050: 73 74 61 72 74 20 65 6e 6a 6f 79 69 6e 67 20 61  start enjoying a
3060: 20 73 74 72 6f 6e 67 65 72 20 69 6e 74 65 67 72   stronger integr
3070: 61 74 69 6f 6e 20 77 69 74 68 20 61 6c 6c 20 6f  ation with all o
3080: 74 68 65 72 73 20 72 65 67 69 6f 6e 73 20 6f 66  thers regions of
3090: 20 53 6f 75 74 68 65 72 6e 20 49 74 61 6c 79 2e   Southern Italy.
30a0: 3c 2f 6c 69 3e 20 0d 0a 3c 6c 69 3e 4c 61 73 74  </li> ..<li>Last
30b0: 20 62 75 74 20 6e 6f 74 20 6c 65 61 73 74 3a 20   but not least: 
30c0: 61 74 20 61 20 6d 6f 72 65 20 73 74 72 61 74 65  at a more strate
30d0: 67 69 63 20 6c 65 76 65 6c 20 69 74 27 73 20 61  gic level it's a
30e0: 62 73 6f 6c 75 74 65 6c 79 20 6f 62 76 69 6f 75  bsolutely obviou
30f0: 73 20 74 68 61 74 20 6e 6f 77 20 73 75 70 65 72  s that now super
3100: 74 61 6e 6b 65 72 73 20 61 6e 64 20 62 69 67 20  tankers and big 
3110: 63 6f 6e 74 61 69 6e 65 72 20 73 68 69 70 73 20  container ships 
3120: 63 61 6e 20 66 72 65 65 6c 79 20 63 69 72 63 75  can freely circu
3130: 6d 6e 61 76 69 67 61 74 65 20 53 69 63 69 6c 79  mnavigate Sicily
3140: 20 69 6e 20 61 6e 79 20 64 69 72 65 63 74 69 6f   in any directio
3150: 6e 20 75 6e 64 65 72 20 75 6e 63 6f 6d 70 72 6f  n under uncompro
3160: 6d 69 73 65 64 20 73 61 66 65 74 79 20 63 6f 6e  mised safety con
3170: 64 69 74 69 6f 6e 73 2e 3c 62 72 3e 0d 0a 41 6c  ditions.<br>..Al
3180: 6c 20 54 79 72 72 68 65 6e 69 61 6e 20 68 61 72  l Tyrrhenian har
3190: 62 6f 72 73 20 77 69 6c 6c 20 6e 6f 77 20 62 65  bors will now be
31a0: 20 64 69 72 65 63 74 6c 79 20 63 6f 6e 6e 65 74   directly connet
31b0: 65 64 20 62 6f 74 68 20 74 6f 20 45 61 73 74 65  ed both to Easte
31c0: 72 6e 20 61 6e 64 20 57 65 73 74 65 72 6e 20 4d  rn and Western M
31d0: 65 64 69 74 65 72 72 61 6e 65 61 6e 2c 20 61 6e  editerranean, an
31e0: 64 20 74 68 69 73 20 77 69 6c 6c 20 73 75 72 65  d this will sure
31f0: 6c 79 20 69 6e 64 75 63 65 20 61 20 67 72 6f 77  ly induce a grow
3200: 74 68 20 69 6e 20 74 68 65 20 76 6f 6c 75 6d 65  th in the volume
3210: 73 20 6f 66 20 69 6e 74 65 72 6e 61 74 69 6f 6e  s of internation
3220: 61 6c 20 74 72 61 66 66 69 63 73 20 74 68 65 79  al traffics they
3230: 20 63 6f 75 6c 64 20 70 6f 74 65 6e 74 69 61 6c   could potential
3240: 6c 79 20 61 74 74 72 61 63 74 2e 3c 2f 6c 69 3e  ly attract.</li>
3250: 20 0d 0a 3c 2f 75 6c 3e 3c 2f 6c 69 3e 20 0d 0a   ..</ul></li> ..
3260: 3c 6c 69 3e 3c 62 3e 48 65 61 76 79 20 69 6e 64  <li><b>Heavy ind
3270: 75 73 74 72 79 3c 2f 62 3e 3a 20 74 68 65 20 6e  ustry</b>: the n
3280: 65 77 20 74 72 61 6e 73 70 6f 72 74 61 74 69 6f  ew transportatio
3290: 6e 20 73 79 73 74 65 6d 20 73 74 72 6f 6e 67 6c  n system strongl
32a0: 79 20 63 65 6e 74 65 72 65 64 20 61 72 6f 75 6e  y centered aroun
32b0: 64 20 6d 61 72 69 74 69 6d 65 20 63 6f 6d 6d 75  d maritime commu
32c0: 6e 69 63 61 74 69 6f 6e 73 20 77 69 6c 6c 20 73  nications will s
32d0: 75 72 65 6c 79 20 69 6e 64 75 63 65 20 61 6e 20  urely induce an 
32e0: 61 63 74 69 76 65 20 72 65 62 69 72 74 68 20 6f  active rebirth o
32f0: 66 20 73 68 69 70 79 61 72 64 73 2c 20 61 20 66  f shipyards, a f
3300: 6c 75 6f 72 69 73 68 69 6e 67 20 74 72 61 64 69  luorishing tradi
3310: 74 69 6f 6e 61 6c 20 65 78 63 65 6c 6c 65 6e 63  tional excellenc
3320: 65 20 6f 66 20 6d 61 6e 79 20 73 6f 75 74 68 65  e of many southe
3330: 72 6e 20 72 65 67 69 6f 6e 73 20 69 6e 20 70 61  rn regions in pa
3340: 73 74 20 74 69 6d 65 73 20 62 75 74 20 6e 6f 77  st times but now
3350: 61 64 61 79 73 20 61 20 70 65 72 69 73 68 69 6e  adays a perishin
3360: 67 20 61 6e 64 20 64 65 63 6c 69 6e 69 6e 67 20  g and declining 
3370: 69 6e 64 75 73 74 72 69 61 6c 20 62 72 61 6e 63  industrial branc
3380: 68 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e  h.</li>..<li><b>
3390: 54 6f 75 72 69 73 6d 3c 2f 62 3e 3a 20 74 68 65  Tourism</b>: the
33a0: 20 73 75 67 67 65 73 74 65 64 20 6e 65 77 20 6c   suggested new l
33b0: 61 79 6f 75 74 20 77 69 6c 6c 20 63 65 72 74 61  ayout will certa
33c0: 69 6e 6c 79 20 70 72 6f 6d 6f 74 65 20 61 20 73  inly promote a s
33d0: 74 72 6f 6e 67 20 64 65 76 65 6c 6f 70 6d 65 6e  trong developmen
33e0: 74 20 6f 66 20 69 6e 74 65 72 6e 61 74 69 6f 6e  t of internation
33f0: 61 6c 20 74 6f 75 72 69 73 6d 2e 3c 62 72 3e 0d  al tourism.<br>.
3400: 0a 49 74 27 73 20 77 6f 72 74 68 20 6e 6f 74 69  .It's worth noti
3410: 6e 67 20 74 68 61 74 20 74 68 65 20 6e 65 77 20  ng that the new 
3420: 6c 61 79 6f 75 74 20 77 69 6c 6c 20 67 69 76 65  layout will give
3430: 20 62 69 72 74 68 20 74 6f 20 61 20 77 6f 6e 64   birth to a wond
3440: 65 72 66 75 6c 20 69 73 6c 61 6e 64 20 67 72 6f  erful island gro
3450: 75 70 20 65 78 74 65 6e 64 69 6e 67 20 62 65 74  up extending bet
3460: 77 65 65 6e 20 53 69 63 69 6c 79 20 74 6f 20 43  ween Sicily to C
3470: 61 6d 70 61 6e 69 61 3b 20 73 65 76 65 72 61 6c  ampania; several
3480: 20 6f 66 20 74 68 65 73 65 20 69 73 6c 61 6e 64   of these island
3490: 73 20 61 63 74 75 61 6c 6c 79 20 61 72 65 20 61  s actually are a
34a0: 63 74 69 76 65 20 76 6f 6c 63 61 6e 6f 65 73 2c  ctive volcanoes,
34b0: 20 61 6e 64 20 74 68 69 73 20 69 73 6c 61 6e 64   and this island
34c0: 20 63 68 61 69 6e 20 77 69 6c 6c 20 69 64 65 61   chain will idea
34d0: 6c 6c 79 20 6a 6f 69 6e 20 4d 6f 75 6e 74 20 45  lly join Mount E
34e0: 74 6e 61 20 61 6e 64 20 4d 6f 75 6e 74 20 56 65  tna and Mount Ve
34f0: 73 75 76 69 75 73 2e 3c 62 72 3e 0d 0a 54 68 69  suvius.<br>..Thi
3500: 73 20 61 72 65 61 20 63 6f 75 6c 64 20 62 65 20  s area could be 
3510: 63 6f 6e 73 69 64 65 72 65 64 20 74 68 65 20 6d  considered the m
3520: 6f 73 74 20 69 6d 70 72 65 73 73 69 76 65 20 76  ost impressive v
3530: 6f 6c 63 61 6e 69 63 20 66 69 65 6c 64 20 6f 66  olcanic field of
3540: 20 45 75 72 6f 70 65 20 61 6e 64 20 77 69 6c 6c   Europe and will
3550: 20 63 65 72 74 61 69 6e 6c 79 20 62 65 63 6f 6d   certainly becom
3560: 65 20 61 20 73 74 72 6f 6e 67 20 74 6f 75 72 69  e a strong touri
3570: 73 74 69 63 20 61 74 74 72 61 63 74 69 6f 6e 2e  stic attraction.
3580: 0d 0a 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e  ..</li>..<li><b>
3590: 49 6e 74 65 72 6e 61 6c 20 63 6f 6d 6d 65 72 63  Internal commerc
35a0: 65 3c 2f 62 3e 3a 20 77 65 20 63 61 6e 20 65 61  e</b>: we can ea
35b0: 73 69 6c 79 20 66 6f 72 65 63 61 73 74 20 61 20  sily forecast a 
35c0: 73 74 72 6f 6e 67 20 67 72 6f 77 74 68 20 69 6e  strong growth in
35d0: 20 76 6f 6c 75 6d 65 20 6f 66 20 69 6e 74 65 72   volume of inter
35e0: 6e 61 6c 20 65 78 63 68 61 6e 67 65 73 20 74 68  nal exchanges th
35f0: 61 6e 6b 20 74 6f 20 74 68 65 20 62 65 74 74 65  ank to the bette
3600: 72 20 63 6f 6e 6e 65 63 74 69 76 69 74 79 20 62  r connectivity b
3610: 61 73 65 64 20 6f 6e 20 6d 61 72 69 74 69 6d 65  ased on maritime
3620: 20 74 72 61 6e 73 70 6f 72 74 73 2e 2e 3c 62 72   transports..<br
3630: 3e 20 0d 0a 4a 75 73 74 20 61 20 73 69 6e 67 6c  > ..Just a singl
3640: 65 20 65 78 61 6d 70 6c 65 3a 20 53 61 72 64 69  e example: Sardi
3650: 6e 69 61 20 73 68 6f 75 6c 64 20 6e 6f 77 20 62  nia should now b
3660: 65 20 61 62 6c 65 20 74 6f 20 65 78 70 6f 72 74  e able to export
3670: 20 69 74 73 20 66 69 6e 65 73 74 20 73 68 65 65   its finest shee
3680: 70 2d 63 68 65 65 73 65 20 6f 6e 20 74 68 65 20  p-cheese on the 
3690: 43 61 6c 61 62 72 69 61 6e 20 6d 61 72 6b 65 74  Calabrian market
36a0: 73 20 77 68 69 6c 73 74 20 43 61 6c 61 62 72 69  s whilst Calabri
36b0: 61 20 63 6f 75 6c 64 20 66 72 65 65 6c 79 20 65  a could freely e
36c0: 78 70 6f 72 74 20 69 74 73 20 72 65 6e 6f 77 6e  xport its renown
36d0: 20 72 65 64 20 68 6f 74 20 63 68 69 6c 6c 79 20   red hot chilly 
36e0: 70 65 70 70 65 72 73 20 74 6f 20 53 61 72 64 69  peppers to Sardi
36f0: 6e 69 61 2c 20 61 6e 64 20 62 6f 74 68 20 72 65  nia, and both re
3700: 67 69 6f 6e 73 20 77 69 6c 6c 20 77 69 64 65 6c  gions will widel
3710: 79 20 62 65 66 69 74 20 66 72 6f 6d 20 69 6e 63  y befit from inc
3720: 72 65 61 73 65 64 20 65 78 63 68 61 6e 67 65 20  reased exchange 
3730: 76 6f 6c 75 6d 65 73 2e 3c 2f 6c 69 3e 0d 0a 3c  volumes.</li>..<
3740: 6c 69 3e 3c 62 3e 50 72 61 63 74 69 63 61 6c 20  li><b>Practical 
3750: 72 65 61 6c 69 7a 61 74 69 6f 6e 3c 2f 62 3e 3a  realization</b>:
3760: 20 74 68 65 20 70 72 65 73 65 6e 74 20 73 74 75   the present stu
3770: 64 79 20 63 6c 65 61 72 6c 79 20 64 65 6d 6f 6e  dy clearly demon
3780: 73 74 72 61 74 65 73 20 74 68 61 74 20 74 68 65  strates that the
3790: 72 65 20 61 72 65 20 6e 6f 20 61 64 76 65 72 73  re are no advers
37a0: 65 20 66 61 63 74 6f 72 73 20 69 6e 20 4d 61 74  e factors in Mat
37b0: 68 65 6d 61 74 69 63 73 2c 20 47 65 6f 6d 65 74  hematics, Geomet
37c0: 72 79 20 61 6e 64 20 47 65 6f 67 72 61 70 68 79  ry and Geography
37d0: 20 70 6f 74 65 6e 74 69 61 6c 6c 79 20 66 6f 72   potentially for
37e0: 62 69 64 64 69 6e 67 20 74 68 65 20 70 72 61 63  bidding the prac
37f0: 74 69 63 61 6c 20 72 65 61 6c 69 7a 61 74 69 6f  tical realizatio
3800: 6e 20 6f 66 20 74 68 65 20 73 75 67 67 65 73 74  n of the suggest
3810: 65 64 20 69 64 65 61 2e 3c 62 72 3e 0d 0a 55 6e  ed idea.<br>..Un
3820: 68 61 70 70 69 6c 79 20 74 68 65 20 63 75 72 72  happily the curr
3830: 65 6e 74 20 73 74 61 74 65 20 6f 66 20 74 68 65  ent state of the
3840: 20 61 72 74 20 69 6e 20 47 65 6f 6c 6f 67 79 20   art in Geology 
3850: 70 6f 73 65 73 20 6d 61 6e 79 20 70 75 7a 7a 6c  poses many puzzl
3860: 69 6e 67 20 71 75 65 73 74 69 6f 6e 73 20 6e 6f  ing questions no
3870: 74 20 79 65 74 20 66 75 6c 6c 79 20 72 65 73 6f  t yet fully reso
3880: 6c 76 65 64 20 69 6e 20 61 20 63 6f 6d 70 6c 65  lved in a comple
3890: 74 65 6c 79 20 73 61 74 69 73 66 79 69 6e 67 20  tely satisfying 
38a0: 77 61 79 2e 3c 62 72 3e 0d 0a 41 6e 77 61 79 20  way.<br>..Anway 
38b0: 77 65 20 61 72 65 20 68 6f 70 65 66 75 6c 6c 79  we are hopefully
38c0: 20 65 78 70 65 63 74 69 6e 67 20 74 68 61 74 20   expecting that 
38d0: 66 75 74 75 72 65 20 61 64 76 61 6e 63 65 6d 65  future advanceme
38e0: 6e 74 73 20 69 6e 20 54 65 63 74 6f 6e 69 63 73  nts in Tectonics
38f0: 20 28 61 6e 64 20 6d 6f 72 65 20 73 70 65 63 69   (and more speci
3900: 66 69 63 61 6c 6c 79 20 61 20 64 65 65 70 65 72  fically a deeper
3910: 20 63 6f 6d 70 72 65 68 65 6e 73 69 6f 6e 20 6f   comprehension o
3920: 66 20 74 68 65 20 6d 69 63 72 6f 2d 70 6c 61 71  f the micro-plaq
3930: 75 65 73 20 6d 65 63 68 61 6e 69 63 73 29 20 77  ues mechanics) w
3940: 69 6c 6c 20 73 75 72 65 6c 79 20 61 6c 6c 6f 77  ill surely allow
3950: 20 74 6f 20 6f 76 65 72 63 6f 6d 65 20 61 6e 79   to overcome any
3960: 20 72 65 6d 61 69 6e 69 6e 67 20 69 73 73 75 65   remaining issue
3970: 2e 0d 0a 3c 2f 6f 6c 3e 0d 0a 3c 2f 74 64 3e 3c  ...</ol>..</td><
3980: 74 64 3e 0d 0a 3c 69 6d 67 20 73 72 63 3d 22 68  td>..<img src="h
3990: 74 74 70 73 3a 2f 2f 77 77 77 2e 67 61 69 61 2d  ttps://www.gaia-
39a0: 67 69 73 2e 69 74 2f 67 61 69 61 2d 73 69 6e 73  gis.it/gaia-sins
39b0: 2f 61 66 66 69 6e 65 2d 70 69 63 73 2f 69 74 61  /affine-pics/ita
39c0: 6c 79 2d 32 2e 30 2e 70 6e 67 22 20 61 6c 74 3d  ly-2.0.png" alt=
39d0: 22 77 66 73 2d 31 22 20 62 6f 72 64 65 72 3d 22  "wfs-1" border="
39e0: 31 22 3e 0d 0a 3c 2f 74 64 3e 3c 2f 74 72 3e 0d  1">..</td></tr>.
39f0: 0a 3c 2f 74 61 62 6c 65 3e 0d 0a 0d 0a 3c 68 72  .</table>....<hr
3a00: 3e 3c 62 72 3e 0d 0a 3c 61 20 68 72 65 66 3d 22  ><br>..<a href="
3a10: 68 74 74 70 73 3a 2f 2f 77 77 77 2e 67 61 69 61  https://www.gaia
3a20: 2d 67 69 73 2e 69 74 2f 66 6f 73 73 69 6c 2f 6c  -gis.it/fossil/l
3a30: 69 62 73 70 61 74 69 61 6c 69 74 65 2f 77 69 6b  ibspatialite/wik
3a40: 69 3f 6e 61 6d 65 3d 34 2e 32 2e 30 2d 64 6f 63  i?name=4.2.0-doc
3a50: 22 3e 62 61 63 6b 3c 2f 61 3e 0a 5a 20 39 64 37  ">back</a>.Z 9d7
3a60: 64 62 33 36 36 65 31 31 63 36 33 37 65 35 34 63  db366e11c637e54c
3a70: 36 64 63 34 39 34 64 39 34 65 34 33 65 0a        6dc494d94e43e.