Hex Artifact Content
Not logged in

Artifact 3a41f2c6fbaf4e142e51e3652c6dac2b859afd80:

Wiki page [Supporting GeoJSON] by sandro 2019-01-22 17:07:23.
0000: 44 20 32 30 31 39 2d 30 31 2d 32 32 54 31 37 3a  D 2019-01-22T17:
0010: 30 37 3a 32 33 2e 37 37 36 0a 4c 20 53 75 70 70  07:23.776.L Supp
0020: 6f 72 74 69 6e 67 5c 73 47 65 6f 4a 53 4f 4e 0a  orting\sGeoJSON.
0030: 50 20 63 62 39 30 65 37 30 61 39 61 39 33 37 35  P cb90e70a9a9375
0040: 65 35 37 37 31 37 63 37 65 39 30 37 64 66 35 32  e57717c7e907df52
0050: 63 34 37 63 32 34 63 37 33 62 0a 55 20 73 61 6e  c47c24c73b.U san
0060: 64 72 6f 0a 57 20 32 33 31 39 30 0a 3c 61 20 68  dro.W 23190.<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 3c 2f 6c 69 3e 2e 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 3e 4d 61 70 53  i/MapServer>MapS
3080: 65 72 76 65 72 22 3e 4d 61 70 53 65 72 76 65 72  erver">MapServer
3090: 3c 2f 61 3e 20 61 6e 64 20 3c 61 20 68 72 65 66  </a> and <a href
30a0: 3d 22 68 74 74 70 73 3a 2f 2f 65 6e 2e 77 69 6b  ="https://en.wik
30b0: 69 70 65 64 69 61 2e 6f 72 67 2f 77 69 6b 69 2f  ipedia.org/wiki/
30c0: 47 65 6f 53 65 72 76 65 72 22 3e 47 65 6f 53 65  GeoServer">GeoSe
30d0: 72 76 65 72 3c 2f 61 3e 29 2e 3c 62 72 3e 3c 62  rver</a>).<br><b
30e0: 72 3e 0d 0a 4f 75 74 73 69 64 65 20 74 68 65 20  r>..Outside the 
30f0: 77 65 62 2d 67 69 73 20 61 72 65 6e 61 20 47 65  web-gis arena Ge
3100: 6f 4a 53 4f 4e 20 73 74 69 6c 6c 20 68 61 73 20  oJSON still has 
3110: 6c 69 6d 69 74 65 64 20 61 64 6f 70 74 69 6f 6e  limited adoption
3120: 2c 20 61 6e 64 20 69 74 27 73 20 61 20 72 65 61  , and it's a rea
3130: 6c 20 70 69 74 79 20 62 65 63 61 75 73 65 20 75  l pity because u
3140: 6e 64 65 72 20 6d 61 6e 79 20 61 73 70 65 63 74  nder many aspect
3150: 73 20 69 74 27 73 20 61 20 76 65 72 79 20 76 61  s it's a very va
3160: 6c 69 64 20 66 75 6c 6c 20 72 65 70 6c 61 63 65  lid full replace
3170: 6d 65 6e 74 20 66 6f 72 20 74 68 65 20 6e 6f 77  ment for the now
3180: 61 64 61 79 73 20 69 72 72 65 6d 65 64 69 61 62  adays irremediab
3190: 6c 79 20 6f 62 73 6f 6c 65 74 65 20 53 68 61 70  ly obsolete Shap
31a0: 65 66 69 6c 65 2e 3c 62 72 3e 0d 0a 53 74 61 72  efile.<br>..Star
31b0: 74 69 6e 67 20 73 69 6e 63 65 20 76 65 72 73 69  ting since versi
31c0: 6f 6e 20 3c 62 3e 35 2e 30 2e 30 3c 2f 62 3e 20  on <b>5.0.0</b> 
31d0: 53 70 61 74 69 61 4c 69 74 65 20 6f 66 66 65 72  SpatiaLite offer
31e0: 73 20 66 75 6c 6c 20 73 75 70 70 6f 72 74 73 20  s full supports 
31f0: 74 6f 20 47 65 6f 4a 53 4f 4e 20 61 73 20 64 65  to GeoJSON as de
3200: 66 69 6e 65 64 20 62 79 20 52 46 43 20 37 39 34  fined by RFC 794
3210: 36 2e 3c 62 72 3e 0d 0a 54 68 65 20 69 6d 70 6c  6.<br>..The impl
3220: 65 6d 65 6e 74 61 74 69 6f 6e 20 73 74 72 6f 6e  ementation stron
3230: 67 6c 79 20 72 65 73 65 6d 62 6c 65 73 20 74 68  gly resembles th
3240: 65 20 6f 6e 65 20 73 75 70 70 6f 72 74 65 64 20  e one supported 
3250: 62 79 20 61 6c 6c 20 70 72 65 76 69 6f 75 73 20  by all previous 
3260: 76 65 72 73 69 6f 6e 73 20 66 6f 72 20 53 68 61  versions for Sha
3270: 70 65 66 69 6c 65 2c 20 61 6e 64 20 74 68 69 73  pefile, and this
3280: 20 69 73 6e 27 74 20 61 74 20 61 6c 6c 20 73 75   isn't at all su
3290: 72 70 72 69 73 69 6e 67 20 62 65 63 61 75 73 65  rprising because
32a0: 20 62 6f 74 68 20 74 68 65 6d 20 63 6f 76 65 72   both them cover
32b0: 20 74 68 65 20 73 61 6d 65 20 66 75 6e 63 74 69   the same functi
32c0: 6f 6e 61 6c 20 61 72 65 61 2e 0d 0a 3c 62 72 3e  onal area...<br>
32d0: 3c 62 72 3e 0d 0a 3c 68 72 3e 0d 0a 3c 68 31 3e  <br>..<hr>..<h1>
32e0: 53 51 4c 20 66 75 6e 63 74 69 6f 6e 73 20 73 75  SQL functions su
32f0: 70 70 6f 72 74 69 6e 67 20 47 65 6f 4a 53 4f 4e  pporting GeoJSON
3300: 3c 2f 68 31 3e 0d 0a 3c 68 33 3e 45 78 70 6f 72  </h1>..<h3>Expor
3310: 74 69 6e 67 20 64 61 74 61 20 74 6f 20 47 65 6f  ting data to Geo
3320: 4a 53 4f 4e 3c 2f 68 33 3e 0d 0a 3c 76 65 72 62  JSON</h3>..<verb
3330: 61 74 69 6d 3e 0d 0a 53 45 4c 45 43 54 20 45 78  atim>..SELECT Ex
3340: 70 6f 72 74 47 65 6f 4a 53 4f 4e 32 28 27 6d 79  portGeoJSON2('my
3350: 74 61 62 6c 65 27 2c 20 27 67 65 6f 6d 27 2c 20  table', 'geom', 
3360: 27 2f 68 6f 6d 65 2f 73 61 6e 64 72 6f 2f 6d 79  '/home/sandro/my
3370: 74 61 62 6c 65 2e 67 65 6f 6a 73 6f 6e 27 29 3b  table.geojson');
3380: 0d 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 0a 31 32 33  ..---------..123
3390: 34 0d 0a 0d 0a 53 45 4c 45 43 54 20 45 78 70 6f  4....SELECT Expo
33a0: 72 74 47 65 6f 4a 53 4f 4e 32 28 27 6d 79 74 61  rtGeoJSON2('myta
33b0: 62 6c 65 27 2c 20 27 67 65 6f 6d 27 2c 20 27 2f  ble', 'geom', '/
33c0: 68 6f 6d 65 2f 73 61 6e 64 72 6f 2f 6d 79 74 61  home/sandro/myta
33d0: 62 6c 65 2e 67 65 6f 6a 73 6f 6e 27 2c 20 31 32  ble.geojson', 12
33e0: 29 3b 0d 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 0a 31  );..---------..1
33f0: 32 33 34 0d 0a 0d 0a 53 45 4c 45 43 54 20 45 78  234....SELECT Ex
3400: 70 6f 72 74 47 65 6f 4a 53 4f 4e 32 28 27 6d 79  portGeoJSON2('my
3410: 74 61 62 6c 65 27 2c 20 27 67 65 6f 6d 27 2c 20  table', 'geom', 
3420: 27 2f 68 6f 6d 65 2f 73 61 6e 64 72 6f 2f 6d 79  '/home/sandro/my
3430: 74 61 62 6c 65 2e 67 65 6f 6a 73 6f 6e 27 2c 20  table.geojson', 
3440: 31 32 2c 20 31 29 3b 0d 0a 2d 2d 2d 2d 2d 2d 2d  12, 1);..-------
3450: 2d 2d 0d 0a 31 32 33 34 0d 0a 0d 0a 53 45 4c 45  --..1234....SELE
3460: 43 54 20 45 78 70 6f 72 74 47 65 6f 4a 53 4f 4e  CT ExportGeoJSON
3470: 32 28 27 6d 79 74 61 62 6c 65 27 2c 20 27 67 65  2('mytable', 'ge
3480: 6f 6d 27 2c 20 27 2f 68 6f 6d 65 2f 73 61 6e 64  om', '/home/sand
3490: 72 6f 2f 6d 79 74 61 62 6c 65 2e 67 65 6f 6a 73  ro/mytable.geojs
34a0: 6f 6e 27 2c 20 31 32 2c 20 31 2c 20 30 29 3b 0d  on', 12, 1, 0);.
34b0: 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 0a 31 32 33 34  .---------..1234
34c0: 0d 0a 0d 0a 53 45 4c 45 43 54 20 45 78 70 6f 72  ....SELECT Expor
34d0: 74 47 65 6f 4a 53 4f 4e 32 28 27 6d 79 74 61 62  tGeoJSON2('mytab
34e0: 6c 65 27 2c 20 27 67 65 6f 6d 27 2c 20 27 2f 68  le', 'geom', '/h
34f0: 6f 6d 65 2f 73 61 6e 64 72 6f 2f 6d 79 74 61 62  ome/sandro/mytab
3500: 6c 65 2e 67 65 6f 6a 73 6f 6e 27 2c 20 31 32 2c  le.geojson', 12,
3510: 20 31 2c 20 30 2c 20 31 29 3b 0d 0a 2d 2d 2d 2d   1, 0, 1);..----
3520: 2d 2d 2d 2d 2d 0d 0a 31 32 33 34 0d 0a 0d 0a 53  -----..1234....S
3530: 45 4c 45 43 54 20 45 78 70 6f 72 74 47 65 6f 4a  ELECT ExportGeoJ
3540: 53 4f 4e 32 28 27 6d 79 74 61 62 6c 65 27 2c 20  SON2('mytable', 
3550: 27 67 65 6f 6d 27 2c 20 27 2f 68 6f 6d 65 2f 73  'geom', '/home/s
3560: 61 6e 64 72 6f 2f 6d 79 74 61 62 6c 65 2e 67 65  andro/mytable.ge
3570: 6f 6a 73 6f 6e 27 2c 20 31 32 2c 20 31 2c 20 30  ojson', 12, 1, 0
3580: 2c 20 31 2c 20 27 4c 4f 57 45 52 43 41 53 45 27  , 1, 'LOWERCASE'
3590: 29 3b 0d 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 0a 31  );..---------..1
35a0: 32 33 34 0d 0a 3c 2f 76 65 72 62 61 74 69 6d 3e  234..</verbatim>
35b0: 0d 0a 54 68 65 20 53 51 4c 20 66 75 6e 63 74 69  ..The SQL functi
35c0: 6f 6e 20 3c 62 3e 45 78 70 6f 72 74 47 65 6f 4a  on <b>ExportGeoJ
35d0: 53 4f 4e 32 28 29 3c 2f 62 3e 20 63 61 6e 20 64  SON2()</b> can d
35e0: 69 72 65 63 74 6c 79 20 65 78 70 6f 72 74 20 61  irectly export a
35f0: 20 77 68 6f 6c 65 20 53 70 61 74 69 61 6c 20 54   whole Spatial T
3600: 61 62 6c 65 20 28 61 6b 61 20 3c 69 3e 4c 61 79  able (aka <i>Lay
3610: 65 72 3c 2f 69 3e 29 20 69 6e 74 6f 20 61 6e 20  er</i>) into an 
3620: 65 78 74 65 72 6e 61 6c 20 47 65 6f 4a 53 4f 4e  external GeoJSON
3630: 20 66 69 6c 65 20 63 6f 6e 66 6f 72 6d 61 6e 74   file conformant
3640: 20 74 6f 20 52 46 43 20 37 39 34 36 2e 3c 62 72   to RFC 7946.<br
3650: 3e 0d 0a 54 68 69 73 20 66 75 6e 63 74 69 6f 6e  >..This function
3660: 20 61 63 63 65 70 74 73 20 74 68 65 20 66 6f 6c   accepts the fol
3670: 6c 6f 77 69 6e 67 20 61 72 67 75 6d 65 6e 74 73  lowing arguments
3680: 3a 0d 0a 3c 6f 6c 3e 0d 0a 3c 6c 69 3e 3c 62 3e  :..<ol>..<li><b>
3690: 74 61 62 6c 65 3c 2f 62 3e 3a 20 28 3c 69 3e 6d  table</b>: (<i>m
36a0: 61 6e 64 61 74 6f 72 79 3c 2f 69 3e 29 20 6e 61  andatory</i>) na
36b0: 6d 65 20 6f 66 20 74 68 65 20 53 70 61 74 69 61  me of the Spatia
36c0: 6c 20 54 61 62 6c 65 20 74 6f 20 62 65 20 65 78  l Table to be ex
36d0: 70 6f 72 74 65 64 2e 3c 2f 6c 69 3e 0d 0a 3c 6c  ported.</li>..<l
36e0: 69 3e 3c 62 3e 67 65 6f 6d 5f 63 6f 6c 75 6d 6e  i><b>geom_column
36f0: 3c 2f 62 3e 3a 20 28 3c 69 3e 6d 61 6e 64 61 74  </b>: (<i>mandat
3700: 6f 72 79 3c 2f 69 3e 29 20 6e 61 6d 65 20 6f 66  ory</i>) name of
3710: 20 74 68 65 20 43 6f 6c 75 6d 6e 20 63 6f 6e 74   the Column cont
3720: 61 69 6e 69 6e 67 20 74 68 65 20 47 65 6f 6d 65  aining the Geome
3730: 74 72 69 65 73 20 74 6f 20 62 65 20 65 78 70 6f  tries to be expo
3740: 72 74 65 64 2e 3c 62 72 3e 0d 0a 43 61 6e 20 62  rted.<br>..Can b
3750: 65 20 3c 62 3e 4e 55 4c 4c 3c 2f 62 3e 2c 20 61  e <b>NULL</b>, a
3760: 6e 64 20 69 6e 20 74 68 69 73 20 63 61 73 65 20  nd in this case 
3770: 74 68 65 20 66 75 6e 63 74 69 6f 6e 20 77 69 6c  the function wil
3780: 6c 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20  l automatically 
3790: 64 65 74 65 72 6d 69 6e 65 20 74 68 65 20 61 70  determine the ap
37a0: 70 72 6f 70 72 69 61 74 65 20 43 6f 6c 75 6d 6e  propriate Column
37b0: 2d 6e 61 6d 65 20 69 66 20 74 68 65 20 54 61 62  -name if the Tab
37c0: 6c 65 20 6a 75 73 74 20 63 6f 6e 74 61 69 6e 73  le just contains
37d0: 20 61 20 73 69 6e 67 6c 65 20 47 65 6f 6d 65 74   a single Geomet
37e0: 72 79 2c 20 6f 74 68 65 72 77 69 73 65 20 61 20  ry, otherwise a 
37f0: 66 61 69 6c 75 72 65 20 77 69 6c 6c 20 66 6f 6c  failure will fol
3800: 6c 6f 77 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c  low.</li>..<li><
3810: 62 3e 66 69 6c 65 6e 61 6d 65 3c 2f 62 3e 3a 20  b>filename</b>: 
3820: 28 3c 69 3e 6d 61 6e 64 61 74 6f 72 79 3c 2f 69  (<i>mandatory</i
3830: 3e 29 20 61 62 73 6f 6c 75 74 65 20 6f 72 20 72  >) absolute or r
3840: 65 6c 61 74 69 76 65 20 70 61 74 68 20 6f 66 20  elative path of 
3850: 74 68 65 20 47 65 6f 4a 73 6f 6e 20 66 69 6c 65  the GeoJson file
3860: 20 74 6f 20 62 65 20 63 72 65 61 74 65 64 20 28   to be created (
3870: 3c 69 3e 6f 75 74 70 75 74 20 66 69 6c 65 3c 2f  <i>output file</
3880: 69 3e 29 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c  i>).</li>..<li><
3890: 62 3e 70 72 65 63 69 73 69 6f 6e 3c 2f 62 3e 3a  b>precision</b>:
38a0: 20 28 3c 69 3e 6f 70 74 69 6f 6e 61 6c 3c 2f 69   (<i>optional</i
38b0: 3e 29 20 6e 75 6d 62 65 72 20 6f 66 20 64 65 63  >) number of dec
38c0: 69 6d 61 6c 20 64 69 67 69 74 73 20 74 6f 20 62  imal digits to b
38d0: 65 20 75 73 65 64 20 66 6f 72 20 63 6f 6f 72 64  e used for coord
38e0: 69 6e 61 74 65 20 76 61 6c 75 65 73 3b 20 74 68  inate values; th
38f0: 65 20 64 65 66 61 75 6c 74 20 73 65 74 74 69 6e  e default settin
3900: 67 20 69 73 20 3c 62 3e 38 3c 2f 62 3e 2e 3c 2f  g is <b>8</b>.</
3910: 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 6c 6f 6e 5f  li>..<li><b>lon_
3920: 6c 61 74 3c 2f 62 3e 3a 20 28 3c 69 3e 6f 70 74  lat</b>: (<i>opt
3930: 69 6f 6e 61 6c 3c 2f 69 3e 29 20 74 68 69 73 20  ional</i>) this 
3940: 69 73 20 61 20 62 6f 6f 6c 65 61 6e 20 66 6c 61  is a boolean fla
3950: 67 3a 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 69 66  g:..<ul>..<li>if
3960: 20 73 65 74 20 74 6f 20 3c 62 3e 46 41 4c 53 45   set to <b>FALSE
3970: 3c 2f 62 3e 20 61 6c 6c 20 63 6f 6f 72 64 69 6e  </b> all coordin
3980: 61 74 65 73 20 77 69 6c 6c 20 62 65 20 65 78 70  ates will be exp
3990: 6f 72 74 65 64 20 65 78 61 63 74 6c 79 20 61 73  orted exactly as
39a0: 20 74 68 65 79 20 61 72 65 2e 3c 2f 6c 69 3e 0d   they are.</li>.
39b0: 0a 3c 6c 69 3e 69 66 20 73 65 74 20 74 6f 20 3c  .<li>if set to <
39c0: 62 3e 54 52 55 45 3c 2f 62 3e 20 61 6c 6c 20 63  b>TRUE</b> all c
39d0: 6f 6f 72 64 69 6e 61 74 65 73 20 77 69 6c 6c 20  oordinates will 
39e0: 62 65 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79  be automatically
39f0: 20 74 72 61 6e 73 66 6f 72 6d 65 64 20 28 69 66   transformed (if
3a00: 20 72 65 71 75 69 72 65 64 29 20 69 6e 74 6f 20   required) into 
3a10: 3c 62 3e 53 52 49 44 3d 34 33 32 36 20 57 47 53  <b>SRID=4326 WGS
3a20: 20 38 34 3c 2f 62 3e 20 61 73 20 72 65 71 75 69   84</b> as requi
3a30: 72 65 64 20 62 79 20 52 46 43 20 37 39 34 36 2e  red by RFC 7946.
3a40: 3c 62 72 3e 0d 0a 54 68 69 73 20 69 73 20 74 68  <br>..This is th
3a50: 65 20 64 65 66 61 75 6c 74 20 73 65 74 74 69 6e  e default settin
3a60: 67 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 3c 2f  g.</li>..</ul></
3a70: 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 4d 5f 63 6f  li>..<li><b>M_co
3a80: 6f 72 64 73 3c 2f 62 3e 3a 20 28 3c 69 3e 6f 70  ords</b>: (<i>op
3a90: 74 69 6f 6e 61 6c 3c 2f 69 3e 29 20 74 68 69 73  tional</i>) this
3aa0: 20 74 6f 6f 20 69 73 20 61 20 62 6f 6f 6c 65 61   too is a boolea
3ab0: 6e 20 66 6c 61 67 3a 0d 0a 3c 75 6c 3e 0d 0a 3c  n flag:..<ul>..<
3ac0: 6c 69 3e 69 66 20 73 65 74 20 74 6f 20 3c 62 3e  li>if set to <b>
3ad0: 46 41 4c 53 45 3c 2f 62 3e 20 65 76 65 6e 74 75  FALSE</b> eventu
3ae0: 61 6c 20 3c 62 3e 4d 2d 76 61 6c 75 65 73 3c 2f  al <b>M-values</
3af0: 62 3e 20 77 69 6c 6c 20 62 65 20 73 69 6d 70 6c  b> will be simpl
3b00: 79 20 69 67 6e 6f 72 65 64 2c 20 61 73 20 72 65  y ignored, as re
3b10: 71 75 69 72 65 64 20 62 79 20 52 46 43 20 37 39  quired by RFC 79
3b20: 34 36 2e 3c 62 72 3e 0d 0a 54 68 69 73 20 69 73  46.<br>..This is
3b30: 20 74 68 65 20 64 65 66 61 75 6c 74 20 73 65 74   the default set
3b40: 74 69 6e 67 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e  ting.</li>..<li>
3b50: 69 66 20 73 65 74 20 74 6f 20 3c 62 3e 54 52 55  if set to <b>TRU
3b60: 45 3c 2f 62 3e 20 65 76 65 6e 74 75 61 6c 20 3c  E</b> eventual <
3b70: 62 3e 4d 2d 76 61 6c 75 65 73 3c 2f 62 3e 20 77  b>M-values</b> w
3b80: 69 6c 6c 20 62 65 20 65 78 70 6f 72 74 65 64 20  ill be exported 
3b90: 69 6e 74 6f 20 74 68 65 20 47 65 6f 4a 53 4f 4e  into the GeoJSON
3ba0: 20 66 69 6c 65 20 61 73 20 65 78 74 72 61 2d 63   file as extra-c
3bb0: 6f 6f 72 64 69 6e 61 74 65 73 2e 3c 62 72 3e 0d  oordinates.<br>.
3bc0: 0a 3c 75 3e 4e 6f 74 65 3c 2f 75 3e 3a 20 74 68  .<u>Note</u>: th
3bd0: 65 20 72 65 73 75 6c 74 69 6e 67 20 6f 75 74 70  e resulting outp
3be0: 75 74 20 66 69 6c 65 20 63 6f 75 6c 64 20 65 61  ut file could ea
3bf0: 73 69 6c 79 20 73 75 66 66 65 72 20 66 72 6f 6d  sily suffer from
3c00: 20 6c 69 6d 69 74 65 64 20 70 6f 72 74 61 62 69   limited portabi
3c10: 6c 69 74 79 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c  lity.</li>..</ul
3c20: 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 69  ></li>..<li><b>i
3c30: 6e 64 65 6e 74 65 64 3c 2f 62 3e 3a 20 28 3c 69  ndented</b>: (<i
3c40: 3e 6f 70 74 69 6f 6e 61 6c 3c 2f 69 3e 29 20 79  >optional</i>) y
3c50: 65 74 20 61 6e 6f 74 68 65 72 20 62 6f 6f 6c 65  et another boole
3c60: 61 6e 20 66 6c 61 67 3a 0d 0a 3c 75 6c 3e 0d 0a  an flag:..<ul>..
3c70: 3c 6c 69 3e 49 66 20 73 65 74 20 74 6f 20 3c 62  <li>If set to <b
3c80: 3e 54 52 55 45 3c 2f 62 3e 20 74 68 65 20 6f 75  >TRUE</b> the ou
3c90: 74 70 75 74 20 66 69 6c 65 20 77 69 6c 6c 20 62  tput file will b
3ca0: 65 20 70 72 6f 70 65 72 6c 79 20 69 6e 64 65 6e  e properly inden
3cb0: 74 65 64 20 66 6f 72 20 65 6e 68 61 6e 63 65 64  ted for enhanced
3cc0: 20 68 75 6d 61 6e 20 72 65 61 64 61 62 69 6c 69   human readabili
3cd0: 74 79 2e 3c 62 72 3e 0d 0a 54 68 69 73 20 69 73  ty.<br>..This is
3ce0: 20 74 68 65 20 64 65 66 61 75 6c 74 20 73 65 74   the default set
3cf0: 74 69 6e 67 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e  ting.</li>..<li>
3d00: 49 66 20 73 65 74 20 74 6f 20 3c 62 3e 46 41 4c  If set to <b>FAL
3d10: 53 45 3c 2f 62 3e 20 74 68 65 20 6f 75 74 70 75  SE</b> the outpu
3d20: 74 20 66 69 6c 65 20 77 69 6c 6c 20 62 65 20 61  t file will be a
3d30: 6c 6c 20 69 6e 20 61 20 73 69 6e 67 6c 65 20 6d  ll in a single m
3d40: 6f 6e 6f 6c 69 74 68 69 63 20 6c 69 6e 65 20 77  onolithic line w
3d50: 69 74 68 6f 75 74 20 62 6c 61 6e 6b 20 73 70 61  ithout blank spa
3d60: 63 65 73 20 6f 72 20 6e 65 77 6c 69 6e 65 73 20  ces or newlines 
3d70: 28 6e 6f 74 69 63 65 61 62 6c 79 20 73 6d 61 6c  (noticeably smal
3d80: 6c 65 72 29 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c  ler).</li>..</ul
3d90: 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 63  ></li>..<li><b>c
3da0: 6f 6c 6e 61 6d 65 5f 63 61 73 65 3c 2f 62 3e 3a  olname_case</b>:
3db0: 20 28 3c 69 3e 6f 70 74 69 6f 6e 61 6c 3c 2f 69   (<i>optional</i
3dc0: 3e 29 20 63 61 6e 20 61 73 73 75 6d 65 20 6f 6e  >) can assume on
3dd0: 65 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20  e the following 
3de0: 76 61 6c 75 65 73 3a 0d 0a 3c 75 6c 3e 0d 0a 3c  values:..<ul>..<
3df0: 6c 69 3e 3c 62 3e 27 55 50 50 45 52 27 3c 2f 62  li><b>'UPPER'</b
3e00: 3e 20 6f 72 20 3c 62 3e 27 55 50 50 45 52 43 41  > or <b>'UPPERCA
3e10: 53 45 27 3c 2f 62 3e 3a 20 61 6c 6c 20 61 74 74  SE'</b>: all att
3e20: 72 69 62 75 74 65 20 6e 61 6d 65 73 20 77 69 6c  ribute names wil
3e30: 6c 20 62 65 20 69 6e 73 65 72 74 65 64 20 69 6e  l be inserted in
3e40: 74 6f 20 74 68 65 20 6f 75 74 70 75 74 20 66 69  to the output fi
3e50: 6c 65 20 69 6e 20 66 75 6c 6c 20 75 70 70 65 72  le in full upper
3e60: 20 63 61 73 65 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69   case.</li>..<li
3e70: 3e 3c 62 3e 27 4c 4f 57 45 52 27 3c 2f 62 3e 20  ><b>'LOWER'</b> 
3e80: 6f 72 20 3c 62 3e 27 4c 4f 57 45 52 43 41 53 45  or <b>'LOWERCASE
3e90: 27 3c 2f 62 3e 3a 20 61 6c 6c 20 61 74 74 72 69  '</b>: all attri
3ea0: 62 75 74 65 20 6e 61 6d 65 73 20 77 69 6c 6c 20  bute names will 
3eb0: 62 65 20 69 6e 73 65 72 74 65 64 20 69 6e 74 6f  be inserted into
3ec0: 20 74 68 65 20 6f 75 74 70 75 74 20 66 69 6c 65   the output file
3ed0: 20 69 6e 20 66 75 6c 6c 20 6c 6f 77 65 72 20 63   in full lower c
3ee0: 61 73 65 2e 3c 62 72 3e 0d 0a 54 68 69 73 20 69  ase.<br>..This i
3ef0: 73 20 74 68 65 20 64 65 66 61 75 6c 74 20 73 65  s the default se
3f00: 74 74 69 6e 67 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69  tting.</li>..<li
3f10: 3e 3c 62 3e 27 53 41 4d 45 27 3c 2f 62 3e 20 6f  ><b>'SAME'</b> o
3f20: 72 20 3c 62 3e 27 53 41 4d 45 43 41 53 45 27 3c  r <b>'SAMECASE'<
3f30: 2f 62 3e 3a 20 61 6c 6c 20 61 74 74 72 69 62 75  /b>: all attribu
3f40: 74 65 20 6e 61 6d 65 73 20 77 69 6c 6c 20 62 65  te names will be
3f50: 20 69 6e 73 65 72 74 65 64 20 69 6e 74 6f 20 74   inserted into t
3f60: 68 65 20 6f 75 74 70 75 74 20 66 69 6c 65 20 70  he output file p
3f70: 72 65 73 65 72 76 69 6e 67 20 61 6c 6c 20 75 70  reserving all up
3f80: 70 65 72 2d 20 61 6e 64 20 6c 6f 77 65 72 2d 63  per- and lower-c
3f90: 61 73 65 20 6c 65 74 74 65 72 73 20 65 78 61 63  ase letters exac
3fa0: 74 6c 79 20 61 73 20 74 68 65 79 20 61 72 65 20  tly as they are 
3fb0: 64 65 66 69 6e 65 64 20 69 6e 20 74 68 65 20 63  defined in the c
3fc0: 6f 72 72 65 73 70 6f 6e 64 69 6e 67 20 63 6f 6c  orresponding col
3fd0: 75 6d 6e 20 6e 61 6d 65 73 2e 3c 2f 6c 69 3e 0d  umn names.</li>.
3fe0: 0a 3c 2f 75 6c 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69  .</ul></li>..<li
3ff0: 3e 74 68 65 20 3c 62 3e 72 65 74 75 72 6e 20 76  >the <b>return v
4000: 61 6c 75 65 3c 2f 62 3e 20 69 73 20 61 6e 20 3c  alue</b> is an <
4010: 62 3e 49 4e 54 45 47 45 52 3c 2f 62 3e 20 63 6f  b>INTEGER</b> co
4020: 72 72 65 73 70 6f 6e 64 69 6e 67 20 74 6f 20 74  rresponding to t
4030: 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 65 78 70  he number of exp
4040: 6f 72 74 65 64 20 72 6f 77 73 2c 20 6f 72 20 3c  orted rows, or <
4050: 62 3e 4e 55 4c 4c 3c 2f 62 3e 20 69 6e 20 74 68  b>NULL</b> in th
4060: 65 20 63 61 73 65 20 6f 66 20 66 61 69 6c 75 72  e case of failur
4070: 65 20 6f 72 20 69 6e 76 61 6c 69 64 20 61 72 67  e or invalid arg
4080: 75 6d 65 6e 74 73 2e 3c 2f 6c 69 3e 0d 0a 3c 2f  uments.</li>..</
4090: 6f 6c 3e 0d 0a 3c 74 61 62 6c 65 20 63 65 6c 6c  ol>..<table cell
40a0: 73 70 61 63 69 6e 67 3d 22 34 22 20 63 65 6c 6c  spacing="4" cell
40b0: 70 61 64 64 69 6e 67 3d 22 38 22 20 62 67 63 6f  padding="8" bgco
40c0: 6c 6f 72 3d 22 23 66 66 66 66 64 30 22 3e 3c 74  lor="#ffffd0"><t
40d0: 72 3e 3c 74 64 3e 0d 0a 3c 68 33 3e 43 61 76 65  r><td>..<h3>Cave
40e0: 61 74 3c 2f 68 33 3e 0d 0a 41 20 73 69 6d 69 6c  at</h3>..A simil
40f0: 61 72 20 66 75 6e 63 74 69 6f 6e 20 6e 61 6d 65  ar function name
4100: 64 20 3c 62 3e 45 78 70 6f 72 74 47 65 6f 4a 53  d <b>ExportGeoJS
4110: 4f 4e 28 29 3c 2f 62 3e 20 77 61 73 20 61 6c 72  ON()</b> was alr
4120: 65 61 64 79 20 73 75 70 70 6f 72 74 65 64 20 62  eady supported b
4130: 79 20 70 72 65 76 69 6f 75 73 20 76 65 72 73 69  y previous versi
4140: 6f 6e 73 20 6f 66 20 53 70 61 74 69 61 4c 69 74  ons of SpatiaLit
4150: 65 2c 20 62 75 74 20 69 74 20 77 61 73 20 6d 6f  e, but it was mo
4160: 64 65 6c 6c 65 64 20 61 67 61 69 6e 73 74 20 74  delled against t
4170: 68 65 20 6f 6c 64 20 28 3c 62 3e 70 72 65 2d 52  he old (<b>pre-R
4180: 46 43 3c 2f 62 3e 29 20 47 65 6f 4a 53 4f 4e 20  FC</b>) GeoJSON 
4190: 73 70 65 63 69 66 69 63 61 74 69 6f 6e 2e 3c 62  specification.<b
41a0: 72 3e 0d 0a 3c 62 3e 45 78 70 6f 72 74 47 65 6f  r>..<b>ExportGeo
41b0: 4a 53 4f 4e 28 29 3c 2f 62 3e 20 69 73 20 6e 6f  JSON()</b> is no
41c0: 77 20 3c 62 3e 44 45 50 52 45 43 41 54 45 44 3c  w <b>DEPRECATED<
41d0: 2f 62 3e 2c 20 61 6e 64 20 77 69 6c 6c 20 72 65  /b>, and will re
41e0: 6d 61 69 6e 20 74 6f 20 61 76 6f 69 64 20 62 72  main to avoid br
41f0: 65 61 6b 69 6e 67 20 65 78 69 73 74 69 6e 67 20  eaking existing 
4200: 61 70 70 6c 69 63 61 74 69 6f 6e 73 20 61 6e 64  applications and
4210: 20 73 63 72 69 70 74 73 2e 3c 62 72 3e 3c 62 72   scripts.<br><br
4220: 3e 0d 0a 49 74 20 69 73 20 73 74 72 6f 6e 67 6c  >..It is strongl
4230: 79 20 72 65 63 6f 6d 6d 65 6e 64 65 64 20 74 6f  y recommended to
4240: 20 75 73 65 20 3c 62 3e 45 78 70 6f 72 74 47 65   use <b>ExportGe
4250: 6f 4a 53 4f 4e 32 28 29 3c 2f 62 3e 20 66 6f 72  oJSON2()</b> for
4260: 20 61 6e 79 20 6e 65 77 20 64 65 76 65 6c 6f 70   any new develop
4270: 6d 65 6e 74 20 61 73 20 66 75 6c 6c 20 72 65 70  ment as full rep
4280: 6c 61 63 65 6d 65 6e 74 20 63 6f 6e 66 6f 72 6d  lacement conform
4290: 61 6e 74 20 74 6f 20 52 46 43 20 37 39 34 36 2e  ant to RFC 7946.
42a0: 0d 0a 3c 2f 74 64 3e 3c 2f 74 72 3e 3c 2f 74 61  ..</td></tr></ta
42b0: 62 6c 65 3e 0d 0a 3c 62 72 3e 0d 0a 3c 74 61 62  ble>..<br>..<tab
42c0: 6c 65 20 63 65 6c 6c 73 70 61 63 69 6e 67 3d 22  le cellspacing="
42d0: 34 22 20 63 65 6c 6c 70 61 64 64 69 6e 67 3d 22  4" cellpadding="
42e0: 38 22 20 62 67 63 6f 6c 6f 72 3d 22 23 66 66 63  8" bgcolor="#ffc
42f0: 30 61 30 22 3e 3c 74 72 3e 3c 74 64 3e 0d 0a 3c  0a0"><tr><td>..<
4300: 68 33 3e 57 61 72 6e 69 6e 67 3c 2f 68 33 3e 0d  h3>Warning</h3>.
4310: 0a 54 68 69 73 20 53 51 4c 20 66 75 6e 63 74 69  .This SQL functi
4320: 6f 6e 20 6f 70 65 6e 20 74 68 65 20 64 6f 6f 72  on open the door
4330: 20 74 6f 20 6d 61 6e 79 20 70 6f 74 65 6e 74 69   to many potenti
4340: 61 6c 20 73 65 63 75 72 69 74 79 20 69 73 73 75  al security issu
4350: 65 73 2c 20 61 6e 64 20 74 68 75 73 20 3c 62 3e  es, and thus <b>
4360: 3c 69 3e 69 73 20 61 6c 77 61 79 73 20 64 69 73  <i>is always dis
4370: 61 62 6c 65 64 20 62 79 20 64 65 66 61 75 6c 74  abled by default
4380: 3c 2f 69 3e 3c 2f 62 3e 2e 3c 62 72 3e 0d 0a 45  </i></b>.<br>..E
4390: 78 70 6c 69 63 69 74 6c 79 20 73 65 74 74 69 6e  xplicitly settin
43a0: 67 20 74 68 65 20 65 78 74 65 72 6e 61 6c 20 76  g the external v
43b0: 61 72 69 61 62 6c 65 20 3c 62 3e 53 50 41 54 49  ariable <b>SPATI
43c0: 41 4c 49 54 45 5f 53 45 43 55 52 49 54 59 3d 72  ALITE_SECURITY=r
43d0: 65 6c 61 78 65 64 3c 2f 62 3e 20 69 73 20 61 62  elaxed</b> is ab
43e0: 73 6f 6c 75 74 65 6c 79 20 72 65 71 75 69 72 65  solutely require
43f0: 64 20 69 6e 20 6f 72 64 65 72 20 74 6f 20 65 6e  d in order to en
4400: 61 62 6c 65 20 74 68 69 73 20 66 75 6e 63 74 69  able this functi
4410: 6f 6e 2e 0d 0a 3c 2f 74 64 3e 3c 2f 74 72 3e 3c  on...</td></tr><
4420: 2f 74 61 62 6c 65 3e 0d 0a 3c 62 72 3e 0d 0a 3c  /table>..<br>..<
4430: 68 72 3e 0d 0a 3c 68 33 3e 49 6d 70 6f 72 74 69  hr>..<h3>Importi
4440: 6e 67 20 64 61 74 61 20 66 72 6f 6d 20 47 65 6f  ng data from Geo
4450: 4a 53 4f 4e 3c 2f 68 33 3e 0d 0a 3c 76 65 72 62  JSON</h3>..<verb
4460: 61 74 69 6d 3e 0d 0a 53 45 4c 45 43 54 20 49 6d  atim>..SELECT Im
4470: 70 6f 72 74 47 65 6f 4a 53 4f 4e 28 27 2f 68 6f  portGeoJSON('/ho
4480: 6d 65 2f 73 61 6e 64 72 6f 2f 73 6f 6d 65 6c 61  me/sandro/somela
4490: 79 65 72 2e 67 65 6f 6a 73 6f 6e 27 2c 20 27 73  yer.geojson', 's
44a0: 6f 6d 65 6c 61 79 65 72 27 29 3b 0d 0a 2d 2d 2d  omelayer');..---
44b0: 2d 2d 2d 2d 2d 2d 2d 2d 0d 0a 39 39 0d 0a 0d 0a  --------..99....
44c0: 53 45 4c 45 43 54 20 49 6d 70 6f 72 74 47 65 6f  SELECT ImportGeo
44d0: 4a 53 4f 4e 28 27 2f 68 6f 6d 65 2f 73 61 6e 64  JSON('/home/sand
44e0: 72 6f 2f 73 6f 6d 65 6c 61 79 65 72 2e 67 65 6f  ro/somelayer.geo
44f0: 6a 73 6f 6e 27 2c 20 27 73 6f 6d 65 6c 61 79 65  json', 'somelaye
4500: 72 27 2c 20 27 67 65 6f 6d 27 29 3b 0d 0a 2d 2d  r', 'geom');..--
4510: 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 0a 39 39 0d 0a 0d  ---------..99...
4520: 0a 53 45 4c 45 43 54 20 49 6d 70 6f 72 74 47 65  .SELECT ImportGe
4530: 6f 4a 53 4f 4e 28 27 2f 68 6f 6d 65 2f 73 61 6e  oJSON('/home/san
4540: 64 72 6f 2f 73 6f 6d 65 6c 61 79 65 72 2e 67 65  dro/somelayer.ge
4550: 6f 6a 73 6f 6e 27 2c 20 27 73 6f 6d 65 6c 61 79  ojson', 'somelay
4560: 65 72 27 2c 20 27 67 65 6f 6d 27 2c 20 31 29 3b  er', 'geom', 1);
4570: 0d 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 0a 39  ..-----------..9
4580: 39 0d 0a 0d 0a 53 45 4c 45 43 54 20 49 6d 70 6f  9....SELECT Impo
4590: 72 74 47 65 6f 4a 53 4f 4e 28 27 2f 68 6f 6d 65  rtGeoJSON('/home
45a0: 2f 73 61 6e 64 72 6f 2f 73 6f 6d 65 6c 61 79 65  /sandro/somelaye
45b0: 72 2e 67 65 6f 6a 73 6f 6e 27 2c 20 27 73 6f 6d  r.geojson', 'som
45c0: 65 6c 61 79 65 72 27 2c 20 27 67 65 6f 6d 27 2c  elayer', 'geom',
45d0: 20 31 2c 20 33 30 30 33 29 3b 0d 0a 2d 2d 2d 2d   1, 3003);..----
45e0: 2d 2d 2d 2d 2d 2d 2d 0d 0a 39 39 0d 0a 0d 0a 53  -------..99....S
45f0: 45 4c 45 43 54 20 49 6d 70 6f 72 74 47 65 6f 4a  ELECT ImportGeoJ
4600: 53 4f 4e 28 27 2f 68 6f 6d 65 2f 73 61 6e 64 72  SON('/home/sandr
4610: 6f 2f 73 6f 6d 65 6c 61 79 65 72 2e 67 65 6f 6a  o/somelayer.geoj
4620: 73 6f 6e 27 2c 20 27 73 6f 6d 65 6c 61 79 65 72  son', 'somelayer
4630: 27 2c 20 27 67 65 6f 6d 27 2c 20 31 2c 20 33 30  ', 'geom', 1, 30
4640: 30 33 2c 20 27 4c 4f 57 45 52 43 41 53 45 27 29  03, 'LOWERCASE')
4650: 3b 0d 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 0a  ;..-----------..
4660: 39 39 0d 0a 3c 2f 76 65 72 62 61 74 69 6d 3e 0d  99..</verbatim>.
4670: 0a 54 68 65 20 53 51 4c 20 66 75 6e 63 74 69 6f  .The SQL functio
4680: 6e 20 3c 62 3e 49 6d 70 6f 72 74 47 65 6f 4a 53  n <b>ImportGeoJS
4690: 4f 4e 28 29 3c 2f 62 3e 20 63 61 6e 20 64 69 72  ON()</b> can dir
46a0: 65 63 74 6c 79 20 63 72 65 61 74 65 20 61 20 6e  ectly create a n
46b0: 65 77 20 53 70 61 74 69 61 6c 20 54 61 62 6c 65  ew Spatial Table
46c0: 20 62 79 20 69 6d 70 6f 72 74 69 6e 67 20 64 61   by importing da
46d0: 74 61 20 66 72 6f 6d 20 61 6e 20 65 78 74 65 6e  ta from an exten
46e0: 61 6c 20 47 65 6f 4a 53 4f 4e 20 66 69 6c 65 20  al GeoJSON file 
46f0: 63 6f 6e 66 6f 72 6d 61 6e 74 20 74 6f 20 52 46  conformant to RF
4700: 43 20 37 39 34 36 2e 3c 62 72 3e 0d 0a 54 68 69  C 7946.<br>..Thi
4710: 73 20 66 75 6e 63 74 69 6f 6e 20 61 63 63 65 70  s function accep
4720: 74 73 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67  ts the following
4730: 20 61 72 67 75 6d 65 6e 74 73 3a 0d 0a 3c 6f 6c   arguments:..<ol
4740: 3e 0d 0a 3c 6c 69 3e 3c 62 3e 66 69 6c 65 6e 61  >..<li><b>filena
4750: 6d 65 3c 2f 62 3e 3a 20 28 3c 69 3e 6d 61 6e 64  me</b>: (<i>mand
4760: 61 74 6f 72 79 3c 2f 69 3e 29 20 61 62 73 6f 6c  atory</i>) absol
4770: 75 74 65 20 6f 72 20 72 65 6c 61 74 69 76 65 20  ute or relative 
4780: 70 61 74 68 20 6f 66 20 74 68 65 20 47 65 6f 4a  path of the GeoJ
4790: 73 6f 6e 20 66 69 6c 65 20 74 6f 20 62 65 20 69  son file to be i
47a0: 6d 70 6f 72 74 65 64 20 28 3c 69 3e 69 6e 70 75  mported (<i>inpu
47b0: 74 20 66 69 6c 65 3c 2f 69 3e 29 2e 3c 2f 6c 69  t file</i>).</li
47c0: 3e 0d 0a 3c 6c 69 3e 3c 62 3e 74 61 62 6c 65 3c  >..<li><b>table<
47d0: 2f 62 3e 3a 20 28 3c 69 3e 6d 61 6e 64 61 74 6f  /b>: (<i>mandato
47e0: 72 79 3c 2f 69 3e 29 20 6e 61 6d 65 20 6f 66 20  ry</i>) name of 
47f0: 74 68 65 20 53 70 61 74 69 61 6c 20 54 61 62 6c  the Spatial Tabl
4800: 65 20 74 6f 20 62 65 20 63 72 65 61 74 65 64 2e  e to be created.
4810: 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 67 65  </li>..<li><b>ge
4820: 6f 6d 5f 63 6f 6c 75 6d 6e 3c 2f 62 3e 3a 20 28  om_column</b>: (
4830: 3c 69 3e 6f 70 74 69 6f 6e 61 6c 3c 2f 69 3e 29  <i>optional</i>)
4840: 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 47 65 6f   name of the Geo
4850: 6d 65 74 72 79 20 43 6f 6c 75 6d 6e 20 74 6f 20  metry Column to 
4860: 62 65 20 63 72 65 61 74 65 64 2e 3c 62 72 3e 0d  be created.<br>.
4870: 0a 49 66 20 6e 6f 74 20 65 78 70 6c 69 63 69 74  .If not explicit
4880: 6c 79 20 73 70 65 63 69 66 69 65 64 20 6f 72 20  ly specified or 
4890: 3c 62 3e 4e 55 4c 4c 3c 2f 62 3e 20 61 20 63 6f  <b>NULL</b> a co
48a0: 6c 75 6d 6e 20 6e 61 6d 65 64 20 3c 62 3e 27 67  lumn named <b>'g
48b0: 65 6f 6d 65 74 72 79 27 3c 2f 62 3e 20 77 69 6c  eometry'</b> wil
48c0: 6c 20 62 65 20 63 72 65 61 74 65 64 20 62 79 20  l be created by 
48d0: 64 65 66 61 75 6c 74 2e 3c 2f 6c 69 3e 0d 0a 3c  default.</li>..<
48e0: 6c 69 3e 3c 62 3e 73 70 61 74 69 61 6c 5f 69 6e  li><b>spatial_in
48f0: 64 65 78 3c 2f 62 3e 3a 20 28 3c 69 3e 6f 70 74  dex</b>: (<i>opt
4900: 69 6f 6e 61 6c 3c 2f 69 3e 29 20 74 68 69 73 20  ional</i>) this 
4910: 69 73 20 61 20 62 6f 6f 6c 65 61 6e 20 66 6c 61  is a boolean fla
4920: 67 3a 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 69 66  g:..<ul>..<li>if
4930: 20 73 65 74 20 74 6f 20 3c 62 3e 54 52 55 45 3c   set to <b>TRUE<
4940: 2f 62 3e 20 61 20 3c 62 3e 53 70 61 74 69 61 6c  /b> a <b>Spatial
4950: 49 6e 64 65 78 3c 2f 62 3e 20 73 75 70 70 6f 72  Index</b> suppor
4960: 74 69 6e 67 20 74 68 65 20 47 65 6f 6d 65 74 72  ting the Geometr
4970: 79 20 43 6f 6c 75 6d 6e 20 77 69 6c 6c 20 62 65  y Column will be
4980: 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 63   automatically c
4990: 72 65 61 74 65 64 2e 3c 2f 6c 69 3e 0d 0a 3c 6c  reated.</li>..<l
49a0: 69 3e 69 66 20 73 65 74 20 74 6f 20 3c 62 3e 46  i>if set to <b>F
49b0: 41 4c 53 45 3c 2f 62 3e 20 6e 6f 20 53 70 61 74  ALSE</b> no Spat
49c0: 69 61 6c 49 6e 64 65 78 20 77 69 6c 6c 20 62 65  ialIndex will be
49d0: 20 63 72 65 61 74 65 64 2e 3c 62 72 3e 0d 0a 54   created.<br>..T
49e0: 68 69 73 20 69 73 20 74 68 65 20 64 65 66 61 75  his is the defau
49f0: 6c 74 20 73 65 74 74 69 6e 67 2e 3c 2f 6c 69 3e  lt setting.</li>
4a00: 0d 0a 3c 2f 75 6c 3e 3c 2f 6c 69 3e 0d 0a 3c 6c  ..</ul></li>..<l
4a10: 69 3e 3c 62 3e 73 72 69 64 3c 2f 62 3e 3a 20 28  i><b>srid</b>: (
4a20: 3c 69 3e 6f 70 74 69 6f 6e 61 6c 3c 2f 69 3e 29  <i>optional</i>)
4a30: 3a 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 57 68 65  :..<ul>..<li>Whe
4a40: 6e 20 69 74 27 73 20 61 20 3c 62 3e 70 6f 73 69  n it's a <b>posi
4a50: 74 69 76 65 20 69 6e 74 65 67 65 72 3c 2f 62 3e  tive integer</b>
4a60: 20 69 74 20 63 6f 72 72 65 73 70 6f 6e 64 73 20   it corresponds 
4a70: 74 6f 20 74 68 65 20 53 52 49 44 20 76 61 6c 75  to the SRID valu
4a80: 65 20 74 6f 20 62 65 20 61 73 73 69 67 6e 65 64  e to be assigned
4a90: 20 74 6f 20 61 6c 6c 20 69 6d 70 6f 72 74 65 64   to all imported
4aa0: 20 47 65 6f 6d 65 74 72 69 65 73 2e 3c 2f 6c 69   Geometries.</li
4ab0: 3e 0d 0a 3c 6c 69 3e 49 66 20 3c 62 3e 30 3c 2f  >..<li>If <b>0</
4ac0: 62 3e 20 6f 72 20 3c 62 3e 6e 65 67 61 74 69 76  b> or <b>negativ
4ad0: 65 3c 2f 62 3e 20 61 6c 6c 20 69 6d 70 6f 72 74  e</b> all import
4ae0: 65 64 20 47 65 6f 6d 65 74 72 69 65 73 20 77 69  ed Geometries wi
4af0: 6c 6c 20 62 65 20 61 73 73 75 6d 65 64 20 74 6f  ll be assumed to
4b00: 20 62 65 20 69 6e 20 3c 62 3e 53 52 49 44 3d 34   be in <b>SRID=4
4b10: 33 32 36 20 57 47 53 20 38 34 3c 2f 62 3e 20 28  326 WGS 84</b> (
4b20: 3c 69 3e 67 65 6f 67 72 61 70 68 69 63 20 63 6f  <i>geographic co
4b30: 6f 72 64 69 6e 61 74 65 73 20 65 78 70 72 65 73  ordinates expres
4b40: 73 65 64 20 61 73 20 3c 62 3e 4c 6f 6e 67 69 74  sed as <b>Longit
4b50: 75 64 65 73 3c 2f 62 3e 20 61 6e 64 20 3c 62 3e  udes</b> and <b>
4b60: 4c 61 74 69 74 75 64 65 73 3c 2f 62 3e 3c 2f 69  Latitudes</b></i
4b70: 3e 29 20 61 73 20 72 65 71 75 69 72 65 64 20 62  >) as required b
4b80: 79 20 52 46 43 20 37 39 34 36 2e 3c 62 72 3e 0d  y RFC 7946.<br>.
4b90: 0a 54 68 69 73 20 69 73 20 74 68 65 20 64 65 66  .This is the def
4ba0: 61 75 6c 74 20 73 65 74 74 69 6e 67 2e 3c 2f 6c  ault setting.</l
4bb0: 69 3e 0d 0a 3c 2f 75 6c 3e 3c 2f 6c 69 3e 0d 0a  i>..</ul></li>..
4bc0: 3c 6c 69 3e 3c 62 3e 63 6f 6c 6e 61 6d 65 5f 63  <li><b>colname_c
4bd0: 61 73 65 3c 2f 62 3e 3a 20 28 3c 69 3e 6f 70 74  ase</b>: (<i>opt
4be0: 69 6f 6e 61 6c 3c 2f 69 3e 29 20 63 61 6e 20 61  ional</i>) can a
4bf0: 73 73 75 6d 65 20 6f 6e 65 20 74 68 65 20 66 6f  ssume one the fo
4c00: 6c 6c 6f 77 69 6e 67 20 76 61 6c 75 65 73 3a 0d  llowing values:.
4c10: 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 3c 62 3e 27 55  .<ul>..<li><b>'U
4c20: 50 50 45 52 27 3c 2f 62 3e 20 6f 72 20 3c 62 3e  PPER'</b> or <b>
4c30: 27 55 50 50 45 52 43 41 53 45 27 3c 2f 62 3e 3a  'UPPERCASE'</b>:
4c40: 20 61 6c 6c 20 63 6f 6c 75 6d 6e 73 20 77 69 6c   all columns wil
4c50: 6c 20 62 65 20 63 72 65 61 74 65 64 20 69 6e 74  l be created int
4c60: 6f 20 74 68 65 20 74 61 62 6c 65 20 69 6e 20 66  o the table in f
4c70: 75 6c 6c 20 75 70 70 65 72 20 63 61 73 65 2e 3c  ull upper case.<
4c80: 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 27 4c 4f  /li>..<li><b>'LO
4c90: 57 45 52 27 3c 2f 62 3e 20 6f 72 20 3c 62 3e 27  WER'</b> or <b>'
4ca0: 4c 4f 57 45 52 43 41 53 45 27 3c 2f 62 3e 3a 20  LOWERCASE'</b>: 
4cb0: 61 6c 6c 20 63 6f 6c 75 6d 6e 73 20 77 69 6c 6c  all columns will
4cc0: 20 62 65 20 63 72 65 61 74 65 64 20 69 6e 74 6f   be created into
4cd0: 20 74 68 65 20 74 61 62 6c 65 20 69 6e 20 66 75   the table in fu
4ce0: 6c 6c 20 6c 6f 77 65 72 20 63 61 73 65 2e 3c 62  ll lower case.<b
4cf0: 72 3e 0d 0a 54 68 69 73 20 69 73 20 74 68 65 20  r>..This is the 
4d00: 64 65 66 61 75 6c 74 20 73 65 74 74 69 6e 67 2e  default setting.
4d10: 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 27 53  </li>..<li><b>'S
4d20: 41 4d 45 27 3c 2f 62 3e 20 6f 72 20 3c 62 3e 27  AME'</b> or <b>'
4d30: 53 41 4d 45 43 41 53 45 27 3c 2f 62 3e 3a 20 61  SAMECASE'</b>: a
4d40: 6c 6c 20 63 6f 6c 75 6d 6e 73 20 77 69 6c 6c 20  ll columns will 
4d50: 62 65 20 63 72 65 61 74 65 64 20 69 6e 74 6f 20  be created into 
4d60: 74 68 65 20 74 61 62 6c 65 20 70 72 65 73 65 72  the table preser
4d70: 76 69 6e 67 20 61 6c 6c 20 75 70 70 65 72 2d 20  ving all upper- 
4d80: 61 6e 64 20 6c 6f 77 65 72 2d 63 61 73 65 20 6c  and lower-case l
4d90: 65 74 74 65 72 73 20 65 78 61 63 74 6c 79 20 61  etters exactly a
4da0: 73 20 74 68 65 79 20 61 72 65 20 64 65 66 69 6e  s they are defin
4db0: 65 64 20 69 6e 20 74 68 65 20 63 6f 72 72 65 73  ed in the corres
4dc0: 70 6f 6e 64 69 6e 67 20 47 65 6f 4a 53 4f 4e 20  ponding GeoJSON 
4dd0: 61 74 74 72 69 62 75 74 65 20 6e 61 6d 65 73 2e  attribute names.
4de0: 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 3c 2f 6c 69  </li>..</ul></li
4df0: 3e 0d 0a 3c 6c 69 3e 74 68 65 20 3c 62 3e 72 65  >..<li>the <b>re
4e00: 74 75 72 6e 20 76 61 6c 75 65 3c 2f 62 3e 20 69  turn value</b> i
4e10: 73 20 61 6e 20 3c 62 3e 49 4e 54 45 47 45 52 3c  s an <b>INTEGER<
4e20: 2f 62 3e 20 63 6f 72 72 65 73 70 6f 6e 64 69 6e  /b> correspondin
4e30: 67 20 74 6f 20 74 68 65 20 6e 75 6d 62 65 72 20  g to the number 
4e40: 6f 66 20 65 78 70 6f 72 74 65 64 20 72 6f 77 73  of exported rows
4e50: 2c 20 6f 72 20 3c 62 3e 4e 55 4c 4c 3c 2f 62 3e  , or <b>NULL</b>
4e60: 20 69 6e 20 74 68 65 20 63 61 73 65 20 6f 66 20   in the case of 
4e70: 66 61 69 6c 75 72 65 20 6f 72 20 69 6e 76 61 6c  failure or inval
4e80: 69 64 20 61 72 67 75 6d 65 6e 74 73 2e 3c 2f 6c  id arguments.</l
4e90: 69 3e 0d 0a 3c 2f 6f 6c 3e 0d 0a 3c 74 61 62 6c  i>..</ol>..<tabl
4ea0: 65 20 63 65 6c 6c 73 70 61 63 69 6e 67 3d 22 34  e cellspacing="4
4eb0: 22 20 63 65 6c 6c 70 61 64 64 69 6e 67 3d 22 38  " cellpadding="8
4ec0: 22 20 62 67 63 6f 6c 6f 72 3d 22 23 66 66 63 30  " bgcolor="#ffc0
4ed0: 61 30 22 3e 3c 74 72 3e 3c 74 64 3e 0d 0a 3c 68  a0"><tr><td>..<h
4ee0: 33 3e 57 61 72 6e 69 6e 67 3c 2f 68 33 3e 0d 0a  3>Warning</h3>..
4ef0: 54 68 69 73 20 53 51 4c 20 66 75 6e 63 74 69 6f  This SQL functio
4f00: 6e 20 6f 70 65 6e 20 74 68 65 20 64 6f 6f 72 20  n open the door 
4f10: 74 6f 20 6d 61 6e 79 20 70 6f 74 65 6e 74 69 61  to many potentia
4f20: 6c 20 73 65 63 75 72 69 74 79 20 69 73 73 75 65  l security issue
4f30: 73 2c 20 61 6e 64 20 74 68 75 73 20 3c 62 3e 3c  s, and thus <b><
4f40: 69 3e 69 73 20 61 6c 77 61 79 73 20 64 69 73 61  i>is always disa
4f50: 62 6c 65 64 20 62 79 20 64 65 66 61 75 6c 74 3c  bled by default<
4f60: 2f 69 3e 3c 2f 62 3e 2e 3c 62 72 3e 0d 0a 45 78  /i></b>.<br>..Ex
4f70: 70 6c 69 63 69 74 6c 79 20 73 65 74 74 69 6e 67  plicitly setting
4f80: 20 74 68 65 20 65 78 74 65 72 6e 61 6c 20 76 61   the external va
4f90: 72 69 61 62 6c 65 20 3c 62 3e 53 50 41 54 49 41  riable <b>SPATIA
4fa0: 4c 49 54 45 5f 53 45 43 55 52 49 54 59 3d 72 65  LITE_SECURITY=re
4fb0: 6c 61 78 65 64 3c 2f 62 3e 20 69 73 20 61 62 73  laxed</b> is abs
4fc0: 6f 6c 75 74 65 6c 79 20 72 65 71 75 69 72 65 64  olutely required
4fd0: 20 69 6e 20 6f 72 64 65 72 20 74 6f 20 65 6e 61   in order to ena
4fe0: 62 6c 65 20 74 68 69 73 20 66 75 6e 63 74 69 6f  ble this functio
4ff0: 6e 2e 0d 0a 3c 2f 74 64 3e 3c 2f 74 72 3e 3c 2f  n...</td></tr></
5000: 74 61 62 6c 65 3e 0d 0a 3c 62 72 3e 0d 0a 3c 68  table>..<br>..<h
5010: 72 3e 0d 0a 3c 68 33 3e 56 69 72 74 75 61 6c 47  r>..<h3>VirtualG
5020: 65 6f 4a 53 4f 4e 3c 2f 68 33 3e 0d 0a 3c 76 65  eoJSON</h3>..<ve
5030: 72 62 61 74 69 6d 3e 0d 0a 43 52 45 41 54 45 20  rbatim>..CREATE 
5040: 56 49 52 54 55 41 4c 20 54 41 42 4c 45 20 73 6f  VIRTUAL TABLE so
5050: 6d 65 5f 6e 61 6d 65 20 55 53 49 4e 47 20 56 69  me_name USING Vi
5060: 72 74 75 61 6c 47 65 6f 4a 53 4f 4e 28 20 70 61  rtualGeoJSON( pa
5070: 74 68 2c 20 5b 20 73 72 69 64 20 2c 20 5b 20 63  th, [ srid , [ c
5080: 6f 6c 6e 61 6d 65 5f 63 61 73 65 20 5d 5d 20 29  olname_case ]] )
5090: 3b 0d 0a 3c 2f 76 65 72 62 61 74 69 6d 3e 0d 0a  ;..</verbatim>..
50a0: 41 20 3c 62 3e 56 69 72 74 75 61 6c 47 65 6f 4a  A <b>VirtualGeoJ
50b0: 53 4f 4e 3c 2f 62 3e 20 74 61 62 6c 65 20 69 73  SON</b> table is
50c0: 20 73 74 72 69 63 74 6c 79 20 73 69 6d 69 6c 61   strictly simila
50d0: 72 20 74 6f 20 61 20 3c 62 3e 56 69 72 74 75 61  r to a <b>Virtua
50e0: 6c 53 68 61 70 65 3c 2f 62 3e 20 74 61 62 6c 65  lShape</b> table
50f0: 2c 20 74 68 65 20 6f 6e 6c 79 20 64 69 66 66 65  , the only diffe
5100: 72 65 6e 63 65 20 62 65 74 77 65 65 6e 20 74 68  rence between th
5110: 65 6d 20 62 65 69 6e 67 20 74 68 65 20 66 69 6c  em being the fil
5120: 65 20 66 6f 72 6d 61 74 20 6f 66 20 74 68 65 20  e format of the 
5130: 75 6e 64 65 72 6c 61 79 69 6e 67 20 64 61 74 61  underlaying data
5140: 73 6f 75 72 63 65 2e 3c 62 72 3e 0d 0a 45 78 63  source.<br>..Exc
5150: 65 70 74 20 66 6f 72 20 74 68 69 73 20 73 6d 61  ept for this sma
5160: 6c 6c 20 62 75 74 20 66 75 6e 64 61 6d 65 6e 74  ll but fundament
5170: 61 6c 20 64 65 74 61 69 6c 20 62 6f 74 68 20 74  al detail both t
5180: 68 65 6d 20 62 65 68 61 76 65 20 69 6e 20 65 78  hem behave in ex
5190: 61 63 74 6c 79 20 74 68 65 20 73 61 6d 65 20 77  actly the same w
51a0: 61 79 2e 0d 0a 3c 62 72 3e 0d 0a 3c 75 6c 3e 0d  ay...<br>..<ul>.
51b0: 0a 3c 6c 69 3e 4a 75 73 74 20 61 20 73 69 6e 67  .<li>Just a sing
51c0: 6c 65 20 6d 61 6e 64 61 74 6f 72 79 20 61 72 67  le mandatory arg
51d0: 75 6d 65 6e 74 20 69 73 20 72 65 71 75 69 72 65  ument is require
51e0: 64 20 66 6f 72 20 63 72 65 61 74 69 6e 67 20 61  d for creating a
51f0: 20 56 69 72 74 75 61 6c 47 65 6f 4a 53 4f 4e 20   VirtualGeoJSON 
5200: 74 61 62 6c 65 3b 20 79 6f 75 20 61 72 65 20 72  table; you are r
5210: 65 71 75 69 72 65 64 20 74 6f 20 73 70 65 63 69  equired to speci
5220: 66 79 20 74 68 65 20 3c 62 3e 61 62 73 6f 6c 75  fy the <b>absolu
5230: 74 65 3c 2f 62 3e 20 6f 72 20 3c 62 3e 72 65 6c  te</b> or <b>rel
5240: 61 74 69 76 65 20 70 61 74 68 3c 2f 62 3e 20 6c  ative path</b> l
5250: 65 61 64 69 6e 67 20 74 6f 20 74 68 65 20 65 78  eading to the ex
5260: 74 65 72 6e 61 6c 20 47 65 6f 4a 53 4f 4e 20 66  ternal GeoJSON f
5270: 69 6c 65 20 6f 6e 20 74 68 65 20 66 69 6c 65 73  ile on the files
5280: 79 73 74 65 6d 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69  ystem.</li>..<li
5290: 3e 59 6f 75 20 63 61 6e 20 65 78 70 6c 69 63 69  >You can explici
52a0: 74 6c 79 20 73 70 65 63 69 66 79 20 74 68 65 20  tly specify the 
52b0: 6f 70 74 69 6f 6e 61 6c 20 61 72 67 75 6d 65 6e  optional argumen
52c0: 74 20 3c 62 3e 73 72 69 64 3c 2f 62 3e 20 66 6f  t <b>srid</b> fo
52d0: 72 20 6f 75 74 2d 6f 66 2d 74 68 65 2d 73 70 65  r out-of-the-spe
52e0: 63 20 47 65 6f 4a 53 4f 4e 20 66 69 6c 65 73 20  c GeoJSON files 
52f0: 62 61 73 65 64 20 6f 6e 20 73 6f 6d 65 20 61 72  based on some ar
5300: 62 69 74 72 61 72 79 20 43 6f 6f 72 64 69 6e 61  bitrary Coordina
5310: 74 65 20 52 65 66 65 72 65 6e 63 65 20 53 79 73  te Reference Sys
5320: 74 65 6d 2e 3c 62 72 3e 0d 0a 42 79 20 64 65 66  tem.<br>..By def
5330: 61 75 6c 74 20 56 69 72 74 75 61 6c 47 65 6f 4a  ault VirtualGeoJ
5340: 53 4f 4e 20 77 69 6c 6c 20 61 6c 77 61 79 73 20  SON will always 
5350: 61 73 73 75 6d 65 20 74 68 61 74 20 61 6c 6c 20  assume that all 
5360: 47 65 6f 6d 65 74 72 69 65 73 20 73 68 6f 75 6c  Geometries shoul
5370: 64 20 62 65 20 61 73 73 69 67 6e 65 64 20 74 6f  d be assigned to
5380: 20 3c 62 3e 53 52 49 44 3d 34 33 32 36 20 57 47   <b>SRID=4326 WG
5390: 53 20 38 34 3c 2f 62 3e 20 28 3c 69 3e 6c 6f 6e  S 84</b> (<i>lon
53a0: 67 69 74 75 64 65 73 20 61 6e 64 20 6c 61 74 69  gitudes and lati
53b0: 74 75 64 65 73 3c 2f 69 3e 29 2c 20 61 63 63 6f  tudes</i>), acco
53c0: 72 64 69 6e 67 6c 79 20 74 6f 20 52 46 43 20 37  rdingly to RFC 7
53d0: 39 34 36 20 73 70 65 63 69 66 69 63 61 74 69 6f  946 specificatio
53e0: 6e 73 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 41 20  ns.</li>..<li>A 
53f0: 66 75 72 74 68 65 72 20 6f 70 74 69 6f 6e 61 6c  further optional
5400: 20 61 72 67 75 6d 65 6e 74 20 3c 62 3e 63 6f 6c   argument <b>col
5410: 6e 61 6d 65 5f 63 61 73 65 3c 2f 62 3e 20 69 73  name_case</b> is
5420: 20 73 75 70 70 6f 72 74 65 64 2c 20 61 6e 64 20   supported, and 
5430: 69 74 20 68 61 73 20 65 78 61 63 74 6c 79 20 74  it has exactly t
5440: 68 65 20 73 61 6d 65 20 69 6e 74 65 72 70 72 65  he same interpre
5450: 74 61 74 69 6f 6e 73 20 61 73 20 69 6e 20 3c 62  tations as in <b
5460: 3e 49 6d 70 6f 72 74 47 65 6f 4a 53 4f 4e 28 29  >ImportGeoJSON()
5470: 3c 2f 62 3e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e  </b></li>..</ul>
5480: 0d 0a 3c 62 72 3e 0d 0a 3c 68 72 3e 0d 0a 3c 68  ..<br>..<hr>..<h
5490: 33 3e 47 65 6f 4a 53 4f 4e 20 73 75 70 70 6f 72  3>GeoJSON suppor
54a0: 74 20 69 6e 20 73 70 61 74 69 61 6c 69 74 65 5f  t in spatialite_
54b0: 67 75 69 3c 2f 68 33 3e 0d 0a 54 68 65 20 6c 61  gui</h3>..The la
54c0: 74 65 73 74 20 76 65 72 73 69 6f 6e 20 6f 66 20  test version of 
54d0: 74 68 65 20 47 55 49 20 74 6f 6f 6c 20 6e 6f 77  the GUI tool now
54e0: 20 73 75 70 70 6f 72 74 73 20 47 65 6f 4a 53 4f   supports GeoJSO
54f0: 4e 20 69 6e 20 65 78 61 63 74 6c 79 20 74 68 65  N in exactly the
5500: 20 73 61 6d 65 20 77 61 79 20 69 74 20 73 75 70   same way it sup
5510: 70 6f 72 74 73 20 53 68 61 70 65 66 69 6c 65 73  ports Shapefiles
5520: 2e 0d 0a 3c 62 72 3e 3c 62 72 3e 0d 0a 3c 74 61  ...<br><br>..<ta
5530: 62 6c 65 20 63 65 6c 6c 73 70 61 63 69 6e 67 3d  ble cellspacing=
5540: 22 34 22 20 63 65 6c 6c 70 61 64 64 69 6e 67 3d  "4" cellpadding=
5550: 22 38 22 20 62 67 63 6f 6c 6f 72 3d 22 23 66 66  "8" bgcolor="#ff
5560: 66 66 66 30 22 20 62 6f 72 64 65 72 3d 22 31 22  fff0" border="1"
5570: 3e 0d 0a 3c 74 72 3e 0d 0a 3c 74 64 3e 0d 0a 54  >..<tr>..<td>..T
5580: 77 6f 20 6e 65 77 20 62 75 74 74 6f 6e 73 20 68  wo new buttons h
5590: 61 76 65 20 62 65 65 6e 20 61 64 64 65 64 20 74  ave been added t
55a0: 6f 20 74 68 65 20 74 6f 6f 6c 62 61 72 3a 0d 0a  o the toolbar:..
55b0: 3c 75 6c 3e 0d 0a 3c 6c 69 3e 6f 6e 65 20 66 6f  <ul>..<li>one fo
55c0: 72 20 3c 62 3e 69 6d 70 6f 72 74 69 6e 67 20 47  r <b>importing G
55d0: 65 6f 4a 53 4f 4e 20 66 69 6c 65 73 3c 2f 62 3e  eoJSON files</b>
55e0: 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 74 68 65 20 6f  </li>..<li>the o
55f0: 74 68 65 72 20 66 6f 72 20 3c 62 3e 63 72 65 61  ther for <b>crea
5600: 74 69 6e 67 20 56 69 72 74 75 61 6c 47 65 6f 4a  ting VirtualGeoJ
5610: 53 4f 4e 20 74 61 62 6c 65 73 3c 2f 62 3e 3c 2f  SON tables</b></
5620: 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c 2f 74 64  li>..</ul>..</td
5630: 3e 0d 0a 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65  >..<td align="ce
5640: 6e 74 65 72 22 3e 0d 0a 3c 69 6d 67 20 73 72 63  nter">..<img src
5650: 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 67 61  ="https://www.ga
5660: 69 61 2d 67 69 73 2e 69 74 2f 67 61 69 61 2d 73  ia-gis.it/gaia-s
5670: 69 6e 73 2f 67 65 6f 6a 73 6f 6e 2d 70 69 63 73  ins/geojson-pics
5680: 2f 74 6f 6f 6c 62 61 72 2e 70 6e 67 22 20 61 6c  /toolbar.png" al
5690: 74 3d 22 47 65 6f 4a 53 4f 4e 20 74 6f 6f 6c 62  t="GeoJSON toolb
56a0: 61 72 20 62 75 74 74 6f 6e 73 22 3e 0d 0a 3c 2f  ar buttons">..</
56b0: 74 64 3e 0d 0a 3c 2f 74 72 3e 0d 0a 3c 74 72 3e  td>..</tr>..<tr>
56c0: 0d 0a 3c 74 64 3e 0d 0a 54 68 65 20 73 69 64 65  ..<td>..The side
56d0: 20 66 69 67 75 72 65 20 69 73 20 61 6e 20 65 78   figure is an ex
56e0: 61 6d 70 6c 65 20 6f 66 20 74 68 65 20 64 69 61  ample of the dia
56f0: 6c 6f 67 20 62 6f 78 20 74 68 61 74 27 73 20 75  log box that's u
5700: 73 65 64 20 66 6f 72 20 73 65 74 74 69 6e 67 20  sed for setting 
5710: 6f 70 74 69 6f 6e 73 20 77 68 65 6e 20 63 72 65  options when cre
5720: 61 74 69 6e 67 20 61 20 6e 65 77 20 53 70 61 74  ating a new Spat
5730: 69 61 6c 20 54 61 62 6c 65 20 62 79 20 69 6d 70  ial Table by imp
5740: 6f 72 74 69 6e 67 20 64 61 74 61 20 66 72 6f 6d  orting data from
5750: 20 61 6e 20 65 78 74 65 72 6e 61 6c 20 47 65 6f   an external Geo
5760: 4a 53 4f 4e 20 66 69 6c 65 2e 0d 0a 3c 2f 74 64  JSON file...</td
5770: 3e 0d 0a 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65  >..<td align="ce
5780: 6e 74 65 72 22 3e 0d 0a 3c 69 6d 67 20 73 72 63  nter">..<img src
5790: 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 67 61  ="https://www.ga
57a0: 69 61 2d 67 69 73 2e 69 74 2f 67 61 69 61 2d 73  ia-gis.it/gaia-s
57b0: 69 6e 73 2f 67 65 6f 6a 73 6f 6e 2d 70 69 63 73  ins/geojson-pics
57c0: 2f 6c 6f 61 64 2e 70 6e 67 22 20 61 6c 74 3d 22  /load.png" alt="
57d0: 47 65 6f 4a 53 4f 4e 20 6c 6f 61 64 22 3e 0d 0a  GeoJSON load">..
57e0: 3c 2f 74 64 3e 0d 0a 3c 2f 74 72 3e 0d 0a 3c 74  </td>..</tr>..<t
57f0: 72 3e 0d 0a 3c 74 64 3e 0d 0a 54 68 65 20 73 69  r>..<td>..The si
5800: 64 65 20 66 69 67 75 72 65 20 69 73 20 61 6e 20  de figure is an 
5810: 65 78 61 6d 70 6c 65 20 6f 66 20 74 68 65 20 64  example of the d
5820: 69 61 6c 6f 67 20 62 6f 78 20 74 68 61 74 27 73  ialog box that's
5830: 20 75 73 65 64 20 66 6f 72 20 73 65 74 74 69 6e   used for settin
5840: 67 20 6f 70 74 69 6f 6e 73 20 77 68 65 6e 20 63  g options when c
5850: 72 65 61 74 69 6e 67 20 61 20 56 69 72 74 75 61  reating a Virtua
5860: 6c 47 65 6f 4a 53 4f 4e 20 54 61 62 6c 65 2e 0d  lGeoJSON Table..
5870: 0a 3c 2f 74 64 3e 0d 0a 3c 74 64 20 61 6c 69 67  .</td>..<td alig
5880: 6e 3d 22 63 65 6e 74 65 72 22 3e 0d 0a 3c 69 6d  n="center">..<im
5890: 67 20 73 72 63 3d 22 68 74 74 70 73 3a 2f 2f 77  g src="https://w
58a0: 77 77 2e 67 61 69 61 2d 67 69 73 2e 69 74 2f 67  ww.gaia-gis.it/g
58b0: 61 69 61 2d 73 69 6e 73 2f 67 65 6f 6a 73 6f 6e  aia-sins/geojson
58c0: 2d 70 69 63 73 2f 76 69 72 74 75 61 6c 2e 70 6e  -pics/virtual.pn
58d0: 67 22 20 61 6c 74 3d 22 47 65 6f 4a 53 4f 4e 20  g" alt="GeoJSON 
58e0: 76 69 72 74 75 61 6c 20 74 61 62 6c 65 22 3e 0d  virtual table">.
58f0: 0a 3c 2f 74 64 3e 0d 0a 3c 2f 74 72 3e 0d 0a 3c  .</td>..</tr>..<
5900: 74 72 3e 0d 0a 3c 74 64 3e 0d 0a 46 6f 72 20 65  tr>..<td>..For e
5910: 78 70 6f 72 74 69 6e 67 20 61 20 77 68 6f 6c 65  xporting a whole
5920: 20 53 70 61 74 69 61 6c 20 54 61 62 6c 65 20 69   Spatial Table i
5930: 6e 74 6f 20 61 6e 20 65 78 74 65 72 6e 61 6c 20  nto an external 
5940: 47 65 6f 4a 53 4f 4e 20 66 69 6c 65 3a 0d 0a 3c  GeoJSON file:..<
5950: 75 6c 3e 0d 0a 3c 6c 69 3e 69 6e 20 74 68 65 20  ul>..<li>in the 
5960: 74 72 65 65 2d 6c 69 73 74 20 3c 62 3e 72 69 67  tree-list <b>rig
5970: 68 74 2d 63 6c 69 63 6b 3c 2f 62 3e 20 6f 6e 20  ht-click</b> on 
5980: 74 68 65 20 72 65 71 75 65 73 74 65 64 20 47 65  the requested Ge
5990: 6f 6d 65 74 72 79 2e 0d 0a 3c 75 6c 3e 0d 0a 3c  ometry...<ul>..<
59a0: 6c 69 3e 74 68 65 6e 20 63 6c 69 63 6b 20 74 68  li>then click th
59b0: 65 20 3c 62 3e 45 78 70 6f 72 74 20 61 73 20 47  e <b>Export as G
59c0: 65 6f 4a 53 4f 4e 3c 2f 62 3e 20 69 74 65 6d 20  eoJSON</b> item 
59d0: 6f 6e 20 74 68 65 20 63 6f 6e 74 65 78 74 2d 6d  on the context-m
59e0: 65 6e 75 20 74 68 61 74 20 77 69 6c 6c 20 61 70  enu that will ap
59f0: 70 65 61 72 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c  pear.</li>..</ul
5a00: 3e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c  ></li>..</ul>..<
5a10: 2f 74 64 3e 0d 0a 3c 74 64 20 61 6c 69 67 6e 3d  /td>..<td align=
5a20: 22 63 65 6e 74 65 72 22 3e 0d 0a 3c 69 6d 67 20  "center">..<img 
5a30: 73 72 63 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77  src="https://www
5a40: 2e 67 61 69 61 2d 67 69 73 2e 69 74 2f 67 61 69  .gaia-gis.it/gai
5a50: 61 2d 73 69 6e 73 2f 67 65 6f 6a 73 6f 6e 2d 70  a-sins/geojson-p
5a60: 69 63 73 2f 64 75 6d 70 2e 70 6e 67 22 20 61 6c  ics/dump.png" al
5a70: 74 3d 22 47 65 6f 4a 53 4f 4e 20 64 75 6d 70 22  t="GeoJSON dump"
5a80: 3e 0d 0a 3c 2f 74 64 3e 0d 0a 3c 2f 74 72 3e 0d  >..</td>..</tr>.
5a90: 0a 3c 2f 74 61 62 6c 65 3e 0d 0a 3c 62 72 3e 3c  .</table>..<br><
5aa0: 62 72 3e 0d 0a 3c 68 72 3e 3c 62 72 3e 0d 0a 3c  br>..<hr><br>..<
5ab0: 61 20 68 72 65 66 3d 22 68 74 74 70 73 3a 2f 2f  a href="https://
5ac0: 77 77 77 2e 67 61 69 61 2d 67 69 73 2e 69 74 2f  www.gaia-gis.it/
5ad0: 66 6f 73 73 69 6c 2f 6c 69 62 73 70 61 74 69 61  fossil/libspatia
5ae0: 6c 69 74 65 2f 77 69 6b 69 3f 6e 61 6d 65 3d 34  lite/wiki?name=4
5af0: 2e 33 2e 30 2d 64 6f 63 22 3e 62 61 63 6b 3c 2f  .3.0-doc">back</
5b00: 61 3e 0a 5a 20 33 66 36 65 64 33 31 65 63 30 31  a>.Z 3f6ed31ec01
5b10: 64 39 39 32 62 38 38 66 33 38 30 33 32 61 33 35  d992b88f38032a35
5b20: 34 66 65 38 32 0a                                4fe82.