Hex Artifact Content
Not logged in

Artifact 8c0e6c87579c44cabd41238a418649cf4c65f2d3:

Wiki page [VirtualOGR] by sandro 2012-11-03 16:30:34.
0000: 44 20 32 30 31 32 2d 31 31 2d 30 33 54 31 36 3a  D 2012-11-03T16:
0010: 33 30 3a 33 34 2e 35 35 33 0a 4c 20 56 69 72 74  30:34.553.L Virt
0020: 75 61 6c 4f 47 52 0a 50 20 34 61 39 65 61 64 30  ualOGR.P 4a9ead0
0030: 36 66 30 31 35 32 65 30 30 37 30 35 62 63 31 65  6f0152e00705bc1e
0040: 37 66 34 34 39 30 66 64 64 36 36 38 31 32 62 31  7f4490fdd66812b1
0050: 34 0a 55 20 73 61 6e 64 72 6f 0a 57 20 37 30 39  4.U sandro.W 709
0060: 36 0a 3c 68 32 3e 56 69 72 74 75 61 6c 4f 47 52  6.<h2>VirtualOGR
0070: 3c 2f 68 32 3e 0d 0a 42 61 63 6b 20 74 6f 20 3c  </h2>..Back to <
0080: 61 20 68 72 65 66 3d 22 68 74 74 70 73 3a 2f 2f  a href="https://
0090: 77 77 77 2e 67 61 69 61 2d 67 69 73 2e 69 74 2f  www.gaia-gis.it/
00a0: 66 6f 73 73 69 6c 2f 6c 69 62 73 70 61 74 69 61  fossil/libspatia
00b0: 6c 69 74 65 2f 77 69 6b 69 3f 6e 61 6d 65 3d 73  lite/wiki?name=s
00c0: 77 69 74 63 68 69 6e 67 2d 74 6f 2d 34 2e 30 23  witching-to-4.0#
00d0: 76 69 72 74 75 61 6c 6f 67 72 22 3e 6d 61 69 6e  virtualogr">main
00e0: 20 70 61 67 65 3c 2f 61 3e 0d 0a 3c 68 33 3e 57   page</a>..<h3>W
00f0: 68 61 74 20 69 73 20 56 69 72 74 75 61 6c 4f 47  hat is VirtualOG
0100: 52 20 3f 3c 2f 68 33 3e 0d 0a 4a 75 73 74 20 61  R ?</h3>..Just a
0110: 20 76 65 72 79 20 71 75 69 63 6b 20 72 65 63 61   very quick reca
0120: 6c 6c 20 6f 66 20 73 6f 6d 65 20 62 61 73 69 63  ll of some basic
0130: 20 6e 6f 74 69 6f 6e 73 20 61 62 6f 75 74 20 74   notions about t
0140: 68 65 20 75 6e 64 65 72 6c 79 69 6e 67 20 61 72  he underlying ar
0150: 63 68 69 74 65 63 74 75 72 65 2e 3c 62 72 3e 0d  chitecture.<br>.
0160: 0a 53 51 4c 69 74 65 20 68 61 73 20 74 68 65 20  .SQLite has the 
0170: 63 61 70 61 62 69 6c 69 74 79 20 74 6f 20 64 79  capability to dy
0180: 6e 61 6d 69 63 61 6c 6c 79 20 6c 6f 61 64 20 61  namically load a
0190: 6e 20 65 78 74 65 72 6e 61 6c 20 6c 69 62 72 61  n external libra
01a0: 72 79 20 28 69 2e 65 2e 20 61 20 3c 69 3e 44 4c  ry (i.e. a <i>DL
01b0: 4c 3c 2f 69 3e 20 6f 6e 20 57 69 6e 64 6f 77 73  L</i> on Windows
01c0: 2c 20 61 20 3c 69 3e 73 68 61 72 65 64 20 6c 69  , a <i>shared li
01d0: 62 72 61 72 79 3c 2f 69 3e 20 6f 6e 20 4c 69 6e  brary</i> on Lin
01e0: 75 78 2c 20 61 6e 64 20 73 6f 20 6f 6e 29 3b 20  ux, and so on); 
01f0: 20 6f 62 76 69 6f 75 73 6c 79 20 53 70 61 74 69   obviously Spati
0200: 61 4c 69 74 65 20 61 73 20 77 65 6c 6c 20 69 6e  aLite as well in
0210: 68 65 72 69 74 73 20 73 75 63 68 20 63 61 70 61  herits such capa
0220: 62 69 6c 69 74 79 20 66 72 6f 6d 20 53 51 4c 69  bility from SQLi
0230: 74 65 2e 0d 0a 46 6f 72 6d 61 6c 6c 79 20 73 70  te...Formally sp
0240: 65 61 6b 69 6e 67 2c 20 53 70 61 74 69 61 4c 69  eaking, SpatiaLi
0250: 74 65 20 69 74 73 65 6c 66 20 73 69 6d 70 6c 79  te itself simply
0260: 20 73 69 6d 70 6c 79 20 69 73 20 61 6e 20 65 78   simply is an ex
0270: 74 65 6e 73 69 6f 6e 20 6c 69 62 72 61 72 79 20  tension library 
0280: 65 78 74 65 6e 64 69 6e 67 20 74 68 65 20 62 61  extending the ba
0290: 73 69 63 20 63 61 70 61 62 69 6c 69 74 69 65 73  sic capabilities
02a0: 20 6f 66 20 53 51 4c 69 74 65 2e 3c 62 72 3e 3c   of SQLite.<br><
02b0: 62 72 3e 0d 0a 41 6e 20 65 78 74 65 6e 73 69 6f  br>..An extensio
02c0: 6e 20 6c 69 62 72 61 72 79 20 63 6f 75 6c 64 20  n library could 
02d0: 61 64 64 20 6d 6f 72 65 20 66 65 61 74 75 72 65  add more feature
02e0: 73 20 74 6f 20 53 51 4c 69 74 65 20 69 6e 20 74  s to SQLite in t
02f0: 77 6f 20 64 69 66 66 65 72 65 6e 74 20 77 61 79  wo different way
0300: 73 3a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 69 6d 70 6c  s:<ul>..<li>impl
0310: 65 6d 65 6e 74 69 6e 67 20 73 6f 6d 65 20 66 75  ementing some fu
0320: 72 74 68 65 72 20 3c 62 3e 53 51 4c 20 66 75 6e  rther <b>SQL fun
0330: 63 74 69 6f 6e 3c 2f 62 3e 2c 20 6e 6f 74 20 69  ction</b>, not i
0340: 6e 69 74 69 61 6c 6c 79 20 73 75 70 70 6f 72 74  nitially support
0350: 65 64 20 62 79 20 74 68 65 20 62 61 73 69 63 20  ed by the basic 
0360: 63 6f 72 65 20 61 6c 6f 6e 65 2e 3c 2f 6c 69 3e  core alone.</li>
0370: 0d 0a 3c 6c 69 3e 69 6d 70 6c 65 6d 65 6e 74 69  ..<li>implementi
0380: 6e 67 20 61 20 3c 62 3e 56 69 72 74 75 61 6c 20  ng a <b>Virtual 
0390: 54 61 62 6c 65 20 64 72 69 76 65 72 3c 2f 62 3e  Table driver</b>
03a0: 2c 20 74 68 75 73 20 61 6c 6c 6f 77 69 6e 67 20  , thus allowing 
03b0: 74 68 65 20 53 51 4c 20 65 6e 67 69 6e 65 20 74  the SQL engine t
03c0: 6f 20 64 69 72 65 63 74 6c 79 20 61 63 63 65 73  o directly acces
03d0: 73 20 61 6e 20 65 78 74 65 72 6e 61 6c 20 64 61  s an external da
03e0: 74 61 73 6f 75 72 63 65 20 28 69 2e 65 2e 20 64  tasource (i.e. d
03f0: 61 74 61 20 70 6c 61 63 65 64 20 73 6f 6d 65 77  ata placed somew
0400: 68 65 72 65 20 65 6c 73 65 20 6f 75 74 73 69 64  here else outsid
0410: 65 20 74 68 65 20 44 42 20 69 74 73 65 6c 66 29  e the DB itself)
0420: 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 20 3c 62  .</li>..</ul> <b
0430: 72 3e 0d 0a 3c 62 3e 47 44 41 4c 3c 2f 62 3e 20  r>..<b>GDAL</b> 
0440: 28 3c 61 20 68 72 65 66 3d 22 68 74 74 70 3a 2f  (<a href="http:/
0450: 2f 77 77 77 2e 67 64 61 6c 2e 6f 72 67 2f 22 3e  /www.gdal.org/">
0460: 47 65 6f 73 70 61 74 69 61 6c 20 44 61 74 61 20  Geospatial Data 
0470: 41 62 73 74 72 61 63 74 69 6f 6e 20 4c 69 62 72  Abstraction Libr
0480: 61 72 79 3c 2f 61 3e 29 20 69 73 20 61 20 77 65  ary</a>) is a we
0490: 6c 6c 20 6b 6e 6f 77 6e 20 6f 70 65 6e 20 73 6f  ll known open so
04a0: 75 72 63 65 20 6c 69 62 72 61 72 79 20 73 75 70  urce library sup
04b0: 70 6f 72 74 69 6e 67 20 6c 6f 74 73 20 6f 66 20  porting lots of 
04c0: 64 69 66 66 65 72 65 6e 74 20 64 61 74 61 73 6f  different dataso
04d0: 75 72 63 65 73 2e 0d 0a 54 68 65 20 3c 62 3e 4f  urces...The <b>O
04e0: 47 52 3c 2f 62 3e 20 3c 61 20 68 72 65 66 3d 22  GR</b> <a href="
04f0: 68 74 74 70 3a 2f 2f 77 77 77 2e 67 64 61 6c 2e  http://www.gdal.
0500: 6f 72 67 2f 6f 67 72 2f 22 3e 53 69 6d 70 6c 65  org/ogr/">Simple
0510: 20 46 65 61 74 75 72 65 20 4c 69 62 72 61 72 79   Feature Library
0520: 20 3c 2f 61 3e 20 69 73 20 64 69 72 65 63 74 6c   </a> is directl
0530: 79 20 69 6e 63 6c 75 64 65 64 20 77 69 74 68 69  y included withi
0540: 6e 20 47 44 41 4c 2c 20 61 6e 64 20 69 73 20 73  n GDAL, and is s
0550: 70 65 63 69 66 69 63 61 6c 6c 79 20 66 6f 63 75  pecifically focu
0560: 73 65 64 20 6f 6e 20 73 75 70 70 6f 72 74 69 6e  sed on supportin
0570: 67 20 64 61 74 61 73 6f 75 72 63 65 73 20 6f 66  g datasources of
0580: 20 74 68 65 20 3c 62 3e 56 65 63 74 6f 72 3c 2f   the <b>Vector</
0590: 62 3e 20 74 79 70 65 2e 3c 62 72 3e 3c 62 72 3e  b> type.<br><br>
05a0: 0d 0a 54 68 65 20 6e 65 78 74 2d 74 6f 2d 63 6f  ..The next-to-co
05b0: 6d 65 20 3c 62 3e 47 44 41 4c 20 32 2e 30 3c 2f  me <b>GDAL 2.0</
05c0: 62 3e 20 28 63 75 72 72 65 6e 74 6c 79 20 61 76  b> (currently av
05d0: 61 69 6c 61 62 6c 65 20 66 72 6f 6d 20 74 68 65  ailable from the
05e0: 20 3c 69 3e 74 72 75 6e 6b 3c 2f 69 3e 20 72 65   <i>trunk</i> re
05f0: 70 6f 73 69 74 6f 72 79 29 20 77 69 6c 6c 20 73  pository) will s
0600: 75 70 70 6f 72 74 20 3c 62 3e 56 69 72 74 75 61  upport <b>Virtua
0610: 6c 4f 47 52 3c 2f 62 3e 20 28 74 68 61 6e 6b 73  lOGR</b> (thanks
0620: 20 74 6f 20 45 76 65 6e 20 52 6f 75 61 75 6c 74   to Even Rouault
0630: 20 68 69 67 68 6c 79 20 61 70 70 72 65 63 69 61   highly apprecia
0640: 74 65 64 20 64 65 76 65 6c 6f 70 6d 65 6e 74 20  ted development 
0650: 77 6f 72 6b 29 2e 3c 62 72 3e 0d 0a 54 68 69 73  work).<br>..This
0660: 20 70 72 61 63 74 69 63 61 6c 6c 79 20 6d 65 61   practically mea
0670: 6e 73 20 74 68 61 74 20 74 68 65 20 77 68 6f 6c  ns that the whol
0680: 65 20 4f 47 52 20 6c 69 62 72 61 72 79 20 77 69  e OGR library wi
0690: 6c 6c 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79  ll automatically
06a0: 20 62 65 63 6f 6d 65 20 61 20 6c 6f 61 64 61 62   become a loadab
06b0: 6c 65 20 65 78 74 65 6e 73 69 6f 6e 20 74 6f 20  le extension to 
06c0: 53 51 4c 69 74 65 3b 20 61 6e 64 20 61 6e 79 20  SQLite; and any 
06d0: 64 61 74 61 73 6f 75 72 63 65 20 73 75 70 70 6f  datasource suppo
06e0: 72 74 65 64 20 62 79 20 4f 47 52 20 77 69 6c 6c  rted by OGR will
06f0: 20 62 65 20 64 69 72 65 63 74 6c 79 20 61 63 63   be directly acc
0700: 65 73 73 69 62 6c 65 20 62 79 20 53 51 4c 20 6f  essible by SQL o
0710: 6e 20 53 51 4c 69 74 65 2f 53 70 61 74 69 61 4c  n SQLite/SpatiaL
0720: 69 74 65 20 61 73 20 69 66 20 69 74 20 77 61 73  ite as if it was
0730: 20 61 6e 20 6f 72 64 69 6e 61 72 79 20 74 61 62   an ordinary tab
0740: 6c 65 20 77 69 74 68 69 6e 20 74 68 65 20 44 42  le within the DB
0750: 2e 3c 62 72 3e 0d 0a 59 6f 75 20 63 61 6e 20 66  .<br>..You can f
0760: 69 6e 64 20 6d 61 6e 79 20 74 65 63 68 6e 69 63  ind many technic
0770: 61 6c 20 64 65 74 61 69 6c 73 20 61 62 6f 75 74  al details about
0780: 20 56 69 72 74 75 61 6c 4f 47 52 20 6f 6e 20 74   VirtualOGR on t
0790: 68 65 20 61 70 70 72 6f 70 69 72 61 74 65 20 3c  he appropirate <
07a0: 61 20 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f 77  a href="http://w
07b0: 77 77 2e 67 64 61 6c 2e 6f 72 67 2f 6f 67 72 2f  ww.gdal.org/ogr/
07c0: 64 72 76 5f 73 71 6c 69 74 65 2e 68 74 6d 6c 22  drv_sqlite.html"
07d0: 3e 64 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 20 70  >documentation p
07e0: 61 67 65 3c 2f 61 3e 2e 0d 0a 3c 68 33 3e 57 68  age</a>...<h3>Wh
07f0: 79 20 69 73 20 56 69 72 74 75 61 6c 4f 47 52 20  y is VirtualOGR 
0800: 65 78 70 65 63 74 65 64 20 74 6f 20 62 65 20 75  expected to be u
0810: 73 65 66 75 6c 20 3f 3c 2f 68 33 3e 0d 0a 41 62  seful ?</h3>..Ab
0820: 6f 75 74 20 73 65 76 65 6e 74 79 20 64 69 66 66  out seventy diff
0830: 65 72 65 6e 74 20 64 61 74 61 20 66 6f 72 6d 61  erent data forma
0840: 74 73 20 61 72 65 20 63 75 72 72 65 6e 74 6c 79  ts are currently
0850: 20 73 75 70 70 6f 72 74 65 64 20 62 79 20 4f 47   supported by OG
0860: 52 2e 0d 0a 49 66 20 79 6f 75 20 61 72 65 20 69  R...If you are i
0870: 6e 74 65 72 65 73 74 65 64 20 74 6f 20 6c 65 61  nterested to lea
0880: 72 6e 20 6d 6f 72 65 2c 20 79 6f 75 20 63 61 6e  rn more, you can
0890: 20 75 73 65 66 75 6c 6c 79 20 63 6f 6e 73 75 6c   usefully consul
08a0: 74 20 74 68 65 20 3c 61 20 68 72 65 66 3d 22 68  t the <a href="h
08b0: 74 74 70 3a 2f 2f 77 77 77 2e 67 64 61 6c 2e 6f  ttp://www.gdal.o
08c0: 72 67 2f 6f 67 72 2f 6f 67 72 5f 66 6f 72 6d 61  rg/ogr/ogr_forma
08d0: 74 73 2e 68 74 6d 6c 22 3e 63 6f 6d 70 6c 65 74  ts.html">complet
08e0: 65 20 6c 69 73 74 3c 2f 61 3e 2e 3c 62 72 3e 0d  e list</a>.<br>.
08f0: 0a 56 65 72 79 20 73 68 6f 72 74 6c 79 20 73 61  .Very shortly sa
0900: 69 64 3a 20 4f 47 52 20 68 61 73 20 74 68 65 20  id: OGR has the 
0910: 63 61 70 61 62 69 6c 69 74 79 20 74 6f 20 61 63  capability to ac
0920: 63 65 73 73 20 6c 6f 74 73 20 6f 66 20 77 69 64  cess lots of wid
0930: 65 73 70 72 65 61 64 20 64 61 74 61 20 66 6f 72  espread data for
0940: 6d 61 74 73 3a 20 45 53 52 49 20 53 68 61 70 65  mats: ESRI Shape
0950: 66 69 6c 65 73 2c 20 47 4d 4c 2c 20 44 57 47 2c  files, GML, DWG,
0960: 20 44 58 46 20 2e 2e 2e 3c 62 72 3e 0d 0a 41 6e   DXF ...<br>..An
0970: 64 20 4f 47 52 20 63 61 6e 20 61 63 63 65 73 73  d OGR can access
0980: 20 74 68 65 20 6d 6f 73 74 20 70 6f 70 75 6c 61   the most popula
0990: 72 20 53 70 61 74 69 61 6c 20 44 4d 42 53 65 73  r Spatial DMBSes
09a0: 20 61 73 20 77 65 6c 6c 3a 20 50 6f 73 74 67 72   as well: Postgr
09b0: 65 53 51 4c 2c 20 4f 72 61 63 6c 65 2c 20 53 51  eSQL, Oracle, SQ
09c0: 4c 20 53 65 72 76 65 72 2c 20 4d 79 53 51 4c 20  L Server, MySQL 
09d0: 2e 2e 2e 3c 62 72 3e 3c 62 72 3e 0d 0a 53 6f 20  ...<br><br>..So 
09e0: 74 68 65 20 56 69 72 74 75 61 6c 4f 47 52 20 6d  the VirtualOGR m
09f0: 65 63 68 61 6e 69 73 6d 20 6f 66 66 65 72 73 20  echanism offers 
0a00: 61 6e 20 65 61 73 79 20 61 6e 64 20 70 61 69 6e  an easy and pain
0a10: 6c 65 73 73 20 77 61 79 20 65 6e 61 62 6c 69 6e  less way enablin
0a20: 67 20 53 51 4c 69 74 65 2f 53 70 61 74 69 61 4c  g SQLite/SpatiaL
0a30: 69 74 65 20 74 6f 20 64 69 72 65 63 74 6c 79 20  ite to directly 
0a40: 61 63 63 65 73 73 20 6c 6f 74 73 20 6f 66 20 64  access lots of d
0a50: 69 66 66 65 72 65 6e 74 20 64 61 74 61 73 6f 75  ifferent datasou
0a60: 72 63 65 73 0d 0a 28 70 72 61 63 74 69 63 61 6c  rces..(practical
0a70: 6c 79 20 61 6e 79 20 70 6f 73 73 69 62 6c 65 20  ly any possible 
0a80: 64 61 74 61 20 66 6f 72 6d 61 74 20 6f 72 20 73  data format or s
0a90: 74 6f 72 61 67 65 20 73 79 73 74 65 6d 20 79 6f  torage system yo
0aa0: 75 20 63 61 6e 20 75 73 75 61 6c 6c 79 20 65 6e  u can usually en
0ab0: 63 6f 75 6e 74 65 72 20 69 6e 20 74 68 65 20 47  counter in the G
0ac0: 65 6f 53 70 61 74 69 61 6c 20 69 6e 64 75 73 74  eoSpatial indust
0ad0: 72 79 29 2e 3c 62 72 3e 0d 0a 41 6e 64 20 74 68  ry).<br>..And th
0ae0: 69 73 20 6f 6e 65 20 73 75 72 65 6c 79 20 69 73  is one surely is
0af0: 20 61 20 72 65 61 6c 6c 79 20 67 6f 6f 64 20 6e   a really good n
0b00: 65 77 20 66 6f 72 20 6d 61 6e 79 20 75 73 65 72  ew for many user
0b10: 73 2c 20 62 65 63 61 75 73 65 20 74 68 69 73 20  s, because this 
0b20: 77 61 79 20 74 72 61 6e 73 66 65 72 72 69 6e 67  way transferring
0b30: 20 64 61 74 61 20 28 69 6e 20 62 6f 74 68 20 64   data (in both d
0b40: 69 72 65 63 74 69 6f 6e 73 29 20 62 65 74 77 65  irections) betwe
0b50: 65 6e 20 53 70 61 74 69 61 4c 69 74 65 20 61 6e  en SpatiaLite an
0b60: 64 20 61 6e 6f 74 68 65 72 20 44 42 4d 53 20 77  d another DBMS w
0b70: 69 6c 6c 20 62 65 63 6f 6d 65 20 61 6e 20 65 61  ill become an ea
0b80: 73 79 20 61 6e 64 20 71 75 69 74 65 20 74 72 69  sy and quite tri
0b90: 76 69 61 6c 20 3c 69 3e 6f 72 64 69 6e 61 72 79  vial <i>ordinary
0ba0: 20 61 64 6d 69 6e 69 73 74 72 61 74 69 6f 6e 3c   administration<
0bb0: 2f 69 3e 20 61 66 66 61 69 72 2e 0d 0a 3c 68 33  /i> affair...<h3
0bc0: 3e 50 72 65 70 61 72 69 6e 67 20 74 68 65 20 74  >Preparing the t
0bd0: 65 73 74 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 3c  est environment<
0be0: 2f 68 33 3e 0d 0a 42 61 64 20 6e 65 77 3a 20 69  /h3>..Bad new: i
0bf0: 6e 20 6f 72 64 65 72 20 74 6f 20 70 65 72 66 6f  n order to perfo
0c00: 72 6d 20 73 6f 6d 65 20 74 65 73 74 20 79 6f 75  rm some test you
0c10: 20 61 72 65 20 73 75 72 65 6c 79 20 72 65 71 75   are surely requ
0c20: 69 72 65 64 20 74 6f 20 62 75 69 6c 64 20 28 62  ired to build (b
0c30: 79 20 79 6f 75 72 73 65 6c 66 29 20 62 6f 74 68  y yourself) both
0c40: 20 53 70 61 74 69 61 4c 69 74 65 20 61 6e 64 20   SpatiaLite and 
0c50: 47 44 41 4c 20 73 74 61 72 74 69 6e 67 20 66 72  GDAL starting fr
0c60: 6f 6d 20 74 68 65 20 63 75 72 72 65 6e 74 20 3c  om the current <
0c70: 69 3e 64 65 76 65 6c 6f 70 6d 65 6e 74 3c 2f 69  i>development</i
0c80: 3e 20 28 61 6b 61 20 3c 69 3e 74 72 75 6e 6b 3c  > (aka <i>trunk<
0c90: 2f 69 3e 29 20 73 6f 75 72 63 65 73 20 61 76 61  /i>) sources ava
0ca0: 69 6c 61 62 6c 65 20 66 72 6f 6d 20 74 68 65 20  ilable from the 
0cb0: 63 6f 72 72 65 73 70 6f 6e 64 69 6e 67 20 63 6f  corresponding co
0cc0: 64 65 20 72 65 70 6f 73 69 74 6f 72 69 65 73 2e  de repositories.
0cd0: 0d 0a 41 6e 79 77 61 79 20 74 68 65 20 73 69 74  ..Anyway the sit
0ce0: 75 61 74 69 6f 6e 20 77 69 6c 6c 20 62 65 63 6f  uation will beco
0cf0: 6d 65 20 6d 75 63 68 20 6d 6f 72 65 20 73 69 6d  me much more sim
0d00: 70 6c 65 20 64 75 72 69 6e 67 20 32 30 31 33 2c  ple during 2013,
0d10: 20 77 68 65 6e 20 62 6f 74 68 20 73 6f 66 74 77   when both softw
0d20: 61 72 65 73 20 77 69 6c 6c 20 62 65 63 6f 6d 65  ares will become
0d30: 20 77 69 64 65 6c 79 20 61 76 61 69 6c 61 62 6c   widely availabl
0d40: 65 20 61 73 20 70 72 65 2d 62 75 69 6c 74 20 70  e as pre-built p
0d50: 61 63 6b 61 67 65 73 20 69 6e 20 6d 61 69 6e 73  ackages in mains
0d60: 74 72 65 61 6d 20 64 69 73 74 72 69 62 75 74 69  tream distributi
0d70: 6f 6e 73 2e 3c 62 72 3e 3c 62 72 3e 0d 0a 49 27  ons.<br><br>..I'
0d80: 76 65 20 70 65 72 73 6f 6e 61 6c 6c 79 20 75 73  ve personally us
0d90: 65 64 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67  ed the following
0da0: 20 74 65 73 74 20 65 6e 76 69 72 6f 6e 6d 65 6e   test environmen
0db0: 74 3a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 44 65 62 69  t:<ul>..<li>Debi
0dc0: 61 6e 20 53 71 75 65 65 7a 65 20 33 32 20 62 69  an Squeeze 32 bi
0dd0: 74 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 47 44 41 4c  t</li>..<li>GDAL
0de0: 20 32 2e 30 64 65 76 3c 2f 6c 69 3e 0d 0a 3c 6c   2.0dev</li>..<l
0df0: 69 3e 6c 69 62 73 70 61 74 69 61 6c 69 74 65 20  i>libspatialite 
0e00: 34 2e 30 2e 30 2d 52 43 32 3c 2f 6c 69 3e 0d 0a  4.0.0-RC2</li>..
0e10: 3c 6c 69 3e 73 70 61 74 69 61 6c 69 74 65 5f 67  <li>spatialite_g
0e20: 75 69 20 31 2e 36 2e 30 3c 2f 6c 69 3e 0d 0a 3c  ui 1.6.0</li>..<
0e30: 2f 75 6c 3e 3c 62 72 3e 0d 0a 3c 75 3e 50 6c 65  /ul><br>..<u>Ple
0e40: 61 73 65 20 6e 6f 74 65 3c 2f 75 3e 3a 20 6f 6e  ase note</u>: on
0e50: 20 6d 79 20 6f 77 6e 20 44 65 62 69 61 6e 20 73   my own Debian s
0e60: 79 73 74 65 6d 20 49 20 69 6e 73 74 61 6c 6c 65  ystem I installe
0e70: 64 20 61 6c 6c 20 63 75 73 74 6f 6d 2d 62 75 69  d all custom-bui
0e80: 6c 74 20 6c 69 62 72 61 72 69 65 73 20 28 3c 69  lt libraries (<i
0e90: 3e 6c 69 62 73 70 61 74 69 61 6c 69 74 65 3c 2f  >libspatialite</
0ea0: 69 3e 20 61 6e 64 20 3c 69 3e 6c 69 62 67 64 61  i> and <i>libgda
0eb0: 6c 3c 2f 69 3e 29 20 6f 6e 20 74 68 65 20 64 65  l</i>) on the de
0ec0: 66 61 75 6c 74 20 74 61 72 67 65 74 20 3c 62 3e  fault target <b>
0ed0: 2f 75 73 72 2f 6c 6f 63 61 6c 2f 6c 69 62 3c 2f  /usr/local/lib</
0ee0: 62 3e 3c 62 72 3e 0d 0a 53 6f 20 49 20 68 61 64  b><br>..So I had
0ef0: 20 74 68 65 6e 20 74 6f 20 65 78 70 6c 69 63 69   then to explici
0f00: 74 6c 79 20 64 65 63 6c 61 72 65 20 74 68 65 20  tly declare the 
0f10: 66 6f 6c 6c 6f 77 69 6e 67 20 76 61 72 69 61 62  following variab
0f20: 6c 65 20 69 6e 20 6f 72 64 65 72 20 74 6f 20 69  le in order to i
0f30: 6e 63 6c 75 64 65 20 74 68 69 73 20 64 69 72 65  nclude this dire
0f40: 63 74 6f 72 79 20 69 6e 74 6f 20 74 68 65 20 73  ctory into the s
0f50: 65 61 72 63 68 20 70 61 74 68 20 28 3c 69 3e 74  earch path (<i>t
0f60: 68 69 73 20 73 74 65 70 20 73 68 6f 75 6c 64 20  his step should 
0f70: 6e 6f 74 20 62 65 20 73 74 72 69 63 74 6c 79 20  not be strictly 
0f80: 72 65 71 75 69 72 65 64 20 75 73 69 6e 67 20 61  required using a
0f90: 20 64 69 66 66 65 72 65 6e 74 20 4c 69 6e 75 78   different Linux
0fa0: 20 64 69 73 74 72 6f 2c 20 65 2e 67 2e 20 46 65   distro, e.g. Fe
0fb0: 64 6f 72 61 3c 2f 69 3e 29 3a 3c 62 72 3e 3c 62  dora</i>):<br><b
0fc0: 72 3e 0d 0a 3c 62 3e 65 78 70 6f 72 74 20 22 4c  r>..<b>export "L
0fd0: 44 5f 4c 49 42 52 41 52 59 5f 50 41 54 48 3d 2f  D_LIBRARY_PATH=/
0fe0: 75 73 72 2f 6c 6f 63 61 6c 2f 6c 69 62 22 3c 2f  usr/local/lib"</
0ff0: 62 3e 3c 62 72 3e 3c 62 72 3e 0d 0a 3c 68 33 3e  b><br><br>..<h3>
1000: 56 65 72 79 20 71 75 69 63 6b 20 56 69 72 74 75  Very quick Virtu
1010: 61 6c 4f 47 52 20 68 6f 77 2d 74 6f 20 28 73 68  alOGR how-to (sh
1020: 6f 77 69 6e 67 20 61 20 70 72 61 63 74 69 63 61  owing a practica
1030: 6c 20 65 78 61 6d 70 6c 65 29 3c 2f 68 33 3e 0d  l example)</h3>.
1040: 0a 3c 74 61 62 6c 65 20 63 65 6c 6c 73 70 61 63  .<table cellspac
1050: 69 6e 67 3d 22 36 22 20 63 65 6c 6c 70 61 64 64  ing="6" cellpadd
1060: 69 6e 67 3d 22 36 22 3e 0d 0a 3c 74 72 3e 3c 74  ing="6">..<tr><t
1070: 64 3e 3c 62 3e 53 74 65 70 20 23 31 3c 2f 62 3e  d><b>Step #1</b>
1080: 3c 62 72 3e 77 65 27 6c 6c 20 73 74 61 72 74 20  <br>we'll start 
1090: 6c 6f 61 64 69 6e 67 20 3c 69 3e 6c 69 62 67 64  loading <i>libgd
10a0: 61 6c 3c 2f 69 3e 20 61 73 20 61 20 64 79 6e 61  al</i> as a dyna
10b0: 6d 69 63 61 6c 20 65 78 74 65 6e 73 69 6f 6e 20  mical extension 
10c0: 74 6f 20 53 51 4c 69 74 65 3b 20 69 66 20 77 65  to SQLite; if we
10d0: 20 77 65 72 65 20 6f 6e 20 57 69 6e 64 6f 77 73   were on Windows
10e0: 20 77 65 20 6f 62 76 69 6f 75 73 6c 79 20 68 61   we obviously ha
10f0: 64 20 74 6f 20 6c 6f 61 64 20 61 20 66 69 6c 65  d to load a file
1100: 20 6e 61 6d 65 64 20 3c 69 3e 6c 69 62 67 64 61   named <i>libgda
1110: 6c 2e 64 6c 6c 3c 2f 69 3e 20 28 3c 69 3e 6f 72  l.dll</i> (<i>or
1120: 20 73 6f 6d 65 74 68 69 6e 67 20 6c 69 6b 65 3b   something like;
1130: 20 69 74 20 75 73 75 61 6c 6c 79 20 64 65 70 65   it usually depe
1140: 6e 64 73 20 6f 6e 20 20 70 61 63 6b 61 67 65 72  nds on  packager
1150: 73 20 63 68 6f 69 63 65 73 3c 2f 69 3e 29 3c 2f  s choices</i>)</
1160: 74 64 3e 0d 0a 3c 74 64 3e 3c 69 6d 67 20 62 6f  td>..<td><img bo
1170: 72 64 65 72 3d 22 31 22 20 73 72 63 3d 22 68 74  rder="1" src="ht
1180: 74 70 3a 2f 2f 77 77 77 2e 67 61 69 61 2d 67 69  tp://www.gaia-gi
1190: 73 2e 69 74 2f 67 61 69 61 2d 73 69 6e 73 2f 76  s.it/gaia-sins/v
11a0: 69 72 74 75 61 6c 6f 67 72 2f 6f 67 72 2d 31 2e  irtualogr/ogr-1.
11b0: 70 6e 67 22 20 61 6c 74 3d 22 6c 6f 61 64 5f 65  png" alt="load_e
11c0: 78 74 65 6e 73 69 6f 6e 22 3e 3c 2f 74 64 3e 3c  xtension"></td><
11d0: 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 3c 62  /tr>..<tr><td><b
11e0: 3e 53 74 65 70 20 23 32 3c 2f 62 3e 3c 62 72 3e  >Step #2</b><br>
11f0: 6e 6f 77 20 77 65 27 6c 6c 20 74 72 79 20 74 6f  now we'll try to
1200: 20 63 6f 6e 6e 65 63 74 20 61 20 50 6f 73 74 47   connect a PostG
1210: 49 53 20 74 61 62 6c 65 20 3c 62 3e 6c 30 39 3c  IS table <b>l09<
1220: 2f 62 3e 2c 20 6c 6f 63 61 74 65 64 20 69 6e 20  /b>, located in 
1230: 74 68 65 20 73 63 68 65 6d 61 20 3c 62 3e 6d 65  the schema <b>me
1240: 72 61 6e 6f 3c 2f 62 3e 20 6f 66 20 74 68 65 20  rano</b> of the 
1250: 64 61 74 61 62 61 73 65 73 20 3c 62 3e 67 69 73  databases <b>gis
1260: 3c 2f 62 3e 3c 62 72 3e 3c 62 72 3e 3c 75 6c 3e  </b><br><br><ul>
1270: 0d 0a 3c 6c 69 3e 74 68 65 20 66 69 72 73 74 20  ..<li>the first 
1280: 61 72 67 75 6d 65 6e 74 20 3c 62 3e 50 47 3a 64  argument <b>PG:d
1290: 62 6e 61 6d 65 3d 67 69 73 3c 2f 62 3e 20 73 65  bname=gis</b> se
12a0: 6c 65 63 74 73 20 61 20 63 6f 6e 6e 65 63 74 69  lects a connecti
12b0: 6f 6e 20 74 6f 20 50 6f 73 74 67 72 65 53 51 4c  on to PostgreSQL
12c0: 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 74 68 65 20 73  </li>..<li>the s
12d0: 65 63 6f 6e 64 20 61 72 67 75 6d 65 6e 74 20 3c  econd argument <
12e0: 62 3e 30 3c 2f 62 3e 20 73 69 6d 70 6c 79 20 69  b>0</b> simply i
12f0: 6e 74 65 6e 64 73 20 3c 69 3e 72 65 61 64 2d 6f  ntends <i>read-o
1300: 6e 6c 79 3c 2f 69 3e 20 6d 6f 64 65 3c 2f 6c 69  nly</i> mode</li
1310: 3e 0d 0a 3c 6c 69 3e 74 68 65 20 74 68 69 72 64  >..<li>the third
1320: 20 61 72 67 75 6d 65 6e 74 20 3c 62 3e 6d 65 72   argument <b>mer
1330: 61 6e 6f 2e 6c 30 39 3c 2f 62 3e 20 73 70 65 63  ano.l09</b> spec
1340: 69 66 69 65 73 20 74 68 65 20 73 63 68 65 6d 61  ifies the schema
1350: 20 61 6e 64 20 74 61 62 6c 65 20 6e 61 6d 65 73   and table names
1360: 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 3c 2f 74 64  </li>..</ul></td
1370: 3e 0d 0a 3c 74 64 3e 3c 69 6d 67 20 62 6f 72 64  >..<td><img bord
1380: 65 72 3d 22 31 22 20 73 72 63 3d 22 68 74 74 70  er="1" src="http
1390: 3a 2f 2f 77 77 77 2e 67 61 69 61 2d 67 69 73 2e  ://www.gaia-gis.
13a0: 69 74 2f 67 61 69 61 2d 73 69 6e 73 2f 76 69 72  it/gaia-sins/vir
13b0: 74 75 61 6c 6f 67 72 2f 6f 67 72 2d 32 2e 70 6e  tualogr/ogr-2.pn
13c0: 67 22 20 61 6c 74 3d 22 63 72 65 61 74 65 5f 76  g" alt="create_v
13d0: 69 72 74 75 61 6c 5f 74 61 62 6c 65 22 3e 3c 2f  irtual_table"></
13e0: 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74  td></tr>..<tr><t
13f0: 64 3e 3c 62 3e 53 74 65 70 20 23 33 3c 2f 62 3e  d><b>Step #3</b>
1400: 3c 62 72 3e 6a 75 73 74 20 61 20 73 69 6d 70 6c  <br>just a simpl
1410: 65 20 74 65 73 74 20 71 75 65 72 79 20 74 6f 20  e test query to 
1420: 63 68 65 63 6b 20 69 66 20 61 6e 79 74 68 69 6e  check if anythin
1430: 67 20 77 6f 72 6b 73 20 61 73 20 65 78 70 65 63  g works as expec
1440: 74 65 64 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 3c 69  ted</td>..<td><i
1450: 6d 67 20 62 6f 72 64 65 72 3d 22 31 22 20 73 72  mg border="1" sr
1460: 63 3d 22 68 74 74 70 3a 2f 2f 77 77 77 2e 67 61  c="http://www.ga
1470: 69 61 2d 67 69 73 2e 69 74 2f 67 61 69 61 2d 73  ia-gis.it/gaia-s
1480: 69 6e 73 2f 76 69 72 74 75 61 6c 6f 67 72 2f 6f  ins/virtualogr/o
1490: 67 72 2d 33 2e 70 6e 67 22 20 61 6c 74 3d 22 74  gr-3.png" alt="t
14a0: 65 73 74 5f 71 75 65 72 79 22 3e 3c 2f 74 64 3e  est_query"></td>
14b0: 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 3c  </tr>..<tr><td><
14c0: 62 3e 53 74 65 70 20 23 34 3c 2f 62 3e 3c 62 72  b>Step #4</b><br
14d0: 3e 77 65 27 6c 6c 20 6e 6f 77 20 63 68 65 63 6b  >we'll now check
14e0: 20 74 68 65 20 47 65 6f 6d 65 74 72 79 2d 54 79   the Geometry-Ty
14f0: 70 65 20 61 6e 64 20 53 52 49 44 20 6f 66 20 67  pe and SRID of g
1500: 65 6f 6d 65 74 72 69 65 73 20 63 6f 6e 74 61 69  eometries contai
1510: 6e 65 64 20 69 6e 74 6f 20 74 68 65 20 50 6f 73  ned into the Pos
1520: 74 47 49 53 20 74 61 62 6c 65 2e 3c 62 72 3e 3c  tGIS table.<br><
1530: 62 72 3e 0d 0a 46 6f 72 20 73 6f 6d 65 20 6f 64  br>..For some od
1540: 64 20 72 65 61 73 6f 6e 20 74 68 65 20 53 52 49  d reason the SRI
1550: 44 20 69 73 20 72 65 70 6f 72 74 65 64 20 61 73  D is reported as
1560: 20 3c 62 3e 2d 31 3c 2f 62 3e 20 28 3c 69 3e 75   <b>-1</b> (<i>u
1570: 6e 64 65 66 69 6e 65 64 3c 2f 69 3e 29 3b 20 61  ndefined</i>); a
1580: 6e 79 77 61 79 20 61 20 64 69 72 65 63 74 20 71  nyway a direct q
1590: 75 65 72 79 20 6f 6e 20 50 6f 73 74 47 49 53 20  uery on PostGIS 
15a0: 72 65 70 6f 72 74 73 20 3c 62 3e 53 52 49 44 3d  reports <b>SRID=
15b0: 32 35 38 33 32 3c 2f 62 3e 3c 62 72 3e 28 3c 69  25832</b><br>(<i
15c0: 3e 43 6f 75 6c 64 20 62 65 20 49 27 76 65 20 20  >Could be I've  
15d0: 6d 69 73 73 65 64 20 74 6f 20 73 65 74 20 73 6f  missed to set so
15e0: 6d 65 20 6d 61 67 69 63 20 61 72 67 75 6d 65 6e  me magic argumen
15f0: 74 20 69 6e 74 6f 20 74 68 65 20 63 6f 6e 6e 65  t into the conne
1600: 63 74 69 6f 6e 20 73 74 72 69 6e 67 20 3f 3c 2f  ction string ?</
1610: 69 3e 29 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 3c 69  i>)</td>..<td><i
1620: 6d 67 20 62 6f 72 64 65 72 3d 22 31 22 20 73 72  mg border="1" sr
1630: 63 3d 22 68 74 74 70 3a 2f 2f 77 77 77 2e 67 61  c="http://www.ga
1640: 69 61 2d 67 69 73 2e 69 74 2f 67 61 69 61 2d 73  ia-gis.it/gaia-s
1650: 69 6e 73 2f 76 69 72 74 75 61 6c 6f 67 72 2f 6f  ins/virtualogr/o
1660: 67 72 2d 34 2e 70 6e 67 22 20 61 6c 74 3d 22 63  gr-4.png" alt="c
1670: 68 65 63 6b 5f 74 79 70 65 5f 73 72 69 64 22 3e  heck_type_srid">
1680: 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e  </td></tr>..<tr>
1690: 3c 74 64 3e 3c 62 3e 53 74 65 70 20 23 35 3c 2f  <td><b>Step #5</
16a0: 62 3e 3c 62 72 3e 6e 6f 77 20 77 65 27 6c 6c 20  b><br>now we'll 
16b0: 63 72 65 61 74 65 20 61 20 3c 69 3e 67 65 6e 75  create a <i>genu
16c0: 69 6e 65 3c 2f 69 3e 20 53 70 61 74 69 61 4c 69  ine</i> SpatiaLi
16d0: 74 65 20 6f 77 6e 20 74 61 62 6c 65 3c 2f 74 64  te own table</td
16e0: 3e 0d 0a 3c 74 64 3e 3c 69 6d 67 20 62 6f 72 64  >..<td><img bord
16f0: 65 72 3d 22 31 22 20 73 72 63 3d 22 68 74 74 70  er="1" src="http
1700: 3a 2f 2f 77 77 77 2e 67 61 69 61 2d 67 69 73 2e  ://www.gaia-gis.
1710: 69 74 2f 67 61 69 61 2d 73 69 6e 73 2f 76 69 72  it/gaia-sins/vir
1720: 74 75 61 6c 6f 67 72 2f 6f 67 72 2d 35 2e 70 6e  tualogr/ogr-5.pn
1730: 67 22 20 61 6c 74 3d 22 63 72 65 61 74 65 5f 74  g" alt="create_t
1740: 61 62 6c 65 22 3e 3c 2f 74 64 3e 3c 2f 74 72 3e  able"></td></tr>
1750: 0d 0a 3c 74 72 3e 3c 74 64 3e 3c 62 3e 53 74 65  ..<tr><td><b>Ste
1760: 70 20 23 36 3c 2f 62 3e 3c 62 72 3e 77 65 27 6c  p #6</b><br>we'l
1770: 6c 20 74 68 65 6e 20 61 64 64 20 61 20 47 65 6f  l then add a Geo
1780: 6d 65 74 72 79 20 63 6f 6c 75 6d 6e 20 74 6f 20  metry column to 
1790: 74 68 65 20 70 72 65 76 69 6f 75 73 6c 79 20 63  the previously c
17a0: 72 65 61 74 65 64 20 74 61 62 6c 65 3c 2f 74 64  reated table</td
17b0: 3e 0d 0a 3c 74 64 3e 3c 69 6d 67 20 62 6f 72 64  >..<td><img bord
17c0: 65 72 3d 22 31 22 20 73 72 63 3d 22 68 74 74 70  er="1" src="http
17d0: 3a 2f 2f 77 77 77 2e 67 61 69 61 2d 67 69 73 2e  ://www.gaia-gis.
17e0: 69 74 2f 67 61 69 61 2d 73 69 6e 73 2f 76 69 72  it/gaia-sins/vir
17f0: 74 75 61 6c 6f 67 72 2f 6f 67 72 2d 36 2e 70 6e  tualogr/ogr-6.pn
1800: 67 22 20 61 6c 74 3d 22 61 64 64 5f 67 65 6f 6d  g" alt="add_geom
1810: 65 74 79 5f 63 6f 6c 75 6d 6e 22 3e 3c 2f 74 64  ety_column"></td
1820: 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e  ></tr>..<tr><td>
1830: 3c 62 3e 53 74 65 70 20 23 37 3c 2f 62 3e 3c 62  <b>Step #7</b><b
1840: 72 3e 61 6e 64 20 66 69 6e 61 6c 6c 79 20 77 65  r>and finally we
1850: 27 6c 6c 20 63 72 65 61 74 65 20 61 20 53 70 61  'll create a Spa
1860: 74 69 61 6c 20 49 6e 64 65 78 20 6f 6e 20 74 68  tial Index on th
1870: 69 73 20 67 65 6f 6d 65 74 72 79 20 63 6f 6c 75  is geometry colu
1880: 6d 6e 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 3c 69 6d  mn</td>..<td><im
1890: 67 20 62 6f 72 64 65 72 3d 22 31 22 20 73 72 63  g border="1" src
18a0: 3d 22 68 74 74 70 3a 2f 2f 77 77 77 2e 67 61 69  ="http://www.gai
18b0: 61 2d 67 69 73 2e 69 74 2f 67 61 69 61 2d 73 69  a-gis.it/gaia-si
18c0: 6e 73 2f 76 69 72 74 75 61 6c 6f 67 72 2f 6f 67  ns/virtualogr/og
18d0: 72 2d 37 2e 70 6e 67 22 20 61 6c 74 3d 22 63 72  r-7.png" alt="cr
18e0: 65 61 74 65 5f 73 70 61 74 69 61 6c 5f 69 6e 64  eate_spatial_ind
18f0: 65 78 22 3e 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a  ex"></td></tr>..
1900: 3c 74 72 3e 3c 74 64 3e 3c 62 3e 53 74 65 70 20  <tr><td><b>Step 
1910: 23 38 3c 2f 62 3e 3c 62 72 3e 6e 6f 77 20 77 65  #8</b><br>now we
1920: 20 73 69 6d 70 6c 79 20 68 61 76 65 20 74 6f 20   simply have to 
1930: 65 78 65 63 75 74 65 20 61 20 76 65 72 79 20 74  execute a very t
1940: 72 69 76 69 61 6c 3c 62 72 3e 0d 0a 3c 62 3e 49  rivial<br>..<b>I
1950: 4e 53 45 52 54 20 49 4e 54 4f 20 2e 2e 2e 20 53  NSERT INTO ... S
1960: 45 4c 45 43 54 3c 2f 62 3e 3c 62 72 3e 0d 0a 53  ELECT</b><br>..S
1970: 51 4c 20 73 74 61 74 65 6d 65 6e 74 2c 20 61 6e  QL statement, an
1980: 64 20 74 68 65 20 77 68 6f 6c 65 20 74 61 62 6c  d the whole tabl
1990: 65 20 77 69 6c 6c 20 62 65 20 64 69 72 65 63 74  e will be direct
19a0: 6c 79 20 69 6d 70 6f 72 74 65 64 20 69 6e 74 6f  ly imported into
19b0: 20 53 70 61 74 69 61 4c 69 74 65 20 66 72 6f 6d   SpatiaLite from
19c0: 20 50 6f 73 74 47 49 53 3c 2f 74 64 3e 0d 0a 3c   PostGIS</td>..<
19d0: 74 64 3e 3c 69 6d 67 20 62 6f 72 64 65 72 3d 22  td><img border="
19e0: 31 22 20 73 72 63 3d 22 68 74 74 70 3a 2f 2f 77  1" src="http://w
19f0: 77 77 2e 67 61 69 61 2d 67 69 73 2e 69 74 2f 67  ww.gaia-gis.it/g
1a00: 61 69 61 2d 73 69 6e 73 2f 76 69 72 74 75 61 6c  aia-sins/virtual
1a10: 6f 67 72 2f 6f 67 72 2d 38 2e 70 6e 67 22 20 61  ogr/ogr-8.png" a
1a20: 6c 74 3d 22 70 6f 70 75 6c 61 74 69 6e 67 5f 74  lt="populating_t
1a30: 61 62 6c 65 22 3e 3c 2f 74 64 3e 3c 2f 74 72 3e  able"></td></tr>
1a40: 0d 0a 3c 74 72 3e 3c 74 64 3e 3c 62 3e 53 74 65  ..<tr><td><b>Ste
1a50: 70 20 23 39 3c 2f 62 3e 3c 62 72 3e 65 6e 64 20  p #9</b><br>end 
1a60: 6f 66 20 74 68 65 20 73 74 6f 72 79 3a 20 6e 6f  of the story: no
1a70: 77 20 77 65 20 73 69 6d 70 6c 79 20 68 61 76 65  w we simply have
1a80: 20 74 6f 20 64 69 73 63 6f 6e 6e 65 63 74 20 74   to disconnect t
1a90: 68 65 20 50 6f 73 74 47 49 53 20 74 61 62 6c 65  he PostGIS table
1aa0: 20 61 6e 64 20 77 65 27 76 65 20 63 6f 6d 70 6c   and we've compl
1ab0: 65 74 65 6c 79 20 66 69 6e 69 73 68 65 64 20 6f  etely finished o
1ac0: 75 72 20 6a 6f 62 20 77 69 74 68 20 66 75 6c 6c  ur job with full
1ad0: 20 73 75 63 63 65 73 73 2e 0d 0a 3c 68 32 3e 52   success...<h2>R
1ae0: 65 61 6c 6c 79 20 61 6d 61 7a 69 6e 67 3c 2f 68  eally amazing</h
1af0: 32 3e 0d 0a 61 73 20 73 69 6d 70 6c 65 20 61 73  2>..as simple as
1b00: 20 64 72 69 6e 6b 69 6e 67 20 61 20 67 6c 61 73   drinking a glas
1b10: 73 20 6f 66 20 77 61 74 65 72 20 21 21 21 3c 2f  s of water !!!</
1b20: 74 64 3e 0d 0a 3c 74 64 3e 3c 69 6d 67 20 62 6f  td>..<td><img bo
1b30: 72 64 65 72 3d 22 31 22 20 73 72 63 3d 22 68 74  rder="1" src="ht
1b40: 74 70 3a 2f 2f 77 77 77 2e 67 61 69 61 2d 67 69  tp://www.gaia-gi
1b50: 73 2e 69 74 2f 67 61 69 61 2d 73 69 6e 73 2f 76  s.it/gaia-sins/v
1b60: 69 72 74 75 61 6c 6f 67 72 2f 6f 67 72 2d 39 2e  irtualogr/ogr-9.
1b70: 70 6e 67 22 20 61 6c 74 3d 22 64 72 6f 70 5f 76  png" alt="drop_v
1b80: 69 72 74 75 61 6c 22 3e 3c 2f 74 64 3e 3c 2f 74  irtual"></td></t
1b90: 72 3e 0d 0a 3c 2f 74 61 62 6c 65 3e 0d 0a 3c 62  r>..</table>..<b
1ba0: 72 3e 3c 68 72 3e 0d 0a 42 61 63 6b 20 74 6f 20  r><hr>..Back to 
1bb0: 3c 61 20 68 72 65 66 3d 22 68 74 74 70 73 3a 2f  <a href="https:/
1bc0: 2f 77 77 77 2e 67 61 69 61 2d 67 69 73 2e 69 74  /www.gaia-gis.it
1bd0: 2f 66 6f 73 73 69 6c 2f 6c 69 62 73 70 61 74 69  /fossil/libspati
1be0: 61 6c 69 74 65 2f 77 69 6b 69 3f 6e 61 6d 65 3d  alite/wiki?name=
1bf0: 73 77 69 74 63 68 69 6e 67 2d 74 6f 2d 34 2e 30  switching-to-4.0
1c00: 23 76 69 72 74 75 61 6c 6f 67 72 22 3e 6d 61 69  #virtualogr">mai
1c10: 6e 20 70 61 67 65 3c 2f 61 3e 0a 5a 20 32 36 32  n page</a>.Z 262
1c20: 65 62 30 65 38 65 64 61 32 63 34 61 30 62 64 36  eb0e8eda2c4a0bd6
1c30: 32 31 30 32 66 62 37 35 61 66 32 63 64 0a        2102fb75af2cd.