Hex Artifact Content
Not logged in

Artifact a523f56ef290af210b6d4c44e74f443ae24d7072:

Wiki page [VirtualOGR] by sandro 2012-11-28 10:23:51.
0000: 44 20 32 30 31 32 2d 31 31 2d 32 38 54 31 30 3a  D 2012-11-28T10:
0010: 32 33 3a 35 31 2e 30 30 30 0a 4c 20 56 69 72 74  23:51.000.L Virt
0020: 75 61 6c 4f 47 52 0a 50 20 61 32 37 31 63 30 33  ualOGR.P a271c03
0030: 66 61 32 37 32 36 61 38 63 38 36 61 66 35 32 65  fa2726a8c86af52e
0040: 36 66 65 61 38 61 61 37 32 34 62 30 34 35 33 36  6fea8aa724b04536
0050: 35 0a 55 20 73 61 6e 64 72 6f 0a 57 20 37 30 39  5.U sandro.W 709
0060: 33 0a 3c 68 32 3e 56 69 72 74 75 61 6c 4f 47 52  3.<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 31 2e 31 30 3c  me <b>GDAL 1.10<
05c0: 2f 62 3e 20 28 63 75 72 72 65 6e 74 6c 79 20 61  /b> (currently a
05d0: 76 61 69 6c 61 62 6c 65 20 66 72 6f 6d 20 74 68  vailable from th
05e0: 65 20 3c 69 3e 74 72 75 6e 6b 3c 2f 69 3e 20 72  e <i>trunk</i> r
05f0: 65 70 6f 73 69 74 6f 72 79 29 20 77 69 6c 6c 20  epository) will 
0600: 73 75 70 70 6f 72 74 20 3c 62 3e 56 69 72 74 75  support <b>Virtu
0610: 61 6c 4f 47 52 3c 2f 62 3e 20 28 74 68 61 6e 6b  alOGR</b> (thank
0620: 73 20 74 6f 20 45 76 65 6e 20 52 6f 75 61 75 6c  s to Even Rouaul
0630: 74 20 68 69 67 68 6c 79 20 61 70 70 72 65 63 69  t highly appreci
0640: 61 74 65 64 20 64 65 76 65 6c 6f 70 6d 65 6e 74  ated development
0650: 20 77 6f 72 6b 29 2e 3c 62 72 3e 0d 0a 54 68 69   work).<br>..Thi
0660: 73 20 70 72 61 63 74 69 63 61 6c 6c 79 20 6d 65  s practically me
0670: 61 6e 73 20 74 68 61 74 20 74 68 65 20 77 68 6f  ans that the who
0680: 6c 65 20 4f 47 52 20 6c 69 62 72 61 72 79 20 77  le OGR library w
0690: 69 6c 6c 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c  ill automaticall
06a0: 79 20 62 65 63 6f 6d 65 20 61 20 6c 6f 61 64 61  y become a loada
06b0: 62 6c 65 20 65 78 74 65 6e 73 69 6f 6e 20 74 6f  ble extension to
06c0: 20 53 51 4c 69 74 65 3b 20 61 6e 64 20 61 6e 79   SQLite; and any
06d0: 20 64 61 74 61 73 6f 75 72 63 65 20 73 75 70 70   datasource supp
06e0: 6f 72 74 65 64 20 62 79 20 4f 47 52 20 77 69 6c  orted by OGR wil
06f0: 6c 20 62 65 20 64 69 72 65 63 74 6c 79 20 61 63  l be directly ac
0700: 63 65 73 73 69 62 6c 65 20 62 79 20 53 51 4c 20  cessible by SQL 
0710: 6f 6e 20 53 51 4c 69 74 65 2f 53 70 61 74 69 61  on SQLite/Spatia
0720: 4c 69 74 65 20 61 73 20 69 66 20 69 74 20 77 61  Lite as if it wa
0730: 73 20 61 6e 20 6f 72 64 69 6e 61 72 79 20 74 61  s an ordinary ta
0740: 62 6c 65 20 77 69 74 68 69 6e 20 74 68 65 20 44  ble within the D
0750: 42 2e 3c 62 72 3e 0d 0a 59 6f 75 20 63 61 6e 20  B.<br>..You can 
0760: 66 69 6e 64 20 6d 61 6e 79 20 74 65 63 68 6e 69  find many techni
0770: 63 61 6c 20 64 65 74 61 69 6c 73 20 61 62 6f 75  cal details abou
0780: 74 20 56 69 72 74 75 61 6c 4f 47 52 20 6f 6e 20  t VirtualOGR on 
0790: 74 68 65 20 61 70 70 72 6f 70 69 72 61 74 65 20  the appropirate 
07a0: 3c 61 20 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f  <a href="http://
07b0: 77 77 77 2e 67 64 61 6c 2e 6f 72 67 2f 6f 67 72  www.gdal.org/ogr
07c0: 2f 64 72 76 5f 73 71 6c 69 74 65 2e 68 74 6d 6c  /drv_sqlite.html
07d0: 22 3e 64 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 20  ">documentation 
07e0: 70 61 67 65 3c 2f 61 3e 2e 0d 0a 3c 68 33 3e 57  page</a>...<h3>W
07f0: 68 79 20 69 73 20 56 69 72 74 75 61 6c 4f 47 52  hy is VirtualOGR
0800: 20 65 78 70 65 63 74 65 64 20 74 6f 20 62 65 20   expected to be 
0810: 75 73 65 66 75 6c 20 3f 3c 2f 68 33 3e 0d 0a 41  useful ?</h3>..A
0820: 62 6f 75 74 20 73 65 76 65 6e 74 79 20 64 69 66  bout seventy dif
0830: 66 65 72 65 6e 74 20 64 61 74 61 20 66 6f 72 6d  ferent data form
0840: 61 74 73 20 61 72 65 20 63 75 72 72 65 6e 74 6c  ats are currentl
0850: 79 20 73 75 70 70 6f 72 74 65 64 20 62 79 20 4f  y supported by O
0860: 47 52 2e 0d 0a 49 66 20 79 6f 75 20 61 72 65 20  GR...If you are 
0870: 69 6e 74 65 72 65 73 74 65 64 20 74 6f 20 6c 65  interested to le
0880: 61 72 6e 20 6d 6f 72 65 2c 20 79 6f 75 20 63 61  arn more, you ca
0890: 6e 20 75 73 65 66 75 6c 6c 79 20 63 6f 6e 73 75  n usefully consu
08a0: 6c 74 20 74 68 65 20 3c 61 20 68 72 65 66 3d 22  lt the <a href="
08b0: 68 74 74 70 3a 2f 2f 77 77 77 2e 67 64 61 6c 2e  http://www.gdal.
08c0: 6f 72 67 2f 6f 67 72 2f 6f 67 72 5f 66 6f 72 6d  org/ogr/ogr_form
08d0: 61 74 73 2e 68 74 6d 6c 22 3e 63 6f 6d 70 6c 65  ats.html">comple
08e0: 74 65 20 6c 69 73 74 3c 2f 61 3e 2e 3c 62 72 3e  te list</a>.<br>
08f0: 0d 0a 56 65 72 79 20 73 68 6f 72 74 6c 79 20 73  ..Very shortly s
0900: 61 69 64 3a 20 4f 47 52 20 68 61 73 20 74 68 65  aid: OGR has the
0910: 20 63 61 70 61 62 69 6c 69 74 79 20 74 6f 20 61   capability to a
0920: 63 63 65 73 73 20 6c 6f 74 73 20 6f 66 20 77 69  ccess lots of wi
0930: 64 65 73 70 72 65 61 64 20 64 61 74 61 20 66 6f  despread data fo
0940: 72 6d 61 74 73 3a 20 45 53 52 49 20 53 68 61 70  rmats: ESRI Shap
0950: 65 66 69 6c 65 73 2c 20 47 4d 4c 2c 20 44 57 47  efiles, GML, DWG
0960: 2c 20 44 58 46 20 2e 2e 2e 3c 62 72 3e 0d 0a 41  , DXF ...<br>..A
0970: 6e 64 20 4f 47 52 20 63 61 6e 20 61 63 63 65 73  nd OGR can acces
0980: 73 20 74 68 65 20 6d 6f 73 74 20 70 6f 70 75 6c  s the most popul
0990: 61 72 20 53 70 61 74 69 61 6c 20 44 4d 42 53 65  ar Spatial DMBSe
09a0: 73 20 61 73 20 77 65 6c 6c 3a 20 50 6f 73 74 67  s as well: Postg
09b0: 72 65 53 51 4c 2c 20 4f 72 61 63 6c 65 2c 20 53  reSQL, Oracle, S
09c0: 51 4c 20 53 65 72 76 65 72 2c 20 4d 79 53 51 4c  QL Server, MySQL
09d0: 20 2e 2e 2e 3c 62 72 3e 3c 62 72 3e 0d 0a 53 6f   ...<br><br>..So
09e0: 20 74 68 65 20 56 69 72 74 75 61 6c 4f 47 52 20   the VirtualOGR 
09f0: 6d 65 63 68 61 6e 69 73 6d 20 6f 66 66 65 72 73  mechanism offers
0a00: 20 61 6e 20 65 61 73 79 20 61 6e 64 20 70 61 69   an easy and pai
0a10: 6e 6c 65 73 73 20 77 61 79 20 65 6e 61 62 6c 69  nless way enabli
0a20: 6e 67 20 53 51 4c 69 74 65 2f 53 70 61 74 69 61  ng SQLite/Spatia
0a30: 4c 69 74 65 20 74 6f 20 64 69 72 65 63 74 6c 79  Lite to directly
0a40: 20 61 63 63 65 73 73 20 6c 6f 74 73 20 6f 66 20   access lots of 
0a50: 64 69 66 66 65 72 65 6e 74 20 64 61 74 61 73 6f  different dataso
0a60: 75 72 63 65 73 0d 0a 28 70 72 61 63 74 69 63 61  urces..(practica
0a70: 6c 6c 79 20 61 6e 79 20 70 6f 73 73 69 62 6c 65  lly any possible
0a80: 20 64 61 74 61 20 66 6f 72 6d 61 74 20 6f 72 20   data format or 
0a90: 73 74 6f 72 61 67 65 20 73 79 73 74 65 6d 20 79  storage system y
0aa0: 6f 75 20 63 61 6e 20 75 73 75 61 6c 6c 79 20 65  ou can usually e
0ab0: 6e 63 6f 75 6e 74 65 72 20 69 6e 20 74 68 65 20  ncounter in the 
0ac0: 47 65 6f 53 70 61 74 69 61 6c 20 69 6e 64 75 73  GeoSpatial indus
0ad0: 74 72 79 29 2e 3c 62 72 3e 0d 0a 41 6e 64 20 74  try).<br>..And t
0ae0: 68 69 73 20 6f 6e 65 20 73 75 72 65 6c 79 20 69  his one surely i
0af0: 73 20 61 20 72 65 61 6c 6c 79 20 67 6f 6f 64 20  s a really good 
0b00: 6e 65 77 20 66 6f 72 20 6d 61 6e 79 20 75 73 65  new for many use
0b10: 72 73 2c 20 62 65 63 61 75 73 65 20 74 68 69 73  rs, because this
0b20: 20 77 61 79 20 74 72 61 6e 73 66 65 72 72 69 6e   way transferrin
0b30: 67 20 64 61 74 61 20 28 69 6e 20 62 6f 74 68 20  g data (in both 
0b40: 64 69 72 65 63 74 69 6f 6e 73 29 20 62 65 74 77  directions) betw
0b50: 65 65 6e 20 53 70 61 74 69 61 4c 69 74 65 20 61  een SpatiaLite a
0b60: 6e 64 20 61 6e 6f 74 68 65 72 20 44 42 4d 53 20  nd another DBMS 
0b70: 77 69 6c 6c 20 62 65 63 6f 6d 65 20 61 6e 20 65  will become an e
0b80: 61 73 79 20 61 6e 64 20 71 75 69 74 65 20 74 72  asy and quite tr
0b90: 69 76 69 61 6c 20 3c 69 3e 6f 72 64 69 6e 61 72  ivial <i>ordinar
0ba0: 79 20 61 64 6d 69 6e 69 73 74 72 61 74 69 6f 6e  y administration
0bb0: 3c 2f 69 3e 20 61 66 66 61 69 72 2e 0d 0a 3c 68  </i> affair...<h
0bc0: 33 3e 50 72 65 70 61 72 69 6e 67 20 74 68 65 20  3>Preparing the 
0bd0: 74 65 73 74 20 65 6e 76 69 72 6f 6e 6d 65 6e 74  test environment
0be0: 3c 2f 68 33 3e 0d 0a 42 61 64 20 6e 65 77 3a 20  </h3>..Bad new: 
0bf0: 69 6e 20 6f 72 64 65 72 20 74 6f 20 70 65 72 66  in order to perf
0c00: 6f 72 6d 20 73 6f 6d 65 20 74 65 73 74 20 79 6f  orm some test yo
0c10: 75 20 61 72 65 20 73 75 72 65 6c 79 20 72 65 71  u are surely req
0c20: 75 69 72 65 64 20 74 6f 20 62 75 69 6c 64 20 28  uired to build (
0c30: 62 79 20 79 6f 75 72 73 65 6c 66 29 20 62 6f 74  by yourself) bot
0c40: 68 20 53 70 61 74 69 61 4c 69 74 65 20 61 6e 64  h SpatiaLite and
0c50: 20 47 44 41 4c 20 73 74 61 72 74 69 6e 67 20 66   GDAL starting f
0c60: 72 6f 6d 20 74 68 65 20 63 75 72 72 65 6e 74 20  rom the current 
0c70: 3c 69 3e 64 65 76 65 6c 6f 70 6d 65 6e 74 3c 2f  <i>development</
0c80: 69 3e 20 28 61 6b 61 20 3c 69 3e 74 72 75 6e 6b  i> (aka <i>trunk
0c90: 3c 2f 69 3e 29 20 73 6f 75 72 63 65 73 20 61 76  </i>) sources av
0ca0: 61 69 6c 61 62 6c 65 20 66 72 6f 6d 20 74 68 65  ailable from the
0cb0: 20 63 6f 72 72 65 73 70 6f 6e 64 69 6e 67 20 63   corresponding c
0cc0: 6f 64 65 20 72 65 70 6f 73 69 74 6f 72 69 65 73  ode repositories
0cd0: 2e 0d 0a 41 6e 79 77 61 79 20 74 68 65 20 73 69  ...Anyway the si
0ce0: 74 75 61 74 69 6f 6e 20 77 69 6c 6c 20 62 65 63  tuation will bec
0cf0: 6f 6d 65 20 6d 75 63 68 20 6d 6f 72 65 20 73 69  ome much more si
0d00: 6d 70 6c 65 20 64 75 72 69 6e 67 20 32 30 31 33  mple during 2013
0d10: 2c 20 77 68 65 6e 20 62 6f 74 68 20 73 6f 66 74  , when both soft
0d20: 77 61 72 65 73 20 77 69 6c 6c 20 62 65 63 6f 6d  wares will becom
0d30: 65 20 77 69 64 65 6c 79 20 61 76 61 69 6c 61 62  e widely availab
0d40: 6c 65 20 61 73 20 70 72 65 2d 62 75 69 6c 74 20  le as pre-built 
0d50: 70 61 63 6b 61 67 65 73 20 69 6e 20 6d 61 69 6e  packages in main
0d60: 73 74 72 65 61 6d 20 64 69 73 74 72 69 62 75 74  stream distribut
0d70: 69 6f 6e 73 2e 3c 62 72 3e 3c 62 72 3e 0d 0a 49  ions.<br><br>..I
0d80: 27 76 65 20 70 65 72 73 6f 6e 61 6c 6c 79 20 75  've personally u
0d90: 73 65 64 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e  sed the followin
0da0: 67 20 74 65 73 74 20 65 6e 76 69 72 6f 6e 6d 65  g test environme
0db0: 6e 74 3a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 44 65 62  nt:<ul>..<li>Deb
0dc0: 69 61 6e 20 53 71 75 65 65 7a 65 20 33 32 20 62  ian Squeeze 32 b
0dd0: 69 74 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 47 44 41  it</li>..<li>GDA
0de0: 4c 20 31 2e 31 30 64 65 76 3c 2f 6c 69 3e 0d 0a  L 1.10dev</li>..
0df0: 3c 6c 69 3e 6c 69 62 73 70 61 74 69 61 6c 69 74  <li>libspatialit
0e00: 65 20 34 2e 30 2e 30 3c 2f 6c 69 3e 0d 0a 3c 6c  e 4.0.0</li>..<l
0e10: 69 3e 73 70 61 74 69 61 6c 69 74 65 5f 67 75 69  i>spatialite_gui
0e20: 20 31 2e 36 2e 30 3c 2f 6c 69 3e 0d 0a 3c 2f 75   1.6.0</li>..</u
0e30: 6c 3e 3c 62 72 3e 0d 0a 3c 75 3e 50 6c 65 61 73  l><br>..<u>Pleas
0e40: 65 20 6e 6f 74 65 3c 2f 75 3e 3a 20 6f 6e 20 6d  e note</u>: on m
0e50: 79 20 6f 77 6e 20 44 65 62 69 61 6e 20 73 79 73  y own Debian sys
0e60: 74 65 6d 20 49 20 69 6e 73 74 61 6c 6c 65 64 20  tem I installed 
0e70: 61 6c 6c 20 63 75 73 74 6f 6d 2d 62 75 69 6c 74  all custom-built
0e80: 20 6c 69 62 72 61 72 69 65 73 20 28 3c 69 3e 6c   libraries (<i>l
0e90: 69 62 73 70 61 74 69 61 6c 69 74 65 3c 2f 69 3e  ibspatialite</i>
0ea0: 20 61 6e 64 20 3c 69 3e 6c 69 62 67 64 61 6c 3c   and <i>libgdal<
0eb0: 2f 69 3e 29 20 6f 6e 20 74 68 65 20 64 65 66 61  /i>) on the defa
0ec0: 75 6c 74 20 74 61 72 67 65 74 20 3c 62 3e 2f 75  ult target <b>/u
0ed0: 73 72 2f 6c 6f 63 61 6c 2f 6c 69 62 3c 2f 62 3e  sr/local/lib</b>
0ee0: 3c 62 72 3e 0d 0a 53 6f 20 49 20 68 61 64 20 74  <br>..So I had t
0ef0: 68 65 6e 20 74 6f 20 65 78 70 6c 69 63 69 74 6c  hen to explicitl
0f00: 79 20 64 65 63 6c 61 72 65 20 74 68 65 20 66 6f  y declare the fo
0f10: 6c 6c 6f 77 69 6e 67 20 76 61 72 69 61 62 6c 65  llowing variable
0f20: 20 69 6e 20 6f 72 64 65 72 20 74 6f 20 69 6e 63   in order to inc
0f30: 6c 75 64 65 20 74 68 69 73 20 64 69 72 65 63 74  lude this direct
0f40: 6f 72 79 20 69 6e 74 6f 20 74 68 65 20 73 65 61  ory into the sea
0f50: 72 63 68 20 70 61 74 68 20 28 3c 69 3e 74 68 69  rch path (<i>thi
0f60: 73 20 73 74 65 70 20 73 68 6f 75 6c 64 20 6e 6f  s step should no
0f70: 74 20 62 65 20 73 74 72 69 63 74 6c 79 20 72 65  t be strictly re
0f80: 71 75 69 72 65 64 20 75 73 69 6e 67 20 61 20 64  quired using a d
0f90: 69 66 66 65 72 65 6e 74 20 4c 69 6e 75 78 20 64  ifferent Linux d
0fa0: 69 73 74 72 6f 2c 20 65 2e 67 2e 20 46 65 64 6f  istro, e.g. Fedo
0fb0: 72 61 3c 2f 69 3e 29 3a 3c 62 72 3e 3c 62 72 3e  ra</i>):<br><br>
0fc0: 0d 0a 3c 62 3e 65 78 70 6f 72 74 20 22 4c 44 5f  ..<b>export "LD_
0fd0: 4c 49 42 52 41 52 59 5f 50 41 54 48 3d 2f 75 73  LIBRARY_PATH=/us
0fe0: 72 2f 6c 6f 63 61 6c 2f 6c 69 62 22 3c 2f 62 3e  r/local/lib"</b>
0ff0: 3c 62 72 3e 3c 62 72 3e 0d 0a 3c 68 33 3e 56 65  <br><br>..<h3>Ve
1000: 72 79 20 71 75 69 63 6b 20 56 69 72 74 75 61 6c  ry quick Virtual
1010: 4f 47 52 20 68 6f 77 2d 74 6f 20 28 73 68 6f 77  OGR how-to (show
1020: 69 6e 67 20 61 20 70 72 61 63 74 69 63 61 6c 20  ing a practical 
1030: 65 78 61 6d 70 6c 65 29 3c 2f 68 33 3e 0d 0a 3c  example)</h3>..<
1040: 74 61 62 6c 65 20 63 65 6c 6c 73 70 61 63 69 6e  table cellspacin
1050: 67 3d 22 36 22 20 63 65 6c 6c 70 61 64 64 69 6e  g="6" cellpaddin
1060: 67 3d 22 36 22 3e 0d 0a 3c 74 72 3e 3c 74 64 3e  g="6">..<tr><td>
1070: 3c 62 3e 53 74 65 70 20 23 31 3c 2f 62 3e 3c 62  <b>Step #1</b><b
1080: 72 3e 77 65 27 6c 6c 20 73 74 61 72 74 20 6c 6f  r>we'll start lo
1090: 61 64 69 6e 67 20 3c 69 3e 6c 69 62 67 64 61 6c  ading <i>libgdal
10a0: 3c 2f 69 3e 20 61 73 20 61 20 64 79 6e 61 6d 69  </i> as a dynami
10b0: 63 61 6c 20 65 78 74 65 6e 73 69 6f 6e 20 74 6f  cal extension to
10c0: 20 53 51 4c 69 74 65 3b 20 69 66 20 77 65 20 77   SQLite; if we w
10d0: 65 72 65 20 6f 6e 20 57 69 6e 64 6f 77 73 20 77  ere on Windows w
10e0: 65 20 6f 62 76 69 6f 75 73 6c 79 20 68 61 64 20  e obviously had 
10f0: 74 6f 20 6c 6f 61 64 20 61 20 66 69 6c 65 20 6e  to load a file n
1100: 61 6d 65 64 20 3c 69 3e 6c 69 62 67 64 61 6c 2e  amed <i>libgdal.
1110: 64 6c 6c 3c 2f 69 3e 20 28 3c 69 3e 6f 72 20 73  dll</i> (<i>or s
1120: 6f 6d 65 74 68 69 6e 67 20 6c 69 6b 65 3b 20 69  omething like; i
1130: 74 20 75 73 75 61 6c 6c 79 20 64 65 70 65 6e 64  t usually depend
1140: 73 20 6f 6e 20 20 70 61 63 6b 61 67 65 72 73 20  s on  packagers 
1150: 63 68 6f 69 63 65 73 3c 2f 69 3e 29 3c 2f 74 64  choices</i>)</td
1160: 3e 0d 0a 3c 74 64 3e 3c 69 6d 67 20 62 6f 72 64  >..<td><img bord
1170: 65 72 3d 22 31 22 20 73 72 63 3d 22 68 74 74 70  er="1" src="http
1180: 3a 2f 2f 77 77 77 2e 67 61 69 61 2d 67 69 73 2e  ://www.gaia-gis.
1190: 69 74 2f 67 61 69 61 2d 73 69 6e 73 2f 76 69 72  it/gaia-sins/vir
11a0: 74 75 61 6c 6f 67 72 2f 6f 67 72 2d 31 2e 70 6e  tualogr/ogr-1.pn
11b0: 67 22 20 61 6c 74 3d 22 6c 6f 61 64 5f 65 78 74  g" alt="load_ext
11c0: 65 6e 73 69 6f 6e 22 3e 3c 2f 74 64 3e 3c 2f 74  ension"></td></t
11d0: 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 3c 62 3e 53  r>..<tr><td><b>S
11e0: 74 65 70 20 23 32 3c 2f 62 3e 3c 62 72 3e 6e 6f  tep #2</b><br>no
11f0: 77 20 77 65 27 6c 6c 20 74 72 79 20 74 6f 20 63  w we'll try to c
1200: 6f 6e 6e 65 63 74 20 61 20 50 6f 73 74 47 49 53  onnect a PostGIS
1210: 20 74 61 62 6c 65 20 3c 62 3e 6c 30 39 3c 2f 62   table <b>l09</b
1220: 3e 2c 20 6c 6f 63 61 74 65 64 20 69 6e 20 74 68  >, located in th
1230: 65 20 73 63 68 65 6d 61 20 3c 62 3e 6d 65 72 61  e schema <b>mera
1240: 6e 6f 3c 2f 62 3e 20 6f 66 20 74 68 65 20 64 61  no</b> of the da
1250: 74 61 62 61 73 65 20 3c 62 3e 67 69 73 3c 2f 62  tabase <b>gis</b
1260: 3e 3c 62 72 3e 3c 62 72 3e 3c 75 6c 3e 0d 0a 3c  ><br><br><ul>..<
1270: 6c 69 3e 74 68 65 20 66 69 72 73 74 20 61 72 67  li>the first arg
1280: 75 6d 65 6e 74 20 3c 62 3e 50 47 3a 64 62 6e 61  ument <b>PG:dbna
1290: 6d 65 3d 67 69 73 3c 2f 62 3e 20 73 65 6c 65 63  me=gis</b> selec
12a0: 74 73 20 61 20 63 6f 6e 6e 65 63 74 69 6f 6e 20  ts a connection 
12b0: 74 6f 20 50 6f 73 74 67 72 65 53 51 4c 3c 2f 6c  to PostgreSQL</l
12c0: 69 3e 0d 0a 3c 6c 69 3e 74 68 65 20 73 65 63 6f  i>..<li>the seco
12d0: 6e 64 20 61 72 67 75 6d 65 6e 74 20 3c 62 3e 30  nd argument <b>0
12e0: 3c 2f 62 3e 20 73 69 6d 70 6c 79 20 69 6e 74 65  </b> simply inte
12f0: 6e 64 73 20 3c 69 3e 72 65 61 64 2d 6f 6e 6c 79  nds <i>read-only
1300: 3c 2f 69 3e 20 6d 6f 64 65 3c 2f 6c 69 3e 0d 0a  </i> mode</li>..
1310: 3c 6c 69 3e 74 68 65 20 74 68 69 72 64 20 61 72  <li>the third ar
1320: 67 75 6d 65 6e 74 20 3c 62 3e 6d 65 72 61 6e 6f  gument <b>merano
1330: 2e 6c 30 39 3c 2f 62 3e 20 73 70 65 63 69 66 69  .l09</b> specifi
1340: 65 73 20 74 68 65 20 73 63 68 65 6d 61 20 61 6e  es the schema an
1350: 64 20 74 61 62 6c 65 20 6e 61 6d 65 73 3c 2f 6c  d table names</l
1360: 69 3e 0d 0a 3c 2f 75 6c 3e 3c 2f 74 64 3e 0d 0a  i>..</ul></td>..
1370: 3c 74 64 3e 3c 69 6d 67 20 62 6f 72 64 65 72 3d  <td><img border=
1380: 22 31 22 20 73 72 63 3d 22 68 74 74 70 3a 2f 2f  "1" src="http://
1390: 77 77 77 2e 67 61 69 61 2d 67 69 73 2e 69 74 2f  www.gaia-gis.it/
13a0: 67 61 69 61 2d 73 69 6e 73 2f 76 69 72 74 75 61  gaia-sins/virtua
13b0: 6c 6f 67 72 2f 6f 67 72 2d 32 2e 70 6e 67 22 20  logr/ogr-2.png" 
13c0: 61 6c 74 3d 22 63 72 65 61 74 65 5f 76 69 72 74  alt="create_virt
13d0: 75 61 6c 5f 74 61 62 6c 65 22 3e 3c 2f 74 64 3e  ual_table"></td>
13e0: 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 3c  </tr>..<tr><td><
13f0: 62 3e 53 74 65 70 20 23 33 3c 2f 62 3e 3c 62 72  b>Step #3</b><br
1400: 3e 6a 75 73 74 20 61 20 73 69 6d 70 6c 65 20 74  >just a simple t
1410: 65 73 74 20 71 75 65 72 79 20 74 6f 20 63 68 65  est query to che
1420: 63 6b 20 69 66 20 61 6e 79 74 68 69 6e 67 20 77  ck if anything w
1430: 6f 72 6b 73 20 61 73 20 65 78 70 65 63 74 65 64  orks as expected
1440: 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 3c 69 6d 67 20  </td>..<td><img 
1450: 62 6f 72 64 65 72 3d 22 31 22 20 73 72 63 3d 22  border="1" src="
1460: 68 74 74 70 3a 2f 2f 77 77 77 2e 67 61 69 61 2d  http://www.gaia-
1470: 67 69 73 2e 69 74 2f 67 61 69 61 2d 73 69 6e 73  gis.it/gaia-sins
1480: 2f 76 69 72 74 75 61 6c 6f 67 72 2f 6f 67 72 2d  /virtualogr/ogr-
1490: 33 2e 70 6e 67 22 20 61 6c 74 3d 22 74 65 73 74  3.png" alt="test
14a0: 5f 71 75 65 72 79 22 3e 3c 2f 74 64 3e 3c 2f 74  _query"></td></t
14b0: 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 3c 62 3e 53  r>..<tr><td><b>S
14c0: 74 65 70 20 23 34 3c 2f 62 3e 3c 62 72 3e 77 65  tep #4</b><br>we
14d0: 27 6c 6c 20 6e 6f 77 20 63 68 65 63 6b 20 74 68  'll now check th
14e0: 65 20 47 65 6f 6d 65 74 72 79 2d 54 79 70 65 20  e Geometry-Type 
14f0: 61 6e 64 20 53 52 49 44 20 6f 66 20 67 65 6f 6d  and SRID of geom
1500: 65 74 72 69 65 73 20 63 6f 6e 74 61 69 6e 65 64  etries contained
1510: 20 69 6e 74 6f 20 74 68 65 20 50 6f 73 74 47 49   into the PostGI
1520: 53 20 74 61 62 6c 65 2e 3c 62 72 3e 3c 62 72 3e  S table.<br><br>
1530: 0d 0a 46 6f 72 20 73 6f 6d 65 20 6f 64 64 20 72  ..For some odd r
1540: 65 61 73 6f 6e 20 74 68 65 20 53 52 49 44 20 69  eason the SRID i
1550: 73 20 72 65 70 6f 72 74 65 64 20 61 73 20 3c 62  s reported as <b
1560: 3e 2d 31 3c 2f 62 3e 20 28 3c 69 3e 75 6e 64 65  >-1</b> (<i>unde
1570: 66 69 6e 65 64 3c 2f 69 3e 29 3b 20 61 6e 79 77  fined</i>); anyw
1580: 61 79 20 61 20 64 69 72 65 63 74 20 71 75 65 72  ay a direct quer
1590: 79 20 6f 6e 20 50 6f 73 74 47 49 53 20 72 65 70  y on PostGIS rep
15a0: 6f 72 74 73 20 3c 62 3e 53 52 49 44 3d 32 35 38  orts <b>SRID=258
15b0: 33 32 3c 2f 62 3e 3c 62 72 3e 28 3c 69 3e 43 6f  32</b><br>(<i>Co
15c0: 75 6c 64 20 62 65 20 49 27 76 65 20 20 6d 69 73  uld be I've  mis
15d0: 73 65 64 20 74 6f 20 73 65 74 20 73 6f 6d 65 20  sed to set some 
15e0: 6d 61 67 69 63 20 61 72 67 75 6d 65 6e 74 20 69  magic argument i
15f0: 6e 74 6f 20 74 68 65 20 63 6f 6e 6e 65 63 74 69  nto the connecti
1600: 6f 6e 20 73 74 72 69 6e 67 20 3f 3c 2f 69 3e 29  on string ?</i>)
1610: 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 3c 69 6d 67 20  </td>..<td><img 
1620: 62 6f 72 64 65 72 3d 22 31 22 20 73 72 63 3d 22  border="1" src="
1630: 68 74 74 70 3a 2f 2f 77 77 77 2e 67 61 69 61 2d  http://www.gaia-
1640: 67 69 73 2e 69 74 2f 67 61 69 61 2d 73 69 6e 73  gis.it/gaia-sins
1650: 2f 76 69 72 74 75 61 6c 6f 67 72 2f 6f 67 72 2d  /virtualogr/ogr-
1660: 34 2e 70 6e 67 22 20 61 6c 74 3d 22 63 68 65 63  4.png" alt="chec
1670: 6b 5f 74 79 70 65 5f 73 72 69 64 22 3e 3c 2f 74  k_type_srid"></t
1680: 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64  d></tr>..<tr><td
1690: 3e 3c 62 3e 53 74 65 70 20 23 35 3c 2f 62 3e 3c  ><b>Step #5</b><
16a0: 62 72 3e 6e 6f 77 20 77 65 27 6c 6c 20 63 72 65  br>now we'll cre
16b0: 61 74 65 20 61 20 3c 69 3e 67 65 6e 75 69 6e 65  ate a <i>genuine
16c0: 3c 2f 69 3e 20 53 70 61 74 69 61 4c 69 74 65 20  </i> SpatiaLite 
16d0: 6f 77 6e 20 74 61 62 6c 65 3c 2f 74 64 3e 0d 0a  own table</td>..
16e0: 3c 74 64 3e 3c 69 6d 67 20 62 6f 72 64 65 72 3d  <td><img border=
16f0: 22 31 22 20 73 72 63 3d 22 68 74 74 70 3a 2f 2f  "1" src="http://
1700: 77 77 77 2e 67 61 69 61 2d 67 69 73 2e 69 74 2f  www.gaia-gis.it/
1710: 67 61 69 61 2d 73 69 6e 73 2f 76 69 72 74 75 61  gaia-sins/virtua
1720: 6c 6f 67 72 2f 6f 67 72 2d 35 2e 70 6e 67 22 20  logr/ogr-5.png" 
1730: 61 6c 74 3d 22 63 72 65 61 74 65 5f 74 61 62 6c  alt="create_tabl
1740: 65 22 3e 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c  e"></td></tr>..<
1750: 74 72 3e 3c 74 64 3e 3c 62 3e 53 74 65 70 20 23  tr><td><b>Step #
1760: 36 3c 2f 62 3e 3c 62 72 3e 77 65 27 6c 6c 20 74  6</b><br>we'll t
1770: 68 65 6e 20 61 64 64 20 61 20 47 65 6f 6d 65 74  hen add a Geomet
1780: 72 79 20 63 6f 6c 75 6d 6e 20 74 6f 20 74 68 65  ry column to the
1790: 20 70 72 65 76 69 6f 75 73 6c 79 20 63 72 65 61   previously crea
17a0: 74 65 64 20 74 61 62 6c 65 3c 2f 74 64 3e 0d 0a  ted table</td>..
17b0: 3c 74 64 3e 3c 69 6d 67 20 62 6f 72 64 65 72 3d  <td><img border=
17c0: 22 31 22 20 73 72 63 3d 22 68 74 74 70 3a 2f 2f  "1" src="http://
17d0: 77 77 77 2e 67 61 69 61 2d 67 69 73 2e 69 74 2f  www.gaia-gis.it/
17e0: 67 61 69 61 2d 73 69 6e 73 2f 76 69 72 74 75 61  gaia-sins/virtua
17f0: 6c 6f 67 72 2f 6f 67 72 2d 36 2e 70 6e 67 22 20  logr/ogr-6.png" 
1800: 61 6c 74 3d 22 61 64 64 5f 67 65 6f 6d 65 74 79  alt="add_geomety
1810: 5f 63 6f 6c 75 6d 6e 22 3e 3c 2f 74 64 3e 3c 2f  _column"></td></
1820: 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 3c 62 3e  tr>..<tr><td><b>
1830: 53 74 65 70 20 23 37 3c 2f 62 3e 3c 62 72 3e 61  Step #7</b><br>a
1840: 6e 64 20 66 69 6e 61 6c 6c 79 20 77 65 27 6c 6c  nd finally we'll
1850: 20 63 72 65 61 74 65 20 61 20 53 70 61 74 69 61   create a Spatia
1860: 6c 20 49 6e 64 65 78 20 6f 6e 20 74 68 69 73 20  l Index on this 
1870: 67 65 6f 6d 65 74 72 79 20 63 6f 6c 75 6d 6e 3c  geometry column<
1880: 2f 74 64 3e 0d 0a 3c 74 64 3e 3c 69 6d 67 20 62  /td>..<td><img b
1890: 6f 72 64 65 72 3d 22 31 22 20 73 72 63 3d 22 68  order="1" src="h
18a0: 74 74 70 3a 2f 2f 77 77 77 2e 67 61 69 61 2d 67  ttp://www.gaia-g
18b0: 69 73 2e 69 74 2f 67 61 69 61 2d 73 69 6e 73 2f  is.it/gaia-sins/
18c0: 76 69 72 74 75 61 6c 6f 67 72 2f 6f 67 72 2d 37  virtualogr/ogr-7
18d0: 2e 70 6e 67 22 20 61 6c 74 3d 22 63 72 65 61 74  .png" alt="creat
18e0: 65 5f 73 70 61 74 69 61 6c 5f 69 6e 64 65 78 22  e_spatial_index"
18f0: 3e 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72  ></td></tr>..<tr
1900: 3e 3c 74 64 3e 3c 62 3e 53 74 65 70 20 23 38 3c  ><td><b>Step #8<
1910: 2f 62 3e 3c 62 72 3e 6e 6f 77 20 77 65 20 73 69  /b><br>now we si
1920: 6d 70 6c 79 20 68 61 76 65 20 74 6f 20 65 78 65  mply have to exe
1930: 63 75 74 65 20 61 20 76 65 72 79 20 74 72 69 76  cute a very triv
1940: 69 61 6c 3c 62 72 3e 0d 0a 3c 62 3e 49 4e 53 45  ial<br>..<b>INSE
1950: 52 54 20 49 4e 54 4f 20 2e 2e 2e 20 53 45 4c 45  RT INTO ... SELE
1960: 43 54 3c 2f 62 3e 3c 62 72 3e 0d 0a 53 51 4c 20  CT</b><br>..SQL 
1970: 73 74 61 74 65 6d 65 6e 74 2c 20 61 6e 64 20 74  statement, and t
1980: 68 65 20 77 68 6f 6c 65 20 74 61 62 6c 65 20 77  he whole table w
1990: 69 6c 6c 20 62 65 20 64 69 72 65 63 74 6c 79 20  ill be directly 
19a0: 69 6d 70 6f 72 74 65 64 20 69 6e 74 6f 20 53 70  imported into Sp
19b0: 61 74 69 61 4c 69 74 65 20 66 72 6f 6d 20 50 6f  atiaLite from Po
19c0: 73 74 47 49 53 3c 2f 74 64 3e 0d 0a 3c 74 64 3e  stGIS</td>..<td>
19d0: 3c 69 6d 67 20 62 6f 72 64 65 72 3d 22 31 22 20  <img border="1" 
19e0: 73 72 63 3d 22 68 74 74 70 3a 2f 2f 77 77 77 2e  src="http://www.
19f0: 67 61 69 61 2d 67 69 73 2e 69 74 2f 67 61 69 61  gaia-gis.it/gaia
1a00: 2d 73 69 6e 73 2f 76 69 72 74 75 61 6c 6f 67 72  -sins/virtualogr
1a10: 2f 6f 67 72 2d 38 2e 70 6e 67 22 20 61 6c 74 3d  /ogr-8.png" alt=
1a20: 22 70 6f 70 75 6c 61 74 69 6e 67 5f 74 61 62 6c  "populating_tabl
1a30: 65 22 3e 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c  e"></td></tr>..<
1a40: 74 72 3e 3c 74 64 3e 3c 62 3e 53 74 65 70 20 23  tr><td><b>Step #
1a50: 39 3c 2f 62 3e 3c 62 72 3e 65 6e 64 20 6f 66 20  9</b><br>end of 
1a60: 74 68 65 20 73 74 6f 72 79 3a 20 6e 6f 77 20 77  the story: now w
1a70: 65 20 73 69 6d 70 6c 79 20 68 61 76 65 20 74 6f  e simply have to
1a80: 20 64 69 73 63 6f 6e 6e 65 63 74 20 74 68 65 20   disconnect the 
1a90: 50 6f 73 74 47 49 53 20 74 61 62 6c 65 20 61 6e  PostGIS table an
1aa0: 64 20 77 65 27 76 65 20 63 6f 6d 70 6c 65 74 65  d we've complete
1ab0: 6c 79 20 66 69 6e 69 73 68 65 64 20 6f 75 72 20  ly finished our 
1ac0: 6a 6f 62 20 77 69 74 68 20 66 75 6c 6c 20 73 75  job with full su
1ad0: 63 63 65 73 73 2e 0d 0a 3c 68 32 3e 52 65 61 6c  ccess...<h2>Real
1ae0: 6c 79 20 61 6d 61 7a 69 6e 67 3c 2f 68 32 3e 0d  ly amazing</h2>.
1af0: 0a 61 73 20 73 69 6d 70 6c 65 20 61 73 20 64 72  .as simple as dr
1b00: 69 6e 6b 69 6e 67 20 61 20 67 6c 61 73 73 20 6f  inking a glass o
1b10: 66 20 77 61 74 65 72 20 21 21 21 3c 2f 74 64 3e  f water !!!</td>
1b20: 0d 0a 3c 74 64 3e 3c 69 6d 67 20 62 6f 72 64 65  ..<td><img borde
1b30: 72 3d 22 31 22 20 73 72 63 3d 22 68 74 74 70 3a  r="1" src="http:
1b40: 2f 2f 77 77 77 2e 67 61 69 61 2d 67 69 73 2e 69  //www.gaia-gis.i
1b50: 74 2f 67 61 69 61 2d 73 69 6e 73 2f 76 69 72 74  t/gaia-sins/virt
1b60: 75 61 6c 6f 67 72 2f 6f 67 72 2d 39 2e 70 6e 67  ualogr/ogr-9.png
1b70: 22 20 61 6c 74 3d 22 64 72 6f 70 5f 76 69 72 74  " alt="drop_virt
1b80: 75 61 6c 22 3e 3c 2f 74 64 3e 3c 2f 74 72 3e 0d  ual"></td></tr>.
1b90: 0a 3c 2f 74 61 62 6c 65 3e 0d 0a 3c 62 72 3e 3c  .</table>..<br><
1ba0: 68 72 3e 0d 0a 42 61 63 6b 20 74 6f 20 3c 61 20  hr>..Back to <a 
1bb0: 68 72 65 66 3d 22 68 74 74 70 73 3a 2f 2f 77 77  href="https://ww
1bc0: 77 2e 67 61 69 61 2d 67 69 73 2e 69 74 2f 66 6f  w.gaia-gis.it/fo
1bd0: 73 73 69 6c 2f 6c 69 62 73 70 61 74 69 61 6c 69  ssil/libspatiali
1be0: 74 65 2f 77 69 6b 69 3f 6e 61 6d 65 3d 73 77 69  te/wiki?name=swi
1bf0: 74 63 68 69 6e 67 2d 74 6f 2d 34 2e 30 23 76 69  tching-to-4.0#vi
1c00: 72 74 75 61 6c 6f 67 72 22 3e 6d 61 69 6e 20 70  rtualogr">main p
1c10: 61 67 65 3c 2f 61 3e 0a 5a 20 31 38 38 65 39 32  age</a>.Z 188e92
1c20: 63 34 61 38 32 37 35 35 37 33 61 38 30 39 36 62  c4a8275573a8096b
1c30: 61 62 33 30 33 65 34 63 39 37 0a                 ab303e4c97.