Artifact
c60685c4e86d0994b6066e85e481afd1d22a3e8d:
Wiki page
[Supporting GeoJSON] by
sandro
2019-01-21 10:16:57.
0000: 44 20 32 30 31 39 2d 30 31 2d 32 31 54 31 30 3a D 2019-01-21T10:
0010: 31 36 3a 35 37 2e 37 32 31 0a 4c 20 53 75 70 70 16:57.721.L Supp
0020: 6f 72 74 69 6e 67 5c 73 47 65 6f 4a 53 4f 4e 0a orting\sGeoJSON.
0030: 55 20 73 61 6e 64 72 6f 0a 57 20 35 35 31 37 0a U sandro.W 5517.
0040: 3c 61 20 68 72 65 66 3d 22 68 74 74 70 73 3a 2f <a href="https:/
0050: 2f 77 77 77 2e 67 61 69 61 2d 67 69 73 2e 69 74 /www.gaia-gis.it
0060: 2f 66 6f 73 73 69 6c 2f 6c 69 62 73 70 61 74 69 /fossil/libspati
0070: 61 6c 69 74 65 2f 77 69 6b 69 3f 6e 61 6d 65 3d alite/wiki?name=
0080: 34 2e 33 2e 30 2d 64 6f 63 22 3e 62 61 63 6b 3c 4.3.0-doc">back<
0090: 2f 61 3e 3c 68 72 3e 3c 62 72 3e 0d 0a 3c 68 31 /a><hr><br>..<h1
00a0: 3e 49 6e 74 72 6f 64 75 63 74 69 6f 6e 3c 2f 68 >Introduction</h
00b0: 31 3e 0d 0a 3c 61 20 68 72 65 66 3d 22 68 74 74 1>..<a href="htt
00c0: 70 73 3a 2f 2f 65 6e 2e 77 69 6b 69 70 65 64 69 ps://en.wikipedi
00d0: 61 2e 6f 72 67 2f 77 69 6b 69 2f 47 65 6f 4a 53 a.org/wiki/GeoJS
00e0: 4f 4e 22 3e 47 65 6f 4a 53 4f 4e 3c 2f 61 3e 20 ON">GeoJSON</a>
00f0: 69 73 20 61 6e 20 6f 70 65 6e 20 73 74 61 6e 64 is an open stand
0100: 61 72 64 20 64 61 74 61 20 66 6f 72 6d 61 74 20 ard data format
0110: 62 61 73 65 64 20 6f 6e 20 3c 61 20 68 72 65 66 based on <a href
0120: 3d 22 68 74 74 70 73 3a 2f 2f 65 6e 2e 77 69 6b ="https://en.wik
0130: 69 70 65 64 69 61 2e 6f 72 67 2f 77 69 6b 69 2f ipedia.org/wiki/
0140: 4a 53 4f 4e 22 3e 4a 53 4f 4e 3c 2f 61 3e 20 28 JSON">JSON</a> (
0150: 3c 62 3e 4a 61 76 61 53 63 72 69 70 74 20 4f 62 <b>JavaScript Ob
0160: 6a 65 63 74 20 4e 6f 74 61 74 69 6f 6e 3c 2f 62 ject Notation</b
0170: 3e 29 2c 20 61 20 76 65 72 79 20 70 6f 70 75 6c >), a very popul
0180: 61 72 20 64 61 74 61 20 66 6f 72 6d 61 74 20 77 ar data format w
0190: 69 64 65 6c 79 20 61 64 6f 70 74 65 64 20 62 79 idely adopted by
01a0: 20 6d 61 6e 79 20 77 65 62 2d 61 70 70 73 20 61 many web-apps a
01b0: 73 20 61 20 72 65 70 6c 61 63 65 6d 65 6e 74 20 s a replacement
01c0: 66 6f 72 20 58 4d 4c 2e 3c 62 72 3e 0d 0a 54 68 for XML.<br>..Th
01d0: 65 20 73 70 65 63 69 66 69 63 20 73 63 6f 70 65 e specific scope
01e0: 20 6f 66 20 47 65 6f 4a 53 4f 4e 20 69 73 20 65 of GeoJSON is e
01f0: 78 74 65 6e 64 69 6e 67 20 74 68 65 20 62 61 73 xtending the bas
0200: 69 63 20 63 61 70 61 62 69 6c 69 74 69 65 73 20 ic capabilities
0210: 6f 66 20 4a 53 4f 4e 20 73 6f 20 74 6f 20 61 64 of JSON so to ad
0220: 65 71 75 61 74 65 6c 79 20 73 75 70 70 6f 72 74 equately support
0230: 20 3c 62 3e 67 65 6f 67 72 61 70 68 69 63 20 66 <b>geographic f
0240: 65 61 74 75 72 65 73 3c 2f 62 3e 20 69 6e 63 6c eatures</b> incl
0250: 75 64 69 6e 67 20 62 6f 74 68 20 3c 62 3e 47 65 uding both <b>Ge
0260: 6f 6d 65 74 72 69 65 73 3c 2f 62 3e 20 61 6e 64 ometries</b> and
0270: 0d 0a 3c 62 3e 6e 6f 6e 2d 73 70 61 74 69 61 6c ..<b>non-spatial
0280: 20 61 74 74 72 69 62 75 74 65 73 3c 2f 62 3e 2e attributes</b>.
0290: 3c 62 72 3e 3c 62 72 3e 0d 0a 47 65 6f 4a 53 4f <br><br>..GeoJSO
02a0: 4e 20 65 78 69 73 74 73 20 73 69 6e 63 65 20 6d N exists since m
02b0: 61 6e 79 20 79 65 61 72 73 20 62 65 69 6e 67 20 any years being
02c0: 62 61 73 65 64 20 6f 6e 20 61 20 6c 6f 6f 73 65 based on a loose
02d0: 20 61 6e 64 20 69 6e 66 6f 72 6d 61 6c 20 64 61 and informal da
02e0: 74 61 20 73 70 65 63 69 66 69 63 61 74 69 6f 6e ta specification
02f0: 2e 3c 62 72 3e 0d 0a 4f 6e 6c 79 20 76 65 72 79 .<br>..Only very
0300: 20 72 65 63 65 6e 74 6c 79 20 28 32 30 31 36 29 recently (2016)
0310: 20 69 74 20 68 61 73 20 66 69 6e 61 6c 6c 79 20 it has finally
0320: 62 65 63 6f 6d 65 20 61 20 72 65 73 70 65 63 74 become a respect
0330: 61 62 6c 65 20 73 74 61 6e 64 61 72 64 20 66 6f able standard fo
0340: 72 6d 61 74 20 62 61 73 65 64 20 6f 6e 20 61 20 rmat based on a
0350: 66 6f 72 6d 61 6c 20 73 70 65 63 69 66 69 63 61 formal specifica
0360: 74 69 6f 6e 2c 20 74 68 61 74 20 69 73 20 3c 61 tion, that is <a
0370: 20 68 72 65 66 3d 22 68 74 74 70 73 3a 2f 2f 74 href="https://t
0380: 6f 6f 6c 73 2e 69 65 74 66 2e 6f 72 67 2f 68 74 ools.ietf.org/ht
0390: 6d 6c 2f 72 66 63 37 39 34 36 22 3e 52 46 43 20 ml/rfc7946">RFC
03a0: 37 39 34 36 3c 2f 61 3e 20 72 65 6c 65 61 73 65 7946</a> release
03b0: 64 20 62 79 20 3c 62 3e 49 45 54 46 3c 2f 62 3e d by <b>IETF</b>
03c0: 20 28 3c 69 3e 49 6e 74 65 72 6e 65 74 20 45 6e (<i>Internet En
03d0: 67 69 6e 65 65 72 69 6e 67 20 54 61 73 6b 20 46 gineering Task F
03e0: 6f 72 63 65 3c 2f 69 3e 29 2e 3c 62 72 3e 0d 0a orce</i>).<br>..
03f0: 3c 75 3e 4e 6f 74 65 3c 2f 75 3e 3a 20 52 46 43 <u>Note</u>: RFC
0400: 20 37 39 34 36 20 69 6e 74 72 6f 64 75 63 65 64 7946 introduced
0410: 20 73 65 76 65 72 61 6c 20 72 65 6c 65 76 61 6e several relevan
0420: 74 20 72 65 71 75 69 72 65 6d 65 6e 74 73 20 61 t requirements a
0430: 6e 64 20 72 65 73 74 72 69 63 74 69 6f 6e 73 2c nd restrictions,
0440: 20 73 6f 20 74 68 61 74 20 3c 62 3e 70 72 65 2d so that <b>pre-
0450: 52 46 43 3c 2f 62 3e 20 61 6e 64 20 3c 62 3e 70 RFC</b> and <b>p
0460: 6f 73 74 2d 52 46 43 3c 2f 62 3e 20 47 65 6f 4a ost-RFC</b> GeoJ
0470: 53 4f 4e 20 66 69 6c 65 73 20 61 72 65 20 6e 6f SON files are no
0480: 74 20 6d 75 74 75 61 6c 6c 79 20 69 6e 74 65 72 t mutually inter
0490: 6f 70 65 72 61 62 6c 65 2e 3c 62 72 3e 3c 62 72 operable.<br><br
04a0: 3e 0d 0a 41 20 76 65 72 79 20 72 65 6d 61 72 6b >..A very remark
04b0: 61 62 6c 65 20 66 65 61 74 75 72 65 20 6f 66 20 able feature of
04c0: 52 46 43 20 37 39 34 36 20 69 73 20 74 68 61 74 RFC 7946 is that
04d0: 20 69 74 27 73 20 65 78 70 6c 69 63 69 74 6c 79 it's explicitly
04e0: 20 64 65 63 6c 61 72 65 64 20 74 6f 20 62 65 20 declared to be
04f0: 61 20 3c 62 3e 66 69 78 65 64 20 61 6e 64 20 69 a <b>fixed and i
0500: 6d 6d 75 74 61 62 6c 65 3c 2f 62 3e 20 73 70 65 mmutable</b> spe
0510: 63 69 66 69 63 61 74 69 6f 6e 2e 3c 62 72 3e 0d cification.<br>.
0520: 0a 54 68 65 72 65 20 77 69 6c 6c 20 6e 65 76 65 .There will neve
0530: 72 20 62 65 20 75 70 64 61 74 65 64 20 76 65 72 r be updated ver
0540: 73 69 6f 6e 73 20 6f 66 20 47 65 6f 4a 53 4f 4e sions of GeoJSON
0550: 3b 20 65 76 65 6e 20 74 68 65 20 73 6c 69 67 68 ; even the sligh
0560: 74 65 72 20 63 68 61 6e 67 65 20 77 69 6c 6c 20 ter change will
0570: 69 6e 65 78 6f 72 61 62 6c 79 20 72 65 71 75 69 inexorably requi
0580: 72 65 20 63 68 61 6e 67 69 6e 67 20 74 68 65 20 re changing the
0590: 6e 61 6d 65 20 66 72 6f 6d 20 47 65 6f 4a 53 4f name from GeoJSO
05a0: 4e 20 74 6f 20 73 6f 6d 65 20 65 6c 73 65 2e 3c N to some else.<
05b0: 62 72 3e 0d 0a 53 75 63 68 20 61 20 72 65 73 74 br>..Such a rest
05c0: 72 69 6e 63 74 69 6f 6e 20 69 73 20 6f 62 76 69 rinction is obvi
05d0: 6f 73 6c 79 20 69 6e 74 65 6e 64 65 64 20 74 6f osly intended to
05e0: 20 65 6e 73 75 72 65 20 61 20 76 65 72 79 20 73 ensure a very s
05f0: 74 72 6f 6e 67 20 73 74 61 62 69 6c 69 74 79 20 trong stability
0600: 64 75 72 69 6e 67 20 74 68 65 20 74 69 6d 65 2e during the time.
0610: 3c 62 72 3e 3c 62 72 3e 0d 0a 54 68 65 20 6d 6f <br><br>..The mo
0620: 73 74 20 6f 62 76 69 6f 75 73 20 63 6f 6d 70 65 st obvious compe
0630: 74 69 74 6f 72 73 20 6f 66 20 47 65 6f 4a 53 4f titors of GeoJSO
0640: 4e 20 61 72 65 20 74 68 65 20 3c 61 20 68 72 65 N are the <a hre
0650: 66 3d 22 68 74 74 70 73 3a 2f 2f 65 6e 2e 77 69 f="https://en.wi
0660: 6b 69 70 65 64 69 61 2e 6f 72 67 2f 77 69 6b 69 kipedia.org/wiki
0670: 2f 53 68 61 70 65 66 69 6c 65 22 3e 45 53 52 49 /Shapefile">ESRI
0680: 20 53 68 61 70 65 66 69 6c 65 3c 2f 61 3e 20 61 Shapefile</a> a
0690: 6e 64 20 3c 61 20 68 72 65 66 3d 22 0d 0a 68 74 nd <a href="..ht
06a0: 74 70 73 3a 2f 2f 65 6e 2e 77 69 6b 69 70 65 64 tps://en.wikiped
06b0: 69 61 2e 6f 72 67 2f 77 69 6b 69 2f 47 65 6f 67 ia.org/wiki/Geog
06c0: 72 61 70 68 79 5f 4d 61 72 6b 75 70 5f 4c 61 6e raphy_Markup_Lan
06d0: 67 75 61 67 65 22 3e 47 4d 4c 3c 2f 61 3e 3c 62 guage">GML</a><b
06e0: 72 3e 0d 0a 54 68 65 20 66 6f 6c 6c 6f 77 69 6e r>..The followin
06f0: 67 20 63 68 61 72 74 20 77 69 6c 6c 20 71 75 69 g chart will qui
0700: 63 6b 6c 79 20 72 65 73 75 6d 65 20 74 68 65 20 ckly resume the
0710: 6d 61 69 6e 20 64 69 66 66 65 72 65 6e 63 65 73 main differences
0720: 20 62 65 74 77 65 65 6e 20 74 68 65 6d 2e 3c 62 between them.<b
0730: 72 3e 3c 62 72 3e 0d 0a 3c 74 61 62 6c 65 20 63 r><br>..<table c
0740: 65 6c 6c 73 70 61 63 69 6e 67 3d 22 34 22 20 63 ellspacing="4" c
0750: 65 6c 6c 70 61 64 64 69 6e 67 3d 22 38 22 20 62 ellpadding="8" b
0760: 67 63 6f 6c 6f 72 3d 22 23 63 30 65 65 63 30 22 gcolor="#c0eec0"
0770: 20 62 6f 72 64 65 72 3d 22 31 22 3e 0d 0a 3c 74 border="1">..<t
0780: 72 3e 3c 74 68 3e 43 61 74 65 67 6f 72 79 3c 2f r><th>Category</
0790: 74 68 3e 3c 74 68 3e 53 68 61 70 65 66 69 6c 65 th><th>Shapefile
07a0: 3c 2f 74 68 3e 3c 74 68 3e 47 4d 4c 3c 2f 74 68 </th><th>GML</th
07b0: 3e 3c 74 68 3e 47 65 6f 4a 53 4f 4e 3c 2f 74 68 ><th>GeoJSON</th
07c0: 3e 3c 74 68 3e 52 65 6d 61 72 6b 73 3c 2f 74 68 ><th>Remarks</th
07d0: 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 0d 0a 3c 74 ></tr>..<tr>..<t
07e0: 64 20 76 61 6c 69 67 6e 3d 22 6d 69 64 64 6c 65 d valign="middle
07f0: 22 3e 46 69 6c 65 20 6f 72 67 61 6e 69 7a 61 74 ">File organizat
0800: 69 6f 6e 3c 2f 74 64 3e 0d 0a 3c 74 64 20 76 61 ion</td>..<td va
0810: 6c 69 67 6e 3d 22 6d 69 64 64 6c 65 22 3e 41 74 lign="middle">At
0820: 20 6c 65 61 73 74 20 74 68 72 65 65 20 69 6e 64 least three ind
0830: 65 70 65 6e 64 65 6e 74 20 66 69 6c 65 73 20 73 ependent files s
0840: 68 61 72 69 6e 67 20 74 68 65 20 73 61 6d 65 20 haring the same
0850: 6e 61 6d 65 20 61 6e 64 20 72 65 73 70 65 63 74 name and respect
0860: 69 76 65 6c 79 20 69 64 65 6e 74 69 66 69 65 64 ively identified
0870: 20 62 79 20 73 75 66 66 69 78 65 73 20 3c 62 3e by suffixes <b>
0880: 2e 73 68 70 3c 2f 62 3e 2c 20 3c 62 3e 2e 73 68 .shp</b>, <b>.sh
0890: 78 3c 2f 62 3e 20 61 6e 64 20 3c 62 3e 2e 64 62 x</b> and <b>.db
08a0: 66 3c 2f 62 3e 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 f</b>..<ul>..<li
08b0: 3e 42 6f 74 68 20 74 68 65 20 3c 62 3e 2e 73 68 >Both the <b>.sh
08c0: 70 3c 2f 62 3e 20 61 6e 64 20 3c 62 3e 2e 73 68 p</b> and <b>.sh
08d0: 78 3c 2f 62 3e 20 6d 65 6d 62 65 72 73 20 61 72 x</b> members ar
08e0: 65 20 3c 62 3e 62 69 6e 61 72 79 20 66 69 6c 65 e <b>binary file
08f0: 73 3c 2f 62 3e 20 69 6e 74 65 6e 64 65 64 20 74 s</b> intended t
0900: 6f 20 73 74 6f 72 65 20 47 65 6f 6d 65 74 72 69 o store Geometri
0910: 65 73 20 61 6e 64 20 73 68 6f 75 6c 64 20 62 65 es and should be
0920: 20 65 6e 63 6f 64 65 64 20 61 63 63 6f 72 64 69 encoded accordi
0930: 6e 67 6c 79 20 74 6f 20 3c 61 20 68 72 65 66 3d ngly to <a href=
0940: 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 65 73 72 "https://www.esr
0950: 69 2e 63 6f 6d 2f 6c 69 62 72 61 72 79 2f 77 68 i.com/library/wh
0960: 69 74 65 70 61 70 65 72 73 2f 70 64 66 73 2f 73 itepapers/pdfs/s
0970: 68 61 70 65 66 69 6c 65 2e 70 64 66 22 3e 45 53 hapefile.pdf">ES
0980: 52 49 20 6f 70 65 6e 20 73 70 65 63 69 66 69 63 RI open specific
0990: 61 74 69 6f 6e 3c 2f 61 3e 3c 2f 6c 69 3e 0d 0a ation</a></li>..
09a0: 3c 6c 69 3e 54 68 65 20 3c 62 3e 2e 64 62 66 3c <li>The <b>.dbf<
09b0: 2f 62 3e 20 6d 65 6d 62 65 72 20 69 73 20 69 6e /b> member is in
09c0: 74 65 6e 64 65 64 20 74 6f 20 73 74 6f 72 65 20 tended to store
09d0: 6e 6f 6e 2d 73 70 61 74 69 61 6c 20 61 74 74 72 non-spatial attr
09e0: 69 62 75 74 65 73 2e 3c 62 72 3e 0d 0a 54 68 69 ibutes.<br>..Thi
09f0: 73 20 74 6f 6f 20 69 73 20 61 20 3c 62 3e 62 69 s too is a <b>bi
0a00: 6e 61 72 79 20 66 69 6c 65 3c 2f 62 3e 20 65 78 nary file</b> ex
0a10: 70 65 63 74 65 64 20 74 6f 20 62 65 20 65 6e 63 pected to be enc
0a20: 6f 64 65 64 20 61 63 63 6f 72 64 69 6e 67 6c 79 oded accordingly
0a30: 20 74 6f 20 3c 61 20 68 72 65 66 3d 22 68 74 74 to <a href="htt
0a40: 70 73 3a 2f 2f 65 6e 2e 77 69 6b 69 70 65 64 69 ps://en.wikipedi
0a50: 61 2e 6f 72 67 2f 77 69 6b 69 2f 44 42 61 73 65 a.org/wiki/DBase
0a60: 22 3e 41 73 68 74 6f 6e 2d 54 61 74 65 20 64 42 ">Ashton-Tate dB
0a70: 61 73 65 20 73 70 65 63 69 66 69 63 61 74 69 6f ase specificatio
0a80: 6e 3c 2f 61 3e 3b 20 75 6e 68 61 70 70 69 6c 79 n</a>; unhappily
0a90: 20 74 68 69 73 20 76 65 72 79 20 6f 6c 64 20 73 this very old s
0aa0: 70 65 63 69 66 69 63 61 74 69 6f 6e 20 28 62 6f pecification (bo
0ab0: 72 6e 20 69 6e 20 74 68 65 20 27 38 30 73 29 20 rn in the '80s)
0ac0: 68 61 64 20 61 20 73 61 76 61 67 65 20 70 72 6f had a savage pro
0ad0: 6c 69 66 65 72 61 74 69 6f 6e 20 6f 66 20 64 69 liferation of di
0ae0: 66 66 65 72 65 6e 74 20 64 69 61 6c 65 63 74 73 fferent dialects
0af0: 20 28 3c 69 3e 43 6c 69 70 70 65 72 3c 2f 69 3e (<i>Clipper</i>
0b00: 2c 20 3c 69 3e 46 6f 78 50 72 6f 3c 2f 69 3e 29 , <i>FoxPro</i>)
0b10: 20 62 65 63 6f 6d 69 6e 67 20 71 75 69 74 65 20 becoming quite
0b20: 6d 65 73 73 79 20 61 6e 64 20 63 68 61 6f 74 69 messy and chaoti
0b30: 63 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a c.</li>..</ul>..
0b40: 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 47 4d 4c 20 69 </td>..<td>GML i
0b50: 73 20 62 61 73 65 64 20 6f 6e 20 58 4d 4c 2c 20 s based on XML,
0b60: 61 6e 64 20 63 6f 6e 73 65 67 75 65 6e 74 6c 79 and conseguently
0b70: 20 6a 75 73 74 20 72 65 71 75 69 72 65 73 20 61 just requires a
0b80: 20 73 69 6e 67 6c 65 2c 20 6d 6f 6e 6f 6c 69 74 single, monolit
0b90: 68 69 63 20 3c 62 3e 74 65 78 74 20 66 69 6c 65 hic <b>text file
0ba0: 2e 3c 2f 62 3e 3c 62 72 3e 0d 0a 41 73 20 61 6e .</b><br>..As an
0bb0: 79 20 6f 74 68 65 72 20 58 4d 4c 20 66 69 6c 65 y other XML file
0bc0: 2c 20 47 4d 4c 20 74 6f 6f 20 63 61 6e 20 62 65 , GML too can be
0bd0: 20 73 74 72 6f 6e 67 6c 79 20 63 6f 6e 73 74 72 strongly constr
0be0: 61 69 6e 65 64 20 74 6f 20 76 65 72 62 61 74 69 ained to verbati
0bf0: 6d 20 72 65 73 70 65 63 74 20 61 20 66 6f 72 6d m respect a form
0c00: 61 6c 6c 79 20 64 65 66 69 6e 65 64 20 3c 61 20 ally defined <a
0c10: 68 72 65 66 3d 22 68 74 74 70 73 3a 2f 2f 69 74 href="https://it
0c20: 2e 77 69 6b 69 70 65 64 69 61 2e 6f 72 67 2f 77 .wikipedia.org/w
0c30: 69 6b 69 2f 58 4d 4c 5f 53 63 68 65 6d 61 22 3e iki/XML_Schema">
0c40: 58 4d 4c 20 53 63 68 65 6d 61 3c 2f 61 3e 0d 0a XML Schema</a>..
0c50: 3c 2f 74 64 3e 0d 0a 3c 74 64 20 76 61 6c 69 67 </td>..<td valig
0c60: 6e 3d 22 6d 69 64 64 6c 65 22 3e 0d 0a 53 69 6e n="middle">..Sin
0c70: 67 6c 65 20 6d 6f 6e 6f 6c 69 74 68 69 63 20 3c gle monolithic <
0c80: 62 3e 74 65 78 74 20 66 69 6c 65 3c 2f 62 3e 2e b>text file</b>.
0c90: 3c 62 72 3e 0d 0a 53 69 6d 69 6c 61 72 20 69 6e <br>..Similar in
0ca0: 20 74 68 69 73 20 74 6f 20 58 4d 4c 2c 20 62 75 this to XML, bu
0cb0: 74 20 65 78 70 6c 69 63 69 74 6c 79 20 69 6e 74 t explicitly int
0cc0: 65 6e 64 65 64 20 74 6f 20 62 65 20 62 79 20 77 ended to be by w
0cd0: 61 79 20 73 69 6d 70 6c 65 72 20 61 6e 64 20 6c ay simpler and l
0ce0: 65 73 73 20 76 65 72 62 6f 73 65 2e 0d 0a 3c 2f ess verbose...</
0cf0: 74 64 3e 0d 0a 3c 74 64 3e 0d 0a 54 68 65 20 74 td>..<td>..The t
0d00: 68 72 65 65 2d 66 69 6c 65 73 20 6c 61 79 6f 75 hree-files layou
0d10: 74 20 6f 66 20 53 68 61 70 65 66 69 6c 65 20 69 t of Shapefile i
0d20: 73 20 63 6c 65 61 72 6c 79 20 6f 62 73 6f 6c 65 s clearly obsole
0d30: 74 65 2c 20 61 6e 64 20 69 74 20 66 72 65 71 75 te, and it frequ
0d40: 65 6e 74 6c 79 20 70 6f 73 65 73 20 6d 61 6e 79 ently poses many
0d50: 20 68 65 61 64 61 63 68 65 73 20 63 61 75 73 69 headaches causi
0d60: 6e 67 20 75 6e 65 78 70 65 63 74 65 64 20 74 72 ng unexpected tr
0d70: 6f 75 62 6c 65 73 2e 3c 62 72 3e 3c 62 72 3e 0d oubles.<br><br>.
0d80: 0a 54 68 65 20 73 69 6e 67 6c 65 2d 66 69 6c 65 .The single-file
0d90: 20 6c 61 79 6f 75 74 20 61 64 6f 70 74 65 64 20 layout adopted
0da0: 62 79 20 62 6f 74 68 20 47 4d 4c 20 61 6e 64 20 by both GML and
0db0: 47 65 6f 4a 53 4f 4e 20 69 73 20 63 6c 65 61 72 GeoJSON is clear
0dc0: 6c 79 20 62 65 74 74 65 72 20 61 6e 64 20 73 61 ly better and sa
0dd0: 66 65 72 2c 20 61 6e 64 20 62 65 69 6e 67 20 3c fer, and being <
0de0: 62 3e 74 65 78 74 20 66 69 6c 65 73 3c 2f 62 3e b>text files</b>
0df0: 20 74 68 65 79 20 63 61 6e 20 62 65 20 65 61 73 they can be eas
0e00: 69 6c 79 20 69 6e 73 70 65 63 74 65 64 20 61 6e ily inspected an
0e10: 64 20 65 76 65 6e 74 75 61 6c 6c 79 20 64 65 62 d eventually deb
0e20: 75 67 67 65 64 20 6a 75 73 74 20 75 73 69 6e 67 ugged just using
0e30: 20 61 6e 79 20 67 65 6e 65 72 69 63 20 3c 62 3e any generic <b>
0e40: 74 65 78 74 20 65 64 69 74 6f 72 3c 2f 62 3e 20 text editor</b>
0e50: 77 69 74 68 6f 75 74 20 72 65 71 75 69 72 69 6e without requirin
0e60: 67 20 61 6e 79 20 73 70 65 63 69 66 69 63 20 74 g any specific t
0e70: 6f 6f 6c 2e 0d 0a 3c 2f 74 64 3e 0d 0a 3c 2f 74 ool...</td>..</t
0e80: 72 3e 0d 0a 3c 74 72 3e 0d 0a 3c 74 64 3e 53 75 r>..<tr>..<td>Su
0e90: 70 70 6f 72 74 65 64 20 47 65 6f 6d 65 74 72 79 pported Geometry
0ea0: 20 63 6c 61 73 73 65 73 3c 2f 74 64 3e 0d 0a 3c classes</td>..<
0eb0: 74 64 3e 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 4e td>..<ul>..<li>N
0ec0: 75 6c 6c 20 53 68 61 70 65 3c 2f 6c 69 3e 0d 0a ull Shape</li>..
0ed0: 3c 6c 69 3e 50 6f 69 6e 74 3c 2f 6c 69 3e 0d 0a <li>Point</li>..
0ee0: 3c 6c 69 3e 4d 75 6c 74 69 50 6f 69 6e 74 3c 2f <li>MultiPoint</
0ef0: 6c 69 3e 0d 0a 3c 6c 69 3e 50 6f 6c 79 4c 69 6e li>..<li>PolyLin
0f00: 65 20 28 77 69 74 68 6f 75 74 20 64 69 73 74 69 e (without disti
0f10: 6e 67 75 69 73 68 69 6e 67 20 62 65 74 77 65 65 nguishing betwee
0f20: 6e 20 73 69 6e 67 6c 65 2d 20 61 6e 64 20 6d 75 n single- and mu
0f30: 6c 74 69 2d 70 61 72 74 29 3c 2f 6c 69 3e 0d 0a lti-part)</li>..
0f40: 3c 6c 69 3e 50 6f 6c 79 67 6f 6e 20 28 77 69 74 <li>Polygon (wit
0f50: 68 6f 75 74 20 64 69 73 74 69 6e 67 75 69 73 68 hout distinguish
0f60: 69 6e 67 20 62 65 74 77 65 65 6e 20 73 69 6e 67 ing between sing
0f70: 6c 65 2d 20 61 6e 64 20 6d 75 6c 74 69 2d 70 61 le- and multi-pa
0f80: 72 74 29 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d rt)</li>..</ul>.
0f90: 0a 3c 62 72 3e 0d 0a 3c 75 3e 4e 6f 74 65 73 3c .<br>..<u>Notes<
0fa0: 2f 75 3e 3a 20 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 /u>: ..<ul>..<li
0fb0: 3e 41 6c 6c 20 47 65 6f 6d 65 74 72 69 65 73 20 >All Geometries
0fc0: 69 6e 20 74 68 65 20 73 61 6d 65 20 53 68 61 70 in the same Shap
0fd0: 65 66 69 6c 65 20 6d 75 73 74 20 73 68 61 72 65 efile must share
0fe0: 20 74 68 65 20 73 61 6d 65 20 63 6c 61 73 73 20 the same class
0ff0: 28 6f 72 20 62 65 20 3c 62 3e 4e 75 6c 6c 3c 2f (or be <b>Null</
1000: 62 3e 29 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 41 b>).</li>..<li>A
1010: 6c 6c 20 47 65 6f 6d 65 74 72 69 65 73 20 69 6e ll Geometries in
1020: 20 74 68 65 20 73 61 6d 65 20 53 68 61 70 65 66 the same Shapef
1030: 69 6c 65 20 6d 75 73 74 20 73 68 61 72 65 20 74 ile must share t
1040: 68 65 20 73 61 6d 65 20 53 52 49 44 2e 3c 2f 6c he same SRID.</l
1050: 69 3e 0d 0a 3c 6c 69 3e 54 68 65 20 72 75 6c 65 i>..<li>The rule
1060: 73 20 66 6f 72 20 69 64 65 6e 74 69 66 79 69 6e s for identifyin
1070: 67 20 3c 62 3e 45 78 74 65 72 69 6f 72 3c 2f 62 g <b>Exterior</b
1080: 3e 20 61 6e 64 20 3c 62 3e 49 6e 74 65 72 69 6f > and <b>Interio
1090: 72 3c 2f 62 3e 20 50 6f 6c 79 67 6f 6e 20 72 69 r</b> Polygon ri
10a0: 6e 67 73 0d 0a 61 72 65 20 61 77 6b 77 61 72 64 ngs..are awkward
10b0: 20 61 6e 64 20 63 61 6e 20 66 72 65 71 75 65 6e and can frequen
10c0: 74 6c 79 20 63 61 75 73 65 20 69 6e 74 65 72 6f tly cause intero
10d0: 70 65 72 61 62 69 6c 69 74 79 20 69 73 73 75 65 perability issue
10e0: 73 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a s.</li>..</ul>..
10f0: 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 0d 0a 47 4d 4c </td>..<td>..GML
1100: 20 61 6c 6c 6f 77 73 20 6d 61 6e 79 20 64 69 66 allows many dif
1110: 66 65 72 65 6e 74 20 77 61 79 73 20 66 6f 72 20 ferent ways for
1120: 64 65 66 69 6e 69 6e 67 20 74 68 65 20 73 61 6d defining the sam
1130: 65 20 47 65 6f 6d 65 74 72 79 2c 20 61 6e 64 20 e Geometry, and
1140: 74 68 65 20 73 70 65 63 69 66 69 63 61 74 69 6f the specificatio
1150: 6e 73 20 72 61 64 69 63 61 6c 6c 79 20 63 68 61 ns radically cha
1160: 6e 67 65 64 20 66 72 6f 6d 20 76 65 72 73 69 6f nged from versio
1170: 6e 20 74 6f 20 76 65 72 73 69 6f 6e 2e 3c 62 72 n to version.<br
1180: 3e 3c 62 72 3e 0d 0a 47 4d 4c 20 68 61 73 20 61 ><br>..GML has a
1190: 20 72 65 61 6c 6c 79 20 69 6d 70 72 65 73 73 69 really impressi
11a0: 76 65 20 66 6c 65 78 69 62 69 6c 79 20 28 65 2e ve flexibily (e.
11b0: 67 2e 20 65 61 63 68 20 73 69 6e 67 6c 65 20 47 g. each single G
11c0: 65 6f 6d 65 74 72 79 20 63 61 6e 20 66 72 65 65 eometry can free
11d0: 6c 79 20 64 65 63 6c 61 72 65 20 69 74 73 20 6f ly declare its o
11e0: 77 6e 20 53 52 49 44 29 2c 20 62 75 74 20 61 74 wn SRID), but at
11f0: 20 74 68 65 20 63 6f 73 74 20 6f 66 20 69 6d 70 the cost of imp
1200: 6f 73 69 6e 67 20 61 6e 20 6f 76 65 72 77 68 65 osing an overwhe
1210: 6c 6d 69 6e 67 20 63 6f 6d 70 6c 65 78 69 74 79 lming complexity
1220: 2e 0d 0a 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 0d 0a ...</td>..<td>..
1230: 3c 75 6c 3e 0d 0a 3c 6c 69 3e 4e 75 6c 6c 3c 2f <ul>..<li>Null</
1240: 6c 69 3e 0d 0a 3c 6c 69 3e 50 6f 69 6e 74 3c 2f li>..<li>Point</
1250: 6c 69 3e 0d 0a 3c 6c 69 3e 4c 69 6e 65 73 74 72 li>..<li>Linestr
1260: 69 6e 67 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 50 6f ing</li>..<li>Po
1270: 6c 79 67 6f 6e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e lygon</li>..<li>
1280: 4d 75 6c 74 69 50 6f 69 6e 74 3c 2f 6c 69 3e 0d MultiPoint</li>.
1290: 0a 3c 6c 69 3e 4d 75 6c 74 69 4c 69 6e 65 73 74 .<li>MultiLinest
12a0: 72 69 6e 67 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 4d ring</li>..<li>M
12b0: 75 6c 74 69 50 6f 6c 79 67 6f 6e 3c 2f 6c 69 3e ultiPolygon</li>
12c0: 0d 0a 3c 6c 69 3e 47 65 6f 6d 65 74 72 79 43 6f ..<li>GeometryCo
12d0: 6c 6c 65 63 74 69 6f 6e 3c 2f 6c 69 3e 0d 0a 3c llection</li>..<
12e0: 2f 75 6c 3e 0d 0a 3c 62 72 3e 0d 0a 3c 75 3e 4e /ul>..<br>..<u>N
12f0: 6f 74 65 73 3c 2f 75 3e 3a 20 0d 0a 3c 75 6c 3e otes</u>: ..<ul>
1300: 0d 0a 3c 6c 69 3e 54 68 69 73 20 65 78 61 63 74 ..<li>This exact
1310: 6c 79 20 63 6f 72 72 65 73 70 6f 6e 64 73 20 74 ly corresponds t
1320: 6f 20 74 68 65 20 73 74 61 6e 64 61 72 64 20 3c o the standard <
1330: 62 3e 37 20 63 6c 61 73 73 65 73 3c 2f 62 3e 20 b>7 classes</b>
1340: 6d 6f 64 65 6c 20 61 64 6f 70 74 65 64 20 62 79 model adopted by
1350: 20 53 70 61 74 69 61 6c 20 53 51 4c 2e 3c 2f 6c Spatial SQL.</l
1360: 69 3e 0d 0a 3c 6c 69 3e 54 68 65 20 73 61 6d 65 i>..<li>The same
1370: 20 47 65 6f 4a 53 4f 4e 20 66 69 6c 65 20 63 61 GeoJSON file ca
1380: 6e 20 66 72 65 65 6c 79 20 63 6f 6e 74 61 69 6e n freely contain
1390: 20 61 6e 79 20 6b 69 6e 64 20 6f 66 20 47 65 6f any kind of Geo
13a0: 6d 65 74 72 79 20 63 6c 61 73 73 65 73 20 77 69 metry classes wi
13b0: 74 68 6f 75 72 20 72 65 73 74 72 69 63 74 69 6f thour restrictio
13c0: 6e 73 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 41 6c ns.</li>..<li>Al
13d0: 6c 20 47 65 6f 6d 65 74 72 69 65 73 20 69 6e 20 l Geometries in
13e0: 74 68 65 20 73 61 6d 65 20 47 65 6f 4a 53 4f 4e the same GeoJSON
13f0: 20 66 69 6c 65 20 6d 75 73 74 20 73 68 61 72 65 file must share
1400: 20 74 68 65 20 73 61 6d 65 20 53 52 49 44 2e 3c the same SRID.<
1410: 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c 2f 74 /li>..</ul>..</t
1420: 64 3e 0d 0a 3c 74 64 3e 0d 0a 3c 75 6c 3e 0d 0a d>..<td>..<ul>..
1430: 3c 6c 69 3e 53 68 61 70 65 66 69 6c 65 20 69 73 <li>Shapefile is
1440: 20 6f 62 76 69 6f 75 73 6c 79 20 6f 62 73 6f 6c obviously obsol
1450: 65 74 65 2c 20 61 6e 64 20 73 6f 6d 65 77 61 79 ete, and someway
1460: 20 6d 65 73 73 79 2e 3c 2f 6c 69 3e 0d 0a 3c 6c messy.</li>..<l
1470: 69 3e 47 4d 4c 20 69 73 20 65 6c 65 67 61 6e 74 i>GML is elegant
1480: 20 61 6e 64 20 76 65 72 79 20 73 6f 70 68 69 73 and very sophis
1490: 74 69 63 61 74 65 64 3a 20 73 6f 6d 65 74 69 6d ticated: sometim
14a0: 65 73 20 74 6f 6f 20 6d 75 63 68 20 73 6f 70 68 es too much soph
14b0: 69 73 74 69 63 61 74 65 64 20 74 6f 20 62 65 20 isticated to be
14c0: 72 65 61 6c 6c 79 20 75 73 61 62 6c 65 2e 3c 2f really usable.</
14d0: 6c 69 3e 0d 0a 3c 6c 69 3e 47 65 6f 4a 53 4f 4e li>..<li>GeoJSON
14e0: 20 6d 61 74 63 68 65 73 20 76 65 72 79 20 77 65 matches very we
14f0: 6c 6c 20 53 70 61 74 69 61 6c 20 53 51 4c 20 72 ll Spatial SQL r
1500: 65 71 75 69 72 65 6d 65 6e 74 73 2c 20 61 6e 64 equirements, and
1510: 20 69 73 20 72 65 61 73 6f 6e 61 62 6c 79 20 73 is reasonably s
1520: 69 6d 70 6c 65 20 61 76 6f 69 64 69 6e 67 20 61 imple avoiding a
1530: 6e 79 20 75 6e 6e 65 63 65 73 73 61 72 79 20 63 ny unnecessary c
1540: 6f 6d 70 6c 65 78 69 74 79 2e 3c 2f 6c 69 3e 0d omplexity.</li>.
1550: 0a 3c 2f 75 6c 3e 0d 0a 3c 2f 74 64 3e 0d 0a 3c .</ul>..</td>..<
1560: 2f 74 72 3e 0d 0a 3c 2f 74 61 62 6c 65 3e 0d 0a /tr>..</table>..
1570: 3c 68 72 3e 3c 62 72 3e 0d 0a 3c 61 20 68 72 65 <hr><br>..<a hre
1580: 66 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 67 f="https://www.g
1590: 61 69 61 2d 67 69 73 2e 69 74 2f 66 6f 73 73 69 aia-gis.it/fossi
15a0: 6c 2f 6c 69 62 73 70 61 74 69 61 6c 69 74 65 2f l/libspatialite/
15b0: 77 69 6b 69 3f 6e 61 6d 65 3d 34 2e 33 2e 30 2d wiki?name=4.3.0-
15c0: 64 6f 63 22 3e 62 61 63 6b 3c 2f 61 3e 0a 5a 20 doc">back</a>.Z
15d0: 34 37 66 38 34 34 33 35 39 65 61 30 66 62 39 33 47f844359ea0fb93
15e0: 64 36 66 64 34 61 62 36 34 34 33 66 65 62 33 31 d6fd4ab6443feb31
15f0: 0a .