Hex Artifact Content
Not logged in

Artifact 56fbb6b4917c1100c41821e35ebbca0c76b0aeb2:

Wiki page [Supporting GeoJSON] by sandro 2019-01-22 17:10:40.
0000: 44 20 32 30 31 39 2d 30 31 2d 32 32 54 31 37 3a  D 2019-01-22T17:
0010: 31 30 3a 34 30 2e 38 34 31 0a 4c 20 53 75 70 70  10:40.841.L Supp
0020: 6f 72 74 69 6e 67 5c 73 47 65 6f 4a 53 4f 4e 0a  orting\sGeoJSON.
0030: 50 20 33 61 34 31 66 32 63 36 66 62 61 66 34 65  P 3a41f2c6fbaf4e
0040: 31 34 32 65 35 31 65 33 36 35 32 63 36 64 61 63  142e51e3652c6dac
0050: 32 62 38 35 39 61 66 64 38 30 0a 55 20 73 61 6e  2b859afd80.U san
0060: 64 72 6f 0a 57 20 32 33 31 38 30 0a 3c 61 20 68  dro.W 23180.<a h
0070: 72 65 66 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77  ref="https://www
0080: 2e 67 61 69 61 2d 67 69 73 2e 69 74 2f 66 6f 73  .gaia-gis.it/fos
0090: 73 69 6c 2f 6c 69 62 73 70 61 74 69 61 6c 69 74  sil/libspatialit
00a0: 65 2f 77 69 6b 69 3f 6e 61 6d 65 3d 34 2e 33 2e  e/wiki?name=4.3.
00b0: 30 2d 64 6f 63 22 3e 62 61 63 6b 3c 2f 61 3e 3c  0-doc">back</a><
00c0: 68 72 3e 3c 62 72 3e 0d 0a 3c 68 31 3e 49 6e 74  hr><br>..<h1>Int
00d0: 72 6f 64 75 63 74 69 6f 6e 3c 2f 68 31 3e 0d 0a  roduction</h1>..
00e0: 3c 61 20 68 72 65 66 3d 22 68 74 74 70 73 3a 2f  <a href="https:/
00f0: 2f 65 6e 2e 77 69 6b 69 70 65 64 69 61 2e 6f 72  /en.wikipedia.or
0100: 67 2f 77 69 6b 69 2f 47 65 6f 4a 53 4f 4e 22 3e  g/wiki/GeoJSON">
0110: 47 65 6f 4a 53 4f 4e 3c 2f 61 3e 20 69 73 20 61  GeoJSON</a> is a
0120: 6e 20 6f 70 65 6e 20 73 74 61 6e 64 61 72 64 20  n open standard 
0130: 64 61 74 61 20 66 6f 72 6d 61 74 20 62 61 73 65  data format base
0140: 64 20 6f 6e 20 3c 61 20 68 72 65 66 3d 22 68 74  d on <a href="ht
0150: 74 70 73 3a 2f 2f 65 6e 2e 77 69 6b 69 70 65 64  tps://en.wikiped
0160: 69 61 2e 6f 72 67 2f 77 69 6b 69 2f 4a 53 4f 4e  ia.org/wiki/JSON
0170: 22 3e 4a 53 4f 4e 3c 2f 61 3e 20 28 3c 62 3e 4a  ">JSON</a> (<b>J
0180: 61 76 61 53 63 72 69 70 74 20 4f 62 6a 65 63 74  avaScript Object
0190: 20 4e 6f 74 61 74 69 6f 6e 3c 2f 62 3e 29 20 74   Notation</b>) t
01a0: 68 61 74 20 69 73 20 61 20 76 65 72 79 20 70 6f  hat is a very po
01b0: 70 75 6c 61 72 20 64 61 74 61 20 66 6f 72 6d 61  pular data forma
01c0: 74 20 77 69 64 65 6c 79 20 75 73 65 64 20 62 79  t widely used by
01d0: 20 6d 61 6e 79 20 77 65 62 2d 61 70 70 73 20 61   many web-apps a
01e0: 73 20 61 20 72 65 70 6c 61 63 65 6d 65 6e 74 20  s a replacement 
01f0: 66 6f 72 20 58 4d 4c 2e 3c 62 72 3e 0d 0a 54 68  for XML.<br>..Th
0200: 65 20 69 6e 74 65 6e 64 65 64 20 75 73 65 20 6f  e intended use o
0210: 66 20 47 65 6f 4a 53 4f 4e 20 69 73 20 74 68 65  f GeoJSON is the
0220: 20 65 78 74 65 6e 73 69 6f 6e 20 6f 66 20 74 68   extension of th
0230: 65 20 62 61 73 69 63 20 63 61 70 61 62 69 6c 69  e basic capabili
0240: 74 69 65 73 20 6f 66 20 4a 53 4f 4e 20 73 6f 20  ties of JSON so 
0250: 74 6f 20 61 64 65 71 75 61 74 65 6c 79 20 73 75  to adequately su
0260: 70 70 6f 72 74 20 3c 62 3e 67 65 6f 67 72 61 70  pport <b>geograp
0270: 68 69 63 20 66 65 61 74 75 72 65 73 3c 2f 62 3e  hic features</b>
0280: 20 69 6e 63 6c 75 64 69 6e 67 20 62 6f 74 68 20   including both 
0290: 3c 62 3e 47 65 6f 6d 65 74 72 69 65 73 3c 2f 62  <b>Geometries</b
02a0: 3e 20 61 6e 64 0d 0a 3c 62 3e 6e 6f 6e 2d 73 70  > and..<b>non-sp
02b0: 61 74 69 61 6c 20 61 74 74 72 69 62 75 74 65 73  atial attributes
02c0: 3c 2f 62 3e 2e 3c 62 72 3e 3c 62 72 3e 0d 0a 47  </b>.<br><br>..G
02d0: 65 6f 4a 53 4f 4e 2c 20 77 68 69 63 68 20 68 61  eoJSON, which ha
02e0: 73 20 65 78 69 73 74 65 64 20 66 6f 72 20 6d 61  s existed for ma
02f0: 6e 79 20 79 65 61 72 73 2c 20 77 61 73 20 69 6e  ny years, was in
0300: 69 74 69 61 6c 6c 79 20 62 61 73 65 64 20 6f 6e  itially based on
0310: 20 61 20 6c 6f 6f 73 65 20 61 6e 64 20 69 6e 66   a loose and inf
0320: 6f 72 6d 61 6c 20 64 61 74 61 20 73 70 65 63 69  ormal data speci
0330: 66 69 63 61 74 69 6f 6e 2e 3c 62 72 3e 0d 0a 4f  fication.<br>..O
0340: 6e 6c 79 20 76 65 72 79 20 72 65 63 65 6e 74 6c  nly very recentl
0350: 79 20 28 32 30 31 36 29 20 69 74 20 68 61 73 20  y (2016) it has 
0360: 66 69 6e 61 6c 6c 79 20 62 65 63 6f 6d 65 20 61  finally become a
0370: 20 72 65 73 70 65 63 74 61 62 6c 65 20 73 74 61   respectable sta
0380: 6e 64 61 72 64 20 66 6f 72 6d 61 74 20 62 61 73  ndard format bas
0390: 65 64 20 6f 6e 20 61 20 66 6f 72 6d 61 6c 20 73  ed on a formal s
03a0: 70 65 63 69 66 69 63 61 74 69 6f 6e 2c 20 3c 61  pecification, <a
03b0: 20 68 72 65 66 3d 22 68 74 74 70 73 3a 2f 2f 74   href="https://t
03c0: 6f 6f 6c 73 2e 69 65 74 66 2e 6f 72 67 2f 68 74  ools.ietf.org/ht
03d0: 6d 6c 2f 72 66 63 37 39 34 36 22 3e 52 46 43 20  ml/rfc7946">RFC 
03e0: 37 39 34 36 3c 2f 61 3e 2c 20 72 65 6c 65 61 73  7946</a>, releas
03f0: 65 64 20 62 79 20 3c 62 3e 49 45 54 46 3c 2f 62  ed by <b>IETF</b
0400: 3e 20 28 3c 69 3e 49 6e 74 65 72 6e 65 74 20 45  > (<i>Internet E
0410: 6e 67 69 6e 65 65 72 69 6e 67 20 54 61 73 6b 20  ngineering Task 
0420: 46 6f 72 63 65 3c 2f 69 3e 29 2e 3c 62 72 3e 0d  Force</i>).<br>.
0430: 0a 3c 75 3e 4e 6f 74 65 3c 2f 75 3e 3a 20 52 46  .<u>Note</u>: RF
0440: 43 20 37 39 34 36 20 69 6e 74 72 6f 64 75 63 65  C 7946 introduce
0450: 64 20 73 65 76 65 72 61 6c 20 72 65 6c 65 76 61  d several releva
0460: 6e 74 20 72 65 71 75 69 72 65 6d 65 6e 74 73 20  nt requirements 
0470: 61 6e 64 20 72 65 73 74 72 69 63 74 69 6f 6e 73  and restrictions
0480: 2c 20 73 6f 20 74 68 61 74 20 3c 62 3e 70 72 65  , so that <b>pre
0490: 2d 52 46 43 3c 2f 62 3e 20 61 6e 64 20 3c 62 3e  -RFC</b> and <b>
04a0: 70 6f 73 74 2d 52 46 43 3c 2f 62 3e 20 47 65 6f  post-RFC</b> Geo
04b0: 4a 53 4f 4e 20 66 69 6c 65 73 20 61 72 65 20 6e  JSON files are n
04c0: 6f 74 20 6d 75 74 75 61 6c 6c 79 20 69 6e 74 65  ot mutually inte
04d0: 72 6f 70 65 72 61 62 6c 65 2e 3c 62 72 3e 3c 62  roperable.<br><b
04e0: 72 3e 0d 0a 41 20 76 65 72 79 20 72 65 6d 61 72  r>..A very remar
04f0: 6b 61 62 6c 65 20 66 65 61 74 75 72 65 20 6f 66  kable feature of
0500: 20 52 46 43 20 37 39 34 36 20 69 73 20 74 68 61   RFC 7946 is tha
0510: 74 20 69 74 27 73 20 65 78 70 6c 69 63 69 74 6c  t it's explicitl
0520: 79 20 64 65 63 6c 61 72 65 64 20 74 6f 20 62 65  y declared to be
0530: 20 61 20 3c 62 3e 66 69 78 65 64 20 61 6e 64 20   a <b>fixed and 
0540: 69 6d 6d 75 74 61 62 6c 65 3c 2f 62 3e 20 73 70  immutable</b> sp
0550: 65 63 69 66 69 63 61 74 69 6f 6e 2e 3c 62 72 3e  ecification.<br>
0560: 0d 0a 54 68 65 72 65 20 77 69 6c 6c 20 6e 65 76  ..There will nev
0570: 65 72 20 62 65 20 75 70 64 61 74 65 64 20 76 65  er be updated ve
0580: 72 73 69 6f 6e 73 20 6f 66 20 47 65 6f 4a 53 4f  rsions of GeoJSO
0590: 4e 3b 20 65 76 65 6e 20 74 68 65 20 73 6c 69 67  N; even the slig
05a0: 68 74 65 73 74 20 63 68 61 6e 67 65 20 77 69 6c  htest change wil
05b0: 6c 20 72 65 71 75 69 72 65 20 61 20 72 65 6e 61  l require a rena
05c0: 6d 65 20 66 72 6f 6d 20 47 65 6f 4a 53 4f 4e 20  me from GeoJSON 
05d0: 74 6f 20 73 6f 6d 65 74 68 69 6e 67 20 65 6c 73  to something els
05e0: 65 2e 3c 62 72 3e 0d 0a 53 75 63 68 20 61 20 72  e.<br>..Such a r
05f0: 65 73 74 72 69 63 74 69 6f 6e 20 69 73 20 6f 62  estriction is ob
0600: 76 69 6f 75 73 6c 79 20 69 6e 74 65 6e 64 65 64  viously intended
0610: 20 74 6f 20 65 6e 73 75 72 65 20 61 20 76 65 72   to ensure a ver
0620: 79 20 73 74 72 6f 6e 67 20 73 74 61 62 69 6c 69  y strong stabili
0630: 74 79 20 64 75 72 69 6e 67 20 69 74 73 20 6c 69  ty during its li
0640: 66 65 74 69 6d 65 20 28 61 6e 64 20 72 65 70 72  fetime (and repr
0650: 65 73 65 6e 74 73 20 61 20 73 74 72 6f 6e 67 20  esents a strong 
0660: 72 65 61 63 74 69 6f 6e 20 74 6f 20 74 68 65 20  reaction to the 
0670: 6d 61 6e 79 20 47 4d 4c 20 76 65 72 73 69 6f 6e  many GML version
0680: 73 20 74 68 61 74 20 61 62 72 75 70 74 6c 79 20  s that abruptly 
0690: 69 6e 74 72 6f 64 75 63 65 64 20 72 61 64 69 63  introduced radic
06a0: 61 6c 20 63 68 61 6e 67 65 73 20 75 70 73 65 74  al changes upset
06b0: 74 69 6e 67 20 74 68 65 20 77 65 6c 6c 20 65 73  ting the well es
06c0: 74 61 62 6c 69 73 68 65 64 20 62 65 68 61 76 69  tablished behavi
06d0: 6f 72 20 6f 66 20 65 78 69 73 74 69 6e 67 20 69  or of existing i
06e0: 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 29 2e  mplementations).
06f0: 3c 62 72 3e 3c 62 72 3e 0d 0a 54 68 65 20 6d 6f  <br><br>..The mo
0700: 73 74 20 6f 62 76 69 6f 75 73 20 63 6f 6d 70 65  st obvious compe
0710: 74 69 74 6f 72 73 20 6f 66 20 47 65 6f 4a 53 4f  titors of GeoJSO
0720: 4e 20 61 72 65 20 74 68 65 20 3c 61 20 68 72 65  N are the <a hre
0730: 66 3d 22 68 74 74 70 73 3a 2f 2f 65 6e 2e 77 69  f="https://en.wi
0740: 6b 69 70 65 64 69 61 2e 6f 72 67 2f 77 69 6b 69  kipedia.org/wiki
0750: 2f 53 68 61 70 65 66 69 6c 65 22 3e 45 53 52 49  /Shapefile">ESRI
0760: 20 53 68 61 70 65 66 69 6c 65 3c 2f 61 3e 20 61   Shapefile</a> a
0770: 6e 64 20 3c 61 20 68 72 65 66 3d 22 0d 0a 68 74  nd <a href="..ht
0780: 74 70 73 3a 2f 2f 65 6e 2e 77 69 6b 69 70 65 64  tps://en.wikiped
0790: 69 61 2e 6f 72 67 2f 77 69 6b 69 2f 47 65 6f 67  ia.org/wiki/Geog
07a0: 72 61 70 68 79 5f 4d 61 72 6b 75 70 5f 4c 61 6e  raphy_Markup_Lan
07b0: 67 75 61 67 65 22 3e 47 4d 4c 3c 2f 61 3e 3c 62  guage">GML</a><b
07c0: 72 3e 0d 0a 54 68 65 20 66 6f 6c 6c 6f 77 69 6e  r>..The followin
07d0: 67 20 63 68 61 72 74 20 77 69 6c 6c 20 71 75 69  g chart will qui
07e0: 63 6b 6c 79 20 6c 69 73 74 20 74 68 65 20 6d 61  ckly list the ma
07f0: 69 6e 20 64 69 66 66 65 72 65 6e 63 65 73 20 62  in differences b
0800: 65 74 77 65 65 6e 20 74 68 65 6d 2e 3c 62 72 3e  etween them.<br>
0810: 3c 62 72 3e 0d 0a 3c 74 61 62 6c 65 20 63 65 6c  <br>..<table cel
0820: 6c 73 70 61 63 69 6e 67 3d 22 34 22 20 63 65 6c  lspacing="4" cel
0830: 6c 70 61 64 64 69 6e 67 3d 22 38 22 20 62 67 63  lpadding="8" bgc
0840: 6f 6c 6f 72 3d 22 23 63 30 65 65 63 30 22 20 62  olor="#c0eec0" b
0850: 6f 72 64 65 72 3d 22 31 22 3e 0d 0a 3c 74 72 3e  order="1">..<tr>
0860: 3c 74 68 3e 54 6f 70 69 63 3c 2f 74 68 3e 3c 74  <th>Topic</th><t
0870: 68 3e 53 68 61 70 65 66 69 6c 65 3c 2f 74 68 3e  h>Shapefile</th>
0880: 3c 74 68 3e 47 4d 4c 3c 2f 74 68 3e 3c 74 68 3e  <th>GML</th><th>
0890: 47 65 6f 4a 53 4f 4e 3c 2f 74 68 3e 3c 74 68 3e  GeoJSON</th><th>
08a0: 52 65 6d 61 72 6b 73 3c 2f 74 68 3e 3c 2f 74 72  Remarks</th></tr
08b0: 3e 0d 0a 3c 74 72 3e 0d 0a 3c 74 68 20 76 61 6c  >..<tr>..<th val
08c0: 69 67 6e 3d 22 6d 69 64 64 6c 65 22 3e 46 69 6c  ign="middle">Fil
08d0: 65 20 6f 72 67 61 6e 69 7a 61 74 69 6f 6e 3c 2f  e organization</
08e0: 74 68 3e 0d 0a 3c 74 64 20 76 61 6c 69 67 6e 3d  th>..<td valign=
08f0: 22 6d 69 64 64 6c 65 22 3e 41 74 20 6c 65 61 73  "middle">At leas
0900: 74 20 74 68 72 65 65 20 69 6e 64 65 70 65 6e 64  t three independ
0910: 65 6e 74 20 66 69 6c 65 73 20 73 68 61 72 69 6e  ent files sharin
0920: 67 20 74 68 65 20 73 61 6d 65 20 6e 61 6d 65 20  g the same name 
0930: 61 6e 64 20 72 65 73 70 65 63 74 69 76 65 6c 79  and respectively
0940: 20 69 64 65 6e 74 69 66 69 65 64 20 62 79 20 73   identified by s
0950: 75 66 66 69 78 65 73 20 3c 62 3e 2e 73 68 70 3c  uffixes <b>.shp<
0960: 2f 62 3e 2c 20 3c 62 3e 2e 73 68 78 3c 2f 62 3e  /b>, <b>.shx</b>
0970: 20 61 6e 64 20 3c 62 3e 2e 64 62 66 3c 2f 62 3e   and <b>.dbf</b>
0980: 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 42 6f 74 68  ..<ul>..<li>Both
0990: 20 74 68 65 20 3c 62 3e 2e 73 68 70 3c 2f 62 3e   the <b>.shp</b>
09a0: 20 61 6e 64 20 3c 62 3e 2e 73 68 78 3c 2f 62 3e   and <b>.shx</b>
09b0: 20 6d 65 6d 62 65 72 73 20 61 72 65 20 3c 62 3e   members are <b>
09c0: 62 69 6e 61 72 79 20 66 69 6c 65 73 3c 2f 62 3e  binary files</b>
09d0: 20 69 6e 74 65 6e 64 65 64 20 74 6f 20 73 74 6f   intended to sto
09e0: 72 65 20 47 65 6f 6d 65 74 72 69 65 73 20 61 6e  re Geometries an
09f0: 64 20 73 68 6f 75 6c 64 20 62 65 20 65 6e 63 6f  d should be enco
0a00: 64 65 64 20 61 63 63 6f 72 64 69 6e 67 6c 79 20  ded accordingly 
0a10: 74 6f 20 74 68 65 20 3c 61 20 68 72 65 66 3d 22  to the <a href="
0a20: 68 74 74 70 73 3a 2f 2f 77 77 77 2e 65 73 72 69  https://www.esri
0a30: 2e 63 6f 6d 2f 6c 69 62 72 61 72 79 2f 77 68 69  .com/library/whi
0a40: 74 65 70 61 70 65 72 73 2f 70 64 66 73 2f 73 68  tepapers/pdfs/sh
0a50: 61 70 65 66 69 6c 65 2e 70 64 66 22 3e 45 53 52  apefile.pdf">ESR
0a60: 49 20 6f 70 65 6e 20 73 70 65 63 69 66 69 63 61  I open specifica
0a70: 74 69 6f 6e 3c 2f 61 3e 3c 2f 6c 69 3e 0d 0a 3c  tion</a></li>..<
0a80: 6c 69 3e 54 68 65 20 3c 62 3e 2e 64 62 66 3c 2f  li>The <b>.dbf</
0a90: 62 3e 20 6d 65 6d 62 65 72 20 69 73 20 69 6e 74  b> member is int
0aa0: 65 6e 64 65 64 20 74 6f 20 73 74 6f 72 65 20 6e  ended to store n
0ab0: 6f 6e 2d 73 70 61 74 69 61 6c 20 61 74 74 72 69  on-spatial attri
0ac0: 62 75 74 65 73 2e 3c 62 72 3e 0d 0a 54 68 69 73  butes.<br>..This
0ad0: 20 3c 62 3e 62 69 6e 61 72 79 20 66 69 6c 65 3c   <b>binary file<
0ae0: 2f 62 3e 20 69 73 20 61 6c 73 6f 20 65 78 70 65  /b> is also expe
0af0: 63 74 65 64 20 74 6f 20 62 65 20 65 6e 63 6f 64  cted to be encod
0b00: 65 64 20 61 63 63 6f 72 64 69 6e 67 6c 79 20 74  ed accordingly t
0b10: 6f 20 3c 61 20 68 72 65 66 3d 22 68 74 74 70 73  o <a href="https
0b20: 3a 2f 2f 65 6e 2e 77 69 6b 69 70 65 64 69 61 2e  ://en.wikipedia.
0b30: 6f 72 67 2f 77 69 6b 69 2f 44 42 61 73 65 22 3e  org/wiki/DBase">
0b40: 41 73 68 74 6f 6e 2d 54 61 74 65 20 64 42 61 73  Ashton-Tate dBas
0b50: 65 20 73 70 65 63 69 66 69 63 61 74 69 6f 6e 3c  e specification<
0b60: 2f 61 3e 3b 20 75 6e 68 61 70 70 69 6c 79 20 74  /a>; unhappily t
0b70: 68 69 73 20 76 65 72 79 20 6f 6c 64 20 73 70 65  his very old spe
0b80: 63 69 66 69 63 61 74 69 6f 6e 20 28 62 6f 72 6e  cification (born
0b90: 20 69 6e 20 74 68 65 20 27 38 30 73 29 20 68 61   in the '80s) ha
0ba0: 64 20 61 20 73 61 76 61 67 65 20 70 72 6f 6c 69  d a savage proli
0bb0: 66 65 72 61 74 69 6f 6e 20 6f 66 20 64 69 66 66  feration of diff
0bc0: 65 72 65 6e 74 20 64 69 61 6c 65 63 74 73 20 28  erent dialects (
0bd0: 3c 69 3e 43 6c 69 70 70 65 72 3c 2f 69 3e 2c 20  <i>Clipper</i>, 
0be0: 3c 69 3e 46 6f 78 50 72 6f 3c 2f 69 3e 29 20 62  <i>FoxPro</i>) b
0bf0: 65 63 6f 6d 69 6e 67 20 71 75 69 74 65 20 6d 65  ecoming quite me
0c00: 73 73 79 20 61 6e 64 20 63 68 61 6f 74 69 63 2e  ssy and chaotic.
0c10: 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c 2f  </li>..</ul>..</
0c20: 74 64 3e 0d 0a 3c 74 64 3e 47 4d 4c 20 69 73 20  td>..<td>GML is 
0c30: 62 61 73 65 64 20 6f 6e 20 58 4d 4c 2c 20 61 6e  based on XML, an
0c40: 64 20 69 73 20 6a 75 73 74 20 61 20 73 69 6e 67  d is just a sing
0c50: 6c 65 2c 20 6d 6f 6e 6f 6c 69 74 68 69 63 20 3c  le, monolithic <
0c60: 62 3e 74 65 78 74 20 66 69 6c 65 2e 3c 2f 62 3e  b>text file.</b>
0c70: 3c 62 72 3e 0d 0a 41 73 20 61 6e 79 20 6f 74 68  <br>..As any oth
0c80: 65 72 20 58 4d 4c 20 66 69 6c 65 2c 20 47 4d 4c  er XML file, GML
0c90: 20 74 6f 6f 20 63 61 6e 20 62 65 20 73 74 72 6f   too can be stro
0ca0: 6e 67 6c 79 20 63 6f 6e 73 74 72 61 69 6e 65 64  ngly constrained
0cb0: 20 74 6f 20 63 6f 6e 66 6f 72 6d 20 74 6f 20 61   to conform to a
0cc0: 20 66 6f 72 6d 61 6c 6c 79 20 64 65 66 69 6e 65   formally define
0cd0: 64 20 3c 61 20 68 72 65 66 3d 22 68 74 74 70 73  d <a href="https
0ce0: 3a 2f 2f 69 74 2e 77 69 6b 69 70 65 64 69 61 2e  ://it.wikipedia.
0cf0: 6f 72 67 2f 77 69 6b 69 2f 58 4d 4c 5f 53 63 68  org/wiki/XML_Sch
0d00: 65 6d 61 22 3e 58 4d 4c 20 53 63 68 65 6d 61 3c  ema">XML Schema<
0d10: 2f 61 3e 0d 0a 3c 2f 74 64 3e 0d 0a 3c 74 64 20  /a>..</td>..<td 
0d20: 76 61 6c 69 67 6e 3d 22 6d 69 64 64 6c 65 22 3e  valign="middle">
0d30: 0d 0a 53 69 6e 67 6c 65 20 6d 6f 6e 6f 6c 69 74  ..Single monolit
0d40: 68 69 63 20 3c 62 3e 74 65 78 74 20 66 69 6c 65  hic <b>text file
0d50: 3c 2f 62 3e 2e 3c 62 72 3e 0d 0a 53 69 6d 69 6c  </b>.<br>..Simil
0d60: 61 72 20 74 6f 20 58 4d 4c 2c 20 62 75 74 20 69  ar to XML, but i
0d70: 6e 74 65 6e 64 65 64 20 74 6f 20 62 65 20 66 61  ntended to be fa
0d80: 72 20 73 69 6d 70 6c 65 72 20 61 6e 64 20 6c 65  r simpler and le
0d90: 73 73 20 76 65 72 62 6f 73 65 2e 0d 0a 3c 2f 74  ss verbose...</t
0da0: 64 3e 0d 0a 3c 74 64 3e 0d 0a 54 68 65 20 74 68  d>..<td>..The th
0db0: 72 65 65 2d 66 69 6c 65 73 20 6c 61 79 6f 75 74  ree-files layout
0dc0: 20 6f 66 20 53 68 61 70 65 66 69 6c 65 20 69 73   of Shapefile is
0dd0: 20 63 6c 65 61 72 6c 79 20 6f 62 73 6f 6c 65 74   clearly obsolet
0de0: 65 2c 20 61 6e 64 20 69 74 20 66 72 65 71 75 65  e, and it freque
0df0: 6e 74 6c 79 20 70 6f 73 65 73 20 6d 61 6e 79 20  ntly poses many 
0e00: 68 65 61 64 61 63 68 65 73 20 63 61 75 73 69 6e  headaches causin
0e10: 67 20 75 6e 65 78 70 65 63 74 65 64 20 74 72 6f  g unexpected tro
0e20: 75 62 6c 65 73 2e 3c 62 72 3e 3c 62 72 3e 0d 0a  ubles.<br><br>..
0e30: 54 68 65 20 73 69 6e 67 6c 65 2d 66 69 6c 65 20  The single-file 
0e40: 6c 61 79 6f 75 74 20 61 64 6f 70 74 65 64 20 62  layout adopted b
0e50: 79 20 62 6f 74 68 20 47 4d 4c 20 61 6e 64 20 47  y both GML and G
0e60: 65 6f 4a 53 4f 4e 20 69 73 20 63 6c 65 61 72 6c  eoJSON is clearl
0e70: 79 20 62 65 74 74 65 72 20 61 6e 64 20 73 61 66  y better and saf
0e80: 65 72 2c 20 61 6e 64 20 62 65 69 6e 67 20 3c 62  er, and being <b
0e90: 3e 74 65 78 74 20 66 69 6c 65 73 3c 2f 62 3e 20  >text files</b> 
0ea0: 74 68 65 79 20 63 61 6e 20 62 65 20 65 61 73 69  they can be easi
0eb0: 6c 79 20 69 6e 73 70 65 63 74 65 64 20 61 6e 64  ly inspected and
0ec0: 20 65 76 65 6e 74 75 61 6c 6c 79 20 64 65 62 75   eventually debu
0ed0: 67 67 65 64 20 6a 75 73 74 20 75 73 69 6e 67 20  gged just using 
0ee0: 61 6e 79 20 67 65 6e 65 72 69 63 20 3c 62 3e 74  any generic <b>t
0ef0: 65 78 74 20 65 64 69 74 6f 72 3c 2f 62 3e 20 77  ext editor</b> w
0f00: 69 74 68 6f 75 74 20 72 65 71 75 69 72 69 6e 67  ithout requiring
0f10: 20 61 6e 79 20 73 70 65 63 69 66 69 63 20 74 6f   any specific to
0f20: 6f 6c 2e 0d 0a 3c 2f 74 64 3e 0d 0a 3c 2f 74 72  ol...</td>..</tr
0f30: 3e 0d 0a 3c 74 72 3e 0d 0a 3c 74 68 3e 47 65 6f  >..<tr>..<th>Geo
0f40: 6d 65 74 72 79 20 63 6c 61 73 73 65 73 3c 2f 74  metry classes</t
0f50: 68 3e 0d 0a 3c 74 64 3e 0d 0a 3c 75 6c 3e 0d 0a  h>..<td>..<ul>..
0f60: 3c 6c 69 3e 4e 75 6c 6c 20 53 68 61 70 65 3c 2f  <li>Null Shape</
0f70: 6c 69 3e 0d 0a 3c 6c 69 3e 50 6f 69 6e 74 3c 2f  li>..<li>Point</
0f80: 6c 69 3e 0d 0a 3c 6c 69 3e 4d 75 6c 74 69 50 6f  li>..<li>MultiPo
0f90: 69 6e 74 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 50 6f  int</li>..<li>Po
0fa0: 6c 79 4c 69 6e 65 20 28 77 69 74 68 6f 75 74 20  lyLine (without 
0fb0: 64 69 73 74 69 6e 67 75 69 73 68 69 6e 67 20 62  distinguishing b
0fc0: 65 74 77 65 65 6e 20 73 69 6e 67 6c 65 2d 20 61  etween single- a
0fd0: 6e 64 20 6d 75 6c 74 69 2d 70 61 72 74 29 3c 2f  nd multi-part)</
0fe0: 6c 69 3e 0d 0a 3c 6c 69 3e 50 6f 6c 79 67 6f 6e  li>..<li>Polygon
0ff0: 20 28 77 69 74 68 6f 75 74 20 64 69 73 74 69 6e   (without distin
1000: 67 75 69 73 68 69 6e 67 20 62 65 74 77 65 65 6e  guishing between
1010: 20 73 69 6e 67 6c 65 2d 20 61 6e 64 20 6d 75 6c   single- and mul
1020: 74 69 2d 70 61 72 74 29 3c 2f 6c 69 3e 0d 0a 3c  ti-part)</li>..<
1030: 2f 75 6c 3e 0d 0a 3c 62 72 3e 0d 0a 3c 75 3e 4e  /ul>..<br>..<u>N
1040: 6f 74 65 73 3c 2f 75 3e 3a 20 0d 0a 3c 75 6c 3e  otes</u>: ..<ul>
1050: 0d 0a 3c 6c 69 3e 41 6c 6c 20 47 65 6f 6d 65 74  ..<li>All Geomet
1060: 72 69 65 73 20 69 6e 20 74 68 65 20 73 61 6d 65  ries in the same
1070: 20 53 68 61 70 65 66 69 6c 65 20 6d 75 73 74 20   Shapefile must 
1080: 73 68 61 72 65 20 74 68 65 20 73 61 6d 65 20 63  share the same c
1090: 6c 61 73 73 20 28 6f 72 20 62 65 20 3c 62 3e 4e  lass (or be <b>N
10a0: 75 6c 6c 3c 2f 62 3e 29 2e 3c 2f 6c 69 3e 0d 0a  ull</b>).</li>..
10b0: 3c 6c 69 3e 41 6c 6c 20 47 65 6f 6d 65 74 72 69  <li>All Geometri
10c0: 65 73 20 69 6e 20 74 68 65 20 73 61 6d 65 20 53  es in the same S
10d0: 68 61 70 65 66 69 6c 65 20 6d 75 73 74 20 73 68  hapefile must sh
10e0: 61 72 65 20 74 68 65 20 73 61 6d 65 20 53 52 49  are the same SRI
10f0: 44 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 54 68 65  D.</li>..<li>The
1100: 20 72 75 6c 65 73 20 66 6f 72 20 69 64 65 6e 74   rules for ident
1110: 69 66 79 69 6e 67 20 3c 62 3e 45 78 74 65 72 69  ifying <b>Exteri
1120: 6f 72 3c 2f 62 3e 20 61 6e 64 20 3c 62 3e 49 6e  or</b> and <b>In
1130: 74 65 72 69 6f 72 3c 2f 62 3e 20 50 6f 6c 79 67  terior</b> Polyg
1140: 6f 6e 20 72 69 6e 67 73 0d 0a 61 72 65 20 61 77  on rings..are aw
1150: 6b 77 61 72 64 20 61 6e 64 20 63 61 6e 20 66 72  kward and can fr
1160: 65 71 75 65 6e 74 6c 79 20 63 61 75 73 65 20 69  equently cause i
1170: 6e 74 65 72 6f 70 65 72 61 62 69 6c 69 74 79 20  nteroperability 
1180: 69 73 73 75 65 73 2e 3c 2f 6c 69 3e 0d 0a 3c 2f  issues.</li>..</
1190: 75 6c 3e 0d 0a 3c 2f 74 64 3e 0d 0a 3c 74 64 3e  ul>..</td>..<td>
11a0: 0d 0a 47 4d 4c 20 61 6c 6c 6f 77 73 20 6d 61 6e  ..GML allows man
11b0: 79 20 64 69 66 66 65 72 65 6e 74 20 77 61 79 73  y different ways
11c0: 20 74 6f 20 64 65 66 69 6e 65 20 74 68 65 20 73   to define the s
11d0: 61 6d 65 20 74 79 70 65 20 6f 66 20 47 65 6f 6d  ame type of Geom
11e0: 65 74 72 79 2c 20 61 6e 64 20 74 68 65 20 73 70  etry, and the sp
11f0: 65 63 69 66 69 63 61 74 69 6f 6e 73 20 68 61 76  ecifications hav
1200: 65 20 72 61 64 69 63 61 6c 6c 79 20 63 68 61 6e  e radically chan
1210: 67 65 64 20 66 72 6f 6d 20 76 65 72 73 69 6f 6e  ged from version
1220: 20 74 6f 20 76 65 72 73 69 6f 6e 2e 3c 62 72 3e   to version.<br>
1230: 3c 62 72 3e 0d 0a 47 4d 4c 20 68 61 73 20 61 20  <br>..GML has a 
1240: 72 65 61 6c 6c 79 20 69 6d 70 72 65 73 73 69 76  really impressiv
1250: 65 20 66 6c 65 78 69 62 69 6c 69 74 79 20 28 65  e flexibility (e
1260: 2e 67 2e 20 65 61 63 68 20 73 69 6e 67 6c 65 20  .g. each single 
1270: 47 65 6f 6d 65 74 72 79 20 63 61 6e 20 66 72 65  Geometry can fre
1280: 65 6c 79 20 64 65 63 6c 61 72 65 20 69 74 73 20  ely declare its 
1290: 6f 77 6e 20 53 52 49 44 29 2c 20 62 75 74 20 61  own SRID), but a
12a0: 74 20 74 68 65 20 63 6f 73 74 20 6f 66 20 69 6d  t the cost of im
12b0: 70 6f 73 69 6e 67 20 61 6e 20 6f 76 65 72 77 68  posing an overwh
12c0: 65 6c 6d 69 6e 67 20 63 6f 6d 70 6c 65 78 69 74  elming complexit
12d0: 79 2e 0d 0a 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 0d  y...</td>..<td>.
12e0: 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 4e 75 6c 6c 3c  .<ul>..<li>Null<
12f0: 2f 6c 69 3e 0d 0a 3c 6c 69 3e 50 6f 69 6e 74 3c  /li>..<li>Point<
1300: 2f 6c 69 3e 0d 0a 3c 6c 69 3e 4c 69 6e 65 73 74  /li>..<li>Linest
1310: 72 69 6e 67 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 50  ring</li>..<li>P
1320: 6f 6c 79 67 6f 6e 3c 2f 6c 69 3e 0d 0a 3c 6c 69  olygon</li>..<li
1330: 3e 4d 75 6c 74 69 50 6f 69 6e 74 3c 2f 6c 69 3e  >MultiPoint</li>
1340: 0d 0a 3c 6c 69 3e 4d 75 6c 74 69 4c 69 6e 65 73  ..<li>MultiLines
1350: 74 72 69 6e 67 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e  tring</li>..<li>
1360: 4d 75 6c 74 69 50 6f 6c 79 67 6f 6e 3c 2f 6c 69  MultiPolygon</li
1370: 3e 0d 0a 3c 6c 69 3e 47 65 6f 6d 65 74 72 79 43  >..<li>GeometryC
1380: 6f 6c 6c 65 63 74 69 6f 6e 3c 2f 6c 69 3e 0d 0a  ollection</li>..
1390: 3c 2f 75 6c 3e 0d 0a 3c 62 72 3e 0d 0a 3c 75 3e  </ul>..<br>..<u>
13a0: 4e 6f 74 65 73 3c 2f 75 3e 3a 20 0d 0a 3c 75 6c  Notes</u>: ..<ul
13b0: 3e 0d 0a 3c 6c 69 3e 54 68 69 73 20 65 78 61 63  >..<li>This exac
13c0: 74 6c 79 20 63 6f 72 72 65 73 70 6f 6e 64 73 20  tly corresponds 
13d0: 74 6f 20 74 68 65 20 73 74 61 6e 64 61 72 64 20  to the standard 
13e0: 3c 62 3e 37 20 63 6c 61 73 73 65 73 3c 2f 62 3e  <b>7 classes</b>
13f0: 20 6d 6f 64 65 6c 20 61 64 6f 70 74 65 64 20 62   model adopted b
1400: 79 20 53 70 61 74 69 61 6c 20 53 51 4c 2e 3c 2f  y Spatial SQL.</
1410: 6c 69 3e 0d 0a 3c 6c 69 3e 54 68 65 20 73 61 6d  li>..<li>The sam
1420: 65 20 47 65 6f 4a 53 4f 4e 20 66 69 6c 65 20 63  e GeoJSON file c
1430: 61 6e 20 66 72 65 65 6c 79 20 63 6f 6e 74 61 69  an freely contai
1440: 6e 20 61 6e 79 20 6b 69 6e 64 20 6f 66 20 47 65  n any kind of Ge
1450: 6f 6d 65 74 72 79 20 63 6c 61 73 73 65 73 20 77  ometry classes w
1460: 69 74 68 6f 75 74 20 72 65 73 74 72 69 63 74 69  ithout restricti
1470: 6f 6e 73 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 41  ons.</li>..<li>A
1480: 6c 6c 20 47 65 6f 6d 65 74 72 69 65 73 20 69 6e  ll Geometries in
1490: 20 74 68 65 20 73 61 6d 65 20 47 65 6f 4a 53 4f   the same GeoJSO
14a0: 4e 20 66 69 6c 65 20 6d 75 73 74 20 73 68 61 72  N file must shar
14b0: 65 20 74 68 65 20 73 61 6d 65 20 53 52 49 44 2e  e the same SRID.
14c0: 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c 2f  </li>..</ul>..</
14d0: 74 64 3e 0d 0a 3c 74 64 3e 0d 0a 3c 75 6c 3e 0d  td>..<td>..<ul>.
14e0: 0a 3c 6c 69 3e 53 68 61 70 65 66 69 6c 65 20 69  .<li>Shapefile i
14f0: 73 20 6f 62 76 69 6f 75 73 6c 79 20 6f 62 73 6f  s obviously obso
1500: 6c 65 74 65 2c 20 61 6e 64 20 73 6f 6d 65 77 61  lete, and somewa
1510: 79 20 6d 65 73 73 79 20 61 6e 64 20 6c 69 6d 69  y messy and limi
1520: 74 65 64 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 47  ted.</li>..<li>G
1530: 4d 4c 20 69 73 20 65 6c 65 67 61 6e 74 20 61 6e  ML is elegant an
1540: 64 20 76 65 72 79 20 73 6f 70 68 69 73 74 69 63  d very sophistic
1550: 61 74 65 64 3a 20 73 6f 6d 65 74 69 6d 65 73 20  ated: sometimes 
1560: 74 6f 6f 20 73 6f 70 68 69 73 74 69 63 61 74 65  too sophisticate
1570: 64 20 61 6e 64 20 63 6f 6d 70 6c 65 78 20 74 6f  d and complex to
1580: 20 62 65 20 72 65 61 6c 6c 79 20 75 73 61 62 6c   be really usabl
1590: 65 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 47 65 6f  e.</li>..<li>Geo
15a0: 4a 53 4f 4e 20 6d 61 74 63 68 65 73 20 74 68 65  JSON matches the
15b0: 20 53 70 61 74 69 61 6c 20 53 51 4c 20 72 65 71   Spatial SQL req
15c0: 75 69 72 65 6d 65 6e 74 73 2c 20 61 6e 64 20 74  uirements, and t
15d0: 68 65 72 65 66 6f 72 65 20 61 76 6f 69 64 73 20  herefore avoids 
15e0: 61 6e 79 20 75 6e 6e 65 63 65 73 73 61 72 79 20  any unnecessary 
15f0: 63 6f 6d 70 6c 65 78 69 74 79 2e 3c 2f 6c 69 3e  complexity.</li>
1600: 0d 0a 3c 2f 75 6c 3e 0d 0a 3c 2f 74 64 3e 0d 0a  ..</ul>..</td>..
1610: 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 0d 0a 3c 74 68  </tr>..<tr>..<th
1620: 3e 44 69 6d 65 6e 73 69 6f 6e 73 3c 2f 74 68 3e  >Dimensions</th>
1630: 0d 0a 3c 74 64 3e 0d 0a 3c 75 6c 3e 0d 0a 3c 6c  ..<td>..<ul>..<l
1640: 69 3e 58 59 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 58  i>XY</li>..<li>X
1650: 59 4d 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 58 59 5a  YM</li>..<li>XYZ
1660: 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 58 59 5a 4d 3c  </li>..<li>XYZM<
1670: 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c 2f 74  /li>..</ul>..</t
1680: 64 3e 0d 0a 3c 74 64 3e 0d 0a 3c 75 6c 3e 0d 0a  d>..<td>..<ul>..
1690: 3c 6c 69 3e 58 59 3c 2f 6c 69 3e 0d 0a 3c 6c 69  <li>XY</li>..<li
16a0: 3e 58 59 4d 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 58  >XYM</li>..<li>X
16b0: 59 5a 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 58 59 5a  YZ</li>..<li>XYZ
16c0: 4d 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c  M</li>..</ul>..<
16d0: 2f 74 64 3e 0d 0a 3c 74 64 3e 0d 0a 3c 75 6c 3e  /td>..<td>..<ul>
16e0: 0d 0a 3c 6c 69 3e 58 59 3c 2f 6c 69 3e 0d 0a 3c  ..<li>XY</li>..<
16f0: 6c 69 3e 58 59 5a 3c 2f 6c 69 3e 0d 0a 3c 2f 75  li>XYZ</li>..</u
1700: 6c 3e 0d 0a 3c 62 72 3e 0d 0a 3c 75 3e 4e 6f 74  l>..<br>..<u>Not
1710: 65 3c 2f 75 3e 3a 20 52 46 43 20 37 39 34 36 20  e</u>: RFC 7946 
1720: 6a 75 73 74 20 73 75 70 70 6f 72 74 73 20 32 20  just supports 2 
1730: 6f 72 20 33 20 63 6f 6f 72 64 69 6e 61 74 65 73  or 3 coordinates
1740: 2c 20 61 6e 64 20 74 68 65 20 74 68 69 72 64 20  , and the third 
1750: 76 61 6c 75 65 20 28 77 68 65 6e 20 64 65 63 6c  value (when decl
1760: 61 72 65 64 29 20 69 73 20 61 6c 77 61 79 73 20  ared) is always 
1770: 65 78 70 65 63 74 65 64 20 74 6f 20 63 6f 72 72  expected to corr
1780: 65 73 70 6f 6e 64 20 74 6f 20 61 6e 20 45 6c 65  espond to an Ele
1790: 76 61 74 69 6f 6e 20 28 5a 20 61 78 69 73 29 2e  vation (Z axis).
17a0: 3c 62 72 3e 3c 62 72 3e 0d 0a 53 75 70 70 6f 72  <br><br>..Suppor
17b0: 74 69 6e 67 20 58 59 4d 20 6f 72 20 58 59 5a 4d  ting XYM or XYZM
17c0: 20 69 73 20 6e 6f 74 20 74 65 63 68 6e 69 63 61   is not technica
17d0: 6c 6c 79 20 75 6e 66 65 61 73 69 62 6c 65 2e 0d  lly unfeasible..
17e0: 0a 42 6f 74 68 20 77 72 69 74 65 72 73 20 61 6e  .Both writers an
17f0: 64 20 72 65 61 64 65 72 73 20 63 6f 75 6c 64 20  d readers could 
1800: 73 75 70 70 6f 72 74 20 73 75 63 68 20 6f 70 74  support such opt
1810: 69 6f 6e 73 2c 20 62 75 74 20 61 6c 6c 20 74 68  ions, but all th
1820: 69 73 20 69 73 20 73 75 72 65 6c 79 20 6f 75 74  is is surely out
1830: 73 69 64 65 20 74 68 65 20 73 74 61 6e 64 61 72  side the standar
1840: 64 20 61 6e 64 20 77 69 6c 6c 20 73 75 72 65 6c  d and will surel
1850: 79 20 69 6d 70 61 69 72 20 74 68 65 20 75 6e 69  y impair the uni
1860: 76 65 72 73 61 6c 20 70 6f 72 74 61 62 69 6c 69  versal portabili
1870: 74 79 20 6f 66 20 61 6e 79 20 6e 6f 6e 20 63 61  ty of any non ca
1880: 6e 6f 6e 69 63 61 6c 20 66 69 6c 65 2e 0d 0a 3c  nonical file...<
1890: 2f 74 64 3e 0d 0a 3c 74 64 3e 0d 0a 47 65 6f 4a  /td>..<td>..GeoJ
18a0: 53 4f 4e 20 6c 61 63 6b 73 20 74 68 65 20 63 61  SON lacks the ca
18b0: 70 61 62 69 6c 69 74 79 20 74 6f 20 73 75 70 70  pability to supp
18c0: 6f 72 74 20 58 59 4d 20 61 6e 64 20 58 59 5a 4d  ort XYM and XYZM
18d0: 2c 20 6f 74 68 65 72 20 74 68 61 6e 20 62 79 20  , other than by 
18e0: 61 64 6f 70 74 69 6e 67 20 28 61 6e 64 20 74 6f  adopting (and to
18f0: 20 6f 74 68 65 72 73 20 75 6e 6b 6e 6f 77 6e 29   others unknown)
1900: 20 76 69 63 69 6f 75 73 20 74 72 69 63 6b 73 2e   vicious tricks.
1910: 3c 62 72 3e 0d 0a 4d 61 79 20 77 65 6c 6c 20 62  <br>..May well b
1920: 65 20 69 74 27 73 20 6e 6f 74 20 61 20 66 6f 72  e it's not a for
1930: 62 69 64 64 69 6e 67 20 6c 69 6d 69 74 61 74 69  bidding limitati
1940: 6f 6e 20 69 6e 20 6d 61 6e 79 20 63 6f 6d 6d 6f  on in many commo
1950: 6e 20 63 61 73 65 73 2c 20 62 75 74 20 69 74 27  n cases, but it'
1960: 73 20 69 6e 64 69 73 70 75 74 61 62 6c 79 20 61  s indisputably a
1970: 20 6c 69 6d 69 74 61 74 69 6f 6e 2e 0d 0a 3c 2f   limitation...</
1980: 74 64 3e 0d 0a 3c 2f 74 72 3e 0d 0a 3c 74 72 3e  td>..</tr>..<tr>
1990: 0d 0a 3c 74 68 3e 53 52 49 44 3c 2f 74 68 3e 0d  ..<th>SRID</th>.
19a0: 0a 3c 74 64 3e 0d 0a 4e 6f 74 20 69 6e 74 65 72  .<td>..Not inter
19b0: 6e 61 6c 6c 79 20 64 65 63 6c 61 72 65 64 20 62  nally declared b
19c0: 79 20 74 68 65 20 53 68 61 70 65 66 69 6c 65 20  y the Shapefile 
19d0: 69 74 73 65 6c 66 2e 3c 62 72 3e 0d 0a 44 65 70  itself.<br>..Dep
19e0: 6c 6f 79 69 6e 67 20 61 20 66 75 72 74 68 65 72  loying a further
19f0: 20 3c 62 3e 2e 70 72 6a 3c 2f 62 3e 20 66 69 6c   <b>.prj</b> fil
1a00: 65 20 64 65 73 63 72 69 62 69 6e 67 20 74 68 65  e describing the
1a10: 20 69 6e 74 65 6e 64 65 64 20 53 52 49 44 20 69   intended SRID i
1a20: 73 20 74 68 65 20 75 73 75 61 6c 20 73 6f 6c 75  s the usual solu
1a30: 74 69 6f 6e 20 61 64 6f 70 74 65 64 20 62 79 20  tion adopted by 
1a40: 45 53 52 49 20 69 74 73 65 6c 66 2c 20 62 75 74  ESRI itself, but
1a50: 20 63 6f 72 72 65 63 74 6c 79 20 70 61 72 73 69   correctly parsi
1a60: 6e 67 20 74 68 65 73 65 20 65 78 74 72 61 20 66  ng these extra f
1a70: 69 6c 65 73 20 69 73 20 61 6e 20 75 73 75 61 6c  iles is an usual
1a80: 6c 79 20 66 6c 69 6d 73 79 20 70 72 6f 63 65 73  ly flimsy proces
1a90: 73 20 66 61 6c 6c 69 6e 67 20 6f 75 74 73 69 64  s falling outsid
1aa0: 65 20 72 65 61 6c 20 63 61 70 61 62 69 6c 69 74  e real capabilit
1ab0: 69 65 73 20 6f 66 20 6d 61 6e 79 20 74 68 69 72  ies of many thir
1ac0: 64 20 70 61 72 74 79 20 72 65 61 64 65 72 73 2e  d party readers.
1ad0: 0d 0a 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 0d 0a 45  ..</td>..<td>..E
1ae0: 61 63 68 20 73 69 6e 67 6c 65 20 47 65 6f 6d 65  ach single Geome
1af0: 74 72 79 20 69 73 20 61 6c 6c 6f 77 65 64 20 74  try is allowed t
1b00: 6f 20 66 72 65 65 6c 79 20 64 65 66 69 6e 65 20  o freely define 
1b10: 69 74 73 20 6f 77 6e 20 53 52 49 44 2c 20 61 73  its own SRID, as
1b20: 20 77 65 6c 6c 20 61 73 20 64 65 66 69 6e 69 6e   well as definin
1b30: 67 20 74 68 65 20 53 52 49 44 20 66 6f 72 20 74  g the SRID for t
1b40: 68 65 20 77 68 6f 6c 65 20 6c 61 79 65 72 2e 0d  he whole layer..
1b50: 0a 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 0d 0a 41 63  .</td>..<td>..Ac
1b60: 63 6f 72 64 69 6e 67 6c 79 20 74 6f 20 52 46 43  cordingly to RFC
1b70: 20 37 39 34 36 20 61 6c 6c 20 63 6f 6f 72 64 69   7946 all coordi
1b80: 6e 61 74 65 73 20 61 72 65 20 61 6c 77 61 79 73  nates are always
1b90: 20 65 78 70 65 63 74 65 64 20 74 6f 20 62 65 20   expected to be 
1ba0: 65 78 70 72 65 73 73 65 64 20 61 73 20 3c 62 3e  expressed as <b>
1bb0: 6c 6f 6e 67 69 74 75 64 65 73 3c 2f 62 3e 20 61  longitudes</b> a
1bc0: 6e 64 20 3c 62 3e 6c 61 74 69 74 75 64 65 73 3c  nd <b>latitudes<
1bd0: 2f 62 3e 20 28 28 69 2e 65 3a 20 78 2d 70 6f 73  /b> ((i.e: x-pos
1be0: 69 74 69 6f 6e 20 61 6e 64 20 79 2d 70 6f 73 69  ition and y-posi
1bf0: 74 69 6f 6e 29 2e 3c 62 72 3e 0d 0a 53 6f 20 61  tion).<br>..So a
1c00: 6e 79 20 63 61 6e 6f 6e 69 63 61 6c 20 47 65 6f  ny canonical Geo
1c10: 4a 53 4f 4e 20 66 69 6c 65 20 69 73 20 61 6c 77  JSON file is alw
1c20: 61 79 73 20 65 78 70 65 63 74 65 64 20 74 6f 20  ays expected to 
1c30: 72 65 66 65 72 65 6e 63 65 20 3c 62 3e 53 52 49  reference <b>SRI
1c40: 44 3d 34 33 32 36 20 57 47 53 20 38 34 3c 2f 62  D=4326 WGS 84</b
1c50: 3e 20 28 69 2e 65 2e 20 74 68 65 20 53 52 49 44  > (i.e. the SRID
1c60: 20 69 73 20 3c 62 3e 6e 6f 74 3c 2f 62 3e 20 73   is <b>not</b> s
1c70: 74 6f 72 65 64 20 77 69 74 68 69 6e 20 74 68 65  tored within the
1c80: 20 47 65 6f 4a 53 4f 4e 20 66 69 6c 65 29 2e 3c   GeoJSON file).<
1c90: 62 72 3e 3c 62 72 3e 0d 0a 55 73 69 6e 67 20 61  br><br>..Using a
1ca0: 6e 79 20 6f 74 68 65 72 20 53 52 49 44 20 69 73  ny other SRID is
1cb0: 20 74 65 63 68 6e 69 63 61 6c 6c 79 20 70 6f 73   technically pos
1cc0: 73 69 62 6c 65 2c 20 62 75 74 20 72 65 71 75 69  sible, but requi
1cd0: 72 65 73 20 61 20 63 6f 6e 76 65 6e 74 69 6f 6e  res a convention
1ce0: 61 6c 20 61 67 72 65 65 6d 65 6e 74 20 62 65 74  al agreement bet
1cf0: 77 65 65 6e 20 77 72 69 74 65 72 73 20 61 6e 64  ween writers and
1d00: 20 72 65 61 64 65 72 73 2c 20 62 75 74 20 61 6c   readers, but al
1d10: 6c 20 74 68 69 73 20 69 73 20 73 75 72 65 6c 79  l this is surely
1d20: 20 6f 75 74 73 69 64 65 20 74 68 65 20 73 74 61   outside the sta
1d30: 6e 64 61 72 64 20 61 6e 64 20 77 69 6c 6c 20 73  ndard and will s
1d40: 75 72 65 6c 79 20 69 6d 70 61 69 72 20 74 68 65  urely impair the
1d50: 20 75 6e 69 76 65 72 73 61 6c 20 70 6f 72 74 61   universal porta
1d60: 62 69 6c 69 74 79 20 6f 66 20 61 6e 79 20 6e 6f  bility of any no
1d70: 6e 20 63 61 6e 6f 6e 69 63 61 6c 20 66 69 6c 65  n canonical file
1d80: 2e 0d 0a 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 0d 0a  ...</td>..<td>..
1d90: 54 68 65 20 75 6e 69 71 75 65 20 65 66 66 65 63  The unique effec
1da0: 74 69 76 65 20 73 6f 6c 75 74 69 6f 6e 20 69 73  tive solution is
1db0: 20 74 68 65 20 6f 6e 65 20 61 64 6f 70 74 65 64   the one adopted
1dc0: 20 62 79 20 47 4d 4c 2e 3c 62 72 3e 0d 0a 42 6f   by GML.<br>..Bo
1dd0: 74 68 20 53 68 61 70 65 66 69 6c 65 20 61 6e 64  th Shapefile and
1de0: 20 47 65 6f 4a 53 4f 4e 20 61 72 65 20 63 6c 65   GeoJSON are cle
1df0: 61 72 6c 79 20 69 6e 66 65 72 69 6f 72 20 75 6e  arly inferior un
1e00: 64 65 72 20 74 68 69 73 20 70 65 63 75 6c 69 61  der this peculia
1e10: 72 20 61 73 70 65 63 74 2e 0d 0a 3c 2f 74 64 3e  r aspect...</td>
1e20: 0d 0a 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 0d 0a 3c  ..</tr>..<tr>..<
1e30: 74 68 3e 4e 6f 6e 2d 73 70 61 74 69 61 6c 20 61  th>Non-spatial a
1e40: 74 74 72 69 62 75 74 65 73 3c 2f 74 68 3e 0d 0a  ttributes</th>..
1e50: 3c 74 64 3e 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e  <td>..<ul>..<li>
1e60: 43 48 41 52 20 28 6c 69 6d 69 74 65 64 20 74 6f  CHAR (limited to
1e70: 20 6d 61 78 2e 20 32 35 34 20 62 79 74 65 73 29   max. 254 bytes)
1e80: 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 4e 55 4d 42 45  </li>..<li>NUMBE
1e90: 52 20 28 72 65 70 72 65 73 65 6e 74 65 64 20 62  R (represented b
1ea0: 79 20 61 6e 20 41 53 43 49 49 20 73 74 72 69 6e  y an ASCII strin
1eb0: 67 20 6f 66 20 6d 61 78 2e 20 33 32 20 62 79 74  g of max. 32 byt
1ec0: 65 73 29 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 44 41  es)</li>..<li>DA
1ed0: 54 45 20 28 59 59 59 59 4d 4d 44 44 29 3c 2f 6c  TE (YYYYMMDD)</l
1ee0: 69 3e 0d 0a 3c 6c 69 3e 4c 4f 47 49 43 41 4c 20  i>..<li>LOGICAL 
1ef0: 28 54 2f 46 29 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c  (T/F)</li>..</ul
1f00: 3e 0d 0a 3c 62 72 3e 0d 0a 3c 75 3e 4e 6f 74 65  >..<br>..<u>Note
1f10: 3c 2f 75 3e 3a 20 61 6c 6c 20 61 74 74 72 69 62  </u>: all attrib
1f20: 75 74 65 20 6e 61 6d 65 73 20 61 72 65 20 6c 69  ute names are li
1f30: 6d 69 74 65 64 20 74 6f 20 61 20 6c 65 6e 67 74  mited to a lengt
1f40: 68 20 6f 66 20 6d 61 78 2e 20 31 30 20 62 79 74  h of max. 10 byt
1f50: 65 73 2e 20 54 68 65 72 65 20 69 73 20 6e 6f 20  es. There is no 
1f60: 73 61 66 65 20 77 61 79 20 66 6f 72 20 64 65 63  safe way for dec
1f70: 6c 61 72 69 6e 67 20 3c 62 3e 4e 55 4c 4c 3c 2f  laring <b>NULL</
1f80: 62 3e 20 76 61 6c 75 65 73 2e 0d 0a 3c 2f 74 64  b> values...</td
1f90: 3e 0d 0a 3c 74 64 3e 0d 0a 41 6e 79 20 70 6f 73  >..<td>..Any pos
1fa0: 73 69 62 6c 65 20 64 61 74 61 74 79 70 65 20 79  sible datatype y
1fb0: 6f 75 20 63 61 6e 20 69 6d 61 67 69 6e 65 2e 3c  ou can imagine.<
1fc0: 62 72 3e 0d 0a 41 6e 64 20 64 65 66 69 6e 69 6e  br>..And definin
1fd0: 67 20 66 75 72 74 68 65 72 20 64 65 72 69 76 65  g further derive
1fe0: 64 20 64 61 74 61 74 79 70 65 73 20 69 73 20 61  d datatypes is a
1ff0: 6e 20 6f 70 74 69 6f 6e 20 73 75 70 70 6f 72 74  n option support
2000: 65 64 20 62 79 20 74 68 65 20 58 4d 4c 20 53 63  ed by the XML Sc
2010: 68 65 6d 61 2e 3c 62 72 3e 3c 62 72 3e 0d 0a 3c  hema.<br><br>..<
2020: 75 3e 4e 6f 74 65 3c 2f 75 3e 3a 20 61 74 74 72  u>Note</u>: attr
2030: 69 62 75 74 65 20 6e 61 6d 65 73 20 61 6e 64 20  ibute names and 
2040: 74 65 78 74 20 76 61 6c 75 65 73 20 63 61 6e 20  text values can 
2050: 68 61 76 65 20 61 6e 79 20 61 72 62 69 74 72 61  have any arbitra
2060: 72 79 20 6c 65 6e 67 74 68 2e 0d 0a 3c 2f 74 64  ry length...</td
2070: 3e 0d 0a 3c 74 64 3e 0d 0a 3c 75 6c 3e 0d 0a 3c  >..<td>..<ul>..<
2080: 6c 69 3e 74 65 78 74 20 28 75 6e 63 6f 6e 73 74  li>text (unconst
2090: 72 61 69 6e 65 64 20 6c 65 6e 67 74 68 29 3c 2f  rained length)</
20a0: 6c 69 3e 0d 0a 3c 6c 69 3e 6e 75 6d 62 65 72 3c  li>..<li>number<
20b0: 2f 6c 69 3e 0d 0a 3c 6c 69 3e 6e 75 6c 6c 3c 2f  /li>..<li>null</
20c0: 6c 69 3e 0d 0a 3c 6c 69 3e 74 72 75 65 3c 2f 6c  li>..<li>true</l
20d0: 69 3e 0d 0a 3c 6c 69 3e 66 61 6c 73 65 3c 2f 6c  i>..<li>false</l
20e0: 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c 62 72 3e 0d  i>..</ul>..<br>.
20f0: 0a 3c 75 3e 4e 6f 74 65 3c 2f 75 3e 3a 20 61 74  .<u>Note</u>: at
2100: 74 72 69 62 75 74 65 20 6e 61 6d 65 73 20 20 63  tribute names  c
2110: 61 6e 20 68 61 76 65 20 61 6e 79 20 61 72 62 69  an have any arbi
2120: 74 72 61 72 79 20 6c 65 6e 67 74 68 2e 0d 0a 3c  trary length...<
2130: 2f 74 64 3e 0d 0a 3c 74 64 3e 0d 0a 3c 75 6c 3e  /td>..<td>..<ul>
2140: 0d 0a 3c 6c 69 3e 53 68 61 70 65 66 69 6c 65 20  ..<li>Shapefile 
2150: 28 6f 72 20 6d 6f 72 65 20 70 72 65 63 69 73 65  (or more precise
2160: 6c 79 20 69 6e 20 74 68 69 73 20 63 61 73 65 20  ly in this case 
2170: 44 42 46 29 20 63 6c 65 61 72 6c 79 20 73 75 66  DBF) clearly suf
2180: 66 65 72 73 20 66 72 6f 6d 20 74 6f 6f 20 6d 61  fers from too ma
2190: 6e 79 20 75 6e 70 6c 65 61 73 61 6e 74 20 6c 69  ny unpleasant li
21a0: 6d 69 74 61 74 69 6f 6e 73 2e 3c 2f 6c 69 3e 0d  mitations.</li>.
21b0: 0a 3c 6c 69 3e 47 4d 4c 20 28 6d 6f 72 65 20 70  .<li>GML (more p
21c0: 72 65 63 69 73 65 6c 79 20 58 4d 4c 29 20 63 61  recisely XML) ca
21d0: 6e 20 65 66 66 65 63 74 69 76 65 6c 79 20 73 75  n effectively su
21e0: 70 70 6f 72 74 20 61 6e 20 69 6d 70 72 65 73 73  pport an impress
21f0: 69 76 65 20 66 6c 65 78 69 62 69 6c 69 74 79 20  ive flexibility 
2200: 62 75 74 20 63 61 6e 20 65 61 73 69 6c 79 20 62  but can easily b
2210: 65 63 6f 6d 65 20 74 6f 6f 20 63 6f 6d 70 6c 65  ecome too comple
2220: 78 20 61 6e 64 20 64 69 66 66 69 63 75 6c 74 20  x and difficult 
2230: 74 6f 20 70 61 72 73 65 2e 3c 2f 6c 69 3e 0d 0a  to parse.</li>..
2240: 3c 6c 69 3e 47 65 6f 4a 53 4f 4e 20 6f 66 66 65  <li>GeoJSON offe
2250: 72 73 20 61 20 77 65 6c 6c 20 62 61 6c 61 6e 63  rs a well balanc
2260: 65 64 20 6d 69 78 3b 20 69 74 27 73 20 73 74 69  ed mix; it's sti
2270: 6c 6c 20 72 65 61 73 6f 6e 61 62 6c 79 20 73 69  ll reasonably si
2280: 6d 70 6c 65 20 61 6e 64 20 69 74 27 73 20 70 6f  mple and it's po
2290: 77 65 72 66 75 6c 20 61 74 20 74 68 65 20 73 61  werful at the sa
22a0: 6d 65 20 74 69 6d 65 2e 3c 2f 6c 69 3e 0d 0a 3c  me time.</li>..<
22b0: 2f 75 6c 3e 0d 0a 3c 2f 74 64 3e 0d 0a 3c 2f 74  /ul>..</td>..</t
22c0: 72 3e 0d 0a 3c 74 72 3e 0d 0a 3c 74 64 20 61 6c  r>..<tr>..<td al
22d0: 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 0d 0a 3c  ign="center">..<
22e0: 62 3e 43 68 61 72 73 65 74 20 65 6e 63 6f 64 69  b>Charset encodi
22f0: 6e 67 3c 2f 62 3e 0d 0a 3c 74 61 62 6c 65 20 63  ng</b>..<table c
2300: 65 6c 6c 70 61 64 64 69 6e 67 3d 22 34 22 20 63  ellpadding="4" c
2310: 65 6c 6c 73 70 61 63 69 6e 67 3d 22 34 22 3e 0d  ellspacing="4">.
2320: 0a 3c 74 72 3e 3c 74 64 20 61 6c 69 67 6e 3d 22  .<tr><td align="
2330: 6c 65 66 74 22 3e 0d 0a 73 65 65 20 74 68 65 20  left">..see the 
2340: 3c 61 20 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f  <a href="http://
2350: 77 77 77 2e 67 61 69 61 2d 67 69 73 2e 69 74 2f  www.gaia-gis.it/
2360: 67 61 69 61 2d 73 69 6e 73 2f 73 70 61 74 69 61  gaia-sins/spatia
2370: 6c 69 74 65 2d 63 6f 6f 6b 62 6f 6f 6b 2d 35 2f  lite-cookbook-5/
2380: 63 6f 6f 6b 62 6f 6f 6b 5f 74 6f 70 69 63 73 2e  cookbook_topics.
2390: 30 31 2e 68 74 6d 6c 23 74 6f 70 69 63 5f 41 62  01.html#topic_Ab
23a0: 6f 75 74 5f 43 68 61 72 73 65 74 5f 45 6e 63 6f  out_Charset_Enco
23b0: 64 69 6e 67 22 3e 43 6f 6f 6b 42 6f 6f 6b 3c 2f  ding">CookBook</
23c0: 61 3e 20 66 6f 72 20 6d 6f 72 65 20 6f 6e 20 74  a> for more on t
23d0: 68 69 73 20 74 6f 70 69 63 2e 0d 0a 3c 2f 74 64  his topic...</td
23e0: 3e 3c 2f 74 72 3e 0d 0a 3c 2f 74 61 62 6c 65 3e  ></tr>..</table>
23f0: 0d 0a 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 0d 0a 4e  ..</td>..<td>..N
2400: 6f 74 20 69 6e 74 65 72 6e 61 6c 6c 79 20 64 65  ot internally de
2410: 66 69 6e 65 64 20 62 79 20 74 68 65 20 53 68 61  fined by the Sha
2420: 70 65 66 69 6c 65 20 69 74 73 65 6c 66 2e 3c 62  pefile itself.<b
2430: 72 3e 0d 0a 41 74 74 65 6d 70 74 69 6e 67 20 74  r>..Attempting t
2440: 6f 20 67 75 65 73 73 20 74 68 65 20 61 70 70 72  o guess the appr
2450: 6f 70 72 69 61 74 65 20 63 68 61 72 73 65 74 20  opriate charset 
2460: 65 6e 63 6f 64 69 6e 67 20 72 65 71 75 69 72 65  encoding require
2470: 64 20 62 79 20 73 6f 6d 65 20 53 68 61 70 65 66  d by some Shapef
2480: 69 6c 65 20 69 73 20 6d 6f 72 65 20 61 20 6d 61  ile is more a ma
2490: 67 69 63 20 61 72 74 20 74 68 61 6e 20 72 61 74  gic art than rat
24a0: 69 6f 6e 61 6c 20 73 63 69 65 6e 63 65 2e 0d 0a  ional science...
24b0: 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 0d 0a 41 6c 77  </td>..<td>..Alw
24c0: 61 79 73 20 69 6e 74 65 72 6e 61 6c 6c 79 20 64  ays internally d
24d0: 65 66 69 6e 65 64 20 62 79 20 74 68 65 20 47 4d  efined by the GM
24e0: 4c 2f 58 4d 4c 20 66 69 6c 65 20 69 74 73 65 6c  L/XML file itsel
24f0: 66 2e 0d 0a 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 0d  f...</td>..<td>.
2500: 0a 52 46 43 20 37 39 34 36 20 73 74 72 69 63 74  .RFC 7946 strict
2510: 6c 79 20 72 65 71 75 69 72 65 73 20 74 68 61 74  ly requires that
2520: 20 61 6c 6c 20 47 65 6f 4a 53 4f 4e 20 66 69 6c   all GeoJSON fil
2530: 65 73 20 6d 75 73 74 20 62 65 20 65 6e 63 6f 64  es must be encod
2540: 65 64 20 61 73 20 3c 62 3e 55 54 46 2d 38 3c 2f  ed as <b>UTF-8</
2550: 62 3e 3c 62 72 3e 3c 62 72 3e 0d 0a 49 6e 20 70  b><br><br>..In p
2560: 75 72 65 20 74 68 65 6f 72 79 20 62 6f 74 68 20  ure theory both 
2570: 3c 62 3e 55 54 46 2d 31 36 3c 2f 62 3e 20 61 6e  <b>UTF-16</b> an
2580: 64 20 3c 62 3e 55 54 46 2d 33 32 3c 2f 62 3e 20  d <b>UTF-32</b> 
2590: 63 6f 75 6c 64 20 62 65 20 75 73 65 64 20 66 6f  could be used fo
25a0: 72 20 65 6e 63 6f 64 69 6e 67 20 61 20 6c 65 67  r encoding a leg
25b0: 69 74 69 6d 61 74 65 20 47 65 6f 4a 53 4f 4e 20  itimate GeoJSON 
25c0: 66 69 6c 65 2c 20 62 75 74 20 73 75 63 68 20 6f  file, but such o
25d0: 70 74 69 6f 6e 73 20 73 65 65 6d 73 20 74 6f 20  ptions seems to 
25e0: 62 65 20 76 65 72 79 20 72 61 72 65 6c 79 20 28  be very rarely (
25f0: 69 66 20 65 76 65 72 29 20 61 64 6f 70 74 65 64  if ever) adopted
2600: 20 69 6e 20 72 65 61 6c 20 77 6f 72 6c 64 2e 0d   in real world..
2610: 0a 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 0d 0a 3c 75  .</td>..<td>..<u
2620: 6c 3e 0d 0a 3c 6c 69 3e 53 68 61 70 65 66 69 6c  l>..<li>Shapefil
2630: 65 73 20 6c 65 61 76 65 73 20 61 20 6c 6f 74 20  es leaves a lot 
2640: 74 6f 20 62 65 20 64 65 73 69 72 65 64 2c 20 61  to be desired, a
2650: 6e 64 20 6c 61 63 6b 20 6f 66 20 64 65 66 69 6e  nd lack of defin
2660: 65 64 20 63 68 61 72 73 65 74 20 65 6e 63 6f 64  ed charset encod
2670: 69 6e 67 20 63 61 75 73 65 73 20 6d 61 6e 79 20  ing causes many 
2680: 73 65 72 69 6f 75 73 20 70 6f 72 74 61 62 69 6c  serious portabil
2690: 69 74 79 20 69 73 73 75 65 73 2e 3c 2f 6c 69 3e  ity issues.</li>
26a0: 0d 0a 3c 6c 69 3e 47 4d 4c 2f 58 4d 4c 20 6e 69  ..<li>GML/XML ni
26b0: 63 65 6c 79 20 73 75 70 70 6f 72 74 73 20 61 6e  cely supports an
26c0: 79 20 70 6f 73 73 69 62 6c 65 20 63 68 61 72 73  y possible chars
26d0: 65 74 20 69 6e 20 74 68 65 20 6d 6f 73 74 20 66  et in the most f
26e0: 6c 65 78 69 62 6c 65 20 28 61 6e 64 20 73 61 66  lexible (and saf
26f0: 65 29 0d 0a 77 61 79 3c 2f 6c 69 3e 0d 0a 3c 6c  e)..way</li>..<l
2700: 69 3e 4f 6e 63 65 20 61 67 61 69 6e 2c 20 47 65  i>Once again, Ge
2710: 6f 4a 53 4f 4e 20 69 73 20 73 74 72 61 69 67 68  oJSON is straigh
2720: 74 66 6f 72 77 61 72 64 20 61 6e 64 20 73 69 6d  tforward and sim
2730: 70 6c 65 2c 20 62 75 74 20 72 65 61 6c 6c 79 20  ple, but really 
2740: 65 66 66 65 63 74 69 76 65 2e 3c 2f 6c 69 3e 0d  effective.</li>.
2750: 0a 3c 2f 75 6c 3e 0d 0a 3c 2f 74 64 3e 0d 0a 3c  .</ul>..</td>..<
2760: 2f 74 72 3e 0d 0a 3c 2f 74 61 62 6c 65 3e 0d 0a  /tr>..</table>..
2770: 3c 68 32 3e 53 6b 65 6c 65 74 61 6c 20 47 65 6f  <h2>Skeletal Geo
2780: 4a 53 4f 4e 20 61 6e 61 74 6f 6d 79 3c 2f 68 32  JSON anatomy</h2
2790: 3e 0d 0a 3c 76 65 72 62 61 74 69 6d 3e 0d 0a 7b  >..<verbatim>..{
27a0: 0d 0a 20 20 20 22 74 79 70 65 22 3a 20 22 46 65  ..   "type": "Fe
27b0: 61 74 75 72 65 43 6f 6c 6c 65 63 74 69 6f 6e 22  atureCollection"
27c0: 2c 0d 0a 20 20 20 22 66 65 61 74 75 72 65 73 22  ,..   "features"
27d0: 3a 20 0d 0a 20 20 20 5b 7b 0d 0a 20 20 20 20 20  : ..   [{..     
27e0: 20 20 22 74 79 70 65 22 3a 20 22 46 65 61 74 75    "type": "Featu
27f0: 72 65 22 2c 0d 0a 20 20 20 20 20 20 20 22 67 65  re",..       "ge
2800: 6f 6d 65 74 72 79 22 3a 20 0d 0a 20 20 20 20 20  ometry": ..     
2810: 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20    {..           
2820: 22 74 79 70 65 22 3a 20 22 50 6f 69 6e 74 22 2c  "type": "Point",
2830: 0d 0a 20 20 20 20 20 20 20 20 20 20 20 22 63 6f  ..           "co
2840: 6f 72 64 69 6e 61 74 65 73 22 3a 20 5b 31 30 32  ordinates": [102
2850: 2e 30 2c 20 30 2e 35 5d 0d 0a 20 20 20 20 20 20  .0, 0.5]..      
2860: 20 7d 2c 0d 0a 20 20 20 20 20 20 20 22 70 72 6f   },..       "pro
2870: 70 65 72 74 69 65 73 22 3a 20 0d 0a 20 20 20 20  perties": ..    
2880: 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20     {..          
2890: 20 22 70 72 6f 70 30 22 3a 20 22 76 61 6c 75 65   "prop0": "value
28a0: 30 22 0d 0a 20 20 20 20 20 20 20 7d 0d 0a 20 20  0"..       }..  
28b0: 20 20 7d 2c 20 0d 0a 20 20 20 20 7b 0d 0a 20 20    }, ..    {..  
28c0: 20 20 20 20 20 22 74 79 70 65 22 3a 20 22 46 65       "type": "Fe
28d0: 61 74 75 72 65 22 2c 0d 0a 20 20 20 20 20 20 20  ature",..       
28e0: 22 67 65 6f 6d 65 74 72 79 22 3a 20 0d 0a 20 20  "geometry": ..  
28f0: 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20       {..        
2900: 20 20 20 22 74 79 70 65 22 3a 20 22 4c 69 6e 65     "type": "Line
2910: 53 74 72 69 6e 67 22 2c 0d 0a 20 20 20 20 20 20  String",..      
2920: 20 20 20 20 20 22 63 6f 6f 72 64 69 6e 61 74 65       "coordinate
2930: 73 22 3a 20 0d 0a 20 20 20 20 20 20 20 20 20 20  s": ..          
2940: 5b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20  [..             
2950: 20 20 5b 31 30 32 2e 30 2c 20 30 2e 30 5d 2c 0d    [102.0, 0.0],.
2960: 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20  .               
2970: 5b 31 30 33 2e 30 2c 20 31 2e 30 5d 2c 0d 0a 20  [103.0, 1.0],.. 
2980: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 5b 31                [1
2990: 30 34 2e 30 2c 20 30 2e 30 5d 2c 0d 0a 20 20 20  04.0, 0.0],..   
29a0: 20 20 20 20 20 20 20 20 20 20 20 20 5b 31 30 35              [105
29b0: 2e 30 2c 20 31 2e 30 5d 0d 0a 20 20 20 20 20 20  .0, 1.0]..      
29c0: 20 20 20 20 20 5d 0d 0a 20 20 20 20 20 20 20 7d       ]..       }
29d0: 2c 0d 0a 20 20 20 20 20 20 20 22 70 72 6f 70 65  ,..       "prope
29e0: 72 74 69 65 73 22 3a 20 0d 0a 20 20 20 20 20 20  rties": ..      
29f0: 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 22   {..           "
2a00: 70 72 6f 70 30 22 3a 20 22 76 61 6c 75 65 30 22  prop0": "value0"
2a10: 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 22 70  ,..           "p
2a20: 72 6f 70 31 22 3a 20 30 2e 30 0d 0a 20 20 20 20  rop1": 0.0..    
2a30: 20 20 20 7d 0d 0a 20 20 20 20 7d 2c 20 0d 0a 20     }..    }, .. 
2a40: 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 22 74 79     {..       "ty
2a50: 70 65 22 3a 20 22 46 65 61 74 75 72 65 22 2c 0d  pe": "Feature",.
2a60: 0a 20 20 20 20 20 20 20 22 67 65 6f 6d 65 74 72  .       "geometr
2a70: 79 22 3a 20 0d 0a 20 20 20 20 20 20 20 7b 0d 0a  y": ..       {..
2a80: 20 20 20 20 20 20 20 20 20 20 20 22 74 79 70 65             "type
2a90: 22 3a 20 22 50 6f 6c 79 67 6f 6e 22 2c 0d 0a 20  ": "Polygon",.. 
2aa0: 20 20 20 20 20 20 20 20 20 20 22 63 6f 6f 72 64            "coord
2ab0: 69 6e 61 74 65 73 22 3a 20 0d 0a 20 20 20 20 20  inates": ..     
2ac0: 20 20 20 20 20 20 5b 0d 0a 20 20 20 20 20 20 20        [..       
2ad0: 20 20 20 20 20 20 20 20 5b 0d 0a 20 20 20 20 20          [..     
2ae0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 5b 31                [1
2af0: 30 30 2e 30 2c 20 30 2e 30 5d 2c 0d 0a 20 20 20  00.0, 0.0],..   
2b00: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
2b10: 5b 31 30 31 2e 30 2c 20 30 2e 30 5d 2c 0d 0a 20  [101.0, 0.0],.. 
2b20: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
2b30: 20 20 5b 31 30 31 2e 30 2c 20 31 2e 30 5d 2c 0d    [101.0, 1.0],.
2b40: 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20  .               
2b50: 20 20 20 20 5b 31 30 30 2e 30 2c 20 31 2e 30 5d      [100.0, 1.0]
2b60: 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20  ,..             
2b70: 20 20 20 20 20 20 5b 31 30 30 2e 30 2c 20 30 2e        [100.0, 0.
2b80: 30 5d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20  0]..            
2b90: 20 20 20 5d 0d 0a 20 20 20 20 20 20 20 20 20 20     ]..          
2ba0: 20 5d 0d 0a 20 20 20 20 20 20 20 7d 2c 0d 0a 20   ]..       },.. 
2bb0: 20 20 20 20 20 20 22 70 72 6f 70 65 72 74 69 65        "propertie
2bc0: 73 22 3a 20 0d 0a 20 20 20 20 20 20 20 7b 0d 0a  s": ..       {..
2bd0: 20 20 20 20 20 20 20 20 20 20 20 22 70 72 6f 70             "prop
2be0: 30 22 3a 20 22 76 61 6c 75 65 30 22 2c 0d 0a 20  0": "value0",.. 
2bf0: 20 20 20 20 20 20 20 20 20 20 22 70 72 6f 70 31            "prop1
2c00: 22 3a 20 7b 22 74 68 69 73 22 3a 20 22 74 68 61  ": {"this": "tha
2c10: 74 22 7d 0d 0a 20 20 20 20 20 20 20 7d 0d 0a 20  t"}..       }.. 
2c20: 20 20 7d 5d 0d 0a 7d 0d 0a 3c 2f 76 65 72 62 61    }]..}..</verba
2c30: 74 69 6d 3e 0d 0a 41 73 20 79 6f 75 20 63 61 6e  tim>..As you can
2c40: 20 65 61 73 69 6c 79 20 6e 6f 74 69 63 65 2c 20   easily notice, 
2c50: 47 65 6f 4a 53 4f 4e 20 68 61 73 20 61 20 70 6c  GeoJSON has a pl
2c60: 61 69 6e 20 72 65 67 75 6c 61 72 20 73 74 72 75  ain regular stru
2c70: 63 74 75 72 65 20 61 6e 64 20 69 73 20 64 65 63  cture and is dec
2c80: 69 73 69 76 65 6c 79 20 6d 6f 73 74 20 63 6f 6e  isively most con
2c90: 63 69 73 65 20 61 6e 64 20 6c 65 73 73 20 76 65  cise and less ve
2ca0: 72 62 6f 73 65 20 74 68 61 6e 20 47 4d 4c 2f 58  rbose than GML/X
2cb0: 4d 4c 3a 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 45  ML:..<ul>..<li>E
2cc0: 76 65 72 79 20 47 65 6f 4a 53 4f 4e 20 66 69 6c  very GeoJSON fil
2cd0: 65 20 6d 75 73 74 20 63 6f 6e 74 61 69 6e 20 61  e must contain a
2ce0: 20 3c 62 3e 46 65 61 74 75 72 65 43 6f 6c 6c 65   <b>FeatureColle
2cf0: 63 74 69 6f 6e 3c 2f 62 3e 20 6f 62 6a 65 63 74  ction</b> object
2d00: 2e 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 41 20 20  ...<ul>..<li>A  
2d10: 3c 62 3e 46 65 61 74 75 72 65 43 6f 6c 6c 65 63  <b>FeatureCollec
2d20: 74 69 6f 6e 3c 2f 62 3e 20 63 6f 6e 74 61 69 6e  tion</b> contain
2d30: 73 20 6f 6e 65 20 6f 72 20 6d 6f 72 65 20 69 6e  s one or more in
2d40: 64 69 76 69 64 75 61 6c 20 3c 62 3e 46 65 61 74  dividual <b>Feat
2d50: 75 72 65 3c 2f 62 3e 20 6f 62 6a 65 63 74 73 2e  ure</b> objects.
2d60: 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 45 61 63 68  ..<ul>..<li>Each
2d70: 20 3c 62 3e 46 65 61 74 75 72 65 3c 2f 62 3e 20   <b>Feature</b> 
2d80: 69 73 20 65 78 70 65 63 74 65 64 20 74 6f 20 64  is expected to d
2d90: 65 63 6c 61 72 65 20 61 20 3c 62 3e 47 65 6f 6d  eclare a <b>Geom
2da0: 65 74 72 79 3c 2f 62 3e 20 61 6e 64 20 61 20 3c  etry</b> and a <
2db0: 62 3e 70 72 6f 70 65 72 74 69 65 73 3c 2f 62 3e  b>properties</b>
2dc0: 20 61 72 72 61 79 2e 0d 0a 3c 75 6c 3e 0d 0a 3c   array...<ul>..<
2dd0: 6c 69 3e 45 61 63 68 20 70 72 6f 70 65 72 74 79  li>Each property
2de0: 20 63 6f 72 72 65 73 70 6f 6e 64 73 20 74 6f 20   corresponds to 
2df0: 61 6e 20 61 74 74 72 69 62 75 74 65 20 77 69 74  an attribute wit
2e00: 68 20 61 20 3c 62 3e 6e 61 6d 65 3c 2f 62 3e 20  h a <b>name</b> 
2e10: 61 6e 64 20 61 20 3c 62 3e 76 61 6c 75 65 3c 2f  and a <b>value</
2e20: 62 3e 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 6c 69 3e 3c  b>.</li>..</li><
2e30: 2f 75 6c 3e 0d 0a 3c 2f 6c 69 3e 3c 2f 75 6c 3e  /ul>..</li></ul>
2e40: 0d 0a 3c 2f 6c 69 3e 3c 2f 75 6c 3e 0d 0a 3c 2f  ..</li></ul>..</
2e50: 75 6c 3e 0d 0a 3c 68 33 3e 53 68 6f 72 74 20 63  ul>..<h3>Short c
2e60: 6f 6e 63 6c 75 73 69 6f 6e 73 3c 2f 68 33 3e 0d  onclusions</h3>.
2e70: 0a 47 65 6f 4a 53 4f 4e 20 69 73 20 77 69 64 65  .GeoJSON is wide
2e80: 6c 79 20 61 64 6f 70 74 65 64 20 62 79 20 6d 61  ly adopted by ma
2e90: 6e 79 20 77 65 62 2d 61 70 70 73 3b 20 62 65 69  ny web-apps; bei
2ea0: 6e 67 20 61 20 6e 6f 74 61 74 69 6f 6e 20 64 69  ng a notation di
2eb0: 72 65 63 74 6c 79 20 62 61 73 65 64 20 6f 6e 20  rectly based on 
2ec0: 3c 62 3e 4a 61 76 61 53 63 72 69 70 74 3c 2f 62  <b>JavaScript</b
2ed0: 3e 20 69 74 20 68 61 73 20 61 20 6e 61 74 75 72  > it has a natur
2ee0: 61 6c 20 69 6e 74 65 67 72 61 74 69 6f 6e 20 69  al integration i
2ef0: 6e 20 70 6f 70 75 6c 61 72 20 3c 69 3e 63 6c 69  n popular <i>cli
2f00: 65 6e 74 2d 73 69 64 65 3c 2f 69 3e 20 4a 53 20  ent-side</i> JS 
2f10: 6c 69 62 72 61 72 69 65 73 20 73 75 63 68 20 61  libraries such a
2f20: 73 20 3c 61 20 68 72 65 66 3d 22 68 74 74 70 73  s <a href="https
2f30: 3a 2f 2f 65 6e 2e 77 69 6b 69 70 65 64 69 61 2e  ://en.wikipedia.
2f40: 6f 72 67 2f 77 69 6b 69 2f 4f 70 65 6e 4c 61 79  org/wiki/OpenLay
2f50: 65 72 73 22 3e 4f 70 65 6e 4c 61 79 65 72 73 3c  ers">OpenLayers<
2f60: 2f 61 3e 20 61 6e 64 20 3c 61 20 68 72 65 66 3d  /a> and <a href=
2f70: 22 68 74 74 70 73 3a 2f 2f 65 6e 2e 77 69 6b 69  "https://en.wiki
2f80: 70 65 64 69 61 2e 6f 72 67 2f 77 69 6b 69 2f 4c  pedia.org/wiki/L
2f90: 65 61 66 6c 65 74 5f 28 73 6f 66 74 77 61 72 65  eaflet_(software
2fa0: 29 22 3e 4c 65 61 66 6c 65 74 3c 2f 61 3e 2e 3c  )">Leaflet</a>.<
2fb0: 62 72 3e 0d 0a 49 74 27 73 20 61 64 65 71 75 61  br>..It's adequa
2fc0: 74 65 6c 79 20 73 75 70 70 6f 72 74 65 64 20 62  tely supported b
2fd0: 79 20 3c 61 20 68 72 65 66 3d 22 68 74 74 70 73  y <a href="https
2fe0: 3a 2f 2f 65 6e 2e 77 69 6b 69 70 65 64 69 61 2e  ://en.wikipedia.
2ff0: 6f 72 67 2f 77 69 6b 69 2f 47 44 41 4c 22 3e 47  org/wiki/GDAL">G
3000: 44 41 4c 3c 2f 61 3e 2c 20 61 6e 64 20 63 6f 6e  DAL</a>, and con
3010: 73 65 71 75 65 6e 74 6c 79 20 62 79 20 6d 61 6e  sequently by man
3020: 79 20 6f 74 68 65 72 73 20 66 72 65 65 2f 6c 69  y others free/li
3030: 62 72 65 20 73 77 20 63 6f 6d 70 6f 6e 65 6e 74  bre sw component
3040: 73 20 28 61 73 20 65 2e 67 2e 20 3c 61 20 68 72  s (as e.g. <a hr
3050: 65 66 3d 22 68 74 74 70 73 3a 2f 2f 65 6e 2e 77  ef="https://en.w
3060: 69 6b 69 70 65 64 69 61 2e 6f 72 67 2f 77 69 6b  ikipedia.org/wik
3070: 69 2f 4d 61 70 53 65 72 76 65 72 22 3e 4d 61 70  i/MapServer">Map
3080: 53 65 72 76 65 72 3c 2f 61 3e 20 61 6e 64 20 3c  Server</a> and <
3090: 61 20 68 72 65 66 3d 22 68 74 74 70 73 3a 2f 2f  a href="https://
30a0: 65 6e 2e 77 69 6b 69 70 65 64 69 61 2e 6f 72 67  en.wikipedia.org
30b0: 2f 77 69 6b 69 2f 47 65 6f 53 65 72 76 65 72 22  /wiki/GeoServer"
30c0: 3e 47 65 6f 53 65 72 76 65 72 3c 2f 61 3e 29 2e  >GeoServer</a>).
30d0: 3c 62 72 3e 3c 62 72 3e 0d 0a 4f 75 74 73 69 64  <br><br>..Outsid
30e0: 65 20 74 68 65 20 77 65 62 2d 67 69 73 20 61 72  e the web-gis ar
30f0: 65 6e 61 20 47 65 6f 4a 53 4f 4e 20 73 74 69 6c  ena GeoJSON stil
3100: 6c 20 68 61 73 20 6c 69 6d 69 74 65 64 20 61 64  l has limited ad
3110: 6f 70 74 69 6f 6e 2c 20 61 6e 64 20 69 74 27 73  option, and it's
3120: 20 61 20 72 65 61 6c 20 70 69 74 79 20 62 65 63   a real pity bec
3130: 61 75 73 65 20 75 6e 64 65 72 20 6d 61 6e 79 20  ause under many 
3140: 61 73 70 65 63 74 73 20 69 74 27 73 20 61 20 76  aspects it's a v
3150: 65 72 79 20 76 61 6c 69 64 20 66 75 6c 6c 20 72  ery valid full r
3160: 65 70 6c 61 63 65 6d 65 6e 74 20 66 6f 72 20 74  eplacement for t
3170: 68 65 20 6e 6f 77 61 64 61 79 73 20 69 72 72 65  he nowadays irre
3180: 6d 65 64 69 61 62 6c 79 20 6f 62 73 6f 6c 65 74  mediably obsolet
3190: 65 20 53 68 61 70 65 66 69 6c 65 2e 3c 62 72 3e  e Shapefile.<br>
31a0: 0d 0a 53 74 61 72 74 69 6e 67 20 73 69 6e 63 65  ..Starting since
31b0: 20 76 65 72 73 69 6f 6e 20 3c 62 3e 35 2e 30 2e   version <b>5.0.
31c0: 30 3c 2f 62 3e 20 53 70 61 74 69 61 4c 69 74 65  0</b> SpatiaLite
31d0: 20 6f 66 66 65 72 73 20 66 75 6c 6c 20 73 75 70   offers full sup
31e0: 70 6f 72 74 73 20 74 6f 20 47 65 6f 4a 53 4f 4e  ports to GeoJSON
31f0: 20 61 73 20 64 65 66 69 6e 65 64 20 62 79 20 52   as defined by R
3200: 46 43 20 37 39 34 36 2e 3c 62 72 3e 0d 0a 54 68  FC 7946.<br>..Th
3210: 65 20 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e  e implementation
3220: 20 73 74 72 6f 6e 67 6c 79 20 72 65 73 65 6d 62   strongly resemb
3230: 6c 65 73 20 74 68 65 20 6f 6e 65 20 73 75 70 70  les the one supp
3240: 6f 72 74 65 64 20 62 79 20 61 6c 6c 20 70 72 65  orted by all pre
3250: 76 69 6f 75 73 20 76 65 72 73 69 6f 6e 73 20 66  vious versions f
3260: 6f 72 20 53 68 61 70 65 66 69 6c 65 2c 20 61 6e  or Shapefile, an
3270: 64 20 74 68 69 73 20 69 73 6e 27 74 20 61 74 20  d this isn't at 
3280: 61 6c 6c 20 73 75 72 70 72 69 73 69 6e 67 20 62  all surprising b
3290: 65 63 61 75 73 65 20 62 6f 74 68 20 74 68 65 6d  ecause both them
32a0: 20 63 6f 76 65 72 20 74 68 65 20 73 61 6d 65 20   cover the same 
32b0: 66 75 6e 63 74 69 6f 6e 61 6c 20 61 72 65 61 2e  functional area.
32c0: 0d 0a 3c 62 72 3e 3c 62 72 3e 0d 0a 3c 68 72 3e  ..<br><br>..<hr>
32d0: 0d 0a 3c 68 31 3e 53 51 4c 20 66 75 6e 63 74 69  ..<h1>SQL functi
32e0: 6f 6e 73 20 73 75 70 70 6f 72 74 69 6e 67 20 47  ons supporting G
32f0: 65 6f 4a 53 4f 4e 3c 2f 68 31 3e 0d 0a 3c 68 33  eoJSON</h1>..<h3
3300: 3e 45 78 70 6f 72 74 69 6e 67 20 64 61 74 61 20  >Exporting data 
3310: 74 6f 20 47 65 6f 4a 53 4f 4e 3c 2f 68 33 3e 0d  to GeoJSON</h3>.
3320: 0a 3c 76 65 72 62 61 74 69 6d 3e 0d 0a 53 45 4c  .<verbatim>..SEL
3330: 45 43 54 20 45 78 70 6f 72 74 47 65 6f 4a 53 4f  ECT ExportGeoJSO
3340: 4e 32 28 27 6d 79 74 61 62 6c 65 27 2c 20 27 67  N2('mytable', 'g
3350: 65 6f 6d 27 2c 20 27 2f 68 6f 6d 65 2f 73 61 6e  eom', '/home/san
3360: 64 72 6f 2f 6d 79 74 61 62 6c 65 2e 67 65 6f 6a  dro/mytable.geoj
3370: 73 6f 6e 27 29 3b 0d 0a 2d 2d 2d 2d 2d 2d 2d 2d  son');..--------
3380: 2d 0d 0a 31 32 33 34 0d 0a 0d 0a 53 45 4c 45 43  -..1234....SELEC
3390: 54 20 45 78 70 6f 72 74 47 65 6f 4a 53 4f 4e 32  T ExportGeoJSON2
33a0: 28 27 6d 79 74 61 62 6c 65 27 2c 20 27 67 65 6f  ('mytable', 'geo
33b0: 6d 27 2c 20 27 2f 68 6f 6d 65 2f 73 61 6e 64 72  m', '/home/sandr
33c0: 6f 2f 6d 79 74 61 62 6c 65 2e 67 65 6f 6a 73 6f  o/mytable.geojso
33d0: 6e 27 2c 20 31 32 29 3b 0d 0a 2d 2d 2d 2d 2d 2d  n', 12);..------
33e0: 2d 2d 2d 0d 0a 31 32 33 34 0d 0a 0d 0a 53 45 4c  ---..1234....SEL
33f0: 45 43 54 20 45 78 70 6f 72 74 47 65 6f 4a 53 4f  ECT ExportGeoJSO
3400: 4e 32 28 27 6d 79 74 61 62 6c 65 27 2c 20 27 67  N2('mytable', 'g
3410: 65 6f 6d 27 2c 20 27 2f 68 6f 6d 65 2f 73 61 6e  eom', '/home/san
3420: 64 72 6f 2f 6d 79 74 61 62 6c 65 2e 67 65 6f 6a  dro/mytable.geoj
3430: 73 6f 6e 27 2c 20 31 32 2c 20 31 29 3b 0d 0a 2d  son', 12, 1);..-
3440: 2d 2d 2d 2d 2d 2d 2d 2d 0d 0a 31 32 33 34 0d 0a  --------..1234..
3450: 0d 0a 53 45 4c 45 43 54 20 45 78 70 6f 72 74 47  ..SELECT ExportG
3460: 65 6f 4a 53 4f 4e 32 28 27 6d 79 74 61 62 6c 65  eoJSON2('mytable
3470: 27 2c 20 27 67 65 6f 6d 27 2c 20 27 2f 68 6f 6d  ', 'geom', '/hom
3480: 65 2f 73 61 6e 64 72 6f 2f 6d 79 74 61 62 6c 65  e/sandro/mytable
3490: 2e 67 65 6f 6a 73 6f 6e 27 2c 20 31 32 2c 20 31  .geojson', 12, 1
34a0: 2c 20 30 29 3b 0d 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d  , 0);..---------
34b0: 0d 0a 31 32 33 34 0d 0a 0d 0a 53 45 4c 45 43 54  ..1234....SELECT
34c0: 20 45 78 70 6f 72 74 47 65 6f 4a 53 4f 4e 32 28   ExportGeoJSON2(
34d0: 27 6d 79 74 61 62 6c 65 27 2c 20 27 67 65 6f 6d  'mytable', 'geom
34e0: 27 2c 20 27 2f 68 6f 6d 65 2f 73 61 6e 64 72 6f  ', '/home/sandro
34f0: 2f 6d 79 74 61 62 6c 65 2e 67 65 6f 6a 73 6f 6e  /mytable.geojson
3500: 27 2c 20 31 32 2c 20 31 2c 20 30 2c 20 31 29 3b  ', 12, 1, 0, 1);
3510: 0d 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 0a 31 32 33  ..---------..123
3520: 34 0d 0a 0d 0a 53 45 4c 45 43 54 20 45 78 70 6f  4....SELECT Expo
3530: 72 74 47 65 6f 4a 53 4f 4e 32 28 27 6d 79 74 61  rtGeoJSON2('myta
3540: 62 6c 65 27 2c 20 27 67 65 6f 6d 27 2c 20 27 2f  ble', 'geom', '/
3550: 68 6f 6d 65 2f 73 61 6e 64 72 6f 2f 6d 79 74 61  home/sandro/myta
3560: 62 6c 65 2e 67 65 6f 6a 73 6f 6e 27 2c 20 31 32  ble.geojson', 12
3570: 2c 20 31 2c 20 30 2c 20 31 2c 20 27 4c 4f 57 45  , 1, 0, 1, 'LOWE
3580: 52 43 41 53 45 27 29 3b 0d 0a 2d 2d 2d 2d 2d 2d  RCASE');..------
3590: 2d 2d 2d 0d 0a 31 32 33 34 0d 0a 3c 2f 76 65 72  ---..1234..</ver
35a0: 62 61 74 69 6d 3e 0d 0a 54 68 65 20 53 51 4c 20  batim>..The SQL 
35b0: 66 75 6e 63 74 69 6f 6e 20 3c 62 3e 45 78 70 6f  function <b>Expo
35c0: 72 74 47 65 6f 4a 53 4f 4e 32 28 29 3c 2f 62 3e  rtGeoJSON2()</b>
35d0: 20 63 61 6e 20 64 69 72 65 63 74 6c 79 20 65 78   can directly ex
35e0: 70 6f 72 74 20 61 20 77 68 6f 6c 65 20 53 70 61  port a whole Spa
35f0: 74 69 61 6c 20 54 61 62 6c 65 20 28 61 6b 61 20  tial Table (aka 
3600: 3c 69 3e 4c 61 79 65 72 3c 2f 69 3e 29 20 69 6e  <i>Layer</i>) in
3610: 74 6f 20 61 6e 20 65 78 74 65 72 6e 61 6c 20 47  to an external G
3620: 65 6f 4a 53 4f 4e 20 66 69 6c 65 20 63 6f 6e 66  eoJSON file conf
3630: 6f 72 6d 61 6e 74 20 74 6f 20 52 46 43 20 37 39  ormant to RFC 79
3640: 34 36 2e 3c 62 72 3e 0d 0a 54 68 69 73 20 66 75  46.<br>..This fu
3650: 6e 63 74 69 6f 6e 20 61 63 63 65 70 74 73 20 74  nction accepts t
3660: 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 61 72 67  he following arg
3670: 75 6d 65 6e 74 73 3a 0d 0a 3c 6f 6c 3e 0d 0a 3c  uments:..<ol>..<
3680: 6c 69 3e 3c 62 3e 74 61 62 6c 65 3c 2f 62 3e 3a  li><b>table</b>:
3690: 20 28 3c 69 3e 6d 61 6e 64 61 74 6f 72 79 3c 2f   (<i>mandatory</
36a0: 69 3e 29 20 6e 61 6d 65 20 6f 66 20 74 68 65 20  i>) name of the 
36b0: 53 70 61 74 69 61 6c 20 54 61 62 6c 65 20 74 6f  Spatial Table to
36c0: 20 62 65 20 65 78 70 6f 72 74 65 64 2e 3c 2f 6c   be exported.</l
36d0: 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 67 65 6f 6d 5f  i>..<li><b>geom_
36e0: 63 6f 6c 75 6d 6e 3c 2f 62 3e 3a 20 28 3c 69 3e  column</b>: (<i>
36f0: 6d 61 6e 64 61 74 6f 72 79 3c 2f 69 3e 29 20 6e  mandatory</i>) n
3700: 61 6d 65 20 6f 66 20 74 68 65 20 43 6f 6c 75 6d  ame of the Colum
3710: 6e 20 63 6f 6e 74 61 69 6e 69 6e 67 20 74 68 65  n containing the
3720: 20 47 65 6f 6d 65 74 72 69 65 73 20 74 6f 20 62   Geometries to b
3730: 65 20 65 78 70 6f 72 74 65 64 2e 3c 62 72 3e 0d  e exported.<br>.
3740: 0a 43 61 6e 20 62 65 20 3c 62 3e 4e 55 4c 4c 3c  .Can be <b>NULL<
3750: 2f 62 3e 2c 20 61 6e 64 20 69 6e 20 74 68 69 73  /b>, and in this
3760: 20 63 61 73 65 20 74 68 65 20 66 75 6e 63 74 69   case the functi
3770: 6f 6e 20 77 69 6c 6c 20 61 75 74 6f 6d 61 74 69  on will automati
3780: 63 61 6c 6c 79 20 64 65 74 65 72 6d 69 6e 65 20  cally determine 
3790: 74 68 65 20 61 70 70 72 6f 70 72 69 61 74 65 20  the appropriate 
37a0: 43 6f 6c 75 6d 6e 2d 6e 61 6d 65 20 69 66 20 74  Column-name if t
37b0: 68 65 20 54 61 62 6c 65 20 6a 75 73 74 20 63 6f  he Table just co
37c0: 6e 74 61 69 6e 73 20 61 20 73 69 6e 67 6c 65 20  ntains a single 
37d0: 47 65 6f 6d 65 74 72 79 2c 20 6f 74 68 65 72 77  Geometry, otherw
37e0: 69 73 65 20 61 20 66 61 69 6c 75 72 65 20 77 69  ise a failure wi
37f0: 6c 6c 20 66 6f 6c 6c 6f 77 2e 3c 2f 6c 69 3e 0d  ll follow.</li>.
3800: 0a 3c 6c 69 3e 3c 62 3e 66 69 6c 65 6e 61 6d 65  .<li><b>filename
3810: 3c 2f 62 3e 3a 20 28 3c 69 3e 6d 61 6e 64 61 74  </b>: (<i>mandat
3820: 6f 72 79 3c 2f 69 3e 29 20 61 62 73 6f 6c 75 74  ory</i>) absolut
3830: 65 20 6f 72 20 72 65 6c 61 74 69 76 65 20 70 61  e or relative pa
3840: 74 68 20 6f 66 20 74 68 65 20 47 65 6f 4a 73 6f  th of the GeoJso
3850: 6e 20 66 69 6c 65 20 74 6f 20 62 65 20 63 72 65  n file to be cre
3860: 61 74 65 64 20 28 3c 69 3e 6f 75 74 70 75 74 20  ated (<i>output 
3870: 66 69 6c 65 3c 2f 69 3e 29 2e 3c 2f 6c 69 3e 0d  file</i>).</li>.
3880: 0a 3c 6c 69 3e 3c 62 3e 70 72 65 63 69 73 69 6f  .<li><b>precisio
3890: 6e 3c 2f 62 3e 3a 20 28 3c 69 3e 6f 70 74 69 6f  n</b>: (<i>optio
38a0: 6e 61 6c 3c 2f 69 3e 29 20 6e 75 6d 62 65 72 20  nal</i>) number 
38b0: 6f 66 20 64 65 63 69 6d 61 6c 20 64 69 67 69 74  of decimal digit
38c0: 73 20 74 6f 20 62 65 20 75 73 65 64 20 66 6f 72  s to be used for
38d0: 20 63 6f 6f 72 64 69 6e 61 74 65 20 76 61 6c 75   coordinate valu
38e0: 65 73 3b 20 74 68 65 20 64 65 66 61 75 6c 74 20  es; the default 
38f0: 73 65 74 74 69 6e 67 20 69 73 20 3c 62 3e 38 3c  setting is <b>8<
3900: 2f 62 3e 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c  /b>.</li>..<li><
3910: 62 3e 6c 6f 6e 5f 6c 61 74 3c 2f 62 3e 3a 20 28  b>lon_lat</b>: (
3920: 3c 69 3e 6f 70 74 69 6f 6e 61 6c 3c 2f 69 3e 29  <i>optional</i>)
3930: 20 74 68 69 73 20 69 73 20 61 20 62 6f 6f 6c 65   this is a boole
3940: 61 6e 20 66 6c 61 67 3a 0d 0a 3c 75 6c 3e 0d 0a  an flag:..<ul>..
3950: 3c 6c 69 3e 69 66 20 73 65 74 20 74 6f 20 3c 62  <li>if set to <b
3960: 3e 46 41 4c 53 45 3c 2f 62 3e 20 61 6c 6c 20 63  >FALSE</b> all c
3970: 6f 6f 72 64 69 6e 61 74 65 73 20 77 69 6c 6c 20  oordinates will 
3980: 62 65 20 65 78 70 6f 72 74 65 64 20 65 78 61 63  be exported exac
3990: 74 6c 79 20 61 73 20 74 68 65 79 20 61 72 65 2e  tly as they are.
39a0: 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 69 66 20 73 65  </li>..<li>if se
39b0: 74 20 74 6f 20 3c 62 3e 54 52 55 45 3c 2f 62 3e  t to <b>TRUE</b>
39c0: 20 61 6c 6c 20 63 6f 6f 72 64 69 6e 61 74 65 73   all coordinates
39d0: 20 77 69 6c 6c 20 62 65 20 61 75 74 6f 6d 61 74   will be automat
39e0: 69 63 61 6c 6c 79 20 74 72 61 6e 73 66 6f 72 6d  ically transform
39f0: 65 64 20 28 69 66 20 72 65 71 75 69 72 65 64 29  ed (if required)
3a00: 20 69 6e 74 6f 20 3c 62 3e 53 52 49 44 3d 34 33   into <b>SRID=43
3a10: 32 36 20 57 47 53 20 38 34 3c 2f 62 3e 20 61 73  26 WGS 84</b> as
3a20: 20 72 65 71 75 69 72 65 64 20 62 79 20 52 46 43   required by RFC
3a30: 20 37 39 34 36 2e 3c 62 72 3e 0d 0a 54 68 69 73   7946.<br>..This
3a40: 20 69 73 20 74 68 65 20 64 65 66 61 75 6c 74 20   is the default 
3a50: 73 65 74 74 69 6e 67 2e 3c 2f 6c 69 3e 0d 0a 3c  setting.</li>..<
3a60: 2f 75 6c 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c  /ul></li>..<li><
3a70: 62 3e 4d 5f 63 6f 6f 72 64 73 3c 2f 62 3e 3a 20  b>M_coords</b>: 
3a80: 28 3c 69 3e 6f 70 74 69 6f 6e 61 6c 3c 2f 69 3e  (<i>optional</i>
3a90: 29 20 74 68 69 73 20 74 6f 6f 20 69 73 20 61 20  ) this too is a 
3aa0: 62 6f 6f 6c 65 61 6e 20 66 6c 61 67 3a 0d 0a 3c  boolean flag:..<
3ab0: 75 6c 3e 0d 0a 3c 6c 69 3e 69 66 20 73 65 74 20  ul>..<li>if set 
3ac0: 74 6f 20 3c 62 3e 46 41 4c 53 45 3c 2f 62 3e 20  to <b>FALSE</b> 
3ad0: 65 76 65 6e 74 75 61 6c 20 3c 62 3e 4d 2d 76 61  eventual <b>M-va
3ae0: 6c 75 65 73 3c 2f 62 3e 20 77 69 6c 6c 20 62 65  lues</b> will be
3af0: 20 73 69 6d 70 6c 79 20 69 67 6e 6f 72 65 64 2c   simply ignored,
3b00: 20 61 73 20 72 65 71 75 69 72 65 64 20 62 79 20   as required by 
3b10: 52 46 43 20 37 39 34 36 2e 3c 62 72 3e 0d 0a 54  RFC 7946.<br>..T
3b20: 68 69 73 20 69 73 20 74 68 65 20 64 65 66 61 75  his is the defau
3b30: 6c 74 20 73 65 74 74 69 6e 67 2e 3c 2f 6c 69 3e  lt setting.</li>
3b40: 0d 0a 3c 6c 69 3e 69 66 20 73 65 74 20 74 6f 20  ..<li>if set to 
3b50: 3c 62 3e 54 52 55 45 3c 2f 62 3e 20 65 76 65 6e  <b>TRUE</b> even
3b60: 74 75 61 6c 20 3c 62 3e 4d 2d 76 61 6c 75 65 73  tual <b>M-values
3b70: 3c 2f 62 3e 20 77 69 6c 6c 20 62 65 20 65 78 70  </b> will be exp
3b80: 6f 72 74 65 64 20 69 6e 74 6f 20 74 68 65 20 47  orted into the G
3b90: 65 6f 4a 53 4f 4e 20 66 69 6c 65 20 61 73 20 65  eoJSON file as e
3ba0: 78 74 72 61 2d 63 6f 6f 72 64 69 6e 61 74 65 73  xtra-coordinates
3bb0: 2e 3c 62 72 3e 0d 0a 3c 75 3e 4e 6f 74 65 3c 2f  .<br>..<u>Note</
3bc0: 75 3e 3a 20 74 68 65 20 72 65 73 75 6c 74 69 6e  u>: the resultin
3bd0: 67 20 6f 75 74 70 75 74 20 66 69 6c 65 20 63 6f  g output file co
3be0: 75 6c 64 20 65 61 73 69 6c 79 20 73 75 66 66 65  uld easily suffe
3bf0: 72 20 66 72 6f 6d 20 6c 69 6d 69 74 65 64 20 70  r from limited p
3c00: 6f 72 74 61 62 69 6c 69 74 79 2e 3c 2f 6c 69 3e  ortability.</li>
3c10: 0d 0a 3c 2f 75 6c 3e 3c 2f 6c 69 3e 0d 0a 3c 6c  ..</ul></li>..<l
3c20: 69 3e 3c 62 3e 69 6e 64 65 6e 74 65 64 3c 2f 62  i><b>indented</b
3c30: 3e 3a 20 28 3c 69 3e 6f 70 74 69 6f 6e 61 6c 3c  >: (<i>optional<
3c40: 2f 69 3e 29 20 79 65 74 20 61 6e 6f 74 68 65 72  /i>) yet another
3c50: 20 62 6f 6f 6c 65 61 6e 20 66 6c 61 67 3a 0d 0a   boolean flag:..
3c60: 3c 75 6c 3e 0d 0a 3c 6c 69 3e 49 66 20 73 65 74  <ul>..<li>If set
3c70: 20 74 6f 20 3c 62 3e 54 52 55 45 3c 2f 62 3e 20   to <b>TRUE</b> 
3c80: 74 68 65 20 6f 75 74 70 75 74 20 66 69 6c 65 20  the output file 
3c90: 77 69 6c 6c 20 62 65 20 70 72 6f 70 65 72 6c 79  will be properly
3ca0: 20 69 6e 64 65 6e 74 65 64 20 66 6f 72 20 65 6e   indented for en
3cb0: 68 61 6e 63 65 64 20 68 75 6d 61 6e 20 72 65 61  hanced human rea
3cc0: 64 61 62 69 6c 69 74 79 2e 3c 62 72 3e 0d 0a 54  dability.<br>..T
3cd0: 68 69 73 20 69 73 20 74 68 65 20 64 65 66 61 75  his is the defau
3ce0: 6c 74 20 73 65 74 74 69 6e 67 2e 3c 2f 6c 69 3e  lt setting.</li>
3cf0: 0d 0a 3c 6c 69 3e 49 66 20 73 65 74 20 74 6f 20  ..<li>If set to 
3d00: 3c 62 3e 46 41 4c 53 45 3c 2f 62 3e 20 74 68 65  <b>FALSE</b> the
3d10: 20 6f 75 74 70 75 74 20 66 69 6c 65 20 77 69 6c   output file wil
3d20: 6c 20 62 65 20 61 6c 6c 20 69 6e 20 61 20 73 69  l be all in a si
3d30: 6e 67 6c 65 20 6d 6f 6e 6f 6c 69 74 68 69 63 20  ngle monolithic 
3d40: 6c 69 6e 65 20 77 69 74 68 6f 75 74 20 62 6c 61  line without bla
3d50: 6e 6b 20 73 70 61 63 65 73 20 6f 72 20 6e 65 77  nk spaces or new
3d60: 6c 69 6e 65 73 20 28 6e 6f 74 69 63 65 61 62 6c  lines (noticeabl
3d70: 79 20 73 6d 61 6c 6c 65 72 29 2e 3c 2f 6c 69 3e  y smaller).</li>
3d80: 0d 0a 3c 2f 75 6c 3e 3c 2f 6c 69 3e 0d 0a 3c 6c  ..</ul></li>..<l
3d90: 69 3e 3c 62 3e 63 6f 6c 6e 61 6d 65 5f 63 61 73  i><b>colname_cas
3da0: 65 3c 2f 62 3e 3a 20 28 3c 69 3e 6f 70 74 69 6f  e</b>: (<i>optio
3db0: 6e 61 6c 3c 2f 69 3e 29 20 63 61 6e 20 61 73 73  nal</i>) can ass
3dc0: 75 6d 65 20 6f 6e 65 20 74 68 65 20 66 6f 6c 6c  ume one the foll
3dd0: 6f 77 69 6e 67 20 76 61 6c 75 65 73 3a 0d 0a 3c  owing values:..<
3de0: 75 6c 3e 0d 0a 3c 6c 69 3e 3c 62 3e 27 55 50 50  ul>..<li><b>'UPP
3df0: 45 52 27 3c 2f 62 3e 20 6f 72 20 3c 62 3e 27 55  ER'</b> or <b>'U
3e00: 50 50 45 52 43 41 53 45 27 3c 2f 62 3e 3a 20 61  PPERCASE'</b>: a
3e10: 6c 6c 20 61 74 74 72 69 62 75 74 65 20 6e 61 6d  ll attribute nam
3e20: 65 73 20 77 69 6c 6c 20 62 65 20 69 6e 73 65 72  es will be inser
3e30: 74 65 64 20 69 6e 74 6f 20 74 68 65 20 6f 75 74  ted into the out
3e40: 70 75 74 20 66 69 6c 65 20 69 6e 20 66 75 6c 6c  put file in full
3e50: 20 75 70 70 65 72 20 63 61 73 65 2e 3c 2f 6c 69   upper case.</li
3e60: 3e 0d 0a 3c 6c 69 3e 3c 62 3e 27 4c 4f 57 45 52  >..<li><b>'LOWER
3e70: 27 3c 2f 62 3e 20 6f 72 20 3c 62 3e 27 4c 4f 57  '</b> or <b>'LOW
3e80: 45 52 43 41 53 45 27 3c 2f 62 3e 3a 20 61 6c 6c  ERCASE'</b>: all
3e90: 20 61 74 74 72 69 62 75 74 65 20 6e 61 6d 65 73   attribute names
3ea0: 20 77 69 6c 6c 20 62 65 20 69 6e 73 65 72 74 65   will be inserte
3eb0: 64 20 69 6e 74 6f 20 74 68 65 20 6f 75 74 70 75  d into the outpu
3ec0: 74 20 66 69 6c 65 20 69 6e 20 66 75 6c 6c 20 6c  t file in full l
3ed0: 6f 77 65 72 20 63 61 73 65 2e 3c 62 72 3e 0d 0a  ower case.<br>..
3ee0: 54 68 69 73 20 69 73 20 74 68 65 20 64 65 66 61  This is the defa
3ef0: 75 6c 74 20 73 65 74 74 69 6e 67 2e 3c 2f 6c 69  ult setting.</li
3f00: 3e 0d 0a 3c 6c 69 3e 3c 62 3e 27 53 41 4d 45 27  >..<li><b>'SAME'
3f10: 3c 2f 62 3e 20 6f 72 20 3c 62 3e 27 53 41 4d 45  </b> or <b>'SAME
3f20: 43 41 53 45 27 3c 2f 62 3e 3a 20 61 6c 6c 20 61  CASE'</b>: all a
3f30: 74 74 72 69 62 75 74 65 20 6e 61 6d 65 73 20 77  ttribute names w
3f40: 69 6c 6c 20 62 65 20 69 6e 73 65 72 74 65 64 20  ill be inserted 
3f50: 69 6e 74 6f 20 74 68 65 20 6f 75 74 70 75 74 20  into the output 
3f60: 66 69 6c 65 20 70 72 65 73 65 72 76 69 6e 67 20  file preserving 
3f70: 61 6c 6c 20 75 70 70 65 72 2d 20 61 6e 64 20 6c  all upper- and l
3f80: 6f 77 65 72 2d 63 61 73 65 20 6c 65 74 74 65 72  ower-case letter
3f90: 73 20 65 78 61 63 74 6c 79 20 61 73 20 74 68 65  s exactly as the
3fa0: 79 20 61 72 65 20 64 65 66 69 6e 65 64 20 69 6e  y are defined in
3fb0: 20 74 68 65 20 63 6f 72 72 65 73 70 6f 6e 64 69   the correspondi
3fc0: 6e 67 20 63 6f 6c 75 6d 6e 20 6e 61 6d 65 73 2e  ng column names.
3fd0: 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 3c 2f 6c 69  </li>..</ul></li
3fe0: 3e 0d 0a 3c 6c 69 3e 74 68 65 20 3c 62 3e 72 65  >..<li>the <b>re
3ff0: 74 75 72 6e 20 76 61 6c 75 65 3c 2f 62 3e 20 69  turn value</b> i
4000: 73 20 61 6e 20 3c 62 3e 49 4e 54 45 47 45 52 3c  s an <b>INTEGER<
4010: 2f 62 3e 20 63 6f 72 72 65 73 70 6f 6e 64 69 6e  /b> correspondin
4020: 67 20 74 6f 20 74 68 65 20 6e 75 6d 62 65 72 20  g to the number 
4030: 6f 66 20 65 78 70 6f 72 74 65 64 20 72 6f 77 73  of exported rows
4040: 2c 20 6f 72 20 3c 62 3e 4e 55 4c 4c 3c 2f 62 3e  , or <b>NULL</b>
4050: 20 69 6e 20 74 68 65 20 63 61 73 65 20 6f 66 20   in the case of 
4060: 66 61 69 6c 75 72 65 20 6f 72 20 69 6e 76 61 6c  failure or inval
4070: 69 64 20 61 72 67 75 6d 65 6e 74 73 2e 3c 2f 6c  id arguments.</l
4080: 69 3e 0d 0a 3c 2f 6f 6c 3e 0d 0a 3c 74 61 62 6c  i>..</ol>..<tabl
4090: 65 20 63 65 6c 6c 73 70 61 63 69 6e 67 3d 22 34  e cellspacing="4
40a0: 22 20 63 65 6c 6c 70 61 64 64 69 6e 67 3d 22 38  " cellpadding="8
40b0: 22 20 62 67 63 6f 6c 6f 72 3d 22 23 66 66 66 66  " bgcolor="#ffff
40c0: 64 30 22 3e 3c 74 72 3e 3c 74 64 3e 0d 0a 3c 68  d0"><tr><td>..<h
40d0: 33 3e 43 61 76 65 61 74 3c 2f 68 33 3e 0d 0a 41  3>Caveat</h3>..A
40e0: 20 73 69 6d 69 6c 61 72 20 66 75 6e 63 74 69 6f   similar functio
40f0: 6e 20 6e 61 6d 65 64 20 3c 62 3e 45 78 70 6f 72  n named <b>Expor
4100: 74 47 65 6f 4a 53 4f 4e 28 29 3c 2f 62 3e 20 77  tGeoJSON()</b> w
4110: 61 73 20 61 6c 72 65 61 64 79 20 73 75 70 70 6f  as already suppo
4120: 72 74 65 64 20 62 79 20 70 72 65 76 69 6f 75 73  rted by previous
4130: 20 76 65 72 73 69 6f 6e 73 20 6f 66 20 53 70 61   versions of Spa
4140: 74 69 61 4c 69 74 65 2c 20 62 75 74 20 69 74 20  tiaLite, but it 
4150: 77 61 73 20 6d 6f 64 65 6c 6c 65 64 20 61 67 61  was modelled aga
4160: 69 6e 73 74 20 74 68 65 20 6f 6c 64 20 28 3c 62  inst the old (<b
4170: 3e 70 72 65 2d 52 46 43 3c 2f 62 3e 29 20 47 65  >pre-RFC</b>) Ge
4180: 6f 4a 53 4f 4e 20 73 70 65 63 69 66 69 63 61 74  oJSON specificat
4190: 69 6f 6e 2e 3c 62 72 3e 0d 0a 3c 62 3e 45 78 70  ion.<br>..<b>Exp
41a0: 6f 72 74 47 65 6f 4a 53 4f 4e 28 29 3c 2f 62 3e  ortGeoJSON()</b>
41b0: 20 69 73 20 6e 6f 77 20 3c 62 3e 44 45 50 52 45   is now <b>DEPRE
41c0: 43 41 54 45 44 3c 2f 62 3e 2c 20 61 6e 64 20 77  CATED</b>, and w
41d0: 69 6c 6c 20 72 65 6d 61 69 6e 20 74 6f 20 61 76  ill remain to av
41e0: 6f 69 64 20 62 72 65 61 6b 69 6e 67 20 65 78 69  oid breaking exi
41f0: 73 74 69 6e 67 20 61 70 70 6c 69 63 61 74 69 6f  sting applicatio
4200: 6e 73 20 61 6e 64 20 73 63 72 69 70 74 73 2e 3c  ns and scripts.<
4210: 62 72 3e 3c 62 72 3e 0d 0a 49 74 20 69 73 20 73  br><br>..It is s
4220: 74 72 6f 6e 67 6c 79 20 72 65 63 6f 6d 6d 65 6e  trongly recommen
4230: 64 65 64 20 74 6f 20 75 73 65 20 3c 62 3e 45 78  ded to use <b>Ex
4240: 70 6f 72 74 47 65 6f 4a 53 4f 4e 32 28 29 3c 2f  portGeoJSON2()</
4250: 62 3e 20 66 6f 72 20 61 6e 79 20 6e 65 77 20 64  b> for any new d
4260: 65 76 65 6c 6f 70 6d 65 6e 74 20 61 73 20 66 75  evelopment as fu
4270: 6c 6c 20 72 65 70 6c 61 63 65 6d 65 6e 74 20 63  ll replacement c
4280: 6f 6e 66 6f 72 6d 61 6e 74 20 74 6f 20 52 46 43  onformant to RFC
4290: 20 37 39 34 36 2e 0d 0a 3c 2f 74 64 3e 3c 2f 74   7946...</td></t
42a0: 72 3e 3c 2f 74 61 62 6c 65 3e 0d 0a 3c 62 72 3e  r></table>..<br>
42b0: 0d 0a 3c 74 61 62 6c 65 20 63 65 6c 6c 73 70 61  ..<table cellspa
42c0: 63 69 6e 67 3d 22 34 22 20 63 65 6c 6c 70 61 64  cing="4" cellpad
42d0: 64 69 6e 67 3d 22 38 22 20 62 67 63 6f 6c 6f 72  ding="8" bgcolor
42e0: 3d 22 23 66 66 63 30 61 30 22 3e 3c 74 72 3e 3c  ="#ffc0a0"><tr><
42f0: 74 64 3e 0d 0a 3c 68 33 3e 57 61 72 6e 69 6e 67  td>..<h3>Warning
4300: 3c 2f 68 33 3e 0d 0a 54 68 69 73 20 53 51 4c 20  </h3>..This SQL 
4310: 66 75 6e 63 74 69 6f 6e 20 6f 70 65 6e 20 74 68  function open th
4320: 65 20 64 6f 6f 72 20 74 6f 20 6d 61 6e 79 20 70  e door to many p
4330: 6f 74 65 6e 74 69 61 6c 20 73 65 63 75 72 69 74  otential securit
4340: 79 20 69 73 73 75 65 73 2c 20 61 6e 64 20 74 68  y issues, and th
4350: 75 73 20 3c 62 3e 3c 69 3e 69 73 20 61 6c 77 61  us <b><i>is alwa
4360: 79 73 20 64 69 73 61 62 6c 65 64 20 62 79 20 64  ys disabled by d
4370: 65 66 61 75 6c 74 3c 2f 69 3e 3c 2f 62 3e 2e 3c  efault</i></b>.<
4380: 62 72 3e 0d 0a 45 78 70 6c 69 63 69 74 6c 79 20  br>..Explicitly 
4390: 73 65 74 74 69 6e 67 20 74 68 65 20 65 78 74 65  setting the exte
43a0: 72 6e 61 6c 20 76 61 72 69 61 62 6c 65 20 3c 62  rnal variable <b
43b0: 3e 53 50 41 54 49 41 4c 49 54 45 5f 53 45 43 55  >SPATIALITE_SECU
43c0: 52 49 54 59 3d 72 65 6c 61 78 65 64 3c 2f 62 3e  RITY=relaxed</b>
43d0: 20 69 73 20 61 62 73 6f 6c 75 74 65 6c 79 20 72   is absolutely r
43e0: 65 71 75 69 72 65 64 20 69 6e 20 6f 72 64 65 72  equired in order
43f0: 20 74 6f 20 65 6e 61 62 6c 65 20 74 68 69 73 20   to enable this 
4400: 66 75 6e 63 74 69 6f 6e 2e 0d 0a 3c 2f 74 64 3e  function...</td>
4410: 3c 2f 74 72 3e 3c 2f 74 61 62 6c 65 3e 0d 0a 3c  </tr></table>..<
4420: 62 72 3e 0d 0a 3c 68 72 3e 0d 0a 3c 68 33 3e 49  br>..<hr>..<h3>I
4430: 6d 70 6f 72 74 69 6e 67 20 64 61 74 61 20 66 72  mporting data fr
4440: 6f 6d 20 47 65 6f 4a 53 4f 4e 3c 2f 68 33 3e 0d  om GeoJSON</h3>.
4450: 0a 3c 76 65 72 62 61 74 69 6d 3e 0d 0a 53 45 4c  .<verbatim>..SEL
4460: 45 43 54 20 49 6d 70 6f 72 74 47 65 6f 4a 53 4f  ECT ImportGeoJSO
4470: 4e 28 27 2f 68 6f 6d 65 2f 73 61 6e 64 72 6f 2f  N('/home/sandro/
4480: 73 6f 6d 65 6c 61 79 65 72 2e 67 65 6f 6a 73 6f  somelayer.geojso
4490: 6e 27 2c 20 27 73 6f 6d 65 6c 61 79 65 72 27 29  n', 'somelayer')
44a0: 3b 0d 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 0a  ;..-----------..
44b0: 39 39 0d 0a 0d 0a 53 45 4c 45 43 54 20 49 6d 70  99....SELECT Imp
44c0: 6f 72 74 47 65 6f 4a 53 4f 4e 28 27 2f 68 6f 6d  ortGeoJSON('/hom
44d0: 65 2f 73 61 6e 64 72 6f 2f 73 6f 6d 65 6c 61 79  e/sandro/somelay
44e0: 65 72 2e 67 65 6f 6a 73 6f 6e 27 2c 20 27 73 6f  er.geojson', 'so
44f0: 6d 65 6c 61 79 65 72 27 2c 20 27 67 65 6f 6d 27  melayer', 'geom'
4500: 29 3b 0d 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d  );..-----------.
4510: 0a 39 39 0d 0a 0d 0a 53 45 4c 45 43 54 20 49 6d  .99....SELECT Im
4520: 70 6f 72 74 47 65 6f 4a 53 4f 4e 28 27 2f 68 6f  portGeoJSON('/ho
4530: 6d 65 2f 73 61 6e 64 72 6f 2f 73 6f 6d 65 6c 61  me/sandro/somela
4540: 79 65 72 2e 67 65 6f 6a 73 6f 6e 27 2c 20 27 73  yer.geojson', 's
4550: 6f 6d 65 6c 61 79 65 72 27 2c 20 27 67 65 6f 6d  omelayer', 'geom
4560: 27 2c 20 31 29 3b 0d 0a 2d 2d 2d 2d 2d 2d 2d 2d  ', 1);..--------
4570: 2d 2d 2d 0d 0a 39 39 0d 0a 0d 0a 53 45 4c 45 43  ---..99....SELEC
4580: 54 20 49 6d 70 6f 72 74 47 65 6f 4a 53 4f 4e 28  T ImportGeoJSON(
4590: 27 2f 68 6f 6d 65 2f 73 61 6e 64 72 6f 2f 73 6f  '/home/sandro/so
45a0: 6d 65 6c 61 79 65 72 2e 67 65 6f 6a 73 6f 6e 27  melayer.geojson'
45b0: 2c 20 27 73 6f 6d 65 6c 61 79 65 72 27 2c 20 27  , 'somelayer', '
45c0: 67 65 6f 6d 27 2c 20 31 2c 20 33 30 30 33 29 3b  geom', 1, 3003);
45d0: 0d 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 0a 39  ..-----------..9
45e0: 39 0d 0a 0d 0a 53 45 4c 45 43 54 20 49 6d 70 6f  9....SELECT Impo
45f0: 72 74 47 65 6f 4a 53 4f 4e 28 27 2f 68 6f 6d 65  rtGeoJSON('/home
4600: 2f 73 61 6e 64 72 6f 2f 73 6f 6d 65 6c 61 79 65  /sandro/somelaye
4610: 72 2e 67 65 6f 6a 73 6f 6e 27 2c 20 27 73 6f 6d  r.geojson', 'som
4620: 65 6c 61 79 65 72 27 2c 20 27 67 65 6f 6d 27 2c  elayer', 'geom',
4630: 20 31 2c 20 33 30 30 33 2c 20 27 4c 4f 57 45 52   1, 3003, 'LOWER
4640: 43 41 53 45 27 29 3b 0d 0a 2d 2d 2d 2d 2d 2d 2d  CASE');..-------
4650: 2d 2d 2d 2d 0d 0a 39 39 0d 0a 3c 2f 76 65 72 62  ----..99..</verb
4660: 61 74 69 6d 3e 0d 0a 54 68 65 20 53 51 4c 20 66  atim>..The SQL f
4670: 75 6e 63 74 69 6f 6e 20 3c 62 3e 49 6d 70 6f 72  unction <b>Impor
4680: 74 47 65 6f 4a 53 4f 4e 28 29 3c 2f 62 3e 20 63  tGeoJSON()</b> c
4690: 61 6e 20 64 69 72 65 63 74 6c 79 20 63 72 65 61  an directly crea
46a0: 74 65 20 61 20 6e 65 77 20 53 70 61 74 69 61 6c  te a new Spatial
46b0: 20 54 61 62 6c 65 20 62 79 20 69 6d 70 6f 72 74   Table by import
46c0: 69 6e 67 20 64 61 74 61 20 66 72 6f 6d 20 61 6e  ing data from an
46d0: 20 65 78 74 65 6e 61 6c 20 47 65 6f 4a 53 4f 4e   extenal GeoJSON
46e0: 20 66 69 6c 65 20 63 6f 6e 66 6f 72 6d 61 6e 74   file conformant
46f0: 20 74 6f 20 52 46 43 20 37 39 34 36 2e 3c 62 72   to RFC 7946.<br
4700: 3e 0d 0a 54 68 69 73 20 66 75 6e 63 74 69 6f 6e  >..This function
4710: 20 61 63 63 65 70 74 73 20 74 68 65 20 66 6f 6c   accepts the fol
4720: 6c 6f 77 69 6e 67 20 61 72 67 75 6d 65 6e 74 73  lowing arguments
4730: 3a 0d 0a 3c 6f 6c 3e 0d 0a 3c 6c 69 3e 3c 62 3e  :..<ol>..<li><b>
4740: 66 69 6c 65 6e 61 6d 65 3c 2f 62 3e 3a 20 28 3c  filename</b>: (<
4750: 69 3e 6d 61 6e 64 61 74 6f 72 79 3c 2f 69 3e 29  i>mandatory</i>)
4760: 20 61 62 73 6f 6c 75 74 65 20 6f 72 20 72 65 6c   absolute or rel
4770: 61 74 69 76 65 20 70 61 74 68 20 6f 66 20 74 68  ative path of th
4780: 65 20 47 65 6f 4a 73 6f 6e 20 66 69 6c 65 20 74  e GeoJson file t
4790: 6f 20 62 65 20 69 6d 70 6f 72 74 65 64 20 28 3c  o be imported (<
47a0: 69 3e 69 6e 70 75 74 20 66 69 6c 65 3c 2f 69 3e  i>input file</i>
47b0: 29 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e  ).</li>..<li><b>
47c0: 74 61 62 6c 65 3c 2f 62 3e 3a 20 28 3c 69 3e 6d  table</b>: (<i>m
47d0: 61 6e 64 61 74 6f 72 79 3c 2f 69 3e 29 20 6e 61  andatory</i>) na
47e0: 6d 65 20 6f 66 20 74 68 65 20 53 70 61 74 69 61  me of the Spatia
47f0: 6c 20 54 61 62 6c 65 20 74 6f 20 62 65 20 63 72  l Table to be cr
4800: 65 61 74 65 64 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69  eated.</li>..<li
4810: 3e 3c 62 3e 67 65 6f 6d 5f 63 6f 6c 75 6d 6e 3c  ><b>geom_column<
4820: 2f 62 3e 3a 20 28 3c 69 3e 6f 70 74 69 6f 6e 61  /b>: (<i>optiona
4830: 6c 3c 2f 69 3e 29 20 6e 61 6d 65 20 6f 66 20 74  l</i>) name of t
4840: 68 65 20 47 65 6f 6d 65 74 72 79 20 43 6f 6c 75  he Geometry Colu
4850: 6d 6e 20 74 6f 20 62 65 20 63 72 65 61 74 65 64  mn to be created
4860: 2e 3c 62 72 3e 0d 0a 49 66 20 6e 6f 74 20 65 78  .<br>..If not ex
4870: 70 6c 69 63 69 74 6c 79 20 73 70 65 63 69 66 69  plicitly specifi
4880: 65 64 20 6f 72 20 3c 62 3e 4e 55 4c 4c 3c 2f 62  ed or <b>NULL</b
4890: 3e 20 61 20 63 6f 6c 75 6d 6e 20 6e 61 6d 65 64  > a column named
48a0: 20 3c 62 3e 27 67 65 6f 6d 65 74 72 79 27 3c 2f   <b>'geometry'</
48b0: 62 3e 20 77 69 6c 6c 20 62 65 20 63 72 65 61 74  b> will be creat
48c0: 65 64 20 62 79 20 64 65 66 61 75 6c 74 2e 3c 2f  ed by default.</
48d0: 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 73 70 61 74  li>..<li><b>spat
48e0: 69 61 6c 5f 69 6e 64 65 78 3c 2f 62 3e 3a 20 28  ial_index</b>: (
48f0: 3c 69 3e 6f 70 74 69 6f 6e 61 6c 3c 2f 69 3e 29  <i>optional</i>)
4900: 20 74 68 69 73 20 69 73 20 61 20 62 6f 6f 6c 65   this is a boole
4910: 61 6e 20 66 6c 61 67 3a 0d 0a 3c 75 6c 3e 0d 0a  an flag:..<ul>..
4920: 3c 6c 69 3e 69 66 20 73 65 74 20 74 6f 20 3c 62  <li>if set to <b
4930: 3e 54 52 55 45 3c 2f 62 3e 20 61 20 3c 62 3e 53  >TRUE</b> a <b>S
4940: 70 61 74 69 61 6c 49 6e 64 65 78 3c 2f 62 3e 20  patialIndex</b> 
4950: 73 75 70 70 6f 72 74 69 6e 67 20 74 68 65 20 47  supporting the G
4960: 65 6f 6d 65 74 72 79 20 43 6f 6c 75 6d 6e 20 77  eometry Column w
4970: 69 6c 6c 20 62 65 20 61 75 74 6f 6d 61 74 69 63  ill be automatic
4980: 61 6c 6c 79 20 63 72 65 61 74 65 64 2e 3c 2f 6c  ally created.</l
4990: 69 3e 0d 0a 3c 6c 69 3e 69 66 20 73 65 74 20 74  i>..<li>if set t
49a0: 6f 20 3c 62 3e 46 41 4c 53 45 3c 2f 62 3e 20 6e  o <b>FALSE</b> n
49b0: 6f 20 53 70 61 74 69 61 6c 49 6e 64 65 78 20 77  o SpatialIndex w
49c0: 69 6c 6c 20 62 65 20 63 72 65 61 74 65 64 2e 3c  ill be created.<
49d0: 62 72 3e 0d 0a 54 68 69 73 20 69 73 20 74 68 65  br>..This is the
49e0: 20 64 65 66 61 75 6c 74 20 73 65 74 74 69 6e 67   default setting
49f0: 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 3c 2f 6c  .</li>..</ul></l
4a00: 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 73 72 69 64 3c  i>..<li><b>srid<
4a10: 2f 62 3e 3a 20 28 3c 69 3e 6f 70 74 69 6f 6e 61  /b>: (<i>optiona
4a20: 6c 3c 2f 69 3e 29 3a 0d 0a 3c 75 6c 3e 0d 0a 3c  l</i>):..<ul>..<
4a30: 6c 69 3e 57 68 65 6e 20 69 74 27 73 20 61 20 3c  li>When it's a <
4a40: 62 3e 70 6f 73 69 74 69 76 65 20 69 6e 74 65 67  b>positive integ
4a50: 65 72 3c 2f 62 3e 20 69 74 20 63 6f 72 72 65 73  er</b> it corres
4a60: 70 6f 6e 64 73 20 74 6f 20 74 68 65 20 53 52 49  ponds to the SRI
4a70: 44 20 76 61 6c 75 65 20 74 6f 20 62 65 20 61 73  D value to be as
4a80: 73 69 67 6e 65 64 20 74 6f 20 61 6c 6c 20 69 6d  signed to all im
4a90: 70 6f 72 74 65 64 20 47 65 6f 6d 65 74 72 69 65  ported Geometrie
4aa0: 73 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 49 66 20  s.</li>..<li>If 
4ab0: 3c 62 3e 30 3c 2f 62 3e 20 6f 72 20 3c 62 3e 6e  <b>0</b> or <b>n
4ac0: 65 67 61 74 69 76 65 3c 2f 62 3e 20 61 6c 6c 20  egative</b> all 
4ad0: 69 6d 70 6f 72 74 65 64 20 47 65 6f 6d 65 74 72  imported Geometr
4ae0: 69 65 73 20 77 69 6c 6c 20 62 65 20 61 73 73 75  ies will be assu
4af0: 6d 65 64 20 74 6f 20 62 65 20 69 6e 20 3c 62 3e  med to be in <b>
4b00: 53 52 49 44 3d 34 33 32 36 20 57 47 53 20 38 34  SRID=4326 WGS 84
4b10: 3c 2f 62 3e 20 28 3c 69 3e 67 65 6f 67 72 61 70  </b> (<i>geograp
4b20: 68 69 63 20 63 6f 6f 72 64 69 6e 61 74 65 73 20  hic coordinates 
4b30: 65 78 70 72 65 73 73 65 64 20 61 73 20 3c 62 3e  expressed as <b>
4b40: 4c 6f 6e 67 69 74 75 64 65 73 3c 2f 62 3e 20 61  Longitudes</b> a
4b50: 6e 64 20 3c 62 3e 4c 61 74 69 74 75 64 65 73 3c  nd <b>Latitudes<
4b60: 2f 62 3e 3c 2f 69 3e 29 20 61 73 20 72 65 71 75  /b></i>) as requ
4b70: 69 72 65 64 20 62 79 20 52 46 43 20 37 39 34 36  ired by RFC 7946
4b80: 2e 3c 62 72 3e 0d 0a 54 68 69 73 20 69 73 20 74  .<br>..This is t
4b90: 68 65 20 64 65 66 61 75 6c 74 20 73 65 74 74 69  he default setti
4ba0: 6e 67 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 3c  ng.</li>..</ul><
4bb0: 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 63 6f 6c  /li>..<li><b>col
4bc0: 6e 61 6d 65 5f 63 61 73 65 3c 2f 62 3e 3a 20 28  name_case</b>: (
4bd0: 3c 69 3e 6f 70 74 69 6f 6e 61 6c 3c 2f 69 3e 29  <i>optional</i>)
4be0: 20 63 61 6e 20 61 73 73 75 6d 65 20 6f 6e 65 20   can assume one 
4bf0: 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 76 61  the following va
4c00: 6c 75 65 73 3a 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69  lues:..<ul>..<li
4c10: 3e 3c 62 3e 27 55 50 50 45 52 27 3c 2f 62 3e 20  ><b>'UPPER'</b> 
4c20: 6f 72 20 3c 62 3e 27 55 50 50 45 52 43 41 53 45  or <b>'UPPERCASE
4c30: 27 3c 2f 62 3e 3a 20 61 6c 6c 20 63 6f 6c 75 6d  '</b>: all colum
4c40: 6e 73 20 77 69 6c 6c 20 62 65 20 63 72 65 61 74  ns will be creat
4c50: 65 64 20 69 6e 74 6f 20 74 68 65 20 74 61 62 6c  ed into the tabl
4c60: 65 20 69 6e 20 66 75 6c 6c 20 75 70 70 65 72 20  e in full upper 
4c70: 63 61 73 65 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e  case.</li>..<li>
4c80: 3c 62 3e 27 4c 4f 57 45 52 27 3c 2f 62 3e 20 6f  <b>'LOWER'</b> o
4c90: 72 20 3c 62 3e 27 4c 4f 57 45 52 43 41 53 45 27  r <b>'LOWERCASE'
4ca0: 3c 2f 62 3e 3a 20 61 6c 6c 20 63 6f 6c 75 6d 6e  </b>: all column
4cb0: 73 20 77 69 6c 6c 20 62 65 20 63 72 65 61 74 65  s will be create
4cc0: 64 20 69 6e 74 6f 20 74 68 65 20 74 61 62 6c 65  d into the table
4cd0: 20 69 6e 20 66 75 6c 6c 20 6c 6f 77 65 72 20 63   in full lower c
4ce0: 61 73 65 2e 3c 62 72 3e 0d 0a 54 68 69 73 20 69  ase.<br>..This i
4cf0: 73 20 74 68 65 20 64 65 66 61 75 6c 74 20 73 65  s the default se
4d00: 74 74 69 6e 67 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69  tting.</li>..<li
4d10: 3e 3c 62 3e 27 53 41 4d 45 27 3c 2f 62 3e 20 6f  ><b>'SAME'</b> o
4d20: 72 20 3c 62 3e 27 53 41 4d 45 43 41 53 45 27 3c  r <b>'SAMECASE'<
4d30: 2f 62 3e 3a 20 61 6c 6c 20 63 6f 6c 75 6d 6e 73  /b>: all columns
4d40: 20 77 69 6c 6c 20 62 65 20 63 72 65 61 74 65 64   will be created
4d50: 20 69 6e 74 6f 20 74 68 65 20 74 61 62 6c 65 20   into the table 
4d60: 70 72 65 73 65 72 76 69 6e 67 20 61 6c 6c 20 75  preserving all u
4d70: 70 70 65 72 2d 20 61 6e 64 20 6c 6f 77 65 72 2d  pper- and lower-
4d80: 63 61 73 65 20 6c 65 74 74 65 72 73 20 65 78 61  case letters exa
4d90: 63 74 6c 79 20 61 73 20 74 68 65 79 20 61 72 65  ctly as they are
4da0: 20 64 65 66 69 6e 65 64 20 69 6e 20 74 68 65 20   defined in the 
4db0: 63 6f 72 72 65 73 70 6f 6e 64 69 6e 67 20 47 65  corresponding Ge
4dc0: 6f 4a 53 4f 4e 20 61 74 74 72 69 62 75 74 65 20  oJSON attribute 
4dd0: 6e 61 6d 65 73 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75  names.</li>..</u
4de0: 6c 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 74 68 65  l></li>..<li>the
4df0: 20 3c 62 3e 72 65 74 75 72 6e 20 76 61 6c 75 65   <b>return value
4e00: 3c 2f 62 3e 20 69 73 20 61 6e 20 3c 62 3e 49 4e  </b> is an <b>IN
4e10: 54 45 47 45 52 3c 2f 62 3e 20 63 6f 72 72 65 73  TEGER</b> corres
4e20: 70 6f 6e 64 69 6e 67 20 74 6f 20 74 68 65 20 6e  ponding to the n
4e30: 75 6d 62 65 72 20 6f 66 20 65 78 70 6f 72 74 65  umber of exporte
4e40: 64 20 72 6f 77 73 2c 20 6f 72 20 3c 62 3e 4e 55  d rows, or <b>NU
4e50: 4c 4c 3c 2f 62 3e 20 69 6e 20 74 68 65 20 63 61  LL</b> in the ca
4e60: 73 65 20 6f 66 20 66 61 69 6c 75 72 65 20 6f 72  se of failure or
4e70: 20 69 6e 76 61 6c 69 64 20 61 72 67 75 6d 65 6e   invalid argumen
4e80: 74 73 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 6f 6c 3e 0d  ts.</li>..</ol>.
4e90: 0a 3c 74 61 62 6c 65 20 63 65 6c 6c 73 70 61 63  .<table cellspac
4ea0: 69 6e 67 3d 22 34 22 20 63 65 6c 6c 70 61 64 64  ing="4" cellpadd
4eb0: 69 6e 67 3d 22 38 22 20 62 67 63 6f 6c 6f 72 3d  ing="8" bgcolor=
4ec0: 22 23 66 66 63 30 61 30 22 3e 3c 74 72 3e 3c 74  "#ffc0a0"><tr><t
4ed0: 64 3e 0d 0a 3c 68 33 3e 57 61 72 6e 69 6e 67 3c  d>..<h3>Warning<
4ee0: 2f 68 33 3e 0d 0a 54 68 69 73 20 53 51 4c 20 66  /h3>..This SQL f
4ef0: 75 6e 63 74 69 6f 6e 20 6f 70 65 6e 20 74 68 65  unction open the
4f00: 20 64 6f 6f 72 20 74 6f 20 6d 61 6e 79 20 70 6f   door to many po
4f10: 74 65 6e 74 69 61 6c 20 73 65 63 75 72 69 74 79  tential security
4f20: 20 69 73 73 75 65 73 2c 20 61 6e 64 20 74 68 75   issues, and thu
4f30: 73 20 3c 62 3e 3c 69 3e 69 73 20 61 6c 77 61 79  s <b><i>is alway
4f40: 73 20 64 69 73 61 62 6c 65 64 20 62 79 20 64 65  s disabled by de
4f50: 66 61 75 6c 74 3c 2f 69 3e 3c 2f 62 3e 2e 3c 62  fault</i></b>.<b
4f60: 72 3e 0d 0a 45 78 70 6c 69 63 69 74 6c 79 20 73  r>..Explicitly s
4f70: 65 74 74 69 6e 67 20 74 68 65 20 65 78 74 65 72  etting the exter
4f80: 6e 61 6c 20 76 61 72 69 61 62 6c 65 20 3c 62 3e  nal variable <b>
4f90: 53 50 41 54 49 41 4c 49 54 45 5f 53 45 43 55 52  SPATIALITE_SECUR
4fa0: 49 54 59 3d 72 65 6c 61 78 65 64 3c 2f 62 3e 20  ITY=relaxed</b> 
4fb0: 69 73 20 61 62 73 6f 6c 75 74 65 6c 79 20 72 65  is absolutely re
4fc0: 71 75 69 72 65 64 20 69 6e 20 6f 72 64 65 72 20  quired in order 
4fd0: 74 6f 20 65 6e 61 62 6c 65 20 74 68 69 73 20 66  to enable this f
4fe0: 75 6e 63 74 69 6f 6e 2e 0d 0a 3c 2f 74 64 3e 3c  unction...</td><
4ff0: 2f 74 72 3e 3c 2f 74 61 62 6c 65 3e 0d 0a 3c 62  /tr></table>..<b
5000: 72 3e 0d 0a 3c 68 72 3e 0d 0a 3c 68 33 3e 56 69  r>..<hr>..<h3>Vi
5010: 72 74 75 61 6c 47 65 6f 4a 53 4f 4e 3c 2f 68 33  rtualGeoJSON</h3
5020: 3e 0d 0a 3c 76 65 72 62 61 74 69 6d 3e 0d 0a 43  >..<verbatim>..C
5030: 52 45 41 54 45 20 56 49 52 54 55 41 4c 20 54 41  REATE VIRTUAL TA
5040: 42 4c 45 20 73 6f 6d 65 5f 6e 61 6d 65 20 55 53  BLE some_name US
5050: 49 4e 47 20 56 69 72 74 75 61 6c 47 65 6f 4a 53  ING VirtualGeoJS
5060: 4f 4e 28 20 70 61 74 68 2c 20 5b 20 73 72 69 64  ON( path, [ srid
5070: 20 2c 20 5b 20 63 6f 6c 6e 61 6d 65 5f 63 61 73   , [ colname_cas
5080: 65 20 5d 5d 20 29 3b 0d 0a 3c 2f 76 65 72 62 61  e ]] );..</verba
5090: 74 69 6d 3e 0d 0a 41 20 3c 62 3e 56 69 72 74 75  tim>..A <b>Virtu
50a0: 61 6c 47 65 6f 4a 53 4f 4e 3c 2f 62 3e 20 74 61  alGeoJSON</b> ta
50b0: 62 6c 65 20 69 73 20 73 74 72 69 63 74 6c 79 20  ble is strictly 
50c0: 73 69 6d 69 6c 61 72 20 74 6f 20 61 20 3c 62 3e  similar to a <b>
50d0: 56 69 72 74 75 61 6c 53 68 61 70 65 3c 2f 62 3e  VirtualShape</b>
50e0: 20 74 61 62 6c 65 2c 20 74 68 65 20 6f 6e 6c 79   table, the only
50f0: 20 64 69 66 66 65 72 65 6e 63 65 20 62 65 74 77   difference betw
5100: 65 65 6e 20 74 68 65 6d 20 62 65 69 6e 67 20 74  een them being t
5110: 68 65 20 66 69 6c 65 20 66 6f 72 6d 61 74 20 6f  he file format o
5120: 66 20 74 68 65 20 75 6e 64 65 72 6c 61 79 69 6e  f the underlayin
5130: 67 20 64 61 74 61 73 6f 75 72 63 65 2e 3c 62 72  g datasource.<br
5140: 3e 0d 0a 45 78 63 65 70 74 20 66 6f 72 20 74 68  >..Except for th
5150: 69 73 20 73 6d 61 6c 6c 20 62 75 74 20 66 75 6e  is small but fun
5160: 64 61 6d 65 6e 74 61 6c 20 64 65 74 61 69 6c 20  damental detail 
5170: 62 6f 74 68 20 74 68 65 6d 20 62 65 68 61 76 65  both them behave
5180: 20 69 6e 20 65 78 61 63 74 6c 79 20 74 68 65 20   in exactly the 
5190: 73 61 6d 65 20 77 61 79 2e 0d 0a 3c 62 72 3e 0d  same way...<br>.
51a0: 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 4a 75 73 74 20  .<ul>..<li>Just 
51b0: 61 20 73 69 6e 67 6c 65 20 6d 61 6e 64 61 74 6f  a single mandato
51c0: 72 79 20 61 72 67 75 6d 65 6e 74 20 69 73 20 72  ry argument is r
51d0: 65 71 75 69 72 65 64 20 66 6f 72 20 63 72 65 61  equired for crea
51e0: 74 69 6e 67 20 61 20 56 69 72 74 75 61 6c 47 65  ting a VirtualGe
51f0: 6f 4a 53 4f 4e 20 74 61 62 6c 65 3b 20 79 6f 75  oJSON table; you
5200: 20 61 72 65 20 72 65 71 75 69 72 65 64 20 74 6f   are required to
5210: 20 73 70 65 63 69 66 79 20 74 68 65 20 3c 62 3e   specify the <b>
5220: 61 62 73 6f 6c 75 74 65 3c 2f 62 3e 20 6f 72 20  absolute</b> or 
5230: 3c 62 3e 72 65 6c 61 74 69 76 65 20 70 61 74 68  <b>relative path
5240: 3c 2f 62 3e 20 6c 65 61 64 69 6e 67 20 74 6f 20  </b> leading to 
5250: 74 68 65 20 65 78 74 65 72 6e 61 6c 20 47 65 6f  the external Geo
5260: 4a 53 4f 4e 20 66 69 6c 65 20 6f 6e 20 74 68 65  JSON file on the
5270: 20 66 69 6c 65 73 79 73 74 65 6d 2e 3c 2f 6c 69   filesystem.</li
5280: 3e 0d 0a 3c 6c 69 3e 59 6f 75 20 63 61 6e 20 65  >..<li>You can e
5290: 78 70 6c 69 63 69 74 6c 79 20 73 70 65 63 69 66  xplicitly specif
52a0: 79 20 74 68 65 20 6f 70 74 69 6f 6e 61 6c 20 61  y the optional a
52b0: 72 67 75 6d 65 6e 74 20 3c 62 3e 73 72 69 64 3c  rgument <b>srid<
52c0: 2f 62 3e 20 66 6f 72 20 6f 75 74 2d 6f 66 2d 74  /b> for out-of-t
52d0: 68 65 2d 73 70 65 63 20 47 65 6f 4a 53 4f 4e 20  he-spec GeoJSON 
52e0: 66 69 6c 65 73 20 62 61 73 65 64 20 6f 6e 20 73  files based on s
52f0: 6f 6d 65 20 61 72 62 69 74 72 61 72 79 20 43 6f  ome arbitrary Co
5300: 6f 72 64 69 6e 61 74 65 20 52 65 66 65 72 65 6e  ordinate Referen
5310: 63 65 20 53 79 73 74 65 6d 2e 3c 62 72 3e 0d 0a  ce System.<br>..
5320: 42 79 20 64 65 66 61 75 6c 74 20 56 69 72 74 75  By default Virtu
5330: 61 6c 47 65 6f 4a 53 4f 4e 20 77 69 6c 6c 20 61  alGeoJSON will a
5340: 6c 77 61 79 73 20 61 73 73 75 6d 65 20 74 68 61  lways assume tha
5350: 74 20 61 6c 6c 20 47 65 6f 6d 65 74 72 69 65 73  t all Geometries
5360: 20 73 68 6f 75 6c 64 20 62 65 20 61 73 73 69 67   should be assig
5370: 6e 65 64 20 74 6f 20 3c 62 3e 53 52 49 44 3d 34  ned to <b>SRID=4
5380: 33 32 36 20 57 47 53 20 38 34 3c 2f 62 3e 20 28  326 WGS 84</b> (
5390: 3c 69 3e 6c 6f 6e 67 69 74 75 64 65 73 20 61 6e  <i>longitudes an
53a0: 64 20 6c 61 74 69 74 75 64 65 73 3c 2f 69 3e 29  d latitudes</i>)
53b0: 2c 20 61 63 63 6f 72 64 69 6e 67 6c 79 20 74 6f  , accordingly to
53c0: 20 52 46 43 20 37 39 34 36 20 73 70 65 63 69 66   RFC 7946 specif
53d0: 69 63 61 74 69 6f 6e 73 2e 3c 2f 6c 69 3e 0d 0a  ications.</li>..
53e0: 3c 6c 69 3e 41 20 66 75 72 74 68 65 72 20 6f 70  <li>A further op
53f0: 74 69 6f 6e 61 6c 20 61 72 67 75 6d 65 6e 74 20  tional argument 
5400: 3c 62 3e 63 6f 6c 6e 61 6d 65 5f 63 61 73 65 3c  <b>colname_case<
5410: 2f 62 3e 20 69 73 20 73 75 70 70 6f 72 74 65 64  /b> is supported
5420: 2c 20 61 6e 64 20 69 74 20 68 61 73 20 65 78 61  , and it has exa
5430: 63 74 6c 79 20 74 68 65 20 73 61 6d 65 20 69 6e  ctly the same in
5440: 74 65 72 70 72 65 74 61 74 69 6f 6e 73 20 61 73  terpretations as
5450: 20 69 6e 20 3c 62 3e 49 6d 70 6f 72 74 47 65 6f   in <b>ImportGeo
5460: 4a 53 4f 4e 28 29 3c 2f 62 3e 3c 2f 6c 69 3e 0d  JSON()</b></li>.
5470: 0a 3c 2f 75 6c 3e 0d 0a 3c 62 72 3e 0d 0a 3c 68  .</ul>..<br>..<h
5480: 72 3e 0d 0a 3c 68 33 3e 47 65 6f 4a 53 4f 4e 20  r>..<h3>GeoJSON 
5490: 73 75 70 70 6f 72 74 20 69 6e 20 73 70 61 74 69  support in spati
54a0: 61 6c 69 74 65 5f 67 75 69 3c 2f 68 33 3e 0d 0a  alite_gui</h3>..
54b0: 54 68 65 20 6c 61 74 65 73 74 20 76 65 72 73 69  The latest versi
54c0: 6f 6e 20 6f 66 20 74 68 65 20 47 55 49 20 74 6f  on of the GUI to
54d0: 6f 6c 20 6e 6f 77 20 73 75 70 70 6f 72 74 73 20  ol now supports 
54e0: 47 65 6f 4a 53 4f 4e 20 69 6e 20 65 78 61 63 74  GeoJSON in exact
54f0: 6c 79 20 74 68 65 20 73 61 6d 65 20 77 61 79 20  ly the same way 
5500: 69 74 20 73 75 70 70 6f 72 74 73 20 53 68 61 70  it supports Shap
5510: 65 66 69 6c 65 73 2e 0d 0a 3c 62 72 3e 3c 62 72  efiles...<br><br
5520: 3e 0d 0a 3c 74 61 62 6c 65 20 63 65 6c 6c 73 70  >..<table cellsp
5530: 61 63 69 6e 67 3d 22 34 22 20 63 65 6c 6c 70 61  acing="4" cellpa
5540: 64 64 69 6e 67 3d 22 38 22 20 62 67 63 6f 6c 6f  dding="8" bgcolo
5550: 72 3d 22 23 66 66 66 66 66 30 22 20 62 6f 72 64  r="#fffff0" bord
5560: 65 72 3d 22 31 22 3e 0d 0a 3c 74 72 3e 0d 0a 3c  er="1">..<tr>..<
5570: 74 64 3e 0d 0a 54 77 6f 20 6e 65 77 20 62 75 74  td>..Two new but
5580: 74 6f 6e 73 20 68 61 76 65 20 62 65 65 6e 20 61  tons have been a
5590: 64 64 65 64 20 74 6f 20 74 68 65 20 74 6f 6f 6c  dded to the tool
55a0: 62 61 72 3a 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e  bar:..<ul>..<li>
55b0: 6f 6e 65 20 66 6f 72 20 3c 62 3e 69 6d 70 6f 72  one for <b>impor
55c0: 74 69 6e 67 20 47 65 6f 4a 53 4f 4e 20 66 69 6c  ting GeoJSON fil
55d0: 65 73 3c 2f 62 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69  es</b></li>..<li
55e0: 3e 74 68 65 20 6f 74 68 65 72 20 66 6f 72 20 3c  >the other for <
55f0: 62 3e 63 72 65 61 74 69 6e 67 20 56 69 72 74 75  b>creating Virtu
5600: 61 6c 47 65 6f 4a 53 4f 4e 20 74 61 62 6c 65 73  alGeoJSON tables
5610: 3c 2f 62 3e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e  </b></li>..</ul>
5620: 0d 0a 3c 2f 74 64 3e 0d 0a 3c 74 64 20 61 6c 69  ..</td>..<td ali
5630: 67 6e 3d 22 63 65 6e 74 65 72 22 3e 0d 0a 3c 69  gn="center">..<i
5640: 6d 67 20 73 72 63 3d 22 68 74 74 70 73 3a 2f 2f  mg src="https://
5650: 77 77 77 2e 67 61 69 61 2d 67 69 73 2e 69 74 2f  www.gaia-gis.it/
5660: 67 61 69 61 2d 73 69 6e 73 2f 67 65 6f 6a 73 6f  gaia-sins/geojso
5670: 6e 2d 70 69 63 73 2f 74 6f 6f 6c 62 61 72 2e 70  n-pics/toolbar.p
5680: 6e 67 22 20 61 6c 74 3d 22 47 65 6f 4a 53 4f 4e  ng" alt="GeoJSON
5690: 20 74 6f 6f 6c 62 61 72 20 62 75 74 74 6f 6e 73   toolbar buttons
56a0: 22 3e 0d 0a 3c 2f 74 64 3e 0d 0a 3c 2f 74 72 3e  ">..</td>..</tr>
56b0: 0d 0a 3c 74 72 3e 0d 0a 3c 74 64 3e 0d 0a 54 68  ..<tr>..<td>..Th
56c0: 65 20 73 69 64 65 20 66 69 67 75 72 65 20 69 73  e side figure is
56d0: 20 61 6e 20 65 78 61 6d 70 6c 65 20 6f 66 20 74   an example of t
56e0: 68 65 20 64 69 61 6c 6f 67 20 62 6f 78 20 74 68  he dialog box th
56f0: 61 74 27 73 20 75 73 65 64 20 66 6f 72 20 73 65  at's used for se
5700: 74 74 69 6e 67 20 6f 70 74 69 6f 6e 73 20 77 68  tting options wh
5710: 65 6e 20 63 72 65 61 74 69 6e 67 20 61 20 6e 65  en creating a ne
5720: 77 20 53 70 61 74 69 61 6c 20 54 61 62 6c 65 20  w Spatial Table 
5730: 62 79 20 69 6d 70 6f 72 74 69 6e 67 20 64 61 74  by importing dat
5740: 61 20 66 72 6f 6d 20 61 6e 20 65 78 74 65 72 6e  a from an extern
5750: 61 6c 20 47 65 6f 4a 53 4f 4e 20 66 69 6c 65 2e  al GeoJSON file.
5760: 0d 0a 3c 2f 74 64 3e 0d 0a 3c 74 64 20 61 6c 69  ..</td>..<td ali
5770: 67 6e 3d 22 63 65 6e 74 65 72 22 3e 0d 0a 3c 69  gn="center">..<i
5780: 6d 67 20 73 72 63 3d 22 68 74 74 70 73 3a 2f 2f  mg src="https://
5790: 77 77 77 2e 67 61 69 61 2d 67 69 73 2e 69 74 2f  www.gaia-gis.it/
57a0: 67 61 69 61 2d 73 69 6e 73 2f 67 65 6f 6a 73 6f  gaia-sins/geojso
57b0: 6e 2d 70 69 63 73 2f 6c 6f 61 64 2e 70 6e 67 22  n-pics/load.png"
57c0: 20 61 6c 74 3d 22 47 65 6f 4a 53 4f 4e 20 6c 6f   alt="GeoJSON lo
57d0: 61 64 22 3e 0d 0a 3c 2f 74 64 3e 0d 0a 3c 2f 74  ad">..</td>..</t
57e0: 72 3e 0d 0a 3c 74 72 3e 0d 0a 3c 74 64 3e 0d 0a  r>..<tr>..<td>..
57f0: 54 68 65 20 73 69 64 65 20 66 69 67 75 72 65 20  The side figure 
5800: 69 73 20 61 6e 20 65 78 61 6d 70 6c 65 20 6f 66  is an example of
5810: 20 74 68 65 20 64 69 61 6c 6f 67 20 62 6f 78 20   the dialog box 
5820: 74 68 61 74 27 73 20 75 73 65 64 20 66 6f 72 20  that's used for 
5830: 73 65 74 74 69 6e 67 20 6f 70 74 69 6f 6e 73 20  setting options 
5840: 77 68 65 6e 20 63 72 65 61 74 69 6e 67 20 61 20  when creating a 
5850: 56 69 72 74 75 61 6c 47 65 6f 4a 53 4f 4e 20 54  VirtualGeoJSON T
5860: 61 62 6c 65 2e 0d 0a 3c 2f 74 64 3e 0d 0a 3c 74  able...</td>..<t
5870: 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22  d align="center"
5880: 3e 0d 0a 3c 69 6d 67 20 73 72 63 3d 22 68 74 74  >..<img src="htt
5890: 70 73 3a 2f 2f 77 77 77 2e 67 61 69 61 2d 67 69  ps://www.gaia-gi
58a0: 73 2e 69 74 2f 67 61 69 61 2d 73 69 6e 73 2f 67  s.it/gaia-sins/g
58b0: 65 6f 6a 73 6f 6e 2d 70 69 63 73 2f 76 69 72 74  eojson-pics/virt
58c0: 75 61 6c 2e 70 6e 67 22 20 61 6c 74 3d 22 47 65  ual.png" alt="Ge
58d0: 6f 4a 53 4f 4e 20 76 69 72 74 75 61 6c 20 74 61  oJSON virtual ta
58e0: 62 6c 65 22 3e 0d 0a 3c 2f 74 64 3e 0d 0a 3c 2f  ble">..</td>..</
58f0: 74 72 3e 0d 0a 3c 74 72 3e 0d 0a 3c 74 64 3e 0d  tr>..<tr>..<td>.
5900: 0a 46 6f 72 20 65 78 70 6f 72 74 69 6e 67 20 61  .For exporting a
5910: 20 77 68 6f 6c 65 20 53 70 61 74 69 61 6c 20 54   whole Spatial T
5920: 61 62 6c 65 20 69 6e 74 6f 20 61 6e 20 65 78 74  able into an ext
5930: 65 72 6e 61 6c 20 47 65 6f 4a 53 4f 4e 20 66 69  ernal GeoJSON fi
5940: 6c 65 3a 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 69  le:..<ul>..<li>i
5950: 6e 20 74 68 65 20 74 72 65 65 2d 6c 69 73 74 20  n the tree-list 
5960: 3c 62 3e 72 69 67 68 74 2d 63 6c 69 63 6b 3c 2f  <b>right-click</
5970: 62 3e 20 6f 6e 20 74 68 65 20 72 65 71 75 65 73  b> on the reques
5980: 74 65 64 20 47 65 6f 6d 65 74 72 79 2e 0d 0a 3c  ted Geometry...<
5990: 75 6c 3e 0d 0a 3c 6c 69 3e 74 68 65 6e 20 63 6c  ul>..<li>then cl
59a0: 69 63 6b 20 74 68 65 20 3c 62 3e 45 78 70 6f 72  ick the <b>Expor
59b0: 74 20 61 73 20 47 65 6f 4a 53 4f 4e 3c 2f 62 3e  t as GeoJSON</b>
59c0: 20 69 74 65 6d 20 6f 6e 20 74 68 65 20 63 6f 6e   item on the con
59d0: 74 65 78 74 2d 6d 65 6e 75 20 74 68 61 74 20 77  text-menu that w
59e0: 69 6c 6c 20 61 70 70 65 61 72 2e 3c 2f 6c 69 3e  ill appear.</li>
59f0: 0d 0a 3c 2f 75 6c 3e 3c 2f 6c 69 3e 0d 0a 3c 2f  ..</ul></li>..</
5a00: 75 6c 3e 0d 0a 3c 2f 74 64 3e 0d 0a 3c 74 64 20  ul>..</td>..<td 
5a10: 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 0d  align="center">.
5a20: 0a 3c 69 6d 67 20 73 72 63 3d 22 68 74 74 70 73  .<img src="https
5a30: 3a 2f 2f 77 77 77 2e 67 61 69 61 2d 67 69 73 2e  ://www.gaia-gis.
5a40: 69 74 2f 67 61 69 61 2d 73 69 6e 73 2f 67 65 6f  it/gaia-sins/geo
5a50: 6a 73 6f 6e 2d 70 69 63 73 2f 64 75 6d 70 2e 70  json-pics/dump.p
5a60: 6e 67 22 20 61 6c 74 3d 22 47 65 6f 4a 53 4f 4e  ng" alt="GeoJSON
5a70: 20 64 75 6d 70 22 3e 0d 0a 3c 2f 74 64 3e 0d 0a   dump">..</td>..
5a80: 3c 2f 74 72 3e 0d 0a 3c 2f 74 61 62 6c 65 3e 0d  </tr>..</table>.
5a90: 0a 3c 62 72 3e 3c 62 72 3e 0d 0a 3c 68 72 3e 3c  .<br><br>..<hr><
5aa0: 62 72 3e 0d 0a 3c 61 20 68 72 65 66 3d 22 68 74  br>..<a href="ht
5ab0: 74 70 73 3a 2f 2f 77 77 77 2e 67 61 69 61 2d 67  tps://www.gaia-g
5ac0: 69 73 2e 69 74 2f 66 6f 73 73 69 6c 2f 6c 69 62  is.it/fossil/lib
5ad0: 73 70 61 74 69 61 6c 69 74 65 2f 77 69 6b 69 3f  spatialite/wiki?
5ae0: 6e 61 6d 65 3d 34 2e 33 2e 30 2d 64 6f 63 22 3e  name=4.3.0-doc">
5af0: 62 61 63 6b 3c 2f 61 3e 0a 5a 20 61 65 32 62 35  back</a>.Z ae2b5
5b00: 39 38 35 33 39 30 36 39 32 66 30 35 39 64 37 63  985390692f059d7c
5b10: 63 65 32 30 37 39 35 66 36 66 62 0a              ce20795f6fb.