Wiki page
[Supporting GeoJSON] by
sandro
2019-12-26 15:52:39.
0000: 44 20 32 30 31 39 2d 31 32 2d 32 36 54 31 35 3a D 2019-12-26T15:
0010: 35 32 3a 33 39 2e 39 31 32 0a 4c 20 53 75 70 70 52:39.912.L Supp
0020: 6f 72 74 69 6e 67 5c 73 47 65 6f 4a 53 4f 4e 0a orting\sGeoJSON.
0030: 50 20 35 36 66 62 62 36 62 34 39 31 37 63 31 31 P 56fbb6b4917c11
0040: 30 30 63 34 31 38 32 31 65 33 35 65 62 62 63 61 00c41821e35ebbca
0050: 30 63 37 36 62 30 61 65 62 32 0a 55 20 73 61 6e 0c76b0aeb2.U san
0060: 64 72 6f 0a 57 20 32 33 32 32 36 0a 42 61 63 6b dro.W 23226.Back
0070: 20 74 6f 20 3c 61 20 68 72 65 66 3d 22 68 74 74 to <a href="htt
0080: 70 73 3a 2f 2f 77 77 77 2e 67 61 69 61 2d 67 69 ps://www.gaia-gi
0090: 73 2e 69 74 2f 66 6f 73 73 69 6c 2f 6c 69 62 73 s.it/fossil/libs
00a0: 70 61 74 69 61 6c 69 74 65 2f 77 69 6b 69 3f 6e patialite/wiki?n
00b0: 61 6d 65 3d 35 2e 30 2e 30 2d 64 6f 63 22 3e 35 ame=5.0.0-doc">5
00c0: 2e 30 2e 30 2d 64 6f 63 20 6d 61 69 6e 20 70 61 .0.0-doc main pa
00d0: 67 65 3c 2f 61 3e 3c 68 72 3e 3c 62 72 3e 0d 0a ge</a><hr><br>..
00e0: 3c 68 31 3e 49 6e 74 72 6f 64 75 63 74 69 6f 6e <h1>Introduction
00f0: 3c 2f 68 31 3e 0d 0a 3c 61 20 68 72 65 66 3d 22 </h1>..<a href="
0100: 68 74 74 70 73 3a 2f 2f 65 6e 2e 77 69 6b 69 70 https://en.wikip
0110: 65 64 69 61 2e 6f 72 67 2f 77 69 6b 69 2f 47 65 edia.org/wiki/Ge
0120: 6f 4a 53 4f 4e 22 3e 47 65 6f 4a 53 4f 4e 3c 2f oJSON">GeoJSON</
0130: 61 3e 20 69 73 20 61 6e 20 6f 70 65 6e 20 73 74 a> is an open st
0140: 61 6e 64 61 72 64 20 64 61 74 61 20 66 6f 72 6d andard data form
0150: 61 74 20 62 61 73 65 64 20 6f 6e 20 3c 61 20 68 at based on <a h
0160: 72 65 66 3d 22 68 74 74 70 73 3a 2f 2f 65 6e 2e ref="https://en.
0170: 77 69 6b 69 70 65 64 69 61 2e 6f 72 67 2f 77 69 wikipedia.org/wi
0180: 6b 69 2f 4a 53 4f 4e 22 3e 4a 53 4f 4e 3c 2f 61 ki/JSON">JSON</a
0190: 3e 20 28 3c 62 3e 4a 61 76 61 53 63 72 69 70 74 > (<b>JavaScript
01a0: 20 4f 62 6a 65 63 74 20 4e 6f 74 61 74 69 6f 6e Object Notation
01b0: 3c 2f 62 3e 29 20 74 68 61 74 20 69 73 20 61 20 </b>) that is a
01c0: 76 65 72 79 20 70 6f 70 75 6c 61 72 20 64 61 74 very popular dat
01d0: 61 20 66 6f 72 6d 61 74 20 77 69 64 65 6c 79 20 a format widely
01e0: 75 73 65 64 20 62 79 20 6d 61 6e 79 20 77 65 62 used by many web
01f0: 2d 61 70 70 73 20 61 73 20 61 20 72 65 70 6c 61 -apps as a repla
0200: 63 65 6d 65 6e 74 20 66 6f 72 20 58 4d 4c 2e 3c cement for XML.<
0210: 62 72 3e 0d 0a 54 68 65 20 69 6e 74 65 6e 64 65 br>..The intende
0220: 64 20 75 73 65 20 6f 66 20 47 65 6f 4a 53 4f 4e d use of GeoJSON
0230: 20 69 73 20 74 68 65 20 65 78 74 65 6e 73 69 6f is the extensio
0240: 6e 20 6f 66 20 74 68 65 20 62 61 73 69 63 20 63 n of the basic c
0250: 61 70 61 62 69 6c 69 74 69 65 73 20 6f 66 20 4a apabilities of J
0260: 53 4f 4e 20 73 6f 20 74 6f 20 61 64 65 71 75 61 SON so to adequa
0270: 74 65 6c 79 20 73 75 70 70 6f 72 74 20 3c 62 3e tely support <b>
0280: 67 65 6f 67 72 61 70 68 69 63 20 66 65 61 74 75 geographic featu
0290: 72 65 73 3c 2f 62 3e 20 69 6e 63 6c 75 64 69 6e res</b> includin
02a0: 67 20 62 6f 74 68 20 3c 62 3e 47 65 6f 6d 65 74 g both <b>Geomet
02b0: 72 69 65 73 3c 2f 62 3e 20 61 6e 64 0d 0a 3c 62 ries</b> and..<b
02c0: 3e 6e 6f 6e 2d 73 70 61 74 69 61 6c 20 61 74 74 >non-spatial att
02d0: 72 69 62 75 74 65 73 3c 2f 62 3e 2e 3c 62 72 3e ributes</b>.<br>
02e0: 3c 62 72 3e 0d 0a 47 65 6f 4a 53 4f 4e 2c 20 77 <br>..GeoJSON, w
02f0: 68 69 63 68 20 68 61 73 20 65 78 69 73 74 65 64 hich has existed
0300: 20 66 6f 72 20 6d 61 6e 79 20 79 65 61 72 73 2c for many years,
0310: 20 77 61 73 20 69 6e 69 74 69 61 6c 6c 79 20 62 was initially b
0320: 61 73 65 64 20 6f 6e 20 61 20 6c 6f 6f 73 65 20 ased on a loose
0330: 61 6e 64 20 69 6e 66 6f 72 6d 61 6c 20 64 61 74 and informal dat
0340: 61 20 73 70 65 63 69 66 69 63 61 74 69 6f 6e 2e a specification.
0350: 3c 62 72 3e 0d 0a 4f 6e 6c 79 20 76 65 72 79 20 <br>..Only very
0360: 72 65 63 65 6e 74 6c 79 20 28 32 30 31 36 29 20 recently (2016)
0370: 69 74 20 68 61 73 20 66 69 6e 61 6c 6c 79 20 62 it has finally b
0380: 65 63 6f 6d 65 20 61 20 72 65 73 70 65 63 74 61 ecome a respecta
0390: 62 6c 65 20 73 74 61 6e 64 61 72 64 20 66 6f 72 ble standard for
03a0: 6d 61 74 20 62 61 73 65 64 20 6f 6e 20 61 20 66 mat based on a f
03b0: 6f 72 6d 61 6c 20 73 70 65 63 69 66 69 63 61 74 ormal specificat
03c0: 69 6f 6e 2c 20 3c 61 20 68 72 65 66 3d 22 68 74 ion, <a href="ht
03d0: 74 70 73 3a 2f 2f 74 6f 6f 6c 73 2e 69 65 74 66 tps://tools.ietf
03e0: 2e 6f 72 67 2f 68 74 6d 6c 2f 72 66 63 37 39 34 .org/html/rfc794
03f0: 36 22 3e 52 46 43 20 37 39 34 36 3c 2f 61 3e 2c 6">RFC 7946</a>,
0400: 20 72 65 6c 65 61 73 65 64 20 62 79 20 3c 62 3e released by <b>
0410: 49 45 54 46 3c 2f 62 3e 20 28 3c 69 3e 49 6e 74 IETF</b> (<i>Int
0420: 65 72 6e 65 74 20 45 6e 67 69 6e 65 65 72 69 6e ernet Engineerin
0430: 67 20 54 61 73 6b 20 46 6f 72 63 65 3c 2f 69 3e g Task Force</i>
0440: 29 2e 3c 62 72 3e 0d 0a 3c 75 3e 4e 6f 74 65 3c ).<br>..<u>Note<
0450: 2f 75 3e 3a 20 52 46 43 20 37 39 34 36 20 69 6e /u>: RFC 7946 in
0460: 74 72 6f 64 75 63 65 64 20 73 65 76 65 72 61 6c troduced several
0470: 20 72 65 6c 65 76 61 6e 74 20 72 65 71 75 69 72 relevant requir
0480: 65 6d 65 6e 74 73 20 61 6e 64 20 72 65 73 74 72 ements and restr
0490: 69 63 74 69 6f 6e 73 2c 20 73 6f 20 74 68 61 74 ictions, so that
04a0: 20 3c 62 3e 70 72 65 2d 52 46 43 3c 2f 62 3e 20 <b>pre-RFC</b>
04b0: 61 6e 64 20 3c 62 3e 70 6f 73 74 2d 52 46 43 3c and <b>post-RFC<
04c0: 2f 62 3e 20 47 65 6f 4a 53 4f 4e 20 66 69 6c 65 /b> GeoJSON file
04d0: 73 20 61 72 65 20 6e 6f 74 20 6d 75 74 75 61 6c s are not mutual
04e0: 6c 79 20 69 6e 74 65 72 6f 70 65 72 61 62 6c 65 ly interoperable
04f0: 2e 3c 62 72 3e 3c 62 72 3e 0d 0a 41 20 76 65 72 .<br><br>..A ver
0500: 79 20 72 65 6d 61 72 6b 61 62 6c 65 20 66 65 61 y remarkable fea
0510: 74 75 72 65 20 6f 66 20 52 46 43 20 37 39 34 36 ture of RFC 7946
0520: 20 69 73 20 74 68 61 74 20 69 74 27 73 20 65 78 is that it's ex
0530: 70 6c 69 63 69 74 6c 79 20 64 65 63 6c 61 72 65 plicitly declare
0540: 64 20 74 6f 20 62 65 20 61 20 3c 62 3e 66 69 78 d to be a <b>fix
0550: 65 64 20 61 6e 64 20 69 6d 6d 75 74 61 62 6c 65 ed and immutable
0560: 3c 2f 62 3e 20 73 70 65 63 69 66 69 63 61 74 69 </b> specificati
0570: 6f 6e 2e 3c 62 72 3e 0d 0a 54 68 65 72 65 20 77 on.<br>..There w
0580: 69 6c 6c 20 6e 65 76 65 72 20 62 65 20 75 70 64 ill never be upd
0590: 61 74 65 64 20 76 65 72 73 69 6f 6e 73 20 6f 66 ated versions of
05a0: 20 47 65 6f 4a 53 4f 4e 3b 20 65 76 65 6e 20 74 GeoJSON; even t
05b0: 68 65 20 73 6c 69 67 68 74 65 73 74 20 63 68 61 he slightest cha
05c0: 6e 67 65 20 77 69 6c 6c 20 72 65 71 75 69 72 65 nge will require
05d0: 20 61 20 72 65 6e 61 6d 65 20 66 72 6f 6d 20 47 a rename from G
05e0: 65 6f 4a 53 4f 4e 20 74 6f 20 73 6f 6d 65 74 68 eoJSON to someth
05f0: 69 6e 67 20 65 6c 73 65 2e 3c 62 72 3e 0d 0a 53 ing else.<br>..S
0600: 75 63 68 20 61 20 72 65 73 74 72 69 63 74 69 6f uch a restrictio
0610: 6e 20 69 73 20 6f 62 76 69 6f 75 73 6c 79 20 69 n is obviously i
0620: 6e 74 65 6e 64 65 64 20 74 6f 20 65 6e 73 75 72 ntended to ensur
0630: 65 20 61 20 76 65 72 79 20 73 74 72 6f 6e 67 20 e a very strong
0640: 73 74 61 62 69 6c 69 74 79 20 64 75 72 69 6e 67 stability during
0650: 20 69 74 73 20 6c 69 66 65 74 69 6d 65 20 28 61 its lifetime (a
0660: 6e 64 20 72 65 70 72 65 73 65 6e 74 73 20 61 20 nd represents a
0670: 73 74 72 6f 6e 67 20 72 65 61 63 74 69 6f 6e 20 strong reaction
0680: 74 6f 20 74 68 65 20 6d 61 6e 79 20 47 4d 4c 20 to the many GML
0690: 76 65 72 73 69 6f 6e 73 20 74 68 61 74 20 61 62 versions that ab
06a0: 72 75 70 74 6c 79 20 69 6e 74 72 6f 64 75 63 65 ruptly introduce
06b0: 64 20 72 61 64 69 63 61 6c 20 63 68 61 6e 67 65 d radical change
06c0: 73 20 75 70 73 65 74 74 69 6e 67 20 74 68 65 20 s upsetting the
06d0: 77 65 6c 6c 20 65 73 74 61 62 6c 69 73 68 65 64 well established
06e0: 20 62 65 68 61 76 69 6f 72 20 6f 66 20 65 78 69 behavior of exi
06f0: 73 74 69 6e 67 20 69 6d 70 6c 65 6d 65 6e 74 61 sting implementa
0700: 74 69 6f 6e 73 29 2e 3c 62 72 3e 3c 62 72 3e 0d tions).<br><br>.
0710: 0a 54 68 65 20 6d 6f 73 74 20 6f 62 76 69 6f 75 .The most obviou
0720: 73 20 63 6f 6d 70 65 74 69 74 6f 72 73 20 6f 66 s competitors of
0730: 20 47 65 6f 4a 53 4f 4e 20 61 72 65 20 74 68 65 GeoJSON are the
0740: 20 3c 61 20 68 72 65 66 3d 22 68 74 74 70 73 3a <a href="https:
0750: 2f 2f 65 6e 2e 77 69 6b 69 70 65 64 69 61 2e 6f //en.wikipedia.o
0760: 72 67 2f 77 69 6b 69 2f 53 68 61 70 65 66 69 6c rg/wiki/Shapefil
0770: 65 22 3e 45 53 52 49 20 53 68 61 70 65 66 69 6c e">ESRI Shapefil
0780: 65 3c 2f 61 3e 20 61 6e 64 20 3c 61 20 68 72 65 e</a> and <a hre
0790: 66 3d 22 0d 0a 68 74 74 70 73 3a 2f 2f 65 6e 2e f="..https://en.
07a0: 77 69 6b 69 70 65 64 69 61 2e 6f 72 67 2f 77 69 wikipedia.org/wi
07b0: 6b 69 2f 47 65 6f 67 72 61 70 68 79 5f 4d 61 72 ki/Geography_Mar
07c0: 6b 75 70 5f 4c 61 6e 67 75 61 67 65 22 3e 47 4d kup_Language">GM
07d0: 4c 3c 2f 61 3e 3c 62 72 3e 0d 0a 54 68 65 20 66 L</a><br>..The f
07e0: 6f 6c 6c 6f 77 69 6e 67 20 63 68 61 72 74 20 77 ollowing chart w
07f0: 69 6c 6c 20 71 75 69 63 6b 6c 79 20 6c 69 73 74 ill quickly list
0800: 20 74 68 65 20 6d 61 69 6e 20 64 69 66 66 65 72 the main differ
0810: 65 6e 63 65 73 20 62 65 74 77 65 65 6e 20 74 68 ences between th
0820: 65 6d 2e 3c 62 72 3e 3c 62 72 3e 0d 0a 3c 74 61 em.<br><br>..<ta
0830: 62 6c 65 20 63 65 6c 6c 73 70 61 63 69 6e 67 3d ble cellspacing=
0840: 22 34 22 20 63 65 6c 6c 70 61 64 64 69 6e 67 3d "4" cellpadding=
0850: 22 38 22 20 62 67 63 6f 6c 6f 72 3d 22 23 63 30 "8" bgcolor="#c0
0860: 65 65 63 30 22 20 62 6f 72 64 65 72 3d 22 31 22 eec0" border="1"
0870: 3e 0d 0a 3c 74 72 3e 3c 74 68 3e 54 6f 70 69 63 >..<tr><th>Topic
0880: 3c 2f 74 68 3e 3c 74 68 3e 53 68 61 70 65 66 69 </th><th>Shapefi
0890: 6c 65 3c 2f 74 68 3e 3c 74 68 3e 47 4d 4c 3c 2f le</th><th>GML</
08a0: 74 68 3e 3c 74 68 3e 47 65 6f 4a 53 4f 4e 3c 2f th><th>GeoJSON</
08b0: 74 68 3e 3c 74 68 3e 52 65 6d 61 72 6b 73 3c 2f th><th>Remarks</
08c0: 74 68 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 0d 0a th></tr>..<tr>..
08d0: 3c 74 68 20 76 61 6c 69 67 6e 3d 22 6d 69 64 64 <th valign="midd
08e0: 6c 65 22 3e 46 69 6c 65 20 6f 72 67 61 6e 69 7a le">File organiz
08f0: 61 74 69 6f 6e 3c 2f 74 68 3e 0d 0a 3c 74 64 20 ation</th>..<td
0900: 76 61 6c 69 67 6e 3d 22 6d 69 64 64 6c 65 22 3e valign="middle">
0910: 41 74 20 6c 65 61 73 74 20 74 68 72 65 65 20 69 At least three i
0920: 6e 64 65 70 65 6e 64 65 6e 74 20 66 69 6c 65 73 ndependent files
0930: 20 73 68 61 72 69 6e 67 20 74 68 65 20 73 61 6d sharing the sam
0940: 65 20 6e 61 6d 65 20 61 6e 64 20 72 65 73 70 65 e name and respe
0950: 63 74 69 76 65 6c 79 20 69 64 65 6e 74 69 66 69 ctively identifi
0960: 65 64 20 62 79 20 73 75 66 66 69 78 65 73 20 3c ed by suffixes <
0970: 62 3e 2e 73 68 70 3c 2f 62 3e 2c 20 3c 62 3e 2e b>.shp</b>, <b>.
0980: 73 68 78 3c 2f 62 3e 20 61 6e 64 20 3c 62 3e 2e shx</b> and <b>.
0990: 64 62 66 3c 2f 62 3e 0d 0a 3c 75 6c 3e 0d 0a 3c dbf</b>..<ul>..<
09a0: 6c 69 3e 42 6f 74 68 20 74 68 65 20 3c 62 3e 2e li>Both the <b>.
09b0: 73 68 70 3c 2f 62 3e 20 61 6e 64 20 3c 62 3e 2e shp</b> and <b>.
09c0: 73 68 78 3c 2f 62 3e 20 6d 65 6d 62 65 72 73 20 shx</b> members
09d0: 61 72 65 20 3c 62 3e 62 69 6e 61 72 79 20 66 69 are <b>binary fi
09e0: 6c 65 73 3c 2f 62 3e 20 69 6e 74 65 6e 64 65 64 les</b> intended
09f0: 20 74 6f 20 73 74 6f 72 65 20 47 65 6f 6d 65 74 to store Geomet
0a00: 72 69 65 73 20 61 6e 64 20 73 68 6f 75 6c 64 20 ries and should
0a10: 62 65 20 65 6e 63 6f 64 65 64 20 61 63 63 6f 72 be encoded accor
0a20: 64 69 6e 67 6c 79 20 74 6f 20 74 68 65 20 3c 61 dingly to the <a
0a30: 20 68 72 65 66 3d 22 68 74 74 70 73 3a 2f 2f 77 href="https://w
0a40: 77 77 2e 65 73 72 69 2e 63 6f 6d 2f 6c 69 62 72 ww.esri.com/libr
0a50: 61 72 79 2f 77 68 69 74 65 70 61 70 65 72 73 2f ary/whitepapers/
0a60: 70 64 66 73 2f 73 68 61 70 65 66 69 6c 65 2e 70 pdfs/shapefile.p
0a70: 64 66 22 3e 45 53 52 49 20 6f 70 65 6e 20 73 70 df">ESRI open sp
0a80: 65 63 69 66 69 63 61 74 69 6f 6e 3c 2f 61 3e 3c ecification</a><
0a90: 2f 6c 69 3e 0d 0a 3c 6c 69 3e 54 68 65 20 3c 62 /li>..<li>The <b
0aa0: 3e 2e 64 62 66 3c 2f 62 3e 20 6d 65 6d 62 65 72 >.dbf</b> member
0ab0: 20 69 73 20 69 6e 74 65 6e 64 65 64 20 74 6f 20 is intended to
0ac0: 73 74 6f 72 65 20 6e 6f 6e 2d 73 70 61 74 69 61 store non-spatia
0ad0: 6c 20 61 74 74 72 69 62 75 74 65 73 2e 3c 62 72 l attributes.<br
0ae0: 3e 0d 0a 54 68 69 73 20 3c 62 3e 62 69 6e 61 72 >..This <b>binar
0af0: 79 20 66 69 6c 65 3c 2f 62 3e 20 69 73 20 61 6c y file</b> is al
0b00: 73 6f 20 65 78 70 65 63 74 65 64 20 74 6f 20 62 so expected to b
0b10: 65 20 65 6e 63 6f 64 65 64 20 61 63 63 6f 72 64 e encoded accord
0b20: 69 6e 67 6c 79 20 74 6f 20 3c 61 20 68 72 65 66 ingly to <a href
0b30: 3d 22 68 74 74 70 73 3a 2f 2f 65 6e 2e 77 69 6b ="https://en.wik
0b40: 69 70 65 64 69 61 2e 6f 72 67 2f 77 69 6b 69 2f ipedia.org/wiki/
0b50: 44 42 61 73 65 22 3e 41 73 68 74 6f 6e 2d 54 61 DBase">Ashton-Ta
0b60: 74 65 20 64 42 61 73 65 20 73 70 65 63 69 66 69 te dBase specifi
0b70: 63 61 74 69 6f 6e 3c 2f 61 3e 3b 20 75 6e 68 61 cation</a>; unha
0b80: 70 70 69 6c 79 20 74 68 69 73 20 76 65 72 79 20 ppily this very
0b90: 6f 6c 64 20 73 70 65 63 69 66 69 63 61 74 69 6f old specificatio
0ba0: 6e 20 28 62 6f 72 6e 20 69 6e 20 74 68 65 20 27 n (born in the '
0bb0: 38 30 73 29 20 68 61 64 20 61 20 73 61 76 61 67 80s) had a savag
0bc0: 65 20 70 72 6f 6c 69 66 65 72 61 74 69 6f 6e 20 e proliferation
0bd0: 6f 66 20 64 69 66 66 65 72 65 6e 74 20 64 69 61 of different dia
0be0: 6c 65 63 74 73 20 28 3c 69 3e 43 6c 69 70 70 65 lects (<i>Clippe
0bf0: 72 3c 2f 69 3e 2c 20 3c 69 3e 46 6f 78 50 72 6f r</i>, <i>FoxPro
0c00: 3c 2f 69 3e 29 20 62 65 63 6f 6d 69 6e 67 20 71 </i>) becoming q
0c10: 75 69 74 65 20 6d 65 73 73 79 20 61 6e 64 20 63 uite messy and c
0c20: 68 61 6f 74 69 63 2e 3c 2f 6c 69 3e 0d 0a 3c 2f haotic.</li>..</
0c30: 75 6c 3e 0d 0a 3c 2f 74 64 3e 0d 0a 3c 74 64 3e ul>..</td>..<td>
0c40: 47 4d 4c 20 69 73 20 62 61 73 65 64 20 6f 6e 20 GML is based on
0c50: 58 4d 4c 2c 20 61 6e 64 20 69 73 20 6a 75 73 74 XML, and is just
0c60: 20 61 20 73 69 6e 67 6c 65 2c 20 6d 6f 6e 6f 6c a single, monol
0c70: 69 74 68 69 63 20 3c 62 3e 74 65 78 74 20 66 69 ithic <b>text fi
0c80: 6c 65 2e 3c 2f 62 3e 3c 62 72 3e 0d 0a 41 73 20 le.</b><br>..As
0c90: 61 6e 79 20 6f 74 68 65 72 20 58 4d 4c 20 66 69 any other XML fi
0ca0: 6c 65 2c 20 47 4d 4c 20 74 6f 6f 20 63 61 6e 20 le, GML too can
0cb0: 62 65 20 73 74 72 6f 6e 67 6c 79 20 63 6f 6e 73 be strongly cons
0cc0: 74 72 61 69 6e 65 64 20 74 6f 20 63 6f 6e 66 6f trained to confo
0cd0: 72 6d 20 74 6f 20 61 20 66 6f 72 6d 61 6c 6c 79 rm to a formally
0ce0: 20 64 65 66 69 6e 65 64 20 3c 61 20 68 72 65 66 defined <a href
0cf0: 3d 22 68 74 74 70 73 3a 2f 2f 69 74 2e 77 69 6b ="https://it.wik
0d00: 69 70 65 64 69 61 2e 6f 72 67 2f 77 69 6b 69 2f ipedia.org/wiki/
0d10: 58 4d 4c 5f 53 63 68 65 6d 61 22 3e 58 4d 4c 20 XML_Schema">XML
0d20: 53 63 68 65 6d 61 3c 2f 61 3e 0d 0a 3c 2f 74 64 Schema</a>..</td
0d30: 3e 0d 0a 3c 74 64 20 76 61 6c 69 67 6e 3d 22 6d >..<td valign="m
0d40: 69 64 64 6c 65 22 3e 0d 0a 53 69 6e 67 6c 65 20 iddle">..Single
0d50: 6d 6f 6e 6f 6c 69 74 68 69 63 20 3c 62 3e 74 65 monolithic <b>te
0d60: 78 74 20 66 69 6c 65 3c 2f 62 3e 2e 3c 62 72 3e xt file</b>.<br>
0d70: 0d 0a 53 69 6d 69 6c 61 72 20 74 6f 20 58 4d 4c ..Similar to XML
0d80: 2c 20 62 75 74 20 69 6e 74 65 6e 64 65 64 20 74 , but intended t
0d90: 6f 20 62 65 20 66 61 72 20 73 69 6d 70 6c 65 72 o be far simpler
0da0: 20 61 6e 64 20 6c 65 73 73 20 76 65 72 62 6f 73 and less verbos
0db0: 65 2e 0d 0a 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 0d e...</td>..<td>.
0dc0: 0a 54 68 65 20 74 68 72 65 65 2d 66 69 6c 65 73 .The three-files
0dd0: 20 6c 61 79 6f 75 74 20 6f 66 20 53 68 61 70 65 layout of Shape
0de0: 66 69 6c 65 20 69 73 20 63 6c 65 61 72 6c 79 20 file is clearly
0df0: 6f 62 73 6f 6c 65 74 65 2c 20 61 6e 64 20 69 74 obsolete, and it
0e00: 20 66 72 65 71 75 65 6e 74 6c 79 20 70 6f 73 65 frequently pose
0e10: 73 20 6d 61 6e 79 20 68 65 61 64 61 63 68 65 73 s many headaches
0e20: 20 63 61 75 73 69 6e 67 20 75 6e 65 78 70 65 63 causing unexpec
0e30: 74 65 64 20 74 72 6f 75 62 6c 65 73 2e 3c 62 72 ted troubles.<br
0e40: 3e 3c 62 72 3e 0d 0a 54 68 65 20 73 69 6e 67 6c ><br>..The singl
0e50: 65 2d 66 69 6c 65 20 6c 61 79 6f 75 74 20 61 64 e-file layout ad
0e60: 6f 70 74 65 64 20 62 79 20 62 6f 74 68 20 47 4d opted by both GM
0e70: 4c 20 61 6e 64 20 47 65 6f 4a 53 4f 4e 20 69 73 L and GeoJSON is
0e80: 20 63 6c 65 61 72 6c 79 20 62 65 74 74 65 72 20 clearly better
0e90: 61 6e 64 20 73 61 66 65 72 2c 20 61 6e 64 20 62 and safer, and b
0ea0: 65 69 6e 67 20 3c 62 3e 74 65 78 74 20 66 69 6c eing <b>text fil
0eb0: 65 73 3c 2f 62 3e 20 74 68 65 79 20 63 61 6e 20 es</b> they can
0ec0: 62 65 20 65 61 73 69 6c 79 20 69 6e 73 70 65 63 be easily inspec
0ed0: 74 65 64 20 61 6e 64 20 65 76 65 6e 74 75 61 6c ted and eventual
0ee0: 6c 79 20 64 65 62 75 67 67 65 64 20 6a 75 73 74 ly debugged just
0ef0: 20 75 73 69 6e 67 20 61 6e 79 20 67 65 6e 65 72 using any gener
0f00: 69 63 20 3c 62 3e 74 65 78 74 20 65 64 69 74 6f ic <b>text edito
0f10: 72 3c 2f 62 3e 20 77 69 74 68 6f 75 74 20 72 65 r</b> without re
0f20: 71 75 69 72 69 6e 67 20 61 6e 79 20 73 70 65 63 quiring any spec
0f30: 69 66 69 63 20 74 6f 6f 6c 2e 0d 0a 3c 2f 74 64 ific tool...</td
0f40: 3e 0d 0a 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 0d 0a >..</tr>..<tr>..
0f50: 3c 74 68 3e 47 65 6f 6d 65 74 72 79 20 63 6c 61 <th>Geometry cla
0f60: 73 73 65 73 3c 2f 74 68 3e 0d 0a 3c 74 64 3e 0d sses</th>..<td>.
0f70: 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 4e 75 6c 6c 20 .<ul>..<li>Null
0f80: 53 68 61 70 65 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e Shape</li>..<li>
0f90: 50 6f 69 6e 74 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e Point</li>..<li>
0fa0: 4d 75 6c 74 69 50 6f 69 6e 74 3c 2f 6c 69 3e 0d MultiPoint</li>.
0fb0: 0a 3c 6c 69 3e 50 6f 6c 79 4c 69 6e 65 20 28 77 .<li>PolyLine (w
0fc0: 69 74 68 6f 75 74 20 64 69 73 74 69 6e 67 75 69 ithout distingui
0fd0: 73 68 69 6e 67 20 62 65 74 77 65 65 6e 20 73 69 shing between si
0fe0: 6e 67 6c 65 2d 20 61 6e 64 20 6d 75 6c 74 69 2d ngle- and multi-
0ff0: 70 61 72 74 29 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e part)</li>..<li>
1000: 50 6f 6c 79 67 6f 6e 20 28 77 69 74 68 6f 75 74 Polygon (without
1010: 20 64 69 73 74 69 6e 67 75 69 73 68 69 6e 67 20 distinguishing
1020: 62 65 74 77 65 65 6e 20 73 69 6e 67 6c 65 2d 20 between single-
1030: 61 6e 64 20 6d 75 6c 74 69 2d 70 61 72 74 29 3c and multi-part)<
1040: 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c 62 72 /li>..</ul>..<br
1050: 3e 0d 0a 3c 75 3e 4e 6f 74 65 73 3c 2f 75 3e 3a >..<u>Notes</u>:
1060: 20 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 41 6c 6c ..<ul>..<li>All
1070: 20 47 65 6f 6d 65 74 72 69 65 73 20 69 6e 20 74 Geometries in t
1080: 68 65 20 73 61 6d 65 20 53 68 61 70 65 66 69 6c he same Shapefil
1090: 65 20 6d 75 73 74 20 73 68 61 72 65 20 74 68 65 e must share the
10a0: 20 73 61 6d 65 20 63 6c 61 73 73 20 28 6f 72 20 same class (or
10b0: 62 65 20 3c 62 3e 4e 75 6c 6c 3c 2f 62 3e 29 2e be <b>Null</b>).
10c0: 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 41 6c 6c 20 47 </li>..<li>All G
10d0: 65 6f 6d 65 74 72 69 65 73 20 69 6e 20 74 68 65 eometries in the
10e0: 20 73 61 6d 65 20 53 68 61 70 65 66 69 6c 65 20 same Shapefile
10f0: 6d 75 73 74 20 73 68 61 72 65 20 74 68 65 20 73 must share the s
1100: 61 6d 65 20 53 52 49 44 2e 3c 2f 6c 69 3e 0d 0a ame SRID.</li>..
1110: 3c 6c 69 3e 54 68 65 20 72 75 6c 65 73 20 66 6f <li>The rules fo
1120: 72 20 69 64 65 6e 74 69 66 79 69 6e 67 20 3c 62 r identifying <b
1130: 3e 45 78 74 65 72 69 6f 72 3c 2f 62 3e 20 61 6e >Exterior</b> an
1140: 64 20 3c 62 3e 49 6e 74 65 72 69 6f 72 3c 2f 62 d <b>Interior</b
1150: 3e 20 50 6f 6c 79 67 6f 6e 20 72 69 6e 67 73 0d > Polygon rings.
1160: 0a 61 72 65 20 61 77 6b 77 61 72 64 20 61 6e 64 .are awkward and
1170: 20 63 61 6e 20 66 72 65 71 75 65 6e 74 6c 79 20 can frequently
1180: 63 61 75 73 65 20 69 6e 74 65 72 6f 70 65 72 61 cause interopera
1190: 62 69 6c 69 74 79 20 69 73 73 75 65 73 2e 3c 2f bility issues.</
11a0: 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c 2f 74 64 li>..</ul>..</td
11b0: 3e 0d 0a 3c 74 64 3e 0d 0a 47 4d 4c 20 61 6c 6c >..<td>..GML all
11c0: 6f 77 73 20 6d 61 6e 79 20 64 69 66 66 65 72 65 ows many differe
11d0: 6e 74 20 77 61 79 73 20 74 6f 20 64 65 66 69 6e nt ways to defin
11e0: 65 20 74 68 65 20 73 61 6d 65 20 74 79 70 65 20 e the same type
11f0: 6f 66 20 47 65 6f 6d 65 74 72 79 2c 20 61 6e 64 of Geometry, and
1200: 20 74 68 65 20 73 70 65 63 69 66 69 63 61 74 69 the specificati
1210: 6f 6e 73 20 68 61 76 65 20 72 61 64 69 63 61 6c ons have radical
1220: 6c 79 20 63 68 61 6e 67 65 64 20 66 72 6f 6d 20 ly changed from
1230: 76 65 72 73 69 6f 6e 20 74 6f 20 76 65 72 73 69 version to versi
1240: 6f 6e 2e 3c 62 72 3e 3c 62 72 3e 0d 0a 47 4d 4c on.<br><br>..GML
1250: 20 68 61 73 20 61 20 72 65 61 6c 6c 79 20 69 6d has a really im
1260: 70 72 65 73 73 69 76 65 20 66 6c 65 78 69 62 69 pressive flexibi
1270: 6c 69 74 79 20 28 65 2e 67 2e 20 65 61 63 68 20 lity (e.g. each
1280: 73 69 6e 67 6c 65 20 47 65 6f 6d 65 74 72 79 20 single Geometry
1290: 63 61 6e 20 66 72 65 65 6c 79 20 64 65 63 6c 61 can freely decla
12a0: 72 65 20 69 74 73 20 6f 77 6e 20 53 52 49 44 29 re its own SRID)
12b0: 2c 20 62 75 74 20 61 74 20 74 68 65 20 63 6f 73 , but at the cos
12c0: 74 20 6f 66 20 69 6d 70 6f 73 69 6e 67 20 61 6e t of imposing an
12d0: 20 6f 76 65 72 77 68 65 6c 6d 69 6e 67 20 63 6f overwhelming co
12e0: 6d 70 6c 65 78 69 74 79 2e 0d 0a 3c 2f 74 64 3e mplexity...</td>
12f0: 0d 0a 3c 74 64 3e 0d 0a 3c 75 6c 3e 0d 0a 3c 6c ..<td>..<ul>..<l
1300: 69 3e 4e 75 6c 6c 3c 2f 6c 69 3e 0d 0a 3c 6c 69 i>Null</li>..<li
1310: 3e 50 6f 69 6e 74 3c 2f 6c 69 3e 0d 0a 3c 6c 69 >Point</li>..<li
1320: 3e 4c 69 6e 65 73 74 72 69 6e 67 3c 2f 6c 69 3e >Linestring</li>
1330: 0d 0a 3c 6c 69 3e 50 6f 6c 79 67 6f 6e 3c 2f 6c ..<li>Polygon</l
1340: 69 3e 0d 0a 3c 6c 69 3e 4d 75 6c 74 69 50 6f 69 i>..<li>MultiPoi
1350: 6e 74 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 4d 75 6c nt</li>..<li>Mul
1360: 74 69 4c 69 6e 65 73 74 72 69 6e 67 3c 2f 6c 69 tiLinestring</li
1370: 3e 0d 0a 3c 6c 69 3e 4d 75 6c 74 69 50 6f 6c 79 >..<li>MultiPoly
1380: 67 6f 6e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 47 65 gon</li>..<li>Ge
1390: 6f 6d 65 74 72 79 43 6f 6c 6c 65 63 74 69 6f 6e ometryCollection
13a0: 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c 62 </li>..</ul>..<b
13b0: 72 3e 0d 0a 3c 75 3e 4e 6f 74 65 73 3c 2f 75 3e r>..<u>Notes</u>
13c0: 3a 20 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 54 68 : ..<ul>..<li>Th
13d0: 69 73 20 65 78 61 63 74 6c 79 20 63 6f 72 72 65 is exactly corre
13e0: 73 70 6f 6e 64 73 20 74 6f 20 74 68 65 20 73 74 sponds to the st
13f0: 61 6e 64 61 72 64 20 3c 62 3e 37 20 63 6c 61 73 andard <b>7 clas
1400: 73 65 73 3c 2f 62 3e 20 6d 6f 64 65 6c 20 61 64 ses</b> model ad
1410: 6f 70 74 65 64 20 62 79 20 53 70 61 74 69 61 6c opted by Spatial
1420: 20 53 51 4c 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e SQL.</li>..<li>
1430: 54 68 65 20 73 61 6d 65 20 47 65 6f 4a 53 4f 4e The same GeoJSON
1440: 20 66 69 6c 65 20 63 61 6e 20 66 72 65 65 6c 79 file can freely
1450: 20 63 6f 6e 74 61 69 6e 20 61 6e 79 20 6b 69 6e contain any kin
1460: 64 20 6f 66 20 47 65 6f 6d 65 74 72 79 20 63 6c d of Geometry cl
1470: 61 73 73 65 73 20 77 69 74 68 6f 75 74 20 72 65 asses without re
1480: 73 74 72 69 63 74 69 6f 6e 73 2e 3c 2f 6c 69 3e strictions.</li>
1490: 0d 0a 3c 6c 69 3e 41 6c 6c 20 47 65 6f 6d 65 74 ..<li>All Geomet
14a0: 72 69 65 73 20 69 6e 20 74 68 65 20 73 61 6d 65 ries in the same
14b0: 20 47 65 6f 4a 53 4f 4e 20 66 69 6c 65 20 6d 75 GeoJSON file mu
14c0: 73 74 20 73 68 61 72 65 20 74 68 65 20 73 61 6d st share the sam
14d0: 65 20 53 52 49 44 2e 3c 2f 6c 69 3e 0d 0a 3c 2f e SRID.</li>..</
14e0: 75 6c 3e 0d 0a 3c 2f 74 64 3e 0d 0a 3c 74 64 3e ul>..</td>..<td>
14f0: 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 53 68 61 70 ..<ul>..<li>Shap
1500: 65 66 69 6c 65 20 69 73 20 6f 62 76 69 6f 75 73 efile is obvious
1510: 6c 79 20 6f 62 73 6f 6c 65 74 65 2c 20 61 6e 64 ly obsolete, and
1520: 20 73 6f 6d 65 77 61 79 20 6d 65 73 73 79 20 61 someway messy a
1530: 6e 64 20 6c 69 6d 69 74 65 64 2e 3c 2f 6c 69 3e nd limited.</li>
1540: 0d 0a 3c 6c 69 3e 47 4d 4c 20 69 73 20 65 6c 65 ..<li>GML is ele
1550: 67 61 6e 74 20 61 6e 64 20 76 65 72 79 20 73 6f gant and very so
1560: 70 68 69 73 74 69 63 61 74 65 64 3a 20 73 6f 6d phisticated: som
1570: 65 74 69 6d 65 73 20 74 6f 6f 20 73 6f 70 68 69 etimes too sophi
1580: 73 74 69 63 61 74 65 64 20 61 6e 64 20 63 6f 6d sticated and com
1590: 70 6c 65 78 20 74 6f 20 62 65 20 72 65 61 6c 6c plex to be reall
15a0: 79 20 75 73 61 62 6c 65 2e 3c 2f 6c 69 3e 0d 0a y usable.</li>..
15b0: 3c 6c 69 3e 47 65 6f 4a 53 4f 4e 20 6d 61 74 63 <li>GeoJSON matc
15c0: 68 65 73 20 74 68 65 20 53 70 61 74 69 61 6c 20 hes the Spatial
15d0: 53 51 4c 20 72 65 71 75 69 72 65 6d 65 6e 74 73 SQL requirements
15e0: 2c 20 61 6e 64 20 74 68 65 72 65 66 6f 72 65 20 , and therefore
15f0: 61 76 6f 69 64 73 20 61 6e 79 20 75 6e 6e 65 63 avoids any unnec
1600: 65 73 73 61 72 79 20 63 6f 6d 70 6c 65 78 69 74 essary complexit
1610: 79 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a y.</li>..</ul>..
1620: 3c 2f 74 64 3e 0d 0a 3c 2f 74 72 3e 0d 0a 3c 74 </td>..</tr>..<t
1630: 72 3e 0d 0a 3c 74 68 3e 44 69 6d 65 6e 73 69 6f r>..<th>Dimensio
1640: 6e 73 3c 2f 74 68 3e 0d 0a 3c 74 64 3e 0d 0a 3c ns</th>..<td>..<
1650: 75 6c 3e 0d 0a 3c 6c 69 3e 58 59 3c 2f 6c 69 3e ul>..<li>XY</li>
1660: 0d 0a 3c 6c 69 3e 58 59 4d 3c 2f 6c 69 3e 0d 0a ..<li>XYM</li>..
1670: 3c 6c 69 3e 58 59 5a 3c 2f 6c 69 3e 0d 0a 3c 6c <li>XYZ</li>..<l
1680: 69 3e 58 59 5a 4d 3c 2f 6c 69 3e 0d 0a 3c 2f 75 i>XYZM</li>..</u
1690: 6c 3e 0d 0a 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 0d l>..</td>..<td>.
16a0: 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 58 59 3c 2f 6c .<ul>..<li>XY</l
16b0: 69 3e 0d 0a 3c 6c 69 3e 58 59 4d 3c 2f 6c 69 3e i>..<li>XYM</li>
16c0: 0d 0a 3c 6c 69 3e 58 59 5a 3c 2f 6c 69 3e 0d 0a ..<li>XYZ</li>..
16d0: 3c 6c 69 3e 58 59 5a 4d 3c 2f 6c 69 3e 0d 0a 3c <li>XYZM</li>..<
16e0: 2f 75 6c 3e 0d 0a 3c 2f 74 64 3e 0d 0a 3c 74 64 /ul>..</td>..<td
16f0: 3e 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 58 59 3c >..<ul>..<li>XY<
1700: 2f 6c 69 3e 0d 0a 3c 6c 69 3e 58 59 5a 3c 2f 6c /li>..<li>XYZ</l
1710: 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c 62 72 3e 0d i>..</ul>..<br>.
1720: 0a 3c 75 3e 4e 6f 74 65 3c 2f 75 3e 3a 20 52 46 .<u>Note</u>: RF
1730: 43 20 37 39 34 36 20 6a 75 73 74 20 73 75 70 70 C 7946 just supp
1740: 6f 72 74 73 20 32 20 6f 72 20 33 20 63 6f 6f 72 orts 2 or 3 coor
1750: 64 69 6e 61 74 65 73 2c 20 61 6e 64 20 74 68 65 dinates, and the
1760: 20 74 68 69 72 64 20 76 61 6c 75 65 20 28 77 68 third value (wh
1770: 65 6e 20 64 65 63 6c 61 72 65 64 29 20 69 73 20 en declared) is
1780: 61 6c 77 61 79 73 20 65 78 70 65 63 74 65 64 20 always expected
1790: 74 6f 20 63 6f 72 72 65 73 70 6f 6e 64 20 74 6f to correspond to
17a0: 20 61 6e 20 45 6c 65 76 61 74 69 6f 6e 20 28 5a an Elevation (Z
17b0: 20 61 78 69 73 29 2e 3c 62 72 3e 3c 62 72 3e 0d axis).<br><br>.
17c0: 0a 53 75 70 70 6f 72 74 69 6e 67 20 58 59 4d 20 .Supporting XYM
17d0: 6f 72 20 58 59 5a 4d 20 69 73 20 6e 6f 74 20 74 or XYZM is not t
17e0: 65 63 68 6e 69 63 61 6c 6c 79 20 75 6e 66 65 61 echnically unfea
17f0: 73 69 62 6c 65 2e 0d 0a 42 6f 74 68 20 77 72 69 sible...Both wri
1800: 74 65 72 73 20 61 6e 64 20 72 65 61 64 65 72 73 ters and readers
1810: 20 63 6f 75 6c 64 20 73 75 70 70 6f 72 74 20 73 could support s
1820: 75 63 68 20 6f 70 74 69 6f 6e 73 2c 20 62 75 74 uch options, but
1830: 20 61 6c 6c 20 74 68 69 73 20 69 73 20 73 75 72 all this is sur
1840: 65 6c 79 20 6f 75 74 73 69 64 65 20 74 68 65 20 ely outside the
1850: 73 74 61 6e 64 61 72 64 20 61 6e 64 20 77 69 6c standard and wil
1860: 6c 20 73 75 72 65 6c 79 20 69 6d 70 61 69 72 20 l surely impair
1870: 74 68 65 20 75 6e 69 76 65 72 73 61 6c 20 70 6f the universal po
1880: 72 74 61 62 69 6c 69 74 79 20 6f 66 20 61 6e 79 rtability of any
1890: 20 6e 6f 6e 20 63 61 6e 6f 6e 69 63 61 6c 20 66 non canonical f
18a0: 69 6c 65 2e 0d 0a 3c 2f 74 64 3e 0d 0a 3c 74 64 ile...</td>..<td
18b0: 3e 0d 0a 47 65 6f 4a 53 4f 4e 20 6c 61 63 6b 73 >..GeoJSON lacks
18c0: 20 74 68 65 20 63 61 70 61 62 69 6c 69 74 79 20 the capability
18d0: 74 6f 20 73 75 70 70 6f 72 74 20 58 59 4d 20 61 to support XYM a
18e0: 6e 64 20 58 59 5a 4d 2c 20 6f 74 68 65 72 20 74 nd XYZM, other t
18f0: 68 61 6e 20 62 79 20 61 64 6f 70 74 69 6e 67 20 han by adopting
1900: 28 61 6e 64 20 74 6f 20 6f 74 68 65 72 73 20 75 (and to others u
1910: 6e 6b 6e 6f 77 6e 29 20 76 69 63 69 6f 75 73 20 nknown) vicious
1920: 74 72 69 63 6b 73 2e 3c 62 72 3e 0d 0a 4d 61 79 tricks.<br>..May
1930: 20 77 65 6c 6c 20 62 65 20 69 74 27 73 20 6e 6f well be it's no
1940: 74 20 61 20 66 6f 72 62 69 64 64 69 6e 67 20 6c t a forbidding l
1950: 69 6d 69 74 61 74 69 6f 6e 20 69 6e 20 6d 61 6e imitation in man
1960: 79 20 63 6f 6d 6d 6f 6e 20 63 61 73 65 73 2c 20 y common cases,
1970: 62 75 74 20 69 74 27 73 20 69 6e 64 69 73 70 75 but it's indispu
1980: 74 61 62 6c 79 20 61 20 6c 69 6d 69 74 61 74 69 tably a limitati
1990: 6f 6e 2e 0d 0a 3c 2f 74 64 3e 0d 0a 3c 2f 74 72 on...</td>..</tr
19a0: 3e 0d 0a 3c 74 72 3e 0d 0a 3c 74 68 3e 53 52 49 >..<tr>..<th>SRI
19b0: 44 3c 2f 74 68 3e 0d 0a 3c 74 64 3e 0d 0a 4e 6f D</th>..<td>..No
19c0: 74 20 69 6e 74 65 72 6e 61 6c 6c 79 20 64 65 63 t internally dec
19d0: 6c 61 72 65 64 20 62 79 20 74 68 65 20 53 68 61 lared by the Sha
19e0: 70 65 66 69 6c 65 20 69 74 73 65 6c 66 2e 3c 62 pefile itself.<b
19f0: 72 3e 0d 0a 44 65 70 6c 6f 79 69 6e 67 20 61 20 r>..Deploying a
1a00: 66 75 72 74 68 65 72 20 3c 62 3e 2e 70 72 6a 3c further <b>.prj<
1a10: 2f 62 3e 20 66 69 6c 65 20 64 65 73 63 72 69 62 /b> file describ
1a20: 69 6e 67 20 74 68 65 20 69 6e 74 65 6e 64 65 64 ing the intended
1a30: 20 53 52 49 44 20 69 73 20 74 68 65 20 75 73 75 SRID is the usu
1a40: 61 6c 20 73 6f 6c 75 74 69 6f 6e 20 61 64 6f 70 al solution adop
1a50: 74 65 64 20 62 79 20 45 53 52 49 20 69 74 73 65 ted by ESRI itse
1a60: 6c 66 2c 20 62 75 74 20 63 6f 72 72 65 63 74 6c lf, but correctl
1a70: 79 20 70 61 72 73 69 6e 67 20 74 68 65 73 65 20 y parsing these
1a80: 65 78 74 72 61 20 66 69 6c 65 73 20 69 73 20 61 extra files is a
1a90: 6e 20 75 73 75 61 6c 6c 79 20 66 6c 69 6d 73 79 n usually flimsy
1aa0: 20 70 72 6f 63 65 73 73 20 66 61 6c 6c 69 6e 67 process falling
1ab0: 20 6f 75 74 73 69 64 65 20 72 65 61 6c 20 63 61 outside real ca
1ac0: 70 61 62 69 6c 69 74 69 65 73 20 6f 66 20 6d 61 pabilities of ma
1ad0: 6e 79 20 74 68 69 72 64 20 70 61 72 74 79 20 72 ny third party r
1ae0: 65 61 64 65 72 73 2e 0d 0a 3c 2f 74 64 3e 0d 0a eaders...</td>..
1af0: 3c 74 64 3e 0d 0a 45 61 63 68 20 73 69 6e 67 6c <td>..Each singl
1b00: 65 20 47 65 6f 6d 65 74 72 79 20 69 73 20 61 6c e Geometry is al
1b10: 6c 6f 77 65 64 20 74 6f 20 66 72 65 65 6c 79 20 lowed to freely
1b20: 64 65 66 69 6e 65 20 69 74 73 20 6f 77 6e 20 53 define its own S
1b30: 52 49 44 2c 20 61 73 20 77 65 6c 6c 20 61 73 20 RID, as well as
1b40: 64 65 66 69 6e 69 6e 67 20 74 68 65 20 53 52 49 defining the SRI
1b50: 44 20 66 6f 72 20 74 68 65 20 77 68 6f 6c 65 20 D for the whole
1b60: 6c 61 79 65 72 2e 0d 0a 3c 2f 74 64 3e 0d 0a 3c layer...</td>..<
1b70: 74 64 3e 0d 0a 41 63 63 6f 72 64 69 6e 67 6c 79 td>..Accordingly
1b80: 20 74 6f 20 52 46 43 20 37 39 34 36 20 61 6c 6c to RFC 7946 all
1b90: 20 63 6f 6f 72 64 69 6e 61 74 65 73 20 61 72 65 coordinates are
1ba0: 20 61 6c 77 61 79 73 20 65 78 70 65 63 74 65 64 always expected
1bb0: 20 74 6f 20 62 65 20 65 78 70 72 65 73 73 65 64 to be expressed
1bc0: 20 61 73 20 3c 62 3e 6c 6f 6e 67 69 74 75 64 65 as <b>longitude
1bd0: 73 3c 2f 62 3e 20 61 6e 64 20 3c 62 3e 6c 61 74 s</b> and <b>lat
1be0: 69 74 75 64 65 73 3c 2f 62 3e 20 28 28 69 2e 65 itudes</b> ((i.e
1bf0: 3a 20 78 2d 70 6f 73 69 74 69 6f 6e 20 61 6e 64 : x-position and
1c00: 20 79 2d 70 6f 73 69 74 69 6f 6e 29 2e 3c 62 72 y-position).<br
1c10: 3e 0d 0a 53 6f 20 61 6e 79 20 63 61 6e 6f 6e 69 >..So any canoni
1c20: 63 61 6c 20 47 65 6f 4a 53 4f 4e 20 66 69 6c 65 cal GeoJSON file
1c30: 20 69 73 20 61 6c 77 61 79 73 20 65 78 70 65 63 is always expec
1c40: 74 65 64 20 74 6f 20 72 65 66 65 72 65 6e 63 65 ted to reference
1c50: 20 3c 62 3e 53 52 49 44 3d 34 33 32 36 20 57 47 <b>SRID=4326 WG
1c60: 53 20 38 34 3c 2f 62 3e 20 28 69 2e 65 2e 20 74 S 84</b> (i.e. t
1c70: 68 65 20 53 52 49 44 20 69 73 20 3c 62 3e 6e 6f he SRID is <b>no
1c80: 74 3c 2f 62 3e 20 73 74 6f 72 65 64 20 77 69 74 t</b> stored wit
1c90: 68 69 6e 20 74 68 65 20 47 65 6f 4a 53 4f 4e 20 hin the GeoJSON
1ca0: 66 69 6c 65 29 2e 3c 62 72 3e 3c 62 72 3e 0d 0a file).<br><br>..
1cb0: 55 73 69 6e 67 20 61 6e 79 20 6f 74 68 65 72 20 Using any other
1cc0: 53 52 49 44 20 69 73 20 74 65 63 68 6e 69 63 61 SRID is technica
1cd0: 6c 6c 79 20 70 6f 73 73 69 62 6c 65 2c 20 62 75 lly possible, bu
1ce0: 74 20 72 65 71 75 69 72 65 73 20 61 20 63 6f 6e t requires a con
1cf0: 76 65 6e 74 69 6f 6e 61 6c 20 61 67 72 65 65 6d ventional agreem
1d00: 65 6e 74 20 62 65 74 77 65 65 6e 20 77 72 69 74 ent between writ
1d10: 65 72 73 20 61 6e 64 20 72 65 61 64 65 72 73 2c ers and readers,
1d20: 20 62 75 74 20 61 6c 6c 20 74 68 69 73 20 69 73 but all this is
1d30: 20 73 75 72 65 6c 79 20 6f 75 74 73 69 64 65 20 surely outside
1d40: 74 68 65 20 73 74 61 6e 64 61 72 64 20 61 6e 64 the standard and
1d50: 20 77 69 6c 6c 20 73 75 72 65 6c 79 20 69 6d 70 will surely imp
1d60: 61 69 72 20 74 68 65 20 75 6e 69 76 65 72 73 61 air the universa
1d70: 6c 20 70 6f 72 74 61 62 69 6c 69 74 79 20 6f 66 l portability of
1d80: 20 61 6e 79 20 6e 6f 6e 20 63 61 6e 6f 6e 69 63 any non canonic
1d90: 61 6c 20 66 69 6c 65 2e 0d 0a 3c 2f 74 64 3e 0d al file...</td>.
1da0: 0a 3c 74 64 3e 0d 0a 54 68 65 20 75 6e 69 71 75 .<td>..The uniqu
1db0: 65 20 65 66 66 65 63 74 69 76 65 20 73 6f 6c 75 e effective solu
1dc0: 74 69 6f 6e 20 69 73 20 74 68 65 20 6f 6e 65 20 tion is the one
1dd0: 61 64 6f 70 74 65 64 20 62 79 20 47 4d 4c 2e 3c adopted by GML.<
1de0: 62 72 3e 0d 0a 42 6f 74 68 20 53 68 61 70 65 66 br>..Both Shapef
1df0: 69 6c 65 20 61 6e 64 20 47 65 6f 4a 53 4f 4e 20 ile and GeoJSON
1e00: 61 72 65 20 63 6c 65 61 72 6c 79 20 69 6e 66 65 are clearly infe
1e10: 72 69 6f 72 20 75 6e 64 65 72 20 74 68 69 73 20 rior under this
1e20: 70 65 63 75 6c 69 61 72 20 61 73 70 65 63 74 2e peculiar aspect.
1e30: 0d 0a 3c 2f 74 64 3e 0d 0a 3c 2f 74 72 3e 0d 0a ..</td>..</tr>..
1e40: 3c 74 72 3e 0d 0a 3c 74 68 3e 4e 6f 6e 2d 73 70 <tr>..<th>Non-sp
1e50: 61 74 69 61 6c 20 61 74 74 72 69 62 75 74 65 73 atial attributes
1e60: 3c 2f 74 68 3e 0d 0a 3c 74 64 3e 0d 0a 3c 75 6c </th>..<td>..<ul
1e70: 3e 0d 0a 3c 6c 69 3e 43 48 41 52 20 28 6c 69 6d >..<li>CHAR (lim
1e80: 69 74 65 64 20 74 6f 20 6d 61 78 2e 20 32 35 34 ited to max. 254
1e90: 20 62 79 74 65 73 29 3c 2f 6c 69 3e 0d 0a 3c 6c bytes)</li>..<l
1ea0: 69 3e 4e 55 4d 42 45 52 20 28 72 65 70 72 65 73 i>NUMBER (repres
1eb0: 65 6e 74 65 64 20 62 79 20 61 6e 20 41 53 43 49 ented by an ASCI
1ec0: 49 20 73 74 72 69 6e 67 20 6f 66 20 6d 61 78 2e I string of max.
1ed0: 20 33 32 20 62 79 74 65 73 29 3c 2f 6c 69 3e 0d 32 bytes)</li>.
1ee0: 0a 3c 6c 69 3e 44 41 54 45 20 28 59 59 59 59 4d .<li>DATE (YYYYM
1ef0: 4d 44 44 29 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 4c MDD)</li>..<li>L
1f00: 4f 47 49 43 41 4c 20 28 54 2f 46 29 3c 2f 6c 69 OGICAL (T/F)</li
1f10: 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c 62 72 3e 0d 0a >..</ul>..<br>..
1f20: 3c 75 3e 4e 6f 74 65 3c 2f 75 3e 3a 20 61 6c 6c <u>Note</u>: all
1f30: 20 61 74 74 72 69 62 75 74 65 20 6e 61 6d 65 73 attribute names
1f40: 20 61 72 65 20 6c 69 6d 69 74 65 64 20 74 6f 20 are limited to
1f50: 61 20 6c 65 6e 67 74 68 20 6f 66 20 6d 61 78 2e a length of max.
1f60: 20 31 30 20 62 79 74 65 73 2e 20 54 68 65 72 65 10 bytes. There
1f70: 20 69 73 20 6e 6f 20 73 61 66 65 20 77 61 79 20 is no safe way
1f80: 66 6f 72 20 64 65 63 6c 61 72 69 6e 67 20 3c 62 for declaring <b
1f90: 3e 4e 55 4c 4c 3c 2f 62 3e 20 76 61 6c 75 65 73 >NULL</b> values
1fa0: 2e 0d 0a 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 0d 0a ...</td>..<td>..
1fb0: 41 6e 79 20 70 6f 73 73 69 62 6c 65 20 64 61 74 Any possible dat
1fc0: 61 74 79 70 65 20 79 6f 75 20 63 61 6e 20 69 6d atype you can im
1fd0: 61 67 69 6e 65 2e 3c 62 72 3e 0d 0a 41 6e 64 20 agine.<br>..And
1fe0: 64 65 66 69 6e 69 6e 67 20 66 75 72 74 68 65 72 defining further
1ff0: 20 64 65 72 69 76 65 64 20 64 61 74 61 74 79 70 derived datatyp
2000: 65 73 20 69 73 20 61 6e 20 6f 70 74 69 6f 6e 20 es is an option
2010: 73 75 70 70 6f 72 74 65 64 20 62 79 20 74 68 65 supported by the
2020: 20 58 4d 4c 20 53 63 68 65 6d 61 2e 3c 62 72 3e XML Schema.<br>
2030: 3c 62 72 3e 0d 0a 3c 75 3e 4e 6f 74 65 3c 2f 75 <br>..<u>Note</u
2040: 3e 3a 20 61 74 74 72 69 62 75 74 65 20 6e 61 6d >: attribute nam
2050: 65 73 20 61 6e 64 20 74 65 78 74 20 76 61 6c 75 es and text valu
2060: 65 73 20 63 61 6e 20 68 61 76 65 20 61 6e 79 20 es can have any
2070: 61 72 62 69 74 72 61 72 79 20 6c 65 6e 67 74 68 arbitrary length
2080: 2e 0d 0a 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 0d 0a ...</td>..<td>..
2090: 3c 75 6c 3e 0d 0a 3c 6c 69 3e 74 65 78 74 20 28 <ul>..<li>text (
20a0: 75 6e 63 6f 6e 73 74 72 61 69 6e 65 64 20 6c 65 unconstrained le
20b0: 6e 67 74 68 29 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e ngth)</li>..<li>
20c0: 6e 75 6d 62 65 72 3c 2f 6c 69 3e 0d 0a 3c 6c 69 number</li>..<li
20d0: 3e 6e 75 6c 6c 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e >null</li>..<li>
20e0: 74 72 75 65 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 66 true</li>..<li>f
20f0: 61 6c 73 65 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e alse</li>..</ul>
2100: 0d 0a 3c 62 72 3e 0d 0a 3c 75 3e 4e 6f 74 65 3c ..<br>..<u>Note<
2110: 2f 75 3e 3a 20 61 74 74 72 69 62 75 74 65 20 6e /u>: attribute n
2120: 61 6d 65 73 20 20 63 61 6e 20 68 61 76 65 20 61 ames can have a
2130: 6e 79 20 61 72 62 69 74 72 61 72 79 20 6c 65 6e ny arbitrary len
2140: 67 74 68 2e 0d 0a 3c 2f 74 64 3e 0d 0a 3c 74 64 gth...</td>..<td
2150: 3e 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 53 68 61 >..<ul>..<li>Sha
2160: 70 65 66 69 6c 65 20 28 6f 72 20 6d 6f 72 65 20 pefile (or more
2170: 70 72 65 63 69 73 65 6c 79 20 69 6e 20 74 68 69 precisely in thi
2180: 73 20 63 61 73 65 20 44 42 46 29 20 63 6c 65 61 s case DBF) clea
2190: 72 6c 79 20 73 75 66 66 65 72 73 20 66 72 6f 6d rly suffers from
21a0: 20 74 6f 6f 20 6d 61 6e 79 20 75 6e 70 6c 65 61 too many unplea
21b0: 73 61 6e 74 20 6c 69 6d 69 74 61 74 69 6f 6e 73 sant limitations
21c0: 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 47 4d 4c 20 .</li>..<li>GML
21d0: 28 6d 6f 72 65 20 70 72 65 63 69 73 65 6c 79 20 (more precisely
21e0: 58 4d 4c 29 20 63 61 6e 20 65 66 66 65 63 74 69 XML) can effecti
21f0: 76 65 6c 79 20 73 75 70 70 6f 72 74 20 61 6e 20 vely support an
2200: 69 6d 70 72 65 73 73 69 76 65 20 66 6c 65 78 69 impressive flexi
2210: 62 69 6c 69 74 79 20 62 75 74 20 63 61 6e 20 65 bility but can e
2220: 61 73 69 6c 79 20 62 65 63 6f 6d 65 20 74 6f 6f asily become too
2230: 20 63 6f 6d 70 6c 65 78 20 61 6e 64 20 64 69 66 complex and dif
2240: 66 69 63 75 6c 74 20 74 6f 20 70 61 72 73 65 2e ficult to parse.
2250: 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 47 65 6f 4a 53 </li>..<li>GeoJS
2260: 4f 4e 20 6f 66 66 65 72 73 20 61 20 77 65 6c 6c ON offers a well
2270: 20 62 61 6c 61 6e 63 65 64 20 6d 69 78 3b 20 69 balanced mix; i
2280: 74 27 73 20 73 74 69 6c 6c 20 72 65 61 73 6f 6e t's still reason
2290: 61 62 6c 79 20 73 69 6d 70 6c 65 20 61 6e 64 20 ably simple and
22a0: 69 74 27 73 20 70 6f 77 65 72 66 75 6c 20 61 74 it's powerful at
22b0: 20 74 68 65 20 73 61 6d 65 20 74 69 6d 65 2e 3c the same time.<
22c0: 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c 2f 74 /li>..</ul>..</t
22d0: 64 3e 0d 0a 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 0d d>..</tr>..<tr>.
22e0: 0a 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 .<td align="cent
22f0: 65 72 22 3e 0d 0a 3c 62 3e 43 68 61 72 73 65 74 er">..<b>Charset
2300: 20 65 6e 63 6f 64 69 6e 67 3c 2f 62 3e 0d 0a 3c encoding</b>..<
2310: 74 61 62 6c 65 20 63 65 6c 6c 70 61 64 64 69 6e table cellpaddin
2320: 67 3d 22 34 22 20 63 65 6c 6c 73 70 61 63 69 6e g="4" cellspacin
2330: 67 3d 22 34 22 3e 0d 0a 3c 74 72 3e 3c 74 64 20 g="4">..<tr><td
2340: 61 6c 69 67 6e 3d 22 6c 65 66 74 22 3e 0d 0a 73 align="left">..s
2350: 65 65 20 74 68 65 20 3c 61 20 68 72 65 66 3d 22 ee the <a href="
2360: 68 74 74 70 3a 2f 2f 77 77 77 2e 67 61 69 61 2d http://www.gaia-
2370: 67 69 73 2e 69 74 2f 67 61 69 61 2d 73 69 6e 73 gis.it/gaia-sins
2380: 2f 73 70 61 74 69 61 6c 69 74 65 2d 63 6f 6f 6b /spatialite-cook
2390: 62 6f 6f 6b 2d 35 2f 63 6f 6f 6b 62 6f 6f 6b 5f book-5/cookbook_
23a0: 74 6f 70 69 63 73 2e 30 31 2e 68 74 6d 6c 23 74 topics.01.html#t
23b0: 6f 70 69 63 5f 41 62 6f 75 74 5f 43 68 61 72 73 opic_About_Chars
23c0: 65 74 5f 45 6e 63 6f 64 69 6e 67 22 3e 43 6f 6f et_Encoding">Coo
23d0: 6b 42 6f 6f 6b 3c 2f 61 3e 20 66 6f 72 20 6d 6f kBook</a> for mo
23e0: 72 65 20 6f 6e 20 74 68 69 73 20 74 6f 70 69 63 re on this topic
23f0: 2e 0d 0a 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c ...</td></tr>..<
2400: 2f 74 61 62 6c 65 3e 0d 0a 3c 2f 74 64 3e 0d 0a /table>..</td>..
2410: 3c 74 64 3e 0d 0a 4e 6f 74 20 69 6e 74 65 72 6e <td>..Not intern
2420: 61 6c 6c 79 20 64 65 66 69 6e 65 64 20 62 79 20 ally defined by
2430: 74 68 65 20 53 68 61 70 65 66 69 6c 65 20 69 74 the Shapefile it
2440: 73 65 6c 66 2e 3c 62 72 3e 0d 0a 41 74 74 65 6d self.<br>..Attem
2450: 70 74 69 6e 67 20 74 6f 20 67 75 65 73 73 20 74 pting to guess t
2460: 68 65 20 61 70 70 72 6f 70 72 69 61 74 65 20 63 he appropriate c
2470: 68 61 72 73 65 74 20 65 6e 63 6f 64 69 6e 67 20 harset encoding
2480: 72 65 71 75 69 72 65 64 20 62 79 20 73 6f 6d 65 required by some
2490: 20 53 68 61 70 65 66 69 6c 65 20 69 73 20 6d 6f Shapefile is mo
24a0: 72 65 20 61 20 6d 61 67 69 63 20 61 72 74 20 74 re a magic art t
24b0: 68 61 6e 20 72 61 74 69 6f 6e 61 6c 20 73 63 69 han rational sci
24c0: 65 6e 63 65 2e 0d 0a 3c 2f 74 64 3e 0d 0a 3c 74 ence...</td>..<t
24d0: 64 3e 0d 0a 41 6c 77 61 79 73 20 69 6e 74 65 72 d>..Always inter
24e0: 6e 61 6c 6c 79 20 64 65 66 69 6e 65 64 20 62 79 nally defined by
24f0: 20 74 68 65 20 47 4d 4c 2f 58 4d 4c 20 66 69 6c the GML/XML fil
2500: 65 20 69 74 73 65 6c 66 2e 0d 0a 3c 2f 74 64 3e e itself...</td>
2510: 0d 0a 3c 74 64 3e 0d 0a 52 46 43 20 37 39 34 36 ..<td>..RFC 7946
2520: 20 73 74 72 69 63 74 6c 79 20 72 65 71 75 69 72 strictly requir
2530: 65 73 20 74 68 61 74 20 61 6c 6c 20 47 65 6f 4a es that all GeoJ
2540: 53 4f 4e 20 66 69 6c 65 73 20 6d 75 73 74 20 62 SON files must b
2550: 65 20 65 6e 63 6f 64 65 64 20 61 73 20 3c 62 3e e encoded as <b>
2560: 55 54 46 2d 38 3c 2f 62 3e 3c 62 72 3e 3c 62 72 UTF-8</b><br><br
2570: 3e 0d 0a 49 6e 20 70 75 72 65 20 74 68 65 6f 72 >..In pure theor
2580: 79 20 62 6f 74 68 20 3c 62 3e 55 54 46 2d 31 36 y both <b>UTF-16
2590: 3c 2f 62 3e 20 61 6e 64 20 3c 62 3e 55 54 46 2d </b> and <b>UTF-
25a0: 33 32 3c 2f 62 3e 20 63 6f 75 6c 64 20 62 65 20 32</b> could be
25b0: 75 73 65 64 20 66 6f 72 20 65 6e 63 6f 64 69 6e used for encodin
25c0: 67 20 61 20 6c 65 67 69 74 69 6d 61 74 65 20 47 g a legitimate G
25d0: 65 6f 4a 53 4f 4e 20 66 69 6c 65 2c 20 62 75 74 eoJSON file, but
25e0: 20 73 75 63 68 20 6f 70 74 69 6f 6e 73 20 73 65 such options se
25f0: 65 6d 73 20 74 6f 20 62 65 20 76 65 72 79 20 72 ems to be very r
2600: 61 72 65 6c 79 20 28 69 66 20 65 76 65 72 29 20 arely (if ever)
2610: 61 64 6f 70 74 65 64 20 69 6e 20 72 65 61 6c 20 adopted in real
2620: 77 6f 72 6c 64 2e 0d 0a 3c 2f 74 64 3e 0d 0a 3c world...</td>..<
2630: 74 64 3e 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 53 td>..<ul>..<li>S
2640: 68 61 70 65 66 69 6c 65 73 20 6c 65 61 76 65 73 hapefiles leaves
2650: 20 61 20 6c 6f 74 20 74 6f 20 62 65 20 64 65 73 a lot to be des
2660: 69 72 65 64 2c 20 61 6e 64 20 6c 61 63 6b 20 6f ired, and lack o
2670: 66 20 64 65 66 69 6e 65 64 20 63 68 61 72 73 65 f defined charse
2680: 74 20 65 6e 63 6f 64 69 6e 67 20 63 61 75 73 65 t encoding cause
2690: 73 20 6d 61 6e 79 20 73 65 72 69 6f 75 73 20 70 s many serious p
26a0: 6f 72 74 61 62 69 6c 69 74 79 20 69 73 73 75 65 ortability issue
26b0: 73 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 47 4d 4c s.</li>..<li>GML
26c0: 2f 58 4d 4c 20 6e 69 63 65 6c 79 20 73 75 70 70 /XML nicely supp
26d0: 6f 72 74 73 20 61 6e 79 20 70 6f 73 73 69 62 6c orts any possibl
26e0: 65 20 63 68 61 72 73 65 74 20 69 6e 20 74 68 65 e charset in the
26f0: 20 6d 6f 73 74 20 66 6c 65 78 69 62 6c 65 20 28 most flexible (
2700: 61 6e 64 20 73 61 66 65 29 0d 0a 77 61 79 3c 2f and safe)..way</
2710: 6c 69 3e 0d 0a 3c 6c 69 3e 4f 6e 63 65 20 61 67 li>..<li>Once ag
2720: 61 69 6e 2c 20 47 65 6f 4a 53 4f 4e 20 69 73 20 ain, GeoJSON is
2730: 73 74 72 61 69 67 68 74 66 6f 72 77 61 72 64 20 straightforward
2740: 61 6e 64 20 73 69 6d 70 6c 65 2c 20 62 75 74 20 and simple, but
2750: 72 65 61 6c 6c 79 20 65 66 66 65 63 74 69 76 65 really effective
2760: 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c .</li>..</ul>..<
2770: 2f 74 64 3e 0d 0a 3c 2f 74 72 3e 0d 0a 3c 2f 74 /td>..</tr>..</t
2780: 61 62 6c 65 3e 0d 0a 3c 68 32 3e 53 6b 65 6c 65 able>..<h2>Skele
2790: 74 61 6c 20 47 65 6f 4a 53 4f 4e 20 61 6e 61 74 tal GeoJSON anat
27a0: 6f 6d 79 3c 2f 68 32 3e 0d 0a 3c 76 65 72 62 61 omy</h2>..<verba
27b0: 74 69 6d 3e 0d 0a 7b 0d 0a 20 20 20 22 74 79 70 tim>..{.. "typ
27c0: 65 22 3a 20 22 46 65 61 74 75 72 65 43 6f 6c 6c e": "FeatureColl
27d0: 65 63 74 69 6f 6e 22 2c 0d 0a 20 20 20 22 66 65 ection",.. "fe
27e0: 61 74 75 72 65 73 22 3a 20 0d 0a 20 20 20 5b 7b atures": .. [{
27f0: 0d 0a 20 20 20 20 20 20 20 22 74 79 70 65 22 3a .. "type":
2800: 20 22 46 65 61 74 75 72 65 22 2c 0d 0a 20 20 20 "Feature",..
2810: 20 20 20 20 22 67 65 6f 6d 65 74 72 79 22 3a 20 "geometry":
2820: 0d 0a 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 .. {..
2830: 20 20 20 20 20 20 20 22 74 79 70 65 22 3a 20 22 "type": "
2840: 50 6f 69 6e 74 22 2c 0d 0a 20 20 20 20 20 20 20 Point",..
2850: 20 20 20 20 22 63 6f 6f 72 64 69 6e 61 74 65 73 "coordinates
2860: 22 3a 20 5b 31 30 32 2e 30 2c 20 30 2e 35 5d 0d ": [102.0, 0.5].
2870: 0a 20 20 20 20 20 20 20 7d 2c 0d 0a 20 20 20 20 . },..
2880: 20 20 20 22 70 72 6f 70 65 72 74 69 65 73 22 3a "properties":
2890: 20 0d 0a 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 .. {..
28a0: 20 20 20 20 20 20 20 20 22 70 72 6f 70 30 22 3a "prop0":
28b0: 20 22 76 61 6c 75 65 30 22 0d 0a 20 20 20 20 20 "value0"..
28c0: 20 20 7d 0d 0a 20 20 20 20 7d 2c 20 0d 0a 20 20 }.. }, ..
28d0: 20 20 7b 0d 0a 20 20 20 20 20 20 20 22 74 79 70 {.. "typ
28e0: 65 22 3a 20 22 46 65 61 74 75 72 65 22 2c 0d 0a e": "Feature",..
28f0: 20 20 20 20 20 20 20 22 67 65 6f 6d 65 74 72 79 "geometry
2900: 22 3a 20 0d 0a 20 20 20 20 20 20 20 7b 0d 0a 20 ": .. {..
2910: 20 20 20 20 20 20 20 20 20 20 22 74 79 70 65 22 "type"
2920: 3a 20 22 4c 69 6e 65 53 74 72 69 6e 67 22 2c 0d : "LineString",.
2930: 0a 20 20 20 20 20 20 20 20 20 20 20 22 63 6f 6f . "coo
2940: 72 64 69 6e 61 74 65 73 22 3a 20 0d 0a 20 20 20 rdinates": ..
2950: 20 20 20 20 20 20 20 5b 0d 0a 20 20 20 20 20 20 [..
2960: 20 20 20 20 20 20 20 20 20 5b 31 30 32 2e 30 2c [102.0,
2970: 20 30 2e 30 5d 2c 0d 0a 20 20 20 20 20 20 20 20 0.0],..
2980: 20 20 20 20 20 20 20 5b 31 30 33 2e 30 2c 20 31 [103.0, 1
2990: 2e 30 5d 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 .0],..
29a0: 20 20 20 20 20 5b 31 30 34 2e 30 2c 20 30 2e 30 [104.0, 0.0
29b0: 5d 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ],..
29c0: 20 20 20 5b 31 30 35 2e 30 2c 20 31 2e 30 5d 0d [105.0, 1.0].
29d0: 0a 20 20 20 20 20 20 20 20 20 20 20 5d 0d 0a 20 . ]..
29e0: 20 20 20 20 20 20 7d 2c 0d 0a 20 20 20 20 20 20 },..
29f0: 20 22 70 72 6f 70 65 72 74 69 65 73 22 3a 20 0d "properties": .
2a00: 0a 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 . {..
2a10: 20 20 20 20 20 20 22 70 72 6f 70 30 22 3a 20 22 "prop0": "
2a20: 76 61 6c 75 65 30 22 2c 0d 0a 20 20 20 20 20 20 value0",..
2a30: 20 20 20 20 20 22 70 72 6f 70 31 22 3a 20 30 2e "prop1": 0.
2a40: 30 0d 0a 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 0.. }..
2a50: 20 7d 2c 20 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 }, .. {..
2a60: 20 20 20 20 22 74 79 70 65 22 3a 20 22 46 65 61 "type": "Fea
2a70: 74 75 72 65 22 2c 0d 0a 20 20 20 20 20 20 20 22 ture",.. "
2a80: 67 65 6f 6d 65 74 72 79 22 3a 20 0d 0a 20 20 20 geometry": ..
2a90: 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 {..
2aa0: 20 20 22 74 79 70 65 22 3a 20 22 50 6f 6c 79 67 "type": "Polyg
2ab0: 6f 6e 22 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 on",..
2ac0: 20 22 63 6f 6f 72 64 69 6e 61 74 65 73 22 3a 20 "coordinates":
2ad0: 0d 0a 20 20 20 20 20 20 20 20 20 20 20 5b 0d 0a .. [..
2ae0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 5b [
2af0: 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..
2b00: 20 20 20 20 20 5b 31 30 30 2e 30 2c 20 30 2e 30 [100.0, 0.0
2b10: 5d 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ],..
2b20: 20 20 20 20 20 20 20 5b 31 30 31 2e 30 2c 20 30 [101.0, 0
2b30: 2e 30 5d 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 .0],..
2b40: 20 20 20 20 20 20 20 20 20 5b 31 30 31 2e 30 2c [101.0,
2b50: 20 31 2e 30 5d 2c 0d 0a 20 20 20 20 20 20 20 20 1.0],..
2b60: 20 20 20 20 20 20 20 20 20 20 20 5b 31 30 30 2e [100.
2b70: 30 2c 20 31 2e 30 5d 2c 0d 0a 20 20 20 20 20 20 0, 1.0],..
2b80: 20 20 20 20 20 20 20 20 20 20 20 20 20 5b 31 30 [10
2b90: 30 2e 30 2c 20 30 2e 30 5d 0d 0a 20 20 20 20 20 0.0, 0.0]..
2ba0: 20 20 20 20 20 20 20 20 20 20 5d 0d 0a 20 20 20 ]..
2bb0: 20 20 20 20 20 20 20 20 5d 0d 0a 20 20 20 20 20 ]..
2bc0: 20 20 7d 2c 0d 0a 20 20 20 20 20 20 20 22 70 72 },.. "pr
2bd0: 6f 70 65 72 74 69 65 73 22 3a 20 0d 0a 20 20 20 operties": ..
2be0: 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 {..
2bf0: 20 20 22 70 72 6f 70 30 22 3a 20 22 76 61 6c 75 "prop0": "valu
2c00: 65 30 22 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 e0",..
2c10: 20 22 70 72 6f 70 31 22 3a 20 7b 22 74 68 69 73 "prop1": {"this
2c20: 22 3a 20 22 74 68 61 74 22 7d 0d 0a 20 20 20 20 ": "that"}..
2c30: 20 20 20 7d 0d 0a 20 20 20 7d 5d 0d 0a 7d 0d 0a }.. }]..}..
2c40: 3c 2f 76 65 72 62 61 74 69 6d 3e 0d 0a 41 73 20 </verbatim>..As
2c50: 79 6f 75 20 63 61 6e 20 65 61 73 69 6c 79 20 6e you can easily n
2c60: 6f 74 69 63 65 2c 20 47 65 6f 4a 53 4f 4e 20 68 otice, GeoJSON h
2c70: 61 73 20 61 20 70 6c 61 69 6e 20 72 65 67 75 6c as a plain regul
2c80: 61 72 20 73 74 72 75 63 74 75 72 65 20 61 6e 64 ar structure and
2c90: 20 69 73 20 64 65 63 69 73 69 76 65 6c 79 20 6d is decisively m
2ca0: 6f 73 74 20 63 6f 6e 63 69 73 65 20 61 6e 64 20 ost concise and
2cb0: 6c 65 73 73 20 76 65 72 62 6f 73 65 20 74 68 61 less verbose tha
2cc0: 6e 20 47 4d 4c 2f 58 4d 4c 3a 0d 0a 3c 75 6c 3e n GML/XML:..<ul>
2cd0: 0d 0a 3c 6c 69 3e 45 76 65 72 79 20 47 65 6f 4a ..<li>Every GeoJ
2ce0: 53 4f 4e 20 66 69 6c 65 20 6d 75 73 74 20 63 6f SON file must co
2cf0: 6e 74 61 69 6e 20 61 20 3c 62 3e 46 65 61 74 75 ntain a <b>Featu
2d00: 72 65 43 6f 6c 6c 65 63 74 69 6f 6e 3c 2f 62 3e reCollection</b>
2d10: 20 6f 62 6a 65 63 74 2e 0d 0a 3c 75 6c 3e 0d 0a object...<ul>..
2d20: 3c 6c 69 3e 41 20 20 3c 62 3e 46 65 61 74 75 72 <li>A <b>Featur
2d30: 65 43 6f 6c 6c 65 63 74 69 6f 6e 3c 2f 62 3e 20 eCollection</b>
2d40: 63 6f 6e 74 61 69 6e 73 20 6f 6e 65 20 6f 72 20 contains one or
2d50: 6d 6f 72 65 20 69 6e 64 69 76 69 64 75 61 6c 20 more individual
2d60: 3c 62 3e 46 65 61 74 75 72 65 3c 2f 62 3e 20 6f <b>Feature</b> o
2d70: 62 6a 65 63 74 73 2e 0d 0a 3c 75 6c 3e 0d 0a 3c bjects...<ul>..<
2d80: 6c 69 3e 45 61 63 68 20 3c 62 3e 46 65 61 74 75 li>Each <b>Featu
2d90: 72 65 3c 2f 62 3e 20 69 73 20 65 78 70 65 63 74 re</b> is expect
2da0: 65 64 20 74 6f 20 64 65 63 6c 61 72 65 20 61 20 ed to declare a
2db0: 3c 62 3e 47 65 6f 6d 65 74 72 79 3c 2f 62 3e 20 <b>Geometry</b>
2dc0: 61 6e 64 20 61 20 3c 62 3e 70 72 6f 70 65 72 74 and a <b>propert
2dd0: 69 65 73 3c 2f 62 3e 20 61 72 72 61 79 2e 0d 0a ies</b> array...
2de0: 3c 75 6c 3e 0d 0a 3c 6c 69 3e 45 61 63 68 20 70 <ul>..<li>Each p
2df0: 72 6f 70 65 72 74 79 20 63 6f 72 72 65 73 70 6f roperty correspo
2e00: 6e 64 73 20 74 6f 20 61 6e 20 61 74 74 72 69 62 nds to an attrib
2e10: 75 74 65 20 77 69 74 68 20 61 20 3c 62 3e 6e 61 ute with a <b>na
2e20: 6d 65 3c 2f 62 3e 20 61 6e 64 20 61 20 3c 62 3e me</b> and a <b>
2e30: 76 61 6c 75 65 3c 2f 62 3e 2e 3c 2f 6c 69 3e 0d value</b>.</li>.
2e40: 0a 3c 2f 6c 69 3e 3c 2f 75 6c 3e 0d 0a 3c 2f 6c .</li></ul>..</l
2e50: 69 3e 3c 2f 75 6c 3e 0d 0a 3c 2f 6c 69 3e 3c 2f i></ul>..</li></
2e60: 75 6c 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c 68 33 3e ul>..</ul>..<h3>
2e70: 53 68 6f 72 74 20 63 6f 6e 63 6c 75 73 69 6f 6e Short conclusion
2e80: 73 3c 2f 68 33 3e 0d 0a 47 65 6f 4a 53 4f 4e 20 s</h3>..GeoJSON
2e90: 69 73 20 77 69 64 65 6c 79 20 61 64 6f 70 74 65 is widely adopte
2ea0: 64 20 62 79 20 6d 61 6e 79 20 77 65 62 2d 61 70 d by many web-ap
2eb0: 70 73 3b 20 62 65 69 6e 67 20 61 20 6e 6f 74 61 ps; being a nota
2ec0: 74 69 6f 6e 20 64 69 72 65 63 74 6c 79 20 62 61 tion directly ba
2ed0: 73 65 64 20 6f 6e 20 3c 62 3e 4a 61 76 61 53 63 sed on <b>JavaSc
2ee0: 72 69 70 74 3c 2f 62 3e 20 69 74 20 68 61 73 20 ript</b> it has
2ef0: 61 20 6e 61 74 75 72 61 6c 20 69 6e 74 65 67 72 a natural integr
2f00: 61 74 69 6f 6e 20 69 6e 20 70 6f 70 75 6c 61 72 ation in popular
2f10: 20 3c 69 3e 63 6c 69 65 6e 74 2d 73 69 64 65 3c <i>client-side<
2f20: 2f 69 3e 20 4a 53 20 6c 69 62 72 61 72 69 65 73 /i> JS libraries
2f30: 20 73 75 63 68 20 61 73 20 3c 61 20 68 72 65 66 such as <a href
2f40: 3d 22 68 74 74 70 73 3a 2f 2f 65 6e 2e 77 69 6b ="https://en.wik
2f50: 69 70 65 64 69 61 2e 6f 72 67 2f 77 69 6b 69 2f ipedia.org/wiki/
2f60: 4f 70 65 6e 4c 61 79 65 72 73 22 3e 4f 70 65 6e OpenLayers">Open
2f70: 4c 61 79 65 72 73 3c 2f 61 3e 20 61 6e 64 20 3c Layers</a> and <
2f80: 61 20 68 72 65 66 3d 22 68 74 74 70 73 3a 2f 2f a href="https://
2f90: 65 6e 2e 77 69 6b 69 70 65 64 69 61 2e 6f 72 67 en.wikipedia.org
2fa0: 2f 77 69 6b 69 2f 4c 65 61 66 6c 65 74 5f 28 73 /wiki/Leaflet_(s
2fb0: 6f 66 74 77 61 72 65 29 22 3e 4c 65 61 66 6c 65 oftware)">Leafle
2fc0: 74 3c 2f 61 3e 2e 3c 62 72 3e 0d 0a 49 74 27 73 t</a>.<br>..It's
2fd0: 20 61 64 65 71 75 61 74 65 6c 79 20 73 75 70 70 adequately supp
2fe0: 6f 72 74 65 64 20 62 79 20 3c 61 20 68 72 65 66 orted by <a href
2ff0: 3d 22 68 74 74 70 73 3a 2f 2f 65 6e 2e 77 69 6b ="https://en.wik
3000: 69 70 65 64 69 61 2e 6f 72 67 2f 77 69 6b 69 2f ipedia.org/wiki/
3010: 47 44 41 4c 22 3e 47 44 41 4c 3c 2f 61 3e 2c 20 GDAL">GDAL</a>,
3020: 61 6e 64 20 63 6f 6e 73 65 71 75 65 6e 74 6c 79 and consequently
3030: 20 62 79 20 6d 61 6e 79 20 6f 74 68 65 72 73 20 by many others
3040: 66 72 65 65 2f 6c 69 62 72 65 20 73 77 20 63 6f free/libre sw co
3050: 6d 70 6f 6e 65 6e 74 73 20 28 61 73 20 65 2e 67 mponents (as e.g
3060: 2e 20 3c 61 20 68 72 65 66 3d 22 68 74 74 70 73 . <a href="https
3070: 3a 2f 2f 65 6e 2e 77 69 6b 69 70 65 64 69 61 2e ://en.wikipedia.
3080: 6f 72 67 2f 77 69 6b 69 2f 4d 61 70 53 65 72 76 org/wiki/MapServ
3090: 65 72 22 3e 4d 61 70 53 65 72 76 65 72 3c 2f 61 er">MapServer</a
30a0: 3e 20 61 6e 64 20 3c 61 20 68 72 65 66 3d 22 68 > and <a href="h
30b0: 74 74 70 73 3a 2f 2f 65 6e 2e 77 69 6b 69 70 65 ttps://en.wikipe
30c0: 64 69 61 2e 6f 72 67 2f 77 69 6b 69 2f 47 65 6f dia.org/wiki/Geo
30d0: 53 65 72 76 65 72 22 3e 47 65 6f 53 65 72 76 65 Server">GeoServe
30e0: 72 3c 2f 61 3e 29 2e 3c 62 72 3e 3c 62 72 3e 0d r</a>).<br><br>.
30f0: 0a 4f 75 74 73 69 64 65 20 74 68 65 20 77 65 62 .Outside the web
3100: 2d 67 69 73 20 61 72 65 6e 61 20 47 65 6f 4a 53 -gis arena GeoJS
3110: 4f 4e 20 73 74 69 6c 6c 20 68 61 73 20 6c 69 6d ON still has lim
3120: 69 74 65 64 20 61 64 6f 70 74 69 6f 6e 2c 20 61 ited adoption, a
3130: 6e 64 20 69 74 27 73 20 61 20 72 65 61 6c 20 70 nd it's a real p
3140: 69 74 79 20 62 65 63 61 75 73 65 20 75 6e 64 65 ity because unde
3150: 72 20 6d 61 6e 79 20 61 73 70 65 63 74 73 20 69 r many aspects i
3160: 74 27 73 20 61 20 76 65 72 79 20 76 61 6c 69 64 t's a very valid
3170: 20 66 75 6c 6c 20 72 65 70 6c 61 63 65 6d 65 6e full replacemen
3180: 74 20 66 6f 72 20 74 68 65 20 6e 6f 77 61 64 61 t for the nowada
3190: 79 73 20 69 72 72 65 6d 65 64 69 61 62 6c 79 20 ys irremediably
31a0: 6f 62 73 6f 6c 65 74 65 20 53 68 61 70 65 66 69 obsolete Shapefi
31b0: 6c 65 2e 3c 62 72 3e 0d 0a 53 74 61 72 74 69 6e le.<br>..Startin
31c0: 67 20 73 69 6e 63 65 20 76 65 72 73 69 6f 6e 20 g since version
31d0: 3c 62 3e 35 2e 30 2e 30 3c 2f 62 3e 20 53 70 61 <b>5.0.0</b> Spa
31e0: 74 69 61 4c 69 74 65 20 6f 66 66 65 72 73 20 66 tiaLite offers f
31f0: 75 6c 6c 20 73 75 70 70 6f 72 74 73 20 74 6f 20 ull supports to
3200: 47 65 6f 4a 53 4f 4e 20 61 73 20 64 65 66 69 6e GeoJSON as defin
3210: 65 64 20 62 79 20 52 46 43 20 37 39 34 36 2e 3c ed by RFC 7946.<
3220: 62 72 3e 0d 0a 54 68 65 20 69 6d 70 6c 65 6d 65 br>..The impleme
3230: 6e 74 61 74 69 6f 6e 20 73 74 72 6f 6e 67 6c 79 ntation strongly
3240: 20 72 65 73 65 6d 62 6c 65 73 20 74 68 65 20 6f resembles the o
3250: 6e 65 20 73 75 70 70 6f 72 74 65 64 20 62 79 20 ne supported by
3260: 61 6c 6c 20 70 72 65 76 69 6f 75 73 20 76 65 72 all previous ver
3270: 73 69 6f 6e 73 20 66 6f 72 20 53 68 61 70 65 66 sions for Shapef
3280: 69 6c 65 2c 20 61 6e 64 20 74 68 69 73 20 69 73 ile, and this is
3290: 6e 27 74 20 61 74 20 61 6c 6c 20 73 75 72 70 72 n't at all surpr
32a0: 69 73 69 6e 67 20 62 65 63 61 75 73 65 20 62 6f ising because bo
32b0: 74 68 20 74 68 65 6d 20 63 6f 76 65 72 20 74 68 th them cover th
32c0: 65 20 73 61 6d 65 20 66 75 6e 63 74 69 6f 6e 61 e same functiona
32d0: 6c 20 61 72 65 61 2e 0d 0a 3c 62 72 3e 3c 62 72 l area...<br><br
32e0: 3e 0d 0a 3c 68 72 3e 0d 0a 3c 68 31 3e 53 51 4c >..<hr>..<h1>SQL
32f0: 20 66 75 6e 63 74 69 6f 6e 73 20 73 75 70 70 6f functions suppo
3300: 72 74 69 6e 67 20 47 65 6f 4a 53 4f 4e 3c 2f 68 rting GeoJSON</h
3310: 31 3e 0d 0a 3c 68 33 3e 45 78 70 6f 72 74 69 6e 1>..<h3>Exportin
3320: 67 20 64 61 74 61 20 74 6f 20 47 65 6f 4a 53 4f g data to GeoJSO
3330: 4e 3c 2f 68 33 3e 0d 0a 3c 76 65 72 62 61 74 69 N</h3>..<verbati
3340: 6d 3e 0d 0a 53 45 4c 45 43 54 20 45 78 70 6f 72 m>..SELECT Expor
3350: 74 47 65 6f 4a 53 4f 4e 32 28 27 6d 79 74 61 62 tGeoJSON2('mytab
3360: 6c 65 27 2c 20 27 67 65 6f 6d 27 2c 20 27 2f 68 le', 'geom', '/h
3370: 6f 6d 65 2f 73 61 6e 64 72 6f 2f 6d 79 74 61 62 ome/sandro/mytab
3380: 6c 65 2e 67 65 6f 6a 73 6f 6e 27 29 3b 0d 0a 2d le.geojson');..-
3390: 2d 2d 2d 2d 2d 2d 2d 2d 0d 0a 31 32 33 34 0d 0a --------..1234..
33a0: 0d 0a 53 45 4c 45 43 54 20 45 78 70 6f 72 74 47 ..SELECT ExportG
33b0: 65 6f 4a 53 4f 4e 32 28 27 6d 79 74 61 62 6c 65 eoJSON2('mytable
33c0: 27 2c 20 27 67 65 6f 6d 27 2c 20 27 2f 68 6f 6d ', 'geom', '/hom
33d0: 65 2f 73 61 6e 64 72 6f 2f 6d 79 74 61 62 6c 65 e/sandro/mytable
33e0: 2e 67 65 6f 6a 73 6f 6e 27 2c 20 31 32 29 3b 0d .geojson', 12);.
33f0: 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 0a 31 32 33 34 .---------..1234
3400: 0d 0a 0d 0a 53 45 4c 45 43 54 20 45 78 70 6f 72 ....SELECT Expor
3410: 74 47 65 6f 4a 53 4f 4e 32 28 27 6d 79 74 61 62 tGeoJSON2('mytab
3420: 6c 65 27 2c 20 27 67 65 6f 6d 27 2c 20 27 2f 68 le', 'geom', '/h
3430: 6f 6d 65 2f 73 61 6e 64 72 6f 2f 6d 79 74 61 62 ome/sandro/mytab
3440: 6c 65 2e 67 65 6f 6a 73 6f 6e 27 2c 20 31 32 2c le.geojson', 12,
3450: 20 31 29 3b 0d 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 1);..---------.
3460: 0a 31 32 33 34 0d 0a 0d 0a 53 45 4c 45 43 54 20 .1234....SELECT
3470: 45 78 70 6f 72 74 47 65 6f 4a 53 4f 4e 32 28 27 ExportGeoJSON2('
3480: 6d 79 74 61 62 6c 65 27 2c 20 27 67 65 6f 6d 27 mytable', 'geom'
3490: 2c 20 27 2f 68 6f 6d 65 2f 73 61 6e 64 72 6f 2f , '/home/sandro/
34a0: 6d 79 74 61 62 6c 65 2e 67 65 6f 6a 73 6f 6e 27 mytable.geojson'
34b0: 2c 20 31 32 2c 20 31 2c 20 30 29 3b 0d 0a 2d 2d , 12, 1, 0);..--
34c0: 2d 2d 2d 2d 2d 2d 2d 0d 0a 31 32 33 34 0d 0a 0d -------..1234...
34d0: 0a 53 45 4c 45 43 54 20 45 78 70 6f 72 74 47 65 .SELECT ExportGe
34e0: 6f 4a 53 4f 4e 32 28 27 6d 79 74 61 62 6c 65 27 oJSON2('mytable'
34f0: 2c 20 27 67 65 6f 6d 27 2c 20 27 2f 68 6f 6d 65 , 'geom', '/home
3500: 2f 73 61 6e 64 72 6f 2f 6d 79 74 61 62 6c 65 2e /sandro/mytable.
3510: 67 65 6f 6a 73 6f 6e 27 2c 20 31 32 2c 20 31 2c geojson', 12, 1,
3520: 20 30 2c 20 31 29 3b 0d 0a 2d 2d 2d 2d 2d 2d 2d 0, 1);..-------
3530: 2d 2d 0d 0a 31 32 33 34 0d 0a 0d 0a 53 45 4c 45 --..1234....SELE
3540: 43 54 20 45 78 70 6f 72 74 47 65 6f 4a 53 4f 4e CT ExportGeoJSON
3550: 32 28 27 6d 79 74 61 62 6c 65 27 2c 20 27 67 65 2('mytable', 'ge
3560: 6f 6d 27 2c 20 27 2f 68 6f 6d 65 2f 73 61 6e 64 om', '/home/sand
3570: 72 6f 2f 6d 79 74 61 62 6c 65 2e 67 65 6f 6a 73 ro/mytable.geojs
3580: 6f 6e 27 2c 20 31 32 2c 20 31 2c 20 30 2c 20 31 on', 12, 1, 0, 1
3590: 2c 20 27 4c 4f 57 45 52 43 41 53 45 27 29 3b 0d , 'LOWERCASE');.
35a0: 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 0a 31 32 33 34 .---------..1234
35b0: 0d 0a 3c 2f 76 65 72 62 61 74 69 6d 3e 0d 0a 54 ..</verbatim>..T
35c0: 68 65 20 53 51 4c 20 66 75 6e 63 74 69 6f 6e 20 he SQL function
35d0: 3c 62 3e 45 78 70 6f 72 74 47 65 6f 4a 53 4f 4e <b>ExportGeoJSON
35e0: 32 28 29 3c 2f 62 3e 20 63 61 6e 20 64 69 72 65 2()</b> can dire
35f0: 63 74 6c 79 20 65 78 70 6f 72 74 20 61 20 77 68 ctly export a wh
3600: 6f 6c 65 20 53 70 61 74 69 61 6c 20 54 61 62 6c ole Spatial Tabl
3610: 65 20 28 61 6b 61 20 3c 69 3e 4c 61 79 65 72 3c e (aka <i>Layer<
3620: 2f 69 3e 29 20 69 6e 74 6f 20 61 6e 20 65 78 74 /i>) into an ext
3630: 65 72 6e 61 6c 20 47 65 6f 4a 53 4f 4e 20 66 69 ernal GeoJSON fi
3640: 6c 65 20 63 6f 6e 66 6f 72 6d 61 6e 74 20 74 6f le conformant to
3650: 20 52 46 43 20 37 39 34 36 2e 3c 62 72 3e 0d 0a RFC 7946.<br>..
3660: 54 68 69 73 20 66 75 6e 63 74 69 6f 6e 20 61 63 This function ac
3670: 63 65 70 74 73 20 74 68 65 20 66 6f 6c 6c 6f 77 cepts the follow
3680: 69 6e 67 20 61 72 67 75 6d 65 6e 74 73 3a 0d 0a ing arguments:..
3690: 3c 6f 6c 3e 0d 0a 3c 6c 69 3e 3c 62 3e 74 61 62 <ol>..<li><b>tab
36a0: 6c 65 3c 2f 62 3e 3a 20 28 3c 69 3e 6d 61 6e 64 le</b>: (<i>mand
36b0: 61 74 6f 72 79 3c 2f 69 3e 29 20 6e 61 6d 65 20 atory</i>) name
36c0: 6f 66 20 74 68 65 20 53 70 61 74 69 61 6c 20 54 of the Spatial T
36d0: 61 62 6c 65 20 74 6f 20 62 65 20 65 78 70 6f 72 able to be expor
36e0: 74 65 64 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c ted.</li>..<li><
36f0: 62 3e 67 65 6f 6d 5f 63 6f 6c 75 6d 6e 3c 2f 62 b>geom_column</b
3700: 3e 3a 20 28 3c 69 3e 6d 61 6e 64 61 74 6f 72 79 >: (<i>mandatory
3710: 3c 2f 69 3e 29 20 6e 61 6d 65 20 6f 66 20 74 68 </i>) name of th
3720: 65 20 43 6f 6c 75 6d 6e 20 63 6f 6e 74 61 69 6e e Column contain
3730: 69 6e 67 20 74 68 65 20 47 65 6f 6d 65 74 72 69 ing the Geometri
3740: 65 73 20 74 6f 20 62 65 20 65 78 70 6f 72 74 65 es to be exporte
3750: 64 2e 3c 62 72 3e 0d 0a 43 61 6e 20 62 65 20 3c d.<br>..Can be <
3760: 62 3e 4e 55 4c 4c 3c 2f 62 3e 2c 20 61 6e 64 20 b>NULL</b>, and
3770: 69 6e 20 74 68 69 73 20 63 61 73 65 20 74 68 65 in this case the
3780: 20 66 75 6e 63 74 69 6f 6e 20 77 69 6c 6c 20 61 function will a
3790: 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 64 65 74 utomatically det
37a0: 65 72 6d 69 6e 65 20 74 68 65 20 61 70 70 72 6f ermine the appro
37b0: 70 72 69 61 74 65 20 43 6f 6c 75 6d 6e 2d 6e 61 priate Column-na
37c0: 6d 65 20 69 66 20 74 68 65 20 54 61 62 6c 65 20 me if the Table
37d0: 6a 75 73 74 20 63 6f 6e 74 61 69 6e 73 20 61 20 just contains a
37e0: 73 69 6e 67 6c 65 20 47 65 6f 6d 65 74 72 79 2c single Geometry,
37f0: 20 6f 74 68 65 72 77 69 73 65 20 61 20 66 61 69 otherwise a fai
3800: 6c 75 72 65 20 77 69 6c 6c 20 66 6f 6c 6c 6f 77 lure will follow
3810: 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 66 .</li>..<li><b>f
3820: 69 6c 65 6e 61 6d 65 3c 2f 62 3e 3a 20 28 3c 69 ilename</b>: (<i
3830: 3e 6d 61 6e 64 61 74 6f 72 79 3c 2f 69 3e 29 20 >mandatory</i>)
3840: 61 62 73 6f 6c 75 74 65 20 6f 72 20 72 65 6c 61 absolute or rela
3850: 74 69 76 65 20 70 61 74 68 20 6f 66 20 74 68 65 tive path of the
3860: 20 47 65 6f 4a 73 6f 6e 20 66 69 6c 65 20 74 6f GeoJson file to
3870: 20 62 65 20 63 72 65 61 74 65 64 20 28 3c 69 3e be created (<i>
3880: 6f 75 74 70 75 74 20 66 69 6c 65 3c 2f 69 3e 29 output file</i>)
3890: 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 70 .</li>..<li><b>p
38a0: 72 65 63 69 73 69 6f 6e 3c 2f 62 3e 3a 20 28 3c recision</b>: (<
38b0: 69 3e 6f 70 74 69 6f 6e 61 6c 3c 2f 69 3e 29 20 i>optional</i>)
38c0: 6e 75 6d 62 65 72 20 6f 66 20 64 65 63 69 6d 61 number of decima
38d0: 6c 20 64 69 67 69 74 73 20 74 6f 20 62 65 20 75 l digits to be u
38e0: 73 65 64 20 66 6f 72 20 63 6f 6f 72 64 69 6e 61 sed for coordina
38f0: 74 65 20 76 61 6c 75 65 73 3b 20 74 68 65 20 64 te values; the d
3900: 65 66 61 75 6c 74 20 73 65 74 74 69 6e 67 20 69 efault setting i
3910: 73 20 3c 62 3e 38 3c 2f 62 3e 2e 3c 2f 6c 69 3e s <b>8</b>.</li>
3920: 0d 0a 3c 6c 69 3e 3c 62 3e 6c 6f 6e 5f 6c 61 74 ..<li><b>lon_lat
3930: 3c 2f 62 3e 3a 20 28 3c 69 3e 6f 70 74 69 6f 6e </b>: (<i>option
3940: 61 6c 3c 2f 69 3e 29 20 74 68 69 73 20 69 73 20 al</i>) this is
3950: 61 20 62 6f 6f 6c 65 61 6e 20 66 6c 61 67 3a 0d a boolean flag:.
3960: 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 69 66 20 73 65 .<ul>..<li>if se
3970: 74 20 74 6f 20 3c 62 3e 46 41 4c 53 45 3c 2f 62 t to <b>FALSE</b
3980: 3e 20 61 6c 6c 20 63 6f 6f 72 64 69 6e 61 74 65 > all coordinate
3990: 73 20 77 69 6c 6c 20 62 65 20 65 78 70 6f 72 74 s will be export
39a0: 65 64 20 65 78 61 63 74 6c 79 20 61 73 20 74 68 ed exactly as th
39b0: 65 79 20 61 72 65 2e 3c 2f 6c 69 3e 0d 0a 3c 6c ey are.</li>..<l
39c0: 69 3e 69 66 20 73 65 74 20 74 6f 20 3c 62 3e 54 i>if set to <b>T
39d0: 52 55 45 3c 2f 62 3e 20 61 6c 6c 20 63 6f 6f 72 RUE</b> all coor
39e0: 64 69 6e 61 74 65 73 20 77 69 6c 6c 20 62 65 20 dinates will be
39f0: 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 74 72 automatically tr
3a00: 61 6e 73 66 6f 72 6d 65 64 20 28 69 66 20 72 65 ansformed (if re
3a10: 71 75 69 72 65 64 29 20 69 6e 74 6f 20 3c 62 3e quired) into <b>
3a20: 53 52 49 44 3d 34 33 32 36 20 57 47 53 20 38 34 SRID=4326 WGS 84
3a30: 3c 2f 62 3e 20 61 73 20 72 65 71 75 69 72 65 64 </b> as required
3a40: 20 62 79 20 52 46 43 20 37 39 34 36 2e 3c 62 72 by RFC 7946.<br
3a50: 3e 0d 0a 54 68 69 73 20 69 73 20 74 68 65 20 64 >..This is the d
3a60: 65 66 61 75 6c 74 20 73 65 74 74 69 6e 67 2e 3c efault setting.<
3a70: 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 3c 2f 6c 69 3e /li>..</ul></li>
3a80: 0d 0a 3c 6c 69 3e 3c 62 3e 4d 5f 63 6f 6f 72 64 ..<li><b>M_coord
3a90: 73 3c 2f 62 3e 3a 20 28 3c 69 3e 6f 70 74 69 6f s</b>: (<i>optio
3aa0: 6e 61 6c 3c 2f 69 3e 29 20 74 68 69 73 20 74 6f nal</i>) this to
3ab0: 6f 20 69 73 20 61 20 62 6f 6f 6c 65 61 6e 20 66 o is a boolean f
3ac0: 6c 61 67 3a 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e lag:..<ul>..<li>
3ad0: 69 66 20 73 65 74 20 74 6f 20 3c 62 3e 46 41 4c if set to <b>FAL
3ae0: 53 45 3c 2f 62 3e 20 65 76 65 6e 74 75 61 6c 20 SE</b> eventual
3af0: 3c 62 3e 4d 2d 76 61 6c 75 65 73 3c 2f 62 3e 20 <b>M-values</b>
3b00: 77 69 6c 6c 20 62 65 20 73 69 6d 70 6c 79 20 69 will be simply i
3b10: 67 6e 6f 72 65 64 2c 20 61 73 20 72 65 71 75 69 gnored, as requi
3b20: 72 65 64 20 62 79 20 52 46 43 20 37 39 34 36 2e red by RFC 7946.
3b30: 3c 62 72 3e 0d 0a 54 68 69 73 20 69 73 20 74 68 <br>..This is th
3b40: 65 20 64 65 66 61 75 6c 74 20 73 65 74 74 69 6e e default settin
3b50: 67 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 69 66 20 g.</li>..<li>if
3b60: 73 65 74 20 74 6f 20 3c 62 3e 54 52 55 45 3c 2f set to <b>TRUE</
3b70: 62 3e 20 65 76 65 6e 74 75 61 6c 20 3c 62 3e 4d b> eventual <b>M
3b80: 2d 76 61 6c 75 65 73 3c 2f 62 3e 20 77 69 6c 6c -values</b> will
3b90: 20 62 65 20 65 78 70 6f 72 74 65 64 20 69 6e 74 be exported int
3ba0: 6f 20 74 68 65 20 47 65 6f 4a 53 4f 4e 20 66 69 o the GeoJSON fi
3bb0: 6c 65 20 61 73 20 65 78 74 72 61 2d 63 6f 6f 72 le as extra-coor
3bc0: 64 69 6e 61 74 65 73 2e 3c 62 72 3e 0d 0a 3c 75 dinates.<br>..<u
3bd0: 3e 4e 6f 74 65 3c 2f 75 3e 3a 20 74 68 65 20 72 >Note</u>: the r
3be0: 65 73 75 6c 74 69 6e 67 20 6f 75 74 70 75 74 20 esulting output
3bf0: 66 69 6c 65 20 63 6f 75 6c 64 20 65 61 73 69 6c file could easil
3c00: 79 20 73 75 66 66 65 72 20 66 72 6f 6d 20 6c 69 y suffer from li
3c10: 6d 69 74 65 64 20 70 6f 72 74 61 62 69 6c 69 74 mited portabilit
3c20: 79 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 3c 2f y.</li>..</ul></
3c30: 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 69 6e 64 65 li>..<li><b>inde
3c40: 6e 74 65 64 3c 2f 62 3e 3a 20 28 3c 69 3e 6f 70 nted</b>: (<i>op
3c50: 74 69 6f 6e 61 6c 3c 2f 69 3e 29 20 79 65 74 20 tional</i>) yet
3c60: 61 6e 6f 74 68 65 72 20 62 6f 6f 6c 65 61 6e 20 another boolean
3c70: 66 6c 61 67 3a 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 flag:..<ul>..<li
3c80: 3e 49 66 20 73 65 74 20 74 6f 20 3c 62 3e 54 52 >If set to <b>TR
3c90: 55 45 3c 2f 62 3e 20 74 68 65 20 6f 75 74 70 75 UE</b> the outpu
3ca0: 74 20 66 69 6c 65 20 77 69 6c 6c 20 62 65 20 70 t file will be p
3cb0: 72 6f 70 65 72 6c 79 20 69 6e 64 65 6e 74 65 64 roperly indented
3cc0: 20 66 6f 72 20 65 6e 68 61 6e 63 65 64 20 68 75 for enhanced hu
3cd0: 6d 61 6e 20 72 65 61 64 61 62 69 6c 69 74 79 2e man readability.
3ce0: 3c 62 72 3e 0d 0a 54 68 69 73 20 69 73 20 74 68 <br>..This is th
3cf0: 65 20 64 65 66 61 75 6c 74 20 73 65 74 74 69 6e e default settin
3d00: 67 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 49 66 20 g.</li>..<li>If
3d10: 73 65 74 20 74 6f 20 3c 62 3e 46 41 4c 53 45 3c set to <b>FALSE<
3d20: 2f 62 3e 20 74 68 65 20 6f 75 74 70 75 74 20 66 /b> the output f
3d30: 69 6c 65 20 77 69 6c 6c 20 62 65 20 61 6c 6c 20 ile will be all
3d40: 69 6e 20 61 20 73 69 6e 67 6c 65 20 6d 6f 6e 6f in a single mono
3d50: 6c 69 74 68 69 63 20 6c 69 6e 65 20 77 69 74 68 lithic line with
3d60: 6f 75 74 20 62 6c 61 6e 6b 20 73 70 61 63 65 73 out blank spaces
3d70: 20 6f 72 20 6e 65 77 6c 69 6e 65 73 20 28 6e 6f or newlines (no
3d80: 74 69 63 65 61 62 6c 79 20 73 6d 61 6c 6c 65 72 ticeably smaller
3d90: 29 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 3c 2f ).</li>..</ul></
3da0: 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 63 6f 6c 6e li>..<li><b>coln
3db0: 61 6d 65 5f 63 61 73 65 3c 2f 62 3e 3a 20 28 3c ame_case</b>: (<
3dc0: 69 3e 6f 70 74 69 6f 6e 61 6c 3c 2f 69 3e 29 20 i>optional</i>)
3dd0: 63 61 6e 20 61 73 73 75 6d 65 20 6f 6e 65 20 74 can assume one t
3de0: 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 76 61 6c he following val
3df0: 75 65 73 3a 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e ues:..<ul>..<li>
3e00: 3c 62 3e 27 55 50 50 45 52 27 3c 2f 62 3e 20 6f <b>'UPPER'</b> o
3e10: 72 20 3c 62 3e 27 55 50 50 45 52 43 41 53 45 27 r <b>'UPPERCASE'
3e20: 3c 2f 62 3e 3a 20 61 6c 6c 20 61 74 74 72 69 62 </b>: all attrib
3e30: 75 74 65 20 6e 61 6d 65 73 20 77 69 6c 6c 20 62 ute names will b
3e40: 65 20 69 6e 73 65 72 74 65 64 20 69 6e 74 6f 20 e inserted into
3e50: 74 68 65 20 6f 75 74 70 75 74 20 66 69 6c 65 20 the output file
3e60: 69 6e 20 66 75 6c 6c 20 75 70 70 65 72 20 63 61 in full upper ca
3e70: 73 65 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 se.</li>..<li><b
3e80: 3e 27 4c 4f 57 45 52 27 3c 2f 62 3e 20 6f 72 20 >'LOWER'</b> or
3e90: 3c 62 3e 27 4c 4f 57 45 52 43 41 53 45 27 3c 2f <b>'LOWERCASE'</
3ea0: 62 3e 3a 20 61 6c 6c 20 61 74 74 72 69 62 75 74 b>: all attribut
3eb0: 65 20 6e 61 6d 65 73 20 77 69 6c 6c 20 62 65 20 e names will be
3ec0: 69 6e 73 65 72 74 65 64 20 69 6e 74 6f 20 74 68 inserted into th
3ed0: 65 20 6f 75 74 70 75 74 20 66 69 6c 65 20 69 6e e output file in
3ee0: 20 66 75 6c 6c 20 6c 6f 77 65 72 20 63 61 73 65 full lower case
3ef0: 2e 3c 62 72 3e 0d 0a 54 68 69 73 20 69 73 20 74 .<br>..This is t
3f00: 68 65 20 64 65 66 61 75 6c 74 20 73 65 74 74 69 he default setti
3f10: 6e 67 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 ng.</li>..<li><b
3f20: 3e 27 53 41 4d 45 27 3c 2f 62 3e 20 6f 72 20 3c >'SAME'</b> or <
3f30: 62 3e 27 53 41 4d 45 43 41 53 45 27 3c 2f 62 3e b>'SAMECASE'</b>
3f40: 3a 20 61 6c 6c 20 61 74 74 72 69 62 75 74 65 20 : all attribute
3f50: 6e 61 6d 65 73 20 77 69 6c 6c 20 62 65 20 69 6e names will be in
3f60: 73 65 72 74 65 64 20 69 6e 74 6f 20 74 68 65 20 serted into the
3f70: 6f 75 74 70 75 74 20 66 69 6c 65 20 70 72 65 73 output file pres
3f80: 65 72 76 69 6e 67 20 61 6c 6c 20 75 70 70 65 72 erving all upper
3f90: 2d 20 61 6e 64 20 6c 6f 77 65 72 2d 63 61 73 65 - and lower-case
3fa0: 20 6c 65 74 74 65 72 73 20 65 78 61 63 74 6c 79 letters exactly
3fb0: 20 61 73 20 74 68 65 79 20 61 72 65 20 64 65 66 as they are def
3fc0: 69 6e 65 64 20 69 6e 20 74 68 65 20 63 6f 72 72 ined in the corr
3fd0: 65 73 70 6f 6e 64 69 6e 67 20 63 6f 6c 75 6d 6e esponding column
3fe0: 20 6e 61 6d 65 73 2e 3c 2f 6c 69 3e 0d 0a 3c 2f names.</li>..</
3ff0: 75 6c 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 74 68 ul></li>..<li>th
4000: 65 20 3c 62 3e 72 65 74 75 72 6e 20 76 61 6c 75 e <b>return valu
4010: 65 3c 2f 62 3e 20 69 73 20 61 6e 20 3c 62 3e 49 e</b> is an <b>I
4020: 4e 54 45 47 45 52 3c 2f 62 3e 20 63 6f 72 72 65 NTEGER</b> corre
4030: 73 70 6f 6e 64 69 6e 67 20 74 6f 20 74 68 65 20 sponding to the
4040: 6e 75 6d 62 65 72 20 6f 66 20 65 78 70 6f 72 74 number of export
4050: 65 64 20 72 6f 77 73 2c 20 6f 72 20 3c 62 3e 4e ed rows, or <b>N
4060: 55 4c 4c 3c 2f 62 3e 20 69 6e 20 74 68 65 20 63 ULL</b> in the c
4070: 61 73 65 20 6f 66 20 66 61 69 6c 75 72 65 20 6f ase of failure o
4080: 72 20 69 6e 76 61 6c 69 64 20 61 72 67 75 6d 65 r invalid argume
4090: 6e 74 73 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 6f 6c 3e nts.</li>..</ol>
40a0: 0d 0a 3c 74 61 62 6c 65 20 63 65 6c 6c 73 70 61 ..<table cellspa
40b0: 63 69 6e 67 3d 22 34 22 20 63 65 6c 6c 70 61 64 cing="4" cellpad
40c0: 64 69 6e 67 3d 22 38 22 20 62 67 63 6f 6c 6f 72 ding="8" bgcolor
40d0: 3d 22 23 66 66 66 66 64 30 22 3e 3c 74 72 3e 3c ="#ffffd0"><tr><
40e0: 74 64 3e 0d 0a 3c 68 33 3e 43 61 76 65 61 74 3c td>..<h3>Caveat<
40f0: 2f 68 33 3e 0d 0a 41 20 73 69 6d 69 6c 61 72 20 /h3>..A similar
4100: 66 75 6e 63 74 69 6f 6e 20 6e 61 6d 65 64 20 3c function named <
4110: 62 3e 45 78 70 6f 72 74 47 65 6f 4a 53 4f 4e 28 b>ExportGeoJSON(
4120: 29 3c 2f 62 3e 20 77 61 73 20 61 6c 72 65 61 64 )</b> was alread
4130: 79 20 73 75 70 70 6f 72 74 65 64 20 62 79 20 70 y supported by p
4140: 72 65 76 69 6f 75 73 20 76 65 72 73 69 6f 6e 73 revious versions
4150: 20 6f 66 20 53 70 61 74 69 61 4c 69 74 65 2c 20 of SpatiaLite,
4160: 62 75 74 20 69 74 20 77 61 73 20 6d 6f 64 65 6c but it was model
4170: 6c 65 64 20 61 67 61 69 6e 73 74 20 74 68 65 20 led against the
4180: 6f 6c 64 20 28 3c 62 3e 70 72 65 2d 52 46 43 3c old (<b>pre-RFC<
4190: 2f 62 3e 29 20 47 65 6f 4a 53 4f 4e 20 73 70 65 /b>) GeoJSON spe
41a0: 63 69 66 69 63 61 74 69 6f 6e 2e 3c 62 72 3e 0d cification.<br>.
41b0: 0a 3c 62 3e 45 78 70 6f 72 74 47 65 6f 4a 53 4f .<b>ExportGeoJSO
41c0: 4e 28 29 3c 2f 62 3e 20 69 73 20 6e 6f 77 20 3c N()</b> is now <
41d0: 62 3e 44 45 50 52 45 43 41 54 45 44 3c 2f 62 3e b>DEPRECATED</b>
41e0: 2c 20 61 6e 64 20 77 69 6c 6c 20 72 65 6d 61 69 , and will remai
41f0: 6e 20 74 6f 20 61 76 6f 69 64 20 62 72 65 61 6b n to avoid break
4200: 69 6e 67 20 65 78 69 73 74 69 6e 67 20 61 70 70 ing existing app
4210: 6c 69 63 61 74 69 6f 6e 73 20 61 6e 64 20 73 63 lications and sc
4220: 72 69 70 74 73 2e 3c 62 72 3e 3c 62 72 3e 0d 0a ripts.<br><br>..
4230: 49 74 20 69 73 20 73 74 72 6f 6e 67 6c 79 20 72 It is strongly r
4240: 65 63 6f 6d 6d 65 6e 64 65 64 20 74 6f 20 75 73 ecommended to us
4250: 65 20 3c 62 3e 45 78 70 6f 72 74 47 65 6f 4a 53 e <b>ExportGeoJS
4260: 4f 4e 32 28 29 3c 2f 62 3e 20 66 6f 72 20 61 6e ON2()</b> for an
4270: 79 20 6e 65 77 20 64 65 76 65 6c 6f 70 6d 65 6e y new developmen
4280: 74 20 61 73 20 66 75 6c 6c 20 72 65 70 6c 61 63 t as full replac
4290: 65 6d 65 6e 74 20 63 6f 6e 66 6f 72 6d 61 6e 74 ement conformant
42a0: 20 74 6f 20 52 46 43 20 37 39 34 36 2e 0d 0a 3c to RFC 7946...<
42b0: 2f 74 64 3e 3c 2f 74 72 3e 3c 2f 74 61 62 6c 65 /td></tr></table
42c0: 3e 0d 0a 3c 62 72 3e 0d 0a 3c 74 61 62 6c 65 20 >..<br>..<table
42d0: 63 65 6c 6c 73 70 61 63 69 6e 67 3d 22 34 22 20 cellspacing="4"
42e0: 63 65 6c 6c 70 61 64 64 69 6e 67 3d 22 38 22 20 cellpadding="8"
42f0: 62 67 63 6f 6c 6f 72 3d 22 23 66 66 63 30 61 30 bgcolor="#ffc0a0
4300: 22 3e 3c 74 72 3e 3c 74 64 3e 0d 0a 3c 68 33 3e "><tr><td>..<h3>
4310: 57 61 72 6e 69 6e 67 3c 2f 68 33 3e 0d 0a 54 68 Warning</h3>..Th
4320: 69 73 20 53 51 4c 20 66 75 6e 63 74 69 6f 6e 20 is SQL function
4330: 6f 70 65 6e 20 74 68 65 20 64 6f 6f 72 20 74 6f open the door to
4340: 20 6d 61 6e 79 20 70 6f 74 65 6e 74 69 61 6c 20 many potential
4350: 73 65 63 75 72 69 74 79 20 69 73 73 75 65 73 2c security issues,
4360: 20 61 6e 64 20 74 68 75 73 20 3c 62 3e 3c 69 3e and thus <b><i>
4370: 69 73 20 61 6c 77 61 79 73 20 64 69 73 61 62 6c is always disabl
4380: 65 64 20 62 79 20 64 65 66 61 75 6c 74 3c 2f 69 ed by default</i
4390: 3e 3c 2f 62 3e 2e 3c 62 72 3e 0d 0a 45 78 70 6c ></b>.<br>..Expl
43a0: 69 63 69 74 6c 79 20 73 65 74 74 69 6e 67 20 74 icitly setting t
43b0: 68 65 20 65 78 74 65 72 6e 61 6c 20 76 61 72 69 he external vari
43c0: 61 62 6c 65 20 3c 62 3e 53 50 41 54 49 41 4c 49 able <b>SPATIALI
43d0: 54 45 5f 53 45 43 55 52 49 54 59 3d 72 65 6c 61 TE_SECURITY=rela
43e0: 78 65 64 3c 2f 62 3e 20 69 73 20 61 62 73 6f 6c xed</b> is absol
43f0: 75 74 65 6c 79 20 72 65 71 75 69 72 65 64 20 69 utely required i
4400: 6e 20 6f 72 64 65 72 20 74 6f 20 65 6e 61 62 6c n order to enabl
4410: 65 20 74 68 69 73 20 66 75 6e 63 74 69 6f 6e 2e e this function.
4420: 0d 0a 3c 2f 74 64 3e 3c 2f 74 72 3e 3c 2f 74 61 ..</td></tr></ta
4430: 62 6c 65 3e 0d 0a 3c 62 72 3e 0d 0a 3c 68 72 3e ble>..<br>..<hr>
4440: 0d 0a 3c 68 33 3e 49 6d 70 6f 72 74 69 6e 67 20 ..<h3>Importing
4450: 64 61 74 61 20 66 72 6f 6d 20 47 65 6f 4a 53 4f data from GeoJSO
4460: 4e 3c 2f 68 33 3e 0d 0a 3c 76 65 72 62 61 74 69 N</h3>..<verbati
4470: 6d 3e 0d 0a 53 45 4c 45 43 54 20 49 6d 70 6f 72 m>..SELECT Impor
4480: 74 47 65 6f 4a 53 4f 4e 28 27 2f 68 6f 6d 65 2f tGeoJSON('/home/
4490: 73 61 6e 64 72 6f 2f 73 6f 6d 65 6c 61 79 65 72 sandro/somelayer
44a0: 2e 67 65 6f 6a 73 6f 6e 27 2c 20 27 73 6f 6d 65 .geojson', 'some
44b0: 6c 61 79 65 72 27 29 3b 0d 0a 2d 2d 2d 2d 2d 2d layer');..------
44c0: 2d 2d 2d 2d 2d 0d 0a 39 39 0d 0a 0d 0a 53 45 4c -----..99....SEL
44d0: 45 43 54 20 49 6d 70 6f 72 74 47 65 6f 4a 53 4f ECT ImportGeoJSO
44e0: 4e 28 27 2f 68 6f 6d 65 2f 73 61 6e 64 72 6f 2f N('/home/sandro/
44f0: 73 6f 6d 65 6c 61 79 65 72 2e 67 65 6f 6a 73 6f somelayer.geojso
4500: 6e 27 2c 20 27 73 6f 6d 65 6c 61 79 65 72 27 2c n', 'somelayer',
4510: 20 27 67 65 6f 6d 27 29 3b 0d 0a 2d 2d 2d 2d 2d 'geom');..-----
4520: 2d 2d 2d 2d 2d 2d 0d 0a 39 39 0d 0a 0d 0a 53 45 ------..99....SE
4530: 4c 45 43 54 20 49 6d 70 6f 72 74 47 65 6f 4a 53 LECT ImportGeoJS
4540: 4f 4e 28 27 2f 68 6f 6d 65 2f 73 61 6e 64 72 6f ON('/home/sandro
4550: 2f 73 6f 6d 65 6c 61 79 65 72 2e 67 65 6f 6a 73 /somelayer.geojs
4560: 6f 6e 27 2c 20 27 73 6f 6d 65 6c 61 79 65 72 27 on', 'somelayer'
4570: 2c 20 27 67 65 6f 6d 27 2c 20 31 29 3b 0d 0a 2d , 'geom', 1);..-
4580: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 0a 39 39 0d 0a ----------..99..
4590: 0d 0a 53 45 4c 45 43 54 20 49 6d 70 6f 72 74 47 ..SELECT ImportG
45a0: 65 6f 4a 53 4f 4e 28 27 2f 68 6f 6d 65 2f 73 61 eoJSON('/home/sa
45b0: 6e 64 72 6f 2f 73 6f 6d 65 6c 61 79 65 72 2e 67 ndro/somelayer.g
45c0: 65 6f 6a 73 6f 6e 27 2c 20 27 73 6f 6d 65 6c 61 eojson', 'somela
45d0: 79 65 72 27 2c 20 27 67 65 6f 6d 27 2c 20 31 2c yer', 'geom', 1,
45e0: 20 33 30 30 33 29 3b 0d 0a 2d 2d 2d 2d 2d 2d 2d 3003);..-------
45f0: 2d 2d 2d 2d 0d 0a 39 39 0d 0a 0d 0a 53 45 4c 45 ----..99....SELE
4600: 43 54 20 49 6d 70 6f 72 74 47 65 6f 4a 53 4f 4e CT ImportGeoJSON
4610: 28 27 2f 68 6f 6d 65 2f 73 61 6e 64 72 6f 2f 73 ('/home/sandro/s
4620: 6f 6d 65 6c 61 79 65 72 2e 67 65 6f 6a 73 6f 6e omelayer.geojson
4630: 27 2c 20 27 73 6f 6d 65 6c 61 79 65 72 27 2c 20 ', 'somelayer',
4640: 27 67 65 6f 6d 27 2c 20 31 2c 20 33 30 30 33 2c 'geom', 1, 3003,
4650: 20 27 4c 4f 57 45 52 43 41 53 45 27 29 3b 0d 0a 'LOWERCASE');..
4660: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 0a 39 39 0d -----------..99.
4670: 0a 3c 2f 76 65 72 62 61 74 69 6d 3e 0d 0a 54 68 .</verbatim>..Th
4680: 65 20 53 51 4c 20 66 75 6e 63 74 69 6f 6e 20 3c e SQL function <
4690: 62 3e 49 6d 70 6f 72 74 47 65 6f 4a 53 4f 4e 28 b>ImportGeoJSON(
46a0: 29 3c 2f 62 3e 20 63 61 6e 20 64 69 72 65 63 74 )</b> can direct
46b0: 6c 79 20 63 72 65 61 74 65 20 61 20 6e 65 77 20 ly create a new
46c0: 53 70 61 74 69 61 6c 20 54 61 62 6c 65 20 62 79 Spatial Table by
46d0: 20 69 6d 70 6f 72 74 69 6e 67 20 64 61 74 61 20 importing data
46e0: 66 72 6f 6d 20 61 6e 20 65 78 74 65 6e 61 6c 20 from an extenal
46f0: 47 65 6f 4a 53 4f 4e 20 66 69 6c 65 20 63 6f 6e GeoJSON file con
4700: 66 6f 72 6d 61 6e 74 20 74 6f 20 52 46 43 20 37 formant to RFC 7
4710: 39 34 36 2e 3c 62 72 3e 0d 0a 54 68 69 73 20 66 946.<br>..This f
4720: 75 6e 63 74 69 6f 6e 20 61 63 63 65 70 74 73 20 unction accepts
4730: 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 61 72 the following ar
4740: 67 75 6d 65 6e 74 73 3a 0d 0a 3c 6f 6c 3e 0d 0a guments:..<ol>..
4750: 3c 6c 69 3e 3c 62 3e 66 69 6c 65 6e 61 6d 65 3c <li><b>filename<
4760: 2f 62 3e 3a 20 28 3c 69 3e 6d 61 6e 64 61 74 6f /b>: (<i>mandato
4770: 72 79 3c 2f 69 3e 29 20 61 62 73 6f 6c 75 74 65 ry</i>) absolute
4780: 20 6f 72 20 72 65 6c 61 74 69 76 65 20 70 61 74 or relative pat
4790: 68 20 6f 66 20 74 68 65 20 47 65 6f 4a 73 6f 6e h of the GeoJson
47a0: 20 66 69 6c 65 20 74 6f 20 62 65 20 69 6d 70 6f file to be impo
47b0: 72 74 65 64 20 28 3c 69 3e 69 6e 70 75 74 20 66 rted (<i>input f
47c0: 69 6c 65 3c 2f 69 3e 29 2e 3c 2f 6c 69 3e 0d 0a ile</i>).</li>..
47d0: 3c 6c 69 3e 3c 62 3e 74 61 62 6c 65 3c 2f 62 3e <li><b>table</b>
47e0: 3a 20 28 3c 69 3e 6d 61 6e 64 61 74 6f 72 79 3c : (<i>mandatory<
47f0: 2f 69 3e 29 20 6e 61 6d 65 20 6f 66 20 74 68 65 /i>) name of the
4800: 20 53 70 61 74 69 61 6c 20 54 61 62 6c 65 20 74 Spatial Table t
4810: 6f 20 62 65 20 63 72 65 61 74 65 64 2e 3c 2f 6c o be created.</l
4820: 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 67 65 6f 6d 5f i>..<li><b>geom_
4830: 63 6f 6c 75 6d 6e 3c 2f 62 3e 3a 20 28 3c 69 3e column</b>: (<i>
4840: 6f 70 74 69 6f 6e 61 6c 3c 2f 69 3e 29 20 6e 61 optional</i>) na
4850: 6d 65 20 6f 66 20 74 68 65 20 47 65 6f 6d 65 74 me of the Geomet
4860: 72 79 20 43 6f 6c 75 6d 6e 20 74 6f 20 62 65 20 ry Column to be
4870: 63 72 65 61 74 65 64 2e 3c 62 72 3e 0d 0a 49 66 created.<br>..If
4880: 20 6e 6f 74 20 65 78 70 6c 69 63 69 74 6c 79 20 not explicitly
4890: 73 70 65 63 69 66 69 65 64 20 6f 72 20 3c 62 3e specified or <b>
48a0: 4e 55 4c 4c 3c 2f 62 3e 20 61 20 63 6f 6c 75 6d NULL</b> a colum
48b0: 6e 20 6e 61 6d 65 64 20 3c 62 3e 27 67 65 6f 6d n named <b>'geom
48c0: 65 74 72 79 27 3c 2f 62 3e 20 77 69 6c 6c 20 62 etry'</b> will b
48d0: 65 20 63 72 65 61 74 65 64 20 62 79 20 64 65 66 e created by def
48e0: 61 75 6c 74 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e ault.</li>..<li>
48f0: 3c 62 3e 73 70 61 74 69 61 6c 5f 69 6e 64 65 78 <b>spatial_index
4900: 3c 2f 62 3e 3a 20 28 3c 69 3e 6f 70 74 69 6f 6e </b>: (<i>option
4910: 61 6c 3c 2f 69 3e 29 20 74 68 69 73 20 69 73 20 al</i>) this is
4920: 61 20 62 6f 6f 6c 65 61 6e 20 66 6c 61 67 3a 0d a boolean flag:.
4930: 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 69 66 20 73 65 .<ul>..<li>if se
4940: 74 20 74 6f 20 3c 62 3e 54 52 55 45 3c 2f 62 3e t to <b>TRUE</b>
4950: 20 61 20 3c 62 3e 53 70 61 74 69 61 6c 49 6e 64 a <b>SpatialInd
4960: 65 78 3c 2f 62 3e 20 73 75 70 70 6f 72 74 69 6e ex</b> supportin
4970: 67 20 74 68 65 20 47 65 6f 6d 65 74 72 79 20 43 g the Geometry C
4980: 6f 6c 75 6d 6e 20 77 69 6c 6c 20 62 65 20 61 75 olumn will be au
4990: 74 6f 6d 61 74 69 63 61 6c 6c 79 20 63 72 65 61 tomatically crea
49a0: 74 65 64 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 69 ted.</li>..<li>i
49b0: 66 20 73 65 74 20 74 6f 20 3c 62 3e 46 41 4c 53 f set to <b>FALS
49c0: 45 3c 2f 62 3e 20 6e 6f 20 53 70 61 74 69 61 6c E</b> no Spatial
49d0: 49 6e 64 65 78 20 77 69 6c 6c 20 62 65 20 63 72 Index will be cr
49e0: 65 61 74 65 64 2e 3c 62 72 3e 0d 0a 54 68 69 73 eated.<br>..This
49f0: 20 69 73 20 74 68 65 20 64 65 66 61 75 6c 74 20 is the default
4a00: 73 65 74 74 69 6e 67 2e 3c 2f 6c 69 3e 0d 0a 3c setting.</li>..<
4a10: 2f 75 6c 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c /ul></li>..<li><
4a20: 62 3e 73 72 69 64 3c 2f 62 3e 3a 20 28 3c 69 3e b>srid</b>: (<i>
4a30: 6f 70 74 69 6f 6e 61 6c 3c 2f 69 3e 29 3a 0d 0a optional</i>):..
4a40: 3c 75 6c 3e 0d 0a 3c 6c 69 3e 57 68 65 6e 20 69 <ul>..<li>When i
4a50: 74 27 73 20 61 20 3c 62 3e 70 6f 73 69 74 69 76 t's a <b>positiv
4a60: 65 20 69 6e 74 65 67 65 72 3c 2f 62 3e 20 69 74 e integer</b> it
4a70: 20 63 6f 72 72 65 73 70 6f 6e 64 73 20 74 6f 20 corresponds to
4a80: 74 68 65 20 53 52 49 44 20 76 61 6c 75 65 20 74 the SRID value t
4a90: 6f 20 62 65 20 61 73 73 69 67 6e 65 64 20 74 6f o be assigned to
4aa0: 20 61 6c 6c 20 69 6d 70 6f 72 74 65 64 20 47 65 all imported Ge
4ab0: 6f 6d 65 74 72 69 65 73 2e 3c 2f 6c 69 3e 0d 0a ometries.</li>..
4ac0: 3c 6c 69 3e 49 66 20 3c 62 3e 30 3c 2f 62 3e 20 <li>If <b>0</b>
4ad0: 6f 72 20 3c 62 3e 6e 65 67 61 74 69 76 65 3c 2f or <b>negative</
4ae0: 62 3e 20 61 6c 6c 20 69 6d 70 6f 72 74 65 64 20 b> all imported
4af0: 47 65 6f 6d 65 74 72 69 65 73 20 77 69 6c 6c 20 Geometries will
4b00: 62 65 20 61 73 73 75 6d 65 64 20 74 6f 20 62 65 be assumed to be
4b10: 20 69 6e 20 3c 62 3e 53 52 49 44 3d 34 33 32 36 in <b>SRID=4326
4b20: 20 57 47 53 20 38 34 3c 2f 62 3e 20 28 3c 69 3e WGS 84</b> (<i>
4b30: 67 65 6f 67 72 61 70 68 69 63 20 63 6f 6f 72 64 geographic coord
4b40: 69 6e 61 74 65 73 20 65 78 70 72 65 73 73 65 64 inates expressed
4b50: 20 61 73 20 3c 62 3e 4c 6f 6e 67 69 74 75 64 65 as <b>Longitude
4b60: 73 3c 2f 62 3e 20 61 6e 64 20 3c 62 3e 4c 61 74 s</b> and <b>Lat
4b70: 69 74 75 64 65 73 3c 2f 62 3e 3c 2f 69 3e 29 20 itudes</b></i>)
4b80: 61 73 20 72 65 71 75 69 72 65 64 20 62 79 20 52 as required by R
4b90: 46 43 20 37 39 34 36 2e 3c 62 72 3e 0d 0a 54 68 FC 7946.<br>..Th
4ba0: 69 73 20 69 73 20 74 68 65 20 64 65 66 61 75 6c is is the defaul
4bb0: 74 20 73 65 74 74 69 6e 67 2e 3c 2f 6c 69 3e 0d t setting.</li>.
4bc0: 0a 3c 2f 75 6c 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 .</ul></li>..<li
4bd0: 3e 3c 62 3e 63 6f 6c 6e 61 6d 65 5f 63 61 73 65 ><b>colname_case
4be0: 3c 2f 62 3e 3a 20 28 3c 69 3e 6f 70 74 69 6f 6e </b>: (<i>option
4bf0: 61 6c 3c 2f 69 3e 29 20 63 61 6e 20 61 73 73 75 al</i>) can assu
4c00: 6d 65 20 6f 6e 65 20 74 68 65 20 66 6f 6c 6c 6f me one the follo
4c10: 77 69 6e 67 20 76 61 6c 75 65 73 3a 0d 0a 3c 75 wing values:..<u
4c20: 6c 3e 0d 0a 3c 6c 69 3e 3c 62 3e 27 55 50 50 45 l>..<li><b>'UPPE
4c30: 52 27 3c 2f 62 3e 20 6f 72 20 3c 62 3e 27 55 50 R'</b> or <b>'UP
4c40: 50 45 52 43 41 53 45 27 3c 2f 62 3e 3a 20 61 6c PERCASE'</b>: al
4c50: 6c 20 63 6f 6c 75 6d 6e 73 20 77 69 6c 6c 20 62 l columns will b
4c60: 65 20 63 72 65 61 74 65 64 20 69 6e 74 6f 20 74 e created into t
4c70: 68 65 20 74 61 62 6c 65 20 69 6e 20 66 75 6c 6c he table in full
4c80: 20 75 70 70 65 72 20 63 61 73 65 2e 3c 2f 6c 69 upper case.</li
4c90: 3e 0d 0a 3c 6c 69 3e 3c 62 3e 27 4c 4f 57 45 52 >..<li><b>'LOWER
4ca0: 27 3c 2f 62 3e 20 6f 72 20 3c 62 3e 27 4c 4f 57 '</b> or <b>'LOW
4cb0: 45 52 43 41 53 45 27 3c 2f 62 3e 3a 20 61 6c 6c ERCASE'</b>: all
4cc0: 20 63 6f 6c 75 6d 6e 73 20 77 69 6c 6c 20 62 65 columns will be
4cd0: 20 63 72 65 61 74 65 64 20 69 6e 74 6f 20 74 68 created into th
4ce0: 65 20 74 61 62 6c 65 20 69 6e 20 66 75 6c 6c 20 e table in full
4cf0: 6c 6f 77 65 72 20 63 61 73 65 2e 3c 62 72 3e 0d lower case.<br>.
4d00: 0a 54 68 69 73 20 69 73 20 74 68 65 20 64 65 66 .This is the def
4d10: 61 75 6c 74 20 73 65 74 74 69 6e 67 2e 3c 2f 6c ault setting.</l
4d20: 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 27 53 41 4d 45 i>..<li><b>'SAME
4d30: 27 3c 2f 62 3e 20 6f 72 20 3c 62 3e 27 53 41 4d '</b> or <b>'SAM
4d40: 45 43 41 53 45 27 3c 2f 62 3e 3a 20 61 6c 6c 20 ECASE'</b>: all
4d50: 63 6f 6c 75 6d 6e 73 20 77 69 6c 6c 20 62 65 20 columns will be
4d60: 63 72 65 61 74 65 64 20 69 6e 74 6f 20 74 68 65 created into the
4d70: 20 74 61 62 6c 65 20 70 72 65 73 65 72 76 69 6e table preservin
4d80: 67 20 61 6c 6c 20 75 70 70 65 72 2d 20 61 6e 64 g all upper- and
4d90: 20 6c 6f 77 65 72 2d 63 61 73 65 20 6c 65 74 74 lower-case lett
4da0: 65 72 73 20 65 78 61 63 74 6c 79 20 61 73 20 74 ers exactly as t
4db0: 68 65 79 20 61 72 65 20 64 65 66 69 6e 65 64 20 hey are defined
4dc0: 69 6e 20 74 68 65 20 63 6f 72 72 65 73 70 6f 6e in the correspon
4dd0: 64 69 6e 67 20 47 65 6f 4a 53 4f 4e 20 61 74 74 ding GeoJSON att
4de0: 72 69 62 75 74 65 20 6e 61 6d 65 73 2e 3c 2f 6c ribute names.</l
4df0: 69 3e 0d 0a 3c 2f 75 6c 3e 3c 2f 6c 69 3e 0d 0a i>..</ul></li>..
4e00: 3c 6c 69 3e 74 68 65 20 3c 62 3e 72 65 74 75 72 <li>the <b>retur
4e10: 6e 20 76 61 6c 75 65 3c 2f 62 3e 20 69 73 20 61 n value</b> is a
4e20: 6e 20 3c 62 3e 49 4e 54 45 47 45 52 3c 2f 62 3e n <b>INTEGER</b>
4e30: 20 63 6f 72 72 65 73 70 6f 6e 64 69 6e 67 20 74 corresponding t
4e40: 6f 20 74 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 o the number of
4e50: 65 78 70 6f 72 74 65 64 20 72 6f 77 73 2c 20 6f exported rows, o
4e60: 72 20 3c 62 3e 4e 55 4c 4c 3c 2f 62 3e 20 69 6e r <b>NULL</b> in
4e70: 20 74 68 65 20 63 61 73 65 20 6f 66 20 66 61 69 the case of fai
4e80: 6c 75 72 65 20 6f 72 20 69 6e 76 61 6c 69 64 20 lure or invalid
4e90: 61 72 67 75 6d 65 6e 74 73 2e 3c 2f 6c 69 3e 0d arguments.</li>.
4ea0: 0a 3c 2f 6f 6c 3e 0d 0a 3c 74 61 62 6c 65 20 63 .</ol>..<table c
4eb0: 65 6c 6c 73 70 61 63 69 6e 67 3d 22 34 22 20 63 ellspacing="4" c
4ec0: 65 6c 6c 70 61 64 64 69 6e 67 3d 22 38 22 20 62 ellpadding="8" b
4ed0: 67 63 6f 6c 6f 72 3d 22 23 66 66 63 30 61 30 22 gcolor="#ffc0a0"
4ee0: 3e 3c 74 72 3e 3c 74 64 3e 0d 0a 3c 68 33 3e 57 ><tr><td>..<h3>W
4ef0: 61 72 6e 69 6e 67 3c 2f 68 33 3e 0d 0a 54 68 69 arning</h3>..Thi
4f00: 73 20 53 51 4c 20 66 75 6e 63 74 69 6f 6e 20 6f s SQL function o
4f10: 70 65 6e 20 74 68 65 20 64 6f 6f 72 20 74 6f 20 pen the door to
4f20: 6d 61 6e 79 20 70 6f 74 65 6e 74 69 61 6c 20 73 many potential s
4f30: 65 63 75 72 69 74 79 20 69 73 73 75 65 73 2c 20 ecurity issues,
4f40: 61 6e 64 20 74 68 75 73 20 3c 62 3e 3c 69 3e 69 and thus <b><i>i
4f50: 73 20 61 6c 77 61 79 73 20 64 69 73 61 62 6c 65 s always disable
4f60: 64 20 62 79 20 64 65 66 61 75 6c 74 3c 2f 69 3e d by default</i>
4f70: 3c 2f 62 3e 2e 3c 62 72 3e 0d 0a 45 78 70 6c 69 </b>.<br>..Expli
4f80: 63 69 74 6c 79 20 73 65 74 74 69 6e 67 20 74 68 citly setting th
4f90: 65 20 65 78 74 65 72 6e 61 6c 20 76 61 72 69 61 e external varia
4fa0: 62 6c 65 20 3c 62 3e 53 50 41 54 49 41 4c 49 54 ble <b>SPATIALIT
4fb0: 45 5f 53 45 43 55 52 49 54 59 3d 72 65 6c 61 78 E_SECURITY=relax
4fc0: 65 64 3c 2f 62 3e 20 69 73 20 61 62 73 6f 6c 75 ed</b> is absolu
4fd0: 74 65 6c 79 20 72 65 71 75 69 72 65 64 20 69 6e tely required in
4fe0: 20 6f 72 64 65 72 20 74 6f 20 65 6e 61 62 6c 65 order to enable
4ff0: 20 74 68 69 73 20 66 75 6e 63 74 69 6f 6e 2e 0d this function..
5000: 0a 3c 2f 74 64 3e 3c 2f 74 72 3e 3c 2f 74 61 62 .</td></tr></tab
5010: 6c 65 3e 0d 0a 3c 62 72 3e 0d 0a 3c 68 72 3e 0d le>..<br>..<hr>.
5020: 0a 3c 68 33 3e 56 69 72 74 75 61 6c 47 65 6f 4a .<h3>VirtualGeoJ
5030: 53 4f 4e 3c 2f 68 33 3e 0d 0a 3c 76 65 72 62 61 SON</h3>..<verba
5040: 74 69 6d 3e 0d 0a 43 52 45 41 54 45 20 56 49 52 tim>..CREATE VIR
5050: 54 55 41 4c 20 54 41 42 4c 45 20 73 6f 6d 65 5f TUAL TABLE some_
5060: 6e 61 6d 65 20 55 53 49 4e 47 20 56 69 72 74 75 name USING Virtu
5070: 61 6c 47 65 6f 4a 53 4f 4e 28 20 70 61 74 68 2c alGeoJSON( path,
5080: 20 5b 20 73 72 69 64 20 2c 20 5b 20 63 6f 6c 6e [ srid , [ coln
5090: 61 6d 65 5f 63 61 73 65 20 5d 5d 20 29 3b 0d 0a ame_case ]] );..
50a0: 3c 2f 76 65 72 62 61 74 69 6d 3e 0d 0a 41 20 3c </verbatim>..A <
50b0: 62 3e 56 69 72 74 75 61 6c 47 65 6f 4a 53 4f 4e b>VirtualGeoJSON
50c0: 3c 2f 62 3e 20 74 61 62 6c 65 20 69 73 20 73 74 </b> table is st
50d0: 72 69 63 74 6c 79 20 73 69 6d 69 6c 61 72 20 74 rictly similar t
50e0: 6f 20 61 20 3c 62 3e 56 69 72 74 75 61 6c 53 68 o a <b>VirtualSh
50f0: 61 70 65 3c 2f 62 3e 20 74 61 62 6c 65 2c 20 74 ape</b> table, t
5100: 68 65 20 6f 6e 6c 79 20 64 69 66 66 65 72 65 6e he only differen
5110: 63 65 20 62 65 74 77 65 65 6e 20 74 68 65 6d 20 ce between them
5120: 62 65 69 6e 67 20 74 68 65 20 66 69 6c 65 20 66 being the file f
5130: 6f 72 6d 61 74 20 6f 66 20 74 68 65 20 75 6e 64 ormat of the und
5140: 65 72 6c 61 79 69 6e 67 20 64 61 74 61 73 6f 75 erlaying datasou
5150: 72 63 65 2e 3c 62 72 3e 0d 0a 45 78 63 65 70 74 rce.<br>..Except
5160: 20 66 6f 72 20 74 68 69 73 20 73 6d 61 6c 6c 20 for this small
5170: 62 75 74 20 66 75 6e 64 61 6d 65 6e 74 61 6c 20 but fundamental
5180: 64 65 74 61 69 6c 20 62 6f 74 68 20 74 68 65 6d detail both them
5190: 20 62 65 68 61 76 65 20 69 6e 20 65 78 61 63 74 behave in exact
51a0: 6c 79 20 74 68 65 20 73 61 6d 65 20 77 61 79 2e ly the same way.
51b0: 0d 0a 3c 62 72 3e 0d 0a 3c 75 6c 3e 0d 0a 3c 6c ..<br>..<ul>..<l
51c0: 69 3e 4a 75 73 74 20 61 20 73 69 6e 67 6c 65 20 i>Just a single
51d0: 6d 61 6e 64 61 74 6f 72 79 20 61 72 67 75 6d 65 mandatory argume
51e0: 6e 74 20 69 73 20 72 65 71 75 69 72 65 64 20 66 nt is required f
51f0: 6f 72 20 63 72 65 61 74 69 6e 67 20 61 20 56 69 or creating a Vi
5200: 72 74 75 61 6c 47 65 6f 4a 53 4f 4e 20 74 61 62 rtualGeoJSON tab
5210: 6c 65 3b 20 79 6f 75 20 61 72 65 20 72 65 71 75 le; you are requ
5220: 69 72 65 64 20 74 6f 20 73 70 65 63 69 66 79 20 ired to specify
5230: 74 68 65 20 3c 62 3e 61 62 73 6f 6c 75 74 65 3c the <b>absolute<
5240: 2f 62 3e 20 6f 72 20 3c 62 3e 72 65 6c 61 74 69 /b> or <b>relati
5250: 76 65 20 70 61 74 68 3c 2f 62 3e 20 6c 65 61 64 ve path</b> lead
5260: 69 6e 67 20 74 6f 20 74 68 65 20 65 78 74 65 72 ing to the exter
5270: 6e 61 6c 20 47 65 6f 4a 53 4f 4e 20 66 69 6c 65 nal GeoJSON file
5280: 20 6f 6e 20 74 68 65 20 66 69 6c 65 73 79 73 74 on the filesyst
5290: 65 6d 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 59 6f em.</li>..<li>Yo
52a0: 75 20 63 61 6e 20 65 78 70 6c 69 63 69 74 6c 79 u can explicitly
52b0: 20 73 70 65 63 69 66 79 20 74 68 65 20 6f 70 74 specify the opt
52c0: 69 6f 6e 61 6c 20 61 72 67 75 6d 65 6e 74 20 3c ional argument <
52d0: 62 3e 73 72 69 64 3c 2f 62 3e 20 66 6f 72 20 6f b>srid</b> for o
52e0: 75 74 2d 6f 66 2d 74 68 65 2d 73 70 65 63 20 47 ut-of-the-spec G
52f0: 65 6f 4a 53 4f 4e 20 66 69 6c 65 73 20 62 61 73 eoJSON files bas
5300: 65 64 20 6f 6e 20 73 6f 6d 65 20 61 72 62 69 74 ed on some arbit
5310: 72 61 72 79 20 43 6f 6f 72 64 69 6e 61 74 65 20 rary Coordinate
5320: 52 65 66 65 72 65 6e 63 65 20 53 79 73 74 65 6d Reference System
5330: 2e 3c 62 72 3e 0d 0a 42 79 20 64 65 66 61 75 6c .<br>..By defaul
5340: 74 20 56 69 72 74 75 61 6c 47 65 6f 4a 53 4f 4e t VirtualGeoJSON
5350: 20 77 69 6c 6c 20 61 6c 77 61 79 73 20 61 73 73 will always ass
5360: 75 6d 65 20 74 68 61 74 20 61 6c 6c 20 47 65 6f ume that all Geo
5370: 6d 65 74 72 69 65 73 20 73 68 6f 75 6c 64 20 62 metries should b
5380: 65 20 61 73 73 69 67 6e 65 64 20 74 6f 20 3c 62 e assigned to <b
5390: 3e 53 52 49 44 3d 34 33 32 36 20 57 47 53 20 38 >SRID=4326 WGS 8
53a0: 34 3c 2f 62 3e 20 28 3c 69 3e 6c 6f 6e 67 69 74 4</b> (<i>longit
53b0: 75 64 65 73 20 61 6e 64 20 6c 61 74 69 74 75 64 udes and latitud
53c0: 65 73 3c 2f 69 3e 29 2c 20 61 63 63 6f 72 64 69 es</i>), accordi
53d0: 6e 67 6c 79 20 74 6f 20 52 46 43 20 37 39 34 36 ngly to RFC 7946
53e0: 20 73 70 65 63 69 66 69 63 61 74 69 6f 6e 73 2e specifications.
53f0: 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 41 20 66 75 72 </li>..<li>A fur
5400: 74 68 65 72 20 6f 70 74 69 6f 6e 61 6c 20 61 72 ther optional ar
5410: 67 75 6d 65 6e 74 20 3c 62 3e 63 6f 6c 6e 61 6d gument <b>colnam
5420: 65 5f 63 61 73 65 3c 2f 62 3e 20 69 73 20 73 75 e_case</b> is su
5430: 70 70 6f 72 74 65 64 2c 20 61 6e 64 20 69 74 20 pported, and it
5440: 68 61 73 20 65 78 61 63 74 6c 79 20 74 68 65 20 has exactly the
5450: 73 61 6d 65 20 69 6e 74 65 72 70 72 65 74 61 74 same interpretat
5460: 69 6f 6e 73 20 61 73 20 69 6e 20 3c 62 3e 49 6d ions as in <b>Im
5470: 70 6f 72 74 47 65 6f 4a 53 4f 4e 28 29 3c 2f 62 portGeoJSON()</b
5480: 3e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c ></li>..</ul>..<
5490: 62 72 3e 0d 0a 3c 68 72 3e 0d 0a 3c 68 33 3e 47 br>..<hr>..<h3>G
54a0: 65 6f 4a 53 4f 4e 20 73 75 70 70 6f 72 74 20 69 eoJSON support i
54b0: 6e 20 73 70 61 74 69 61 6c 69 74 65 5f 67 75 69 n spatialite_gui
54c0: 3c 2f 68 33 3e 0d 0a 54 68 65 20 6c 61 74 65 73 </h3>..The lates
54d0: 74 20 76 65 72 73 69 6f 6e 20 6f 66 20 74 68 65 t version of the
54e0: 20 47 55 49 20 74 6f 6f 6c 20 6e 6f 77 20 73 75 GUI tool now su
54f0: 70 70 6f 72 74 73 20 47 65 6f 4a 53 4f 4e 20 69 pports GeoJSON i
5500: 6e 20 65 78 61 63 74 6c 79 20 74 68 65 20 73 61 n exactly the sa
5510: 6d 65 20 77 61 79 20 69 74 20 73 75 70 70 6f 72 me way it suppor
5520: 74 73 20 53 68 61 70 65 66 69 6c 65 73 2e 0d 0a ts Shapefiles...
5530: 3c 62 72 3e 3c 62 72 3e 0d 0a 3c 74 61 62 6c 65 <br><br>..<table
5540: 20 63 65 6c 6c 73 70 61 63 69 6e 67 3d 22 34 22 cellspacing="4"
5550: 20 63 65 6c 6c 70 61 64 64 69 6e 67 3d 22 38 22 cellpadding="8"
5560: 20 62 67 63 6f 6c 6f 72 3d 22 23 66 66 66 66 66 bgcolor="#fffff
5570: 30 22 20 62 6f 72 64 65 72 3d 22 31 22 3e 0d 0a 0" border="1">..
5580: 3c 74 72 3e 0d 0a 3c 74 64 3e 0d 0a 54 77 6f 20 <tr>..<td>..Two
5590: 6e 65 77 20 62 75 74 74 6f 6e 73 20 68 61 76 65 new buttons have
55a0: 20 62 65 65 6e 20 61 64 64 65 64 20 74 6f 20 74 been added to t
55b0: 68 65 20 74 6f 6f 6c 62 61 72 3a 0d 0a 3c 75 6c he toolbar:..<ul
55c0: 3e 0d 0a 3c 6c 69 3e 6f 6e 65 20 66 6f 72 20 3c >..<li>one for <
55d0: 62 3e 69 6d 70 6f 72 74 69 6e 67 20 47 65 6f 4a b>importing GeoJ
55e0: 53 4f 4e 20 66 69 6c 65 73 3c 2f 62 3e 3c 2f 6c SON files</b></l
55f0: 69 3e 0d 0a 3c 6c 69 3e 74 68 65 20 6f 74 68 65 i>..<li>the othe
5600: 72 20 66 6f 72 20 3c 62 3e 63 72 65 61 74 69 6e r for <b>creatin
5610: 67 20 56 69 72 74 75 61 6c 47 65 6f 4a 53 4f 4e g VirtualGeoJSON
5620: 20 74 61 62 6c 65 73 3c 2f 62 3e 3c 2f 6c 69 3e tables</b></li>
5630: 0d 0a 3c 2f 75 6c 3e 0d 0a 3c 2f 74 64 3e 0d 0a ..</ul>..</td>..
5640: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 <td align="cente
5650: 72 22 3e 0d 0a 3c 69 6d 67 20 73 72 63 3d 22 68 r">..<img src="h
5660: 74 74 70 73 3a 2f 2f 77 77 77 2e 67 61 69 61 2d ttps://www.gaia-
5670: 67 69 73 2e 69 74 2f 67 61 69 61 2d 73 69 6e 73 gis.it/gaia-sins
5680: 2f 67 65 6f 6a 73 6f 6e 2d 70 69 63 73 2f 74 6f /geojson-pics/to
5690: 6f 6c 62 61 72 2e 70 6e 67 22 20 61 6c 74 3d 22 olbar.png" alt="
56a0: 47 65 6f 4a 53 4f 4e 20 74 6f 6f 6c 62 61 72 20 GeoJSON toolbar
56b0: 62 75 74 74 6f 6e 73 22 3e 0d 0a 3c 2f 74 64 3e buttons">..</td>
56c0: 0d 0a 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 0d 0a 3c ..</tr>..<tr>..<
56d0: 74 64 3e 0d 0a 54 68 65 20 73 69 64 65 20 66 69 td>..The side fi
56e0: 67 75 72 65 20 69 73 20 61 6e 20 65 78 61 6d 70 gure is an examp
56f0: 6c 65 20 6f 66 20 74 68 65 20 64 69 61 6c 6f 67 le of the dialog
5700: 20 62 6f 78 20 74 68 61 74 27 73 20 75 73 65 64 box that's used
5710: 20 66 6f 72 20 73 65 74 74 69 6e 67 20 6f 70 74 for setting opt
5720: 69 6f 6e 73 20 77 68 65 6e 20 63 72 65 61 74 69 ions when creati
5730: 6e 67 20 61 20 6e 65 77 20 53 70 61 74 69 61 6c ng a new Spatial
5740: 20 54 61 62 6c 65 20 62 79 20 69 6d 70 6f 72 74 Table by import
5750: 69 6e 67 20 64 61 74 61 20 66 72 6f 6d 20 61 6e ing data from an
5760: 20 65 78 74 65 72 6e 61 6c 20 47 65 6f 4a 53 4f external GeoJSO
5770: 4e 20 66 69 6c 65 2e 0d 0a 3c 2f 74 64 3e 0d 0a N file...</td>..
5780: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 <td align="cente
5790: 72 22 3e 0d 0a 3c 69 6d 67 20 73 72 63 3d 22 68 r">..<img src="h
57a0: 74 74 70 73 3a 2f 2f 77 77 77 2e 67 61 69 61 2d ttps://www.gaia-
57b0: 67 69 73 2e 69 74 2f 67 61 69 61 2d 73 69 6e 73 gis.it/gaia-sins
57c0: 2f 67 65 6f 6a 73 6f 6e 2d 70 69 63 73 2f 6c 6f /geojson-pics/lo
57d0: 61 64 2e 70 6e 67 22 20 61 6c 74 3d 22 47 65 6f ad.png" alt="Geo
57e0: 4a 53 4f 4e 20 6c 6f 61 64 22 3e 0d 0a 3c 2f 74 JSON load">..</t
57f0: 64 3e 0d 0a 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 0d d>..</tr>..<tr>.
5800: 0a 3c 74 64 3e 0d 0a 54 68 65 20 73 69 64 65 20 .<td>..The side
5810: 66 69 67 75 72 65 20 69 73 20 61 6e 20 65 78 61 figure is an exa
5820: 6d 70 6c 65 20 6f 66 20 74 68 65 20 64 69 61 6c mple of the dial
5830: 6f 67 20 62 6f 78 20 74 68 61 74 27 73 20 75 73 og box that's us
5840: 65 64 20 66 6f 72 20 73 65 74 74 69 6e 67 20 6f ed for setting o
5850: 70 74 69 6f 6e 73 20 77 68 65 6e 20 63 72 65 61 ptions when crea
5860: 74 69 6e 67 20 61 20 56 69 72 74 75 61 6c 47 65 ting a VirtualGe
5870: 6f 4a 53 4f 4e 20 54 61 62 6c 65 2e 0d 0a 3c 2f oJSON Table...</
5880: 74 64 3e 0d 0a 3c 74 64 20 61 6c 69 67 6e 3d 22 td>..<td align="
5890: 63 65 6e 74 65 72 22 3e 0d 0a 3c 69 6d 67 20 73 center">..<img s
58a0: 72 63 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e rc="https://www.
58b0: 67 61 69 61 2d 67 69 73 2e 69 74 2f 67 61 69 61 gaia-gis.it/gaia
58c0: 2d 73 69 6e 73 2f 67 65 6f 6a 73 6f 6e 2d 70 69 -sins/geojson-pi
58d0: 63 73 2f 76 69 72 74 75 61 6c 2e 70 6e 67 22 20 cs/virtual.png"
58e0: 61 6c 74 3d 22 47 65 6f 4a 53 4f 4e 20 76 69 72 alt="GeoJSON vir
58f0: 74 75 61 6c 20 74 61 62 6c 65 22 3e 0d 0a 3c 2f tual table">..</
5900: 74 64 3e 0d 0a 3c 2f 74 72 3e 0d 0a 3c 74 72 3e td>..</tr>..<tr>
5910: 0d 0a 3c 74 64 3e 0d 0a 46 6f 72 20 65 78 70 6f ..<td>..For expo
5920: 72 74 69 6e 67 20 61 20 77 68 6f 6c 65 20 53 70 rting a whole Sp
5930: 61 74 69 61 6c 20 54 61 62 6c 65 20 69 6e 74 6f atial Table into
5940: 20 61 6e 20 65 78 74 65 72 6e 61 6c 20 47 65 6f an external Geo
5950: 4a 53 4f 4e 20 66 69 6c 65 3a 0d 0a 3c 75 6c 3e JSON file:..<ul>
5960: 0d 0a 3c 6c 69 3e 69 6e 20 74 68 65 20 74 72 65 ..<li>in the tre
5970: 65 2d 6c 69 73 74 20 3c 62 3e 72 69 67 68 74 2d e-list <b>right-
5980: 63 6c 69 63 6b 3c 2f 62 3e 20 6f 6e 20 74 68 65 click</b> on the
5990: 20 72 65 71 75 65 73 74 65 64 20 47 65 6f 6d 65 requested Geome
59a0: 74 72 79 2e 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e try...<ul>..<li>
59b0: 74 68 65 6e 20 63 6c 69 63 6b 20 74 68 65 20 3c then click the <
59c0: 62 3e 45 78 70 6f 72 74 20 61 73 20 47 65 6f 4a b>Export as GeoJ
59d0: 53 4f 4e 3c 2f 62 3e 20 69 74 65 6d 20 6f 6e 20 SON</b> item on
59e0: 74 68 65 20 63 6f 6e 74 65 78 74 2d 6d 65 6e 75 the context-menu
59f0: 20 74 68 61 74 20 77 69 6c 6c 20 61 70 70 65 61 that will appea
5a00: 72 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 3c 2f r.</li>..</ul></
5a10: 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c 2f 74 64 li>..</ul>..</td
5a20: 3e 0d 0a 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 >..<td align="ce
5a30: 6e 74 65 72 22 3e 0d 0a 3c 69 6d 67 20 73 72 63 nter">..<img src
5a40: 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 67 61 ="https://www.ga
5a50: 69 61 2d 67 69 73 2e 69 74 2f 67 61 69 61 2d 73 ia-gis.it/gaia-s
5a60: 69 6e 73 2f 67 65 6f 6a 73 6f 6e 2d 70 69 63 73 ins/geojson-pics
5a70: 2f 64 75 6d 70 2e 70 6e 67 22 20 61 6c 74 3d 22 /dump.png" alt="
5a80: 47 65 6f 4a 53 4f 4e 20 64 75 6d 70 22 3e 0d 0a GeoJSON dump">..
5a90: 3c 2f 74 64 3e 0d 0a 3c 2f 74 72 3e 0d 0a 3c 2f </td>..</tr>..</
5aa0: 74 61 62 6c 65 3e 0d 0a 3c 62 72 3e 3c 62 72 3e table>..<br><br>
5ab0: 0d 0a 3c 68 72 3e 3c 62 72 3e 0d 0a 42 61 63 6b ..<hr><br>..Back
5ac0: 20 74 6f 20 3c 61 20 68 72 65 66 3d 22 68 74 74 to <a href="htt
5ad0: 70 73 3a 2f 2f 77 77 77 2e 67 61 69 61 2d 67 69 ps://www.gaia-gi
5ae0: 73 2e 69 74 2f 66 6f 73 73 69 6c 2f 6c 69 62 73 s.it/fossil/libs
5af0: 70 61 74 69 61 6c 69 74 65 2f 77 69 6b 69 3f 6e patialite/wiki?n
5b00: 61 6d 65 3d 35 2e 30 2e 30 2d 64 6f 63 22 3e 35 ame=5.0.0-doc">5
5b10: 2e 30 2e 30 2d 64 6f 63 20 6d 61 69 6e 20 70 61 .0.0-doc main pa
5b20: 67 65 3c 2f 61 3e 0a 5a 20 31 62 35 31 30 31 62 ge</a>.Z 1b5101b
5b30: 32 34 34 38 35 37 61 31 33 31 64 35 61 30 36 30 244857a131d5a060
5b40: 39 32 62 35 30 30 61 38 39 0a 92b500a89.