Wiki page
[Supporting GeoJSON] by
sandro
2019-01-21 15:24:02.
0000: 44 20 32 30 31 39 2d 30 31 2d 32 31 54 31 35 3a D 2019-01-21T15:
0010: 32 34 3a 30 32 2e 38 30 32 0a 4c 20 53 75 70 70 24:02.802.L Supp
0020: 6f 72 74 69 6e 67 5c 73 47 65 6f 4a 53 4f 4e 0a orting\sGeoJSON.
0030: 50 20 36 38 30 62 35 66 38 65 61 32 36 63 66 64 P 680b5f8ea26cfd
0040: 61 64 65 35 35 61 36 66 37 62 33 61 36 39 33 61 ade55a6f7b3a693a
0050: 65 62 61 66 37 33 35 39 35 37 0a 55 20 73 61 6e ebaf735957.U san
0060: 64 72 6f 0a 57 20 31 32 35 35 32 0a 3c 61 20 68 dro.W 12552.<a h
0070: 72 65 66 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 ref="https://www
0080: 2e 67 61 69 61 2d 67 69 73 2e 69 74 2f 66 6f 73 .gaia-gis.it/fos
0090: 73 69 6c 2f 6c 69 62 73 70 61 74 69 61 6c 69 74 sil/libspatialit
00a0: 65 2f 77 69 6b 69 3f 6e 61 6d 65 3d 34 2e 33 2e e/wiki?name=4.3.
00b0: 30 2d 64 6f 63 22 3e 62 61 63 6b 3c 2f 61 3e 3c 0-doc">back</a><
00c0: 68 72 3e 3c 62 72 3e 0d 0a 3c 68 31 3e 49 6e 74 hr><br>..<h1>Int
00d0: 72 6f 64 75 63 74 69 6f 6e 3c 2f 68 31 3e 0d 0a roduction</h1>..
00e0: 3c 61 20 68 72 65 66 3d 22 68 74 74 70 73 3a 2f <a href="https:/
00f0: 2f 65 6e 2e 77 69 6b 69 70 65 64 69 61 2e 6f 72 /en.wikipedia.or
0100: 67 2f 77 69 6b 69 2f 47 65 6f 4a 53 4f 4e 22 3e g/wiki/GeoJSON">
0110: 47 65 6f 4a 53 4f 4e 3c 2f 61 3e 20 69 73 20 61 GeoJSON</a> is a
0120: 6e 20 6f 70 65 6e 20 73 74 61 6e 64 61 72 64 20 n open standard
0130: 64 61 74 61 20 66 6f 72 6d 61 74 20 62 61 73 65 data format base
0140: 64 20 6f 6e 20 3c 61 20 68 72 65 66 3d 22 68 74 d on <a href="ht
0150: 74 70 73 3a 2f 2f 65 6e 2e 77 69 6b 69 70 65 64 tps://en.wikiped
0160: 69 61 2e 6f 72 67 2f 77 69 6b 69 2f 4a 53 4f 4e ia.org/wiki/JSON
0170: 22 3e 4a 53 4f 4e 3c 2f 61 3e 20 28 3c 62 3e 4a ">JSON</a> (<b>J
0180: 61 76 61 53 63 72 69 70 74 20 4f 62 6a 65 63 74 avaScript Object
0190: 20 4e 6f 74 61 74 69 6f 6e 3c 2f 62 3e 29 2c 20 Notation</b>),
01a0: 61 20 76 65 72 79 20 70 6f 70 75 6c 61 72 20 64 a very popular d
01b0: 61 74 61 20 66 6f 72 6d 61 74 20 77 69 64 65 6c ata format widel
01c0: 79 20 61 64 6f 70 74 65 64 20 62 79 20 6d 61 6e y adopted by man
01d0: 79 20 77 65 62 2d 61 70 70 73 20 61 73 20 61 20 y web-apps as a
01e0: 72 65 70 6c 61 63 65 6d 65 6e 74 20 66 6f 72 20 replacement for
01f0: 58 4d 4c 2e 3c 62 72 3e 0d 0a 54 68 65 20 73 70 XML.<br>..The sp
0200: 65 63 69 66 69 63 20 73 63 6f 70 65 20 6f 66 20 ecific scope of
0210: 47 65 6f 4a 53 4f 4e 20 69 73 20 65 78 74 65 6e GeoJSON is exten
0220: 64 69 6e 67 20 74 68 65 20 62 61 73 69 63 20 63 ding the basic c
0230: 61 70 61 62 69 6c 69 74 69 65 73 20 6f 66 20 4a apabilities of J
0240: 53 4f 4e 20 73 6f 20 74 6f 20 61 64 65 71 75 61 SON so to adequa
0250: 74 65 6c 79 20 73 75 70 70 6f 72 74 20 3c 62 3e tely support <b>
0260: 67 65 6f 67 72 61 70 68 69 63 20 66 65 61 74 75 geographic featu
0270: 72 65 73 3c 2f 62 3e 20 69 6e 63 6c 75 64 69 6e res</b> includin
0280: 67 20 62 6f 74 68 20 3c 62 3e 47 65 6f 6d 65 74 g both <b>Geomet
0290: 72 69 65 73 3c 2f 62 3e 20 61 6e 64 0d 0a 3c 62 ries</b> and..<b
02a0: 3e 6e 6f 6e 2d 73 70 61 74 69 61 6c 20 61 74 74 >non-spatial att
02b0: 72 69 62 75 74 65 73 3c 2f 62 3e 2e 3c 62 72 3e ributes</b>.<br>
02c0: 3c 62 72 3e 0d 0a 47 65 6f 4a 53 4f 4e 20 65 78 <br>..GeoJSON ex
02d0: 69 73 74 73 20 73 69 6e 63 65 20 6d 61 6e 79 20 ists since many
02e0: 79 65 61 72 73 20 62 65 69 6e 67 20 62 61 73 65 years being base
02f0: 64 20 6f 6e 20 61 20 6c 6f 6f 73 65 20 61 6e 64 d on a loose and
0300: 20 69 6e 66 6f 72 6d 61 6c 20 64 61 74 61 20 73 informal data s
0310: 70 65 63 69 66 69 63 61 74 69 6f 6e 2e 3c 62 72 pecification.<br
0320: 3e 0d 0a 4f 6e 6c 79 20 76 65 72 79 20 72 65 63 >..Only very rec
0330: 65 6e 74 6c 79 20 28 32 30 31 36 29 20 69 74 20 ently (2016) it
0340: 68 61 73 20 66 69 6e 61 6c 6c 79 20 62 65 63 6f has finally beco
0350: 6d 65 20 61 20 72 65 73 70 65 63 74 61 62 6c 65 me a respectable
0360: 20 73 74 61 6e 64 61 72 64 20 66 6f 72 6d 61 74 standard format
0370: 20 62 61 73 65 64 20 6f 6e 20 61 20 66 6f 72 6d based on a form
0380: 61 6c 20 73 70 65 63 69 66 69 63 61 74 69 6f 6e al specification
0390: 2c 20 74 68 61 74 20 69 73 20 3c 61 20 68 72 65 , that is <a hre
03a0: 66 3d 22 68 74 74 70 73 3a 2f 2f 74 6f 6f 6c 73 f="https://tools
03b0: 2e 69 65 74 66 2e 6f 72 67 2f 68 74 6d 6c 2f 72 .ietf.org/html/r
03c0: 66 63 37 39 34 36 22 3e 52 46 43 20 37 39 34 36 fc7946">RFC 7946
03d0: 3c 2f 61 3e 20 72 65 6c 65 61 73 65 64 20 62 79 </a> released by
03e0: 20 3c 62 3e 49 45 54 46 3c 2f 62 3e 20 28 3c 69 <b>IETF</b> (<i
03f0: 3e 49 6e 74 65 72 6e 65 74 20 45 6e 67 69 6e 65 >Internet Engine
0400: 65 72 69 6e 67 20 54 61 73 6b 20 46 6f 72 63 65 ering Task Force
0410: 3c 2f 69 3e 29 2e 3c 62 72 3e 0d 0a 3c 75 3e 4e </i>).<br>..<u>N
0420: 6f 74 65 3c 2f 75 3e 3a 20 52 46 43 20 37 39 34 ote</u>: RFC 794
0430: 36 20 69 6e 74 72 6f 64 75 63 65 64 20 73 65 76 6 introduced sev
0440: 65 72 61 6c 20 72 65 6c 65 76 61 6e 74 20 72 65 eral relevant re
0450: 71 75 69 72 65 6d 65 6e 74 73 20 61 6e 64 20 72 quirements and r
0460: 65 73 74 72 69 63 74 69 6f 6e 73 2c 20 73 6f 20 estrictions, so
0470: 74 68 61 74 20 3c 62 3e 70 72 65 2d 52 46 43 3c that <b>pre-RFC<
0480: 2f 62 3e 20 61 6e 64 20 3c 62 3e 70 6f 73 74 2d /b> and <b>post-
0490: 52 46 43 3c 2f 62 3e 20 47 65 6f 4a 53 4f 4e 20 RFC</b> GeoJSON
04a0: 66 69 6c 65 73 20 61 72 65 20 6e 6f 74 20 6d 75 files are not mu
04b0: 74 75 61 6c 6c 79 20 69 6e 74 65 72 6f 70 65 72 tually interoper
04c0: 61 62 6c 65 2e 3c 62 72 3e 3c 62 72 3e 0d 0a 41 able.<br><br>..A
04d0: 20 76 65 72 79 20 72 65 6d 61 72 6b 61 62 6c 65 very remarkable
04e0: 20 66 65 61 74 75 72 65 20 6f 66 20 52 46 43 20 feature of RFC
04f0: 37 39 34 36 20 69 73 20 74 68 61 74 20 69 74 27 7946 is that it'
0500: 73 20 65 78 70 6c 69 63 69 74 6c 79 20 64 65 63 s explicitly dec
0510: 6c 61 72 65 64 20 74 6f 20 62 65 20 61 20 3c 62 lared to be a <b
0520: 3e 66 69 78 65 64 20 61 6e 64 20 69 6d 6d 75 74 >fixed and immut
0530: 61 62 6c 65 3c 2f 62 3e 20 73 70 65 63 69 66 69 able</b> specifi
0540: 63 61 74 69 6f 6e 2e 3c 62 72 3e 0d 0a 54 68 65 cation.<br>..The
0550: 72 65 20 77 69 6c 6c 20 6e 65 76 65 72 20 62 65 re will never be
0560: 20 75 70 64 61 74 65 64 20 76 65 72 73 69 6f 6e updated version
0570: 73 20 6f 66 20 47 65 6f 4a 53 4f 4e 3b 20 65 76 s of GeoJSON; ev
0580: 65 6e 20 74 68 65 20 73 6c 69 67 68 74 65 72 20 en the slighter
0590: 63 68 61 6e 67 65 20 77 69 6c 6c 20 69 6e 65 78 change will inex
05a0: 6f 72 61 62 6c 79 20 72 65 71 75 69 72 65 20 63 orably require c
05b0: 68 61 6e 67 69 6e 67 20 74 68 65 20 6e 61 6d 65 hanging the name
05c0: 20 66 72 6f 6d 20 47 65 6f 4a 53 4f 4e 20 74 6f from GeoJSON to
05d0: 20 73 6f 6d 65 20 65 6c 73 65 2e 3c 62 72 3e 0d some else.<br>.
05e0: 0a 53 75 63 68 20 61 20 72 65 73 74 72 69 6e 63 .Such a restrinc
05f0: 74 69 6f 6e 20 69 73 20 6f 62 76 69 6f 73 6c 79 tion is obviosly
0600: 20 69 6e 74 65 6e 64 65 64 20 74 6f 20 65 6e 73 intended to ens
0610: 75 72 65 20 61 20 76 65 72 79 20 73 74 72 6f 6e ure a very stron
0620: 67 20 73 74 61 62 69 6c 69 74 79 20 64 75 72 69 g stability duri
0630: 6e 67 20 74 68 65 20 74 69 6d 65 2e 3c 62 72 3e ng the time.<br>
0640: 3c 62 72 3e 0d 0a 54 68 65 20 6d 6f 73 74 20 6f <br>..The most o
0650: 62 76 69 6f 75 73 20 63 6f 6d 70 65 74 69 74 6f bvious competito
0660: 72 73 20 6f 66 20 47 65 6f 4a 53 4f 4e 20 61 72 rs of GeoJSON ar
0670: 65 20 74 68 65 20 3c 61 20 68 72 65 66 3d 22 68 e the <a href="h
0680: 74 74 70 73 3a 2f 2f 65 6e 2e 77 69 6b 69 70 65 ttps://en.wikipe
0690: 64 69 61 2e 6f 72 67 2f 77 69 6b 69 2f 53 68 61 dia.org/wiki/Sha
06a0: 70 65 66 69 6c 65 22 3e 45 53 52 49 20 53 68 61 pefile">ESRI Sha
06b0: 70 65 66 69 6c 65 3c 2f 61 3e 20 61 6e 64 20 3c pefile</a> and <
06c0: 61 20 68 72 65 66 3d 22 0d 0a 68 74 74 70 73 3a a href="..https:
06d0: 2f 2f 65 6e 2e 77 69 6b 69 70 65 64 69 61 2e 6f //en.wikipedia.o
06e0: 72 67 2f 77 69 6b 69 2f 47 65 6f 67 72 61 70 68 rg/wiki/Geograph
06f0: 79 5f 4d 61 72 6b 75 70 5f 4c 61 6e 67 75 61 67 y_Markup_Languag
0700: 65 22 3e 47 4d 4c 3c 2f 61 3e 3c 62 72 3e 0d 0a e">GML</a><br>..
0710: 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 63 68 The following ch
0720: 61 72 74 20 77 69 6c 6c 20 71 75 69 63 6b 6c 79 art will quickly
0730: 20 73 75 6d 6d 61 72 69 7a 65 20 74 68 65 20 6d summarize the m
0740: 61 69 6e 20 64 69 66 66 65 72 65 6e 63 65 73 20 ain differences
0750: 62 65 74 77 65 65 6e 20 74 68 65 6d 2e 3c 62 72 between them.<br
0760: 3e 3c 62 72 3e 0d 0a 3c 74 61 62 6c 65 20 63 65 ><br>..<table ce
0770: 6c 6c 73 70 61 63 69 6e 67 3d 22 34 22 20 63 65 llspacing="4" ce
0780: 6c 6c 70 61 64 64 69 6e 67 3d 22 38 22 20 62 67 llpadding="8" bg
0790: 63 6f 6c 6f 72 3d 22 23 63 30 65 65 63 30 22 20 color="#c0eec0"
07a0: 62 6f 72 64 65 72 3d 22 31 22 3e 0d 0a 3c 74 72 border="1">..<tr
07b0: 3e 3c 74 68 3e 54 6f 70 69 63 3c 2f 74 68 3e 3c ><th>Topic</th><
07c0: 74 68 3e 53 68 61 70 65 66 69 6c 65 3c 2f 74 68 th>Shapefile</th
07d0: 3e 3c 74 68 3e 47 4d 4c 3c 2f 74 68 3e 3c 74 68 ><th>GML</th><th
07e0: 3e 47 65 6f 4a 53 4f 4e 3c 2f 74 68 3e 3c 74 68 >GeoJSON</th><th
07f0: 3e 52 65 6d 61 72 6b 73 3c 2f 74 68 3e 3c 2f 74 >Remarks</th></t
0800: 72 3e 0d 0a 3c 74 72 3e 0d 0a 3c 74 68 20 76 61 r>..<tr>..<th va
0810: 6c 69 67 6e 3d 22 6d 69 64 64 6c 65 22 3e 46 69 lign="middle">Fi
0820: 6c 65 20 6f 72 67 61 6e 69 7a 61 74 69 6f 6e 3c le organization<
0830: 2f 74 68 3e 0d 0a 3c 74 64 20 76 61 6c 69 67 6e /th>..<td valign
0840: 3d 22 6d 69 64 64 6c 65 22 3e 41 74 20 6c 65 61 ="middle">At lea
0850: 73 74 20 74 68 72 65 65 20 69 6e 64 65 70 65 6e st three indepen
0860: 64 65 6e 74 20 66 69 6c 65 73 20 73 68 61 72 69 dent files shari
0870: 6e 67 20 74 68 65 20 73 61 6d 65 20 6e 61 6d 65 ng the same name
0880: 20 61 6e 64 20 72 65 73 70 65 63 74 69 76 65 6c and respectivel
0890: 79 20 69 64 65 6e 74 69 66 69 65 64 20 62 79 20 y identified by
08a0: 73 75 66 66 69 78 65 73 20 3c 62 3e 2e 73 68 70 suffixes <b>.shp
08b0: 3c 2f 62 3e 2c 20 3c 62 3e 2e 73 68 78 3c 2f 62 </b>, <b>.shx</b
08c0: 3e 20 61 6e 64 20 3c 62 3e 2e 64 62 66 3c 2f 62 > and <b>.dbf</b
08d0: 3e 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 42 6f 74 >..<ul>..<li>Bot
08e0: 68 20 74 68 65 20 3c 62 3e 2e 73 68 70 3c 2f 62 h the <b>.shp</b
08f0: 3e 20 61 6e 64 20 3c 62 3e 2e 73 68 78 3c 2f 62 > and <b>.shx</b
0900: 3e 20 6d 65 6d 62 65 72 73 20 61 72 65 20 3c 62 > members are <b
0910: 3e 62 69 6e 61 72 79 20 66 69 6c 65 73 3c 2f 62 >binary files</b
0920: 3e 20 69 6e 74 65 6e 64 65 64 20 74 6f 20 73 74 > intended to st
0930: 6f 72 65 20 47 65 6f 6d 65 74 72 69 65 73 20 61 ore Geometries a
0940: 6e 64 20 73 68 6f 75 6c 64 20 62 65 20 65 6e 63 nd should be enc
0950: 6f 64 65 64 20 61 63 63 6f 72 64 69 6e 67 6c 79 oded accordingly
0960: 20 74 6f 20 3c 61 20 68 72 65 66 3d 22 68 74 74 to <a href="htt
0970: 70 73 3a 2f 2f 77 77 77 2e 65 73 72 69 2e 63 6f ps://www.esri.co
0980: 6d 2f 6c 69 62 72 61 72 79 2f 77 68 69 74 65 70 m/library/whitep
0990: 61 70 65 72 73 2f 70 64 66 73 2f 73 68 61 70 65 apers/pdfs/shape
09a0: 66 69 6c 65 2e 70 64 66 22 3e 45 53 52 49 20 6f file.pdf">ESRI o
09b0: 70 65 6e 20 73 70 65 63 69 66 69 63 61 74 69 6f pen specificatio
09c0: 6e 3c 2f 61 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e n</a></li>..<li>
09d0: 54 68 65 20 3c 62 3e 2e 64 62 66 3c 2f 62 3e 20 The <b>.dbf</b>
09e0: 6d 65 6d 62 65 72 20 69 73 20 69 6e 74 65 6e 64 member is intend
09f0: 65 64 20 74 6f 20 73 74 6f 72 65 20 6e 6f 6e 2d ed to store non-
0a00: 73 70 61 74 69 61 6c 20 61 74 74 72 69 62 75 74 spatial attribut
0a10: 65 73 2e 3c 62 72 3e 0d 0a 54 68 69 73 20 74 6f es.<br>..This to
0a20: 6f 20 69 73 20 61 20 3c 62 3e 62 69 6e 61 72 79 o is a <b>binary
0a30: 20 66 69 6c 65 3c 2f 62 3e 20 65 78 70 65 63 74 file</b> expect
0a40: 65 64 20 74 6f 20 62 65 20 65 6e 63 6f 64 65 64 ed to be encoded
0a50: 20 61 63 63 6f 72 64 69 6e 67 6c 79 20 74 6f 20 accordingly to
0a60: 3c 61 20 68 72 65 66 3d 22 68 74 74 70 73 3a 2f <a href="https:/
0a70: 2f 65 6e 2e 77 69 6b 69 70 65 64 69 61 2e 6f 72 /en.wikipedia.or
0a80: 67 2f 77 69 6b 69 2f 44 42 61 73 65 22 3e 41 73 g/wiki/DBase">As
0a90: 68 74 6f 6e 2d 54 61 74 65 20 64 42 61 73 65 20 hton-Tate dBase
0aa0: 73 70 65 63 69 66 69 63 61 74 69 6f 6e 3c 2f 61 specification</a
0ab0: 3e 3b 20 75 6e 68 61 70 70 69 6c 79 20 74 68 69 >; unhappily thi
0ac0: 73 20 76 65 72 79 20 6f 6c 64 20 73 70 65 63 69 s very old speci
0ad0: 66 69 63 61 74 69 6f 6e 20 28 62 6f 72 6e 20 69 fication (born i
0ae0: 6e 20 74 68 65 20 27 38 30 73 29 20 68 61 64 20 n the '80s) had
0af0: 61 20 73 61 76 61 67 65 20 70 72 6f 6c 69 66 65 a savage prolife
0b00: 72 61 74 69 6f 6e 20 6f 66 20 64 69 66 66 65 72 ration of differ
0b10: 65 6e 74 20 64 69 61 6c 65 63 74 73 20 28 3c 69 ent dialects (<i
0b20: 3e 43 6c 69 70 70 65 72 3c 2f 69 3e 2c 20 3c 69 >Clipper</i>, <i
0b30: 3e 46 6f 78 50 72 6f 3c 2f 69 3e 29 20 62 65 63 >FoxPro</i>) bec
0b40: 6f 6d 69 6e 67 20 71 75 69 74 65 20 6d 65 73 73 oming quite mess
0b50: 79 20 61 6e 64 20 63 68 61 6f 74 69 63 2e 3c 2f y and chaotic.</
0b60: 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c 2f 74 64 li>..</ul>..</td
0b70: 3e 0d 0a 3c 74 64 3e 47 4d 4c 20 69 73 20 62 61 >..<td>GML is ba
0b80: 73 65 64 20 6f 6e 20 58 4d 4c 2c 20 61 6e 64 20 sed on XML, and
0b90: 63 6f 6e 73 65 67 75 65 6e 74 6c 79 20 6a 75 73 conseguently jus
0ba0: 74 20 72 65 71 75 69 72 65 73 20 61 20 73 69 6e t requires a sin
0bb0: 67 6c 65 2c 20 6d 6f 6e 6f 6c 69 74 68 69 63 20 gle, monolithic
0bc0: 3c 62 3e 74 65 78 74 20 66 69 6c 65 2e 3c 2f 62 <b>text file.</b
0bd0: 3e 3c 62 72 3e 0d 0a 41 73 20 61 6e 79 20 6f 74 ><br>..As any ot
0be0: 68 65 72 20 58 4d 4c 20 66 69 6c 65 2c 20 47 4d her XML file, GM
0bf0: 4c 20 74 6f 6f 20 63 61 6e 20 62 65 20 73 74 72 L too can be str
0c00: 6f 6e 67 6c 79 20 63 6f 6e 73 74 72 61 69 6e 65 ongly constraine
0c10: 64 20 74 6f 20 76 65 72 62 61 74 69 6d 20 72 65 d to verbatim re
0c20: 73 70 65 63 74 20 61 20 66 6f 72 6d 61 6c 6c 79 spect a formally
0c30: 20 64 65 66 69 6e 65 64 20 3c 61 20 68 72 65 66 defined <a href
0c40: 3d 22 68 74 74 70 73 3a 2f 2f 69 74 2e 77 69 6b ="https://it.wik
0c50: 69 70 65 64 69 61 2e 6f 72 67 2f 77 69 6b 69 2f ipedia.org/wiki/
0c60: 58 4d 4c 5f 53 63 68 65 6d 61 22 3e 58 4d 4c 20 XML_Schema">XML
0c70: 53 63 68 65 6d 61 3c 2f 61 3e 0d 0a 3c 2f 74 64 Schema</a>..</td
0c80: 3e 0d 0a 3c 74 64 20 76 61 6c 69 67 6e 3d 22 6d >..<td valign="m
0c90: 69 64 64 6c 65 22 3e 0d 0a 53 69 6e 67 6c 65 20 iddle">..Single
0ca0: 6d 6f 6e 6f 6c 69 74 68 69 63 20 3c 62 3e 74 65 monolithic <b>te
0cb0: 78 74 20 66 69 6c 65 3c 2f 62 3e 2e 3c 62 72 3e xt file</b>.<br>
0cc0: 0d 0a 53 69 6d 69 6c 61 72 20 69 6e 20 74 68 69 ..Similar in thi
0cd0: 73 20 74 6f 20 58 4d 4c 2c 20 62 75 74 20 65 78 s to XML, but ex
0ce0: 70 6c 69 63 69 74 6c 79 20 69 6e 74 65 6e 64 65 plicitly intende
0cf0: 64 20 74 6f 20 62 65 20 62 79 20 77 61 79 20 73 d to be by way s
0d00: 69 6d 70 6c 65 72 20 61 6e 64 20 6c 65 73 73 20 impler and less
0d10: 76 65 72 62 6f 73 65 2e 0d 0a 3c 2f 74 64 3e 0d verbose...</td>.
0d20: 0a 3c 74 64 3e 0d 0a 54 68 65 20 74 68 72 65 65 .<td>..The three
0d30: 2d 66 69 6c 65 73 20 6c 61 79 6f 75 74 20 6f 66 -files layout of
0d40: 20 53 68 61 70 65 66 69 6c 65 20 69 73 20 63 6c Shapefile is cl
0d50: 65 61 72 6c 79 20 6f 62 73 6f 6c 65 74 65 2c 20 early obsolete,
0d60: 61 6e 64 20 69 74 20 66 72 65 71 75 65 6e 74 6c and it frequentl
0d70: 79 20 70 6f 73 65 73 20 6d 61 6e 79 20 68 65 61 y poses many hea
0d80: 64 61 63 68 65 73 20 63 61 75 73 69 6e 67 20 75 daches causing u
0d90: 6e 65 78 70 65 63 74 65 64 20 74 72 6f 75 62 6c nexpected troubl
0da0: 65 73 2e 3c 62 72 3e 3c 62 72 3e 0d 0a 54 68 65 es.<br><br>..The
0db0: 20 73 69 6e 67 6c 65 2d 66 69 6c 65 20 6c 61 79 single-file lay
0dc0: 6f 75 74 20 61 64 6f 70 74 65 64 20 62 79 20 62 out adopted by b
0dd0: 6f 74 68 20 47 4d 4c 20 61 6e 64 20 47 65 6f 4a oth GML and GeoJ
0de0: 53 4f 4e 20 69 73 20 63 6c 65 61 72 6c 79 20 62 SON is clearly b
0df0: 65 74 74 65 72 20 61 6e 64 20 73 61 66 65 72 2c etter and safer,
0e00: 20 61 6e 64 20 62 65 69 6e 67 20 3c 62 3e 74 65 and being <b>te
0e10: 78 74 20 66 69 6c 65 73 3c 2f 62 3e 20 74 68 65 xt files</b> the
0e20: 79 20 63 61 6e 20 62 65 20 65 61 73 69 6c 79 20 y can be easily
0e30: 69 6e 73 70 65 63 74 65 64 20 61 6e 64 20 65 76 inspected and ev
0e40: 65 6e 74 75 61 6c 6c 79 20 64 65 62 75 67 67 65 entually debugge
0e50: 64 20 6a 75 73 74 20 75 73 69 6e 67 20 61 6e 79 d just using any
0e60: 20 67 65 6e 65 72 69 63 20 3c 62 3e 74 65 78 74 generic <b>text
0e70: 20 65 64 69 74 6f 72 3c 2f 62 3e 20 77 69 74 68 editor</b> with
0e80: 6f 75 74 20 72 65 71 75 69 72 69 6e 67 20 61 6e out requiring an
0e90: 79 20 73 70 65 63 69 66 69 63 20 74 6f 6f 6c 2e y specific tool.
0ea0: 0d 0a 3c 2f 74 64 3e 0d 0a 3c 2f 74 72 3e 0d 0a ..</td>..</tr>..
0eb0: 3c 74 72 3e 0d 0a 3c 74 68 3e 47 65 6f 6d 65 74 <tr>..<th>Geomet
0ec0: 72 79 20 63 6c 61 73 73 65 73 3c 2f 74 68 3e 0d ry classes</th>.
0ed0: 0a 3c 74 64 3e 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 .<td>..<ul>..<li
0ee0: 3e 4e 75 6c 6c 20 53 68 61 70 65 3c 2f 6c 69 3e >Null Shape</li>
0ef0: 0d 0a 3c 6c 69 3e 50 6f 69 6e 74 3c 2f 6c 69 3e ..<li>Point</li>
0f00: 0d 0a 3c 6c 69 3e 4d 75 6c 74 69 50 6f 69 6e 74 ..<li>MultiPoint
0f10: 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 50 6f 6c 79 4c </li>..<li>PolyL
0f20: 69 6e 65 20 28 77 69 74 68 6f 75 74 20 64 69 73 ine (without dis
0f30: 74 69 6e 67 75 69 73 68 69 6e 67 20 62 65 74 77 tinguishing betw
0f40: 65 65 6e 20 73 69 6e 67 6c 65 2d 20 61 6e 64 20 een single- and
0f50: 6d 75 6c 74 69 2d 70 61 72 74 29 3c 2f 6c 69 3e multi-part)</li>
0f60: 0d 0a 3c 6c 69 3e 50 6f 6c 79 67 6f 6e 20 28 77 ..<li>Polygon (w
0f70: 69 74 68 6f 75 74 20 64 69 73 74 69 6e 67 75 69 ithout distingui
0f80: 73 68 69 6e 67 20 62 65 74 77 65 65 6e 20 73 69 shing between si
0f90: 6e 67 6c 65 2d 20 61 6e 64 20 6d 75 6c 74 69 2d ngle- and multi-
0fa0: 70 61 72 74 29 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c part)</li>..</ul
0fb0: 3e 0d 0a 3c 62 72 3e 0d 0a 3c 75 3e 4e 6f 74 65 >..<br>..<u>Note
0fc0: 73 3c 2f 75 3e 3a 20 0d 0a 3c 75 6c 3e 0d 0a 3c s</u>: ..<ul>..<
0fd0: 6c 69 3e 41 6c 6c 20 47 65 6f 6d 65 74 72 69 65 li>All Geometrie
0fe0: 73 20 69 6e 20 74 68 65 20 73 61 6d 65 20 53 68 s in the same Sh
0ff0: 61 70 65 66 69 6c 65 20 6d 75 73 74 20 73 68 61 apefile must sha
1000: 72 65 20 74 68 65 20 73 61 6d 65 20 63 6c 61 73 re the same clas
1010: 73 20 28 6f 72 20 62 65 20 3c 62 3e 4e 75 6c 6c s (or be <b>Null
1020: 3c 2f 62 3e 29 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 </b>).</li>..<li
1030: 3e 41 6c 6c 20 47 65 6f 6d 65 74 72 69 65 73 20 >All Geometries
1040: 69 6e 20 74 68 65 20 73 61 6d 65 20 53 68 61 70 in the same Shap
1050: 65 66 69 6c 65 20 6d 75 73 74 20 73 68 61 72 65 efile must share
1060: 20 74 68 65 20 73 61 6d 65 20 53 52 49 44 2e 3c the same SRID.<
1070: 2f 6c 69 3e 0d 0a 3c 6c 69 3e 54 68 65 20 72 75 /li>..<li>The ru
1080: 6c 65 73 20 66 6f 72 20 69 64 65 6e 74 69 66 79 les for identify
1090: 69 6e 67 20 3c 62 3e 45 78 74 65 72 69 6f 72 3c ing <b>Exterior<
10a0: 2f 62 3e 20 61 6e 64 20 3c 62 3e 49 6e 74 65 72 /b> and <b>Inter
10b0: 69 6f 72 3c 2f 62 3e 20 50 6f 6c 79 67 6f 6e 20 ior</b> Polygon
10c0: 72 69 6e 67 73 0d 0a 61 72 65 20 61 77 6b 77 61 rings..are awkwa
10d0: 72 64 20 61 6e 64 20 63 61 6e 20 66 72 65 71 75 rd and can frequ
10e0: 65 6e 74 6c 79 20 63 61 75 73 65 20 69 6e 74 65 ently cause inte
10f0: 72 6f 70 65 72 61 62 69 6c 69 74 79 20 69 73 73 roperability iss
1100: 75 65 73 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e ues.</li>..</ul>
1110: 0d 0a 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 0d 0a 47 ..</td>..<td>..G
1120: 4d 4c 20 61 6c 6c 6f 77 73 20 6d 61 6e 79 20 64 ML allows many d
1130: 69 66 66 65 72 65 6e 74 20 77 61 79 73 20 66 6f ifferent ways fo
1140: 72 20 64 65 66 69 6e 69 6e 67 20 74 68 65 20 73 r defining the s
1150: 61 6d 65 20 47 65 6f 6d 65 74 72 79 2c 20 61 6e ame Geometry, an
1160: 64 20 74 68 65 20 73 70 65 63 69 66 69 63 61 74 d the specificat
1170: 69 6f 6e 73 20 72 61 64 69 63 61 6c 6c 79 20 63 ions radically c
1180: 68 61 6e 67 65 64 20 66 72 6f 6d 20 76 65 72 73 hanged from vers
1190: 69 6f 6e 20 74 6f 20 76 65 72 73 69 6f 6e 2e 3c ion to version.<
11a0: 62 72 3e 3c 62 72 3e 0d 0a 47 4d 4c 20 68 61 73 br><br>..GML has
11b0: 20 61 20 72 65 61 6c 6c 79 20 69 6d 70 72 65 73 a really impres
11c0: 73 69 76 65 20 66 6c 65 78 69 62 69 6c 79 20 28 sive flexibily (
11d0: 65 2e 67 2e 20 65 61 63 68 20 73 69 6e 67 6c 65 e.g. each single
11e0: 20 47 65 6f 6d 65 74 72 79 20 63 61 6e 20 66 72 Geometry can fr
11f0: 65 65 6c 79 20 64 65 63 6c 61 72 65 20 69 74 73 eely declare its
1200: 20 6f 77 6e 20 53 52 49 44 29 2c 20 62 75 74 20 own SRID), but
1210: 61 74 20 74 68 65 20 63 6f 73 74 20 6f 66 20 69 at the cost of i
1220: 6d 70 6f 73 69 6e 67 20 61 6e 20 6f 76 65 72 77 mposing an overw
1230: 68 65 6c 6d 69 6e 67 20 63 6f 6d 70 6c 65 78 69 helming complexi
1240: 74 79 2e 0d 0a 3c 2f 74 64 3e 0d 0a 3c 74 64 3e ty...</td>..<td>
1250: 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 4e 75 6c 6c ..<ul>..<li>Null
1260: 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 50 6f 69 6e 74 </li>..<li>Point
1270: 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 4c 69 6e 65 73 </li>..<li>Lines
1280: 74 72 69 6e 67 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e tring</li>..<li>
1290: 50 6f 6c 79 67 6f 6e 3c 2f 6c 69 3e 0d 0a 3c 6c Polygon</li>..<l
12a0: 69 3e 4d 75 6c 74 69 50 6f 69 6e 74 3c 2f 6c 69 i>MultiPoint</li
12b0: 3e 0d 0a 3c 6c 69 3e 4d 75 6c 74 69 4c 69 6e 65 >..<li>MultiLine
12c0: 73 74 72 69 6e 67 3c 2f 6c 69 3e 0d 0a 3c 6c 69 string</li>..<li
12d0: 3e 4d 75 6c 74 69 50 6f 6c 79 67 6f 6e 3c 2f 6c >MultiPolygon</l
12e0: 69 3e 0d 0a 3c 6c 69 3e 47 65 6f 6d 65 74 72 79 i>..<li>Geometry
12f0: 43 6f 6c 6c 65 63 74 69 6f 6e 3c 2f 6c 69 3e 0d Collection</li>.
1300: 0a 3c 2f 75 6c 3e 0d 0a 3c 62 72 3e 0d 0a 3c 75 .</ul>..<br>..<u
1310: 3e 4e 6f 74 65 73 3c 2f 75 3e 3a 20 0d 0a 3c 75 >Notes</u>: ..<u
1320: 6c 3e 0d 0a 3c 6c 69 3e 54 68 69 73 20 65 78 61 l>..<li>This exa
1330: 63 74 6c 79 20 63 6f 72 72 65 73 70 6f 6e 64 73 ctly corresponds
1340: 20 74 6f 20 74 68 65 20 73 74 61 6e 64 61 72 64 to the standard
1350: 20 3c 62 3e 37 20 63 6c 61 73 73 65 73 3c 2f 62 <b>7 classes</b
1360: 3e 20 6d 6f 64 65 6c 20 61 64 6f 70 74 65 64 20 > model adopted
1370: 62 79 20 53 70 61 74 69 61 6c 20 53 51 4c 2e 3c by Spatial SQL.<
1380: 2f 6c 69 3e 0d 0a 3c 6c 69 3e 54 68 65 20 73 61 /li>..<li>The sa
1390: 6d 65 20 47 65 6f 4a 53 4f 4e 20 66 69 6c 65 20 me GeoJSON file
13a0: 63 61 6e 20 66 72 65 65 6c 79 20 63 6f 6e 74 61 can freely conta
13b0: 69 6e 20 61 6e 79 20 6b 69 6e 64 20 6f 66 20 47 in any kind of G
13c0: 65 6f 6d 65 74 72 79 20 63 6c 61 73 73 65 73 20 eometry classes
13d0: 77 69 74 68 6f 75 72 20 72 65 73 74 72 69 63 74 withour restrict
13e0: 69 6f 6e 73 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e ions.</li>..<li>
13f0: 41 6c 6c 20 47 65 6f 6d 65 74 72 69 65 73 20 69 All Geometries i
1400: 6e 20 74 68 65 20 73 61 6d 65 20 47 65 6f 4a 53 n the same GeoJS
1410: 4f 4e 20 66 69 6c 65 20 6d 75 73 74 20 73 68 61 ON file must sha
1420: 72 65 20 74 68 65 20 73 61 6d 65 20 53 52 49 44 re the same SRID
1430: 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c .</li>..</ul>..<
1440: 2f 74 64 3e 0d 0a 3c 74 64 3e 0d 0a 3c 75 6c 3e /td>..<td>..<ul>
1450: 0d 0a 3c 6c 69 3e 53 68 61 70 65 66 69 6c 65 20 ..<li>Shapefile
1460: 69 73 20 6f 62 76 69 6f 75 73 6c 79 20 6f 62 73 is obviously obs
1470: 6f 6c 65 74 65 2c 20 61 6e 64 20 73 6f 6d 65 77 olete, and somew
1480: 61 79 20 6d 65 73 73 79 20 61 6e 64 20 6c 69 6d ay messy and lim
1490: 69 74 65 64 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e ited.</li>..<li>
14a0: 47 4d 4c 20 69 73 20 65 6c 65 67 61 6e 74 20 61 GML is elegant a
14b0: 6e 64 20 76 65 72 79 20 73 6f 70 68 69 73 74 69 nd very sophisti
14c0: 63 61 74 65 64 3a 20 73 6f 6d 65 74 69 6d 65 73 cated: sometimes
14d0: 20 74 6f 6f 20 6d 75 63 68 20 73 6f 70 68 69 73 too much sophis
14e0: 74 69 63 61 74 65 64 20 61 6e 64 20 63 6f 6d 70 ticated and comp
14f0: 6c 65 78 20 74 6f 20 62 65 20 72 65 61 6c 6c 79 lex to be really
1500: 20 75 73 61 62 6c 65 2e 3c 2f 6c 69 3e 0d 0a 3c usable.</li>..<
1510: 6c 69 3e 47 65 6f 4a 53 4f 4e 20 6d 61 74 63 68 li>GeoJSON match
1520: 65 73 20 76 65 72 79 20 77 65 6c 6c 20 53 70 61 es very well Spa
1530: 74 69 61 6c 20 53 51 4c 20 72 65 71 75 69 72 65 tial SQL require
1540: 6d 65 6e 74 73 2c 20 61 6e 64 20 69 73 20 73 6f ments, and is so
1550: 20 73 69 6d 70 6c 65 20 74 6f 20 61 76 6f 69 64 simple to avoid
1560: 20 61 6e 79 20 75 6e 6e 65 63 65 73 73 61 72 79 any unnecessary
1570: 20 63 6f 6d 70 6c 65 78 69 74 79 2e 3c 2f 6c 69 complexity.</li
1580: 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c 2f 74 64 3e 0d >..</ul>..</td>.
1590: 0a 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 0d 0a 3c 74 .</tr>..<tr>..<t
15a0: 68 3e 44 69 6d 65 6e 73 69 6f 6e 73 3c 2f 74 68 h>Dimensions</th
15b0: 3e 0d 0a 3c 74 64 3e 0d 0a 3c 75 6c 3e 0d 0a 3c >..<td>..<ul>..<
15c0: 6c 69 3e 58 59 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e li>XY</li>..<li>
15d0: 58 59 4d 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 58 59 XYM</li>..<li>XY
15e0: 5a 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 58 59 5a 4d Z</li>..<li>XYZM
15f0: 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c 2f </li>..</ul>..</
1600: 74 64 3e 0d 0a 3c 74 64 3e 0d 0a 3c 75 6c 3e 0d td>..<td>..<ul>.
1610: 0a 3c 6c 69 3e 58 59 3c 2f 6c 69 3e 0d 0a 3c 6c .<li>XY</li>..<l
1620: 69 3e 58 59 4d 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e i>XYM</li>..<li>
1630: 58 59 5a 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 58 59 XYZ</li>..<li>XY
1640: 5a 4d 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a ZM</li>..</ul>..
1650: 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 0d 0a 3c 75 6c </td>..<td>..<ul
1660: 3e 0d 0a 3c 6c 69 3e 58 59 3c 2f 6c 69 3e 0d 0a >..<li>XY</li>..
1670: 3c 6c 69 3e 58 59 5a 3c 2f 6c 69 3e 0d 0a 3c 2f <li>XYZ</li>..</
1680: 75 6c 3e 0d 0a 3c 62 72 3e 0d 0a 3c 75 3e 4e 6f ul>..<br>..<u>No
1690: 74 65 3c 2f 75 3e 3a 20 52 46 43 20 37 39 34 36 te</u>: RFC 7946
16a0: 20 6a 75 73 74 20 73 75 70 70 6f 72 74 73 20 32 just supports 2
16b0: 20 6f 72 20 33 20 63 6f 6f 72 64 69 6e 61 74 65 or 3 coordinate
16c0: 73 2c 20 61 6e 64 20 74 68 65 20 74 68 69 72 64 s, and the third
16d0: 20 76 61 6c 75 65 20 28 77 68 65 6e 20 64 65 63 value (when dec
16e0: 6c 61 72 65 64 29 20 69 73 20 61 6c 77 61 79 73 lared) is always
16f0: 20 65 78 70 65 63 74 65 64 20 74 6f 20 63 6f 72 expected to cor
1700: 72 65 73 70 6f 6e 64 20 74 6f 20 61 6e 20 45 6c respond to an El
1710: 65 76 61 74 69 6f 6e 20 28 5a 20 61 78 69 73 29 evation (Z axis)
1720: 2e 3c 62 72 3e 3c 62 72 3e 0d 0a 53 75 70 70 6f .<br><br>..Suppo
1730: 72 74 69 6e 67 20 58 59 4d 20 6f 72 20 58 59 5a rting XYM or XYZ
1740: 4d 20 69 73 20 6e 6f 74 20 74 65 63 68 6e 69 63 M is not technic
1750: 61 6c 6c 79 20 75 6e 66 65 61 73 69 62 6c 65 2e ally unfeasible.
1760: 0d 0a 42 6f 74 68 20 77 72 69 74 65 72 73 20 61 ..Both writers a
1770: 6e 64 20 72 65 61 64 65 72 73 20 63 6f 75 6c 64 nd readers could
1780: 20 73 75 70 70 6f 72 74 20 73 75 63 68 20 6f 70 support such op
1790: 74 69 6f 6e 73 2c 20 62 75 74 20 61 6c 6c 20 74 tions, but all t
17a0: 68 69 73 20 69 73 20 73 75 72 65 6c 79 20 6f 75 his is surely ou
17b0: 74 73 69 64 65 20 74 68 65 20 73 74 61 6e 64 61 tside the standa
17c0: 72 64 20 61 6e 64 20 77 69 6c 6c 20 73 75 72 65 rd and will sure
17d0: 6c 79 20 69 6d 70 61 69 72 20 74 68 65 20 75 6e ly impair the un
17e0: 69 76 65 72 73 61 6c 20 70 6f 72 74 61 62 69 6c iversal portabil
17f0: 69 74 79 20 6f 66 20 61 6e 79 20 6e 6f 6e 20 63 ity of any non c
1800: 61 6e 6f 6e 69 63 61 6c 20 66 69 6c 65 2e 0d 0a anonical file...
1810: 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 0d 0a 47 65 6f </td>..<td>..Geo
1820: 4a 53 4f 4e 20 6c 61 63 6b 73 20 74 68 65 20 63 JSON lacks the c
1830: 61 70 61 62 69 6c 69 74 79 20 74 6f 20 73 75 70 apability to sup
1840: 70 6f 72 74 20 58 59 4d 20 61 6e 64 20 58 59 5a port XYM and XYZ
1850: 4d 2c 20 69 66 20 6e 6f 74 20 62 79 20 61 64 6f M, if not by ado
1860: 70 74 69 6e 67 20 76 69 63 69 6f 75 73 20 74 72 pting vicious tr
1870: 69 63 6b 73 2e 3c 62 72 3e 0d 0a 4d 61 79 20 77 icks.<br>..May w
1880: 65 6c 6c 20 62 65 20 69 74 27 73 20 6e 6f 74 20 ell be it's not
1890: 61 20 66 6f 72 62 69 64 64 69 6e 67 20 6c 69 6d a forbidding lim
18a0: 69 74 61 74 69 6f 6e 20 69 6e 20 6d 61 6e 79 20 itation in many
18b0: 63 6f 6d 6d 6f 6e 20 63 61 73 65 73 2c 20 62 75 common cases, bu
18c0: 74 20 69 74 27 73 20 69 6e 64 69 73 70 75 74 61 t it's indisputa
18d0: 62 6c 79 20 61 20 6c 69 6d 69 74 61 74 69 6f 6e bly a limitation
18e0: 2e 0d 0a 3c 2f 74 64 3e 0d 0a 3c 2f 74 72 3e 0d ...</td>..</tr>.
18f0: 0a 3c 74 72 3e 0d 0a 3c 74 68 3e 53 52 49 44 3c .<tr>..<th>SRID<
1900: 2f 74 68 3e 0d 0a 3c 74 64 3e 0d 0a 4e 6f 74 20 /th>..<td>..Not
1910: 69 6e 74 65 72 6e 61 6c 6c 79 20 64 65 63 6c 61 internally decla
1920: 72 65 64 20 62 79 20 74 68 65 20 53 68 61 70 65 red by the Shape
1930: 66 69 6c 65 20 69 74 73 65 6c 66 2e 3c 62 72 3e file itself.<br>
1940: 0d 0a 44 65 70 6c 6f 79 69 6e 67 20 61 20 66 75 ..Deploying a fu
1950: 72 74 68 65 72 20 3c 62 3e 2e 70 72 6a 3c 2f 62 rther <b>.prj</b
1960: 3e 20 66 69 6c 65 20 64 65 73 63 72 69 62 69 6e > file describin
1970: 67 20 74 68 65 20 69 6e 74 65 6e 64 65 64 20 53 g the intended S
1980: 52 49 44 20 69 73 20 74 68 65 20 75 73 75 61 6c RID is the usual
1990: 20 73 6f 6c 75 74 69 6f 6e 20 61 64 6f 70 74 65 solution adopte
19a0: 64 20 62 79 20 45 53 52 49 20 69 74 73 65 6c 66 d by ESRI itself
19b0: 2c 20 62 75 74 20 63 6f 72 72 65 63 74 6c 79 20 , but correctly
19c0: 70 61 72 73 69 6e 67 20 74 68 65 73 65 20 65 78 parsing these ex
19d0: 74 72 61 20 66 69 6c 65 73 20 69 73 20 61 6e 20 tra files is an
19e0: 75 73 75 61 6c 6c 79 20 66 6c 69 6d 73 79 20 70 usually flimsy p
19f0: 72 6f 63 65 73 73 20 66 61 6c 6c 69 6e 67 20 6f rocess falling o
1a00: 75 74 73 69 64 65 20 72 65 61 6c 20 63 61 70 61 utside real capa
1a10: 62 69 6c 69 74 69 65 73 20 6f 66 20 6d 61 6e 79 bilities of many
1a20: 20 74 68 69 72 64 20 70 61 72 74 79 20 72 65 61 third party rea
1a30: 64 65 72 73 2e 0d 0a 3c 2f 74 64 3e 0d 0a 3c 74 ders...</td>..<t
1a40: 64 3e 0d 0a 45 61 63 68 20 73 69 6e 67 6c 65 20 d>..Each single
1a50: 47 65 6f 6d 65 74 72 79 20 69 73 20 61 6c 6c 6f Geometry is allo
1a60: 77 65 64 20 74 6f 20 66 72 65 65 6c 79 20 64 65 wed to freely de
1a70: 66 69 6e 65 20 69 74 73 20 6f 77 6e 20 53 52 49 fine its own SRI
1a80: 44 3b 20 61 6e 64 20 69 73 20 61 6c 73 6f 20 70 D; and is also p
1a90: 6f 73 73 69 62 6c 65 20 74 6f 20 64 65 66 69 6e ossible to defin
1aa0: 65 20 74 68 65 20 53 52 49 44 20 66 6f 72 20 61 e the SRID for a
1ab0: 20 77 68 6f 6c 65 20 6c 61 79 65 72 2e 0d 0a 3c whole layer...<
1ac0: 2f 74 64 3e 0d 0a 3c 74 64 3e 0d 0a 41 63 63 6f /td>..<td>..Acco
1ad0: 72 64 69 6e 67 6c 79 20 74 6f 20 52 46 43 20 37 rdingly to RFC 7
1ae0: 39 34 36 20 61 6c 6c 20 63 6f 6f 72 64 69 6e 61 946 all coordina
1af0: 74 65 73 20 61 72 65 20 61 6c 77 61 79 73 20 65 tes are always e
1b00: 78 70 65 74 65 64 20 74 6f 20 62 65 20 65 78 70 xpeted to be exp
1b10: 72 65 73 73 65 64 20 61 73 20 3c 62 3e 6c 6f 6e ressed as <b>lon
1b20: 67 69 74 75 65 73 3c 2f 62 3e 20 61 6e 64 20 3c gitues</b> and <
1b30: 62 3e 6c 61 74 69 74 75 64 65 73 3c 2f 62 3e 20 b>latitudes</b>
1b40: 28 69 6e 20 74 68 69 73 20 65 78 61 63 74 20 6f (in this exact o
1b50: 72 64 65 72 29 2e 3c 62 72 3e 0d 0a 53 6f 20 61 rder).<br>..So a
1b60: 6e 79 20 63 61 6e 6f 6e 69 63 61 6c 20 47 65 6f ny canonical Geo
1b70: 4a 53 4f 4e 20 66 69 6c 65 20 69 73 20 61 6c 77 JSON file is alw
1b80: 61 79 73 20 65 78 70 65 63 74 65 64 20 74 6f 20 ays expected to
1b90: 72 65 66 65 72 65 6e 63 65 20 3c 62 3e 53 52 49 reference <b>SRI
1ba0: 44 3d 34 33 32 36 20 57 47 53 20 38 34 3c 2f 62 D=4326 WGS 84</b
1bb0: 3e 2e 3c 62 72 3e 3c 62 72 3e 0d 0a 55 73 69 6e >.<br><br>..Usin
1bc0: 67 20 61 6e 79 20 6f 74 68 65 72 20 53 52 49 44 g any other SRID
1bd0: 20 69 73 20 74 65 63 68 6e 69 63 61 6c 6c 79 20 is technically
1be0: 70 6f 73 73 69 62 6c 65 2c 20 62 75 74 20 72 65 possible, but re
1bf0: 71 75 69 72 65 73 20 61 20 63 6f 6e 76 65 6e 74 quires a convent
1c00: 69 6f 6e 61 6c 20 61 67 72 65 65 6d 65 6e 74 20 ional agreement
1c10: 62 65 74 77 65 65 6e 20 77 72 69 74 65 72 73 20 between writers
1c20: 61 6e 64 20 72 65 61 64 65 72 73 2c 20 62 75 74 and readers, but
1c30: 20 61 6c 6c 20 74 68 69 73 20 69 73 20 73 75 72 all this is sur
1c40: 65 6c 79 20 6f 75 74 73 69 64 65 20 74 68 65 20 ely outside the
1c50: 73 74 61 6e 64 61 72 64 20 61 6e 64 20 77 69 6c standard and wil
1c60: 6c 20 73 75 72 65 6c 79 20 69 6d 70 61 69 72 20 l surely impair
1c70: 74 68 65 20 75 6e 69 76 65 72 73 61 6c 20 70 6f the universal po
1c80: 72 74 61 62 69 6c 69 74 79 20 6f 66 20 61 6e 79 rtability of any
1c90: 20 6e 6f 6e 20 63 61 6e 6f 6e 69 63 61 6c 20 66 non canonical f
1ca0: 69 6c 65 2e 0d 0a 3c 2f 74 64 3e 0d 0a 3c 74 64 ile...</td>..<td
1cb0: 3e 0d 0a 54 68 65 20 75 6e 69 71 75 65 20 65 66 >..The unique ef
1cc0: 66 65 63 74 69 76 65 20 73 6f 6c 75 74 69 6f 6e fective solution
1cd0: 20 69 73 20 74 68 65 20 6f 6e 65 20 61 64 6f 70 is the one adop
1ce0: 74 65 64 20 62 79 20 47 4d 4c 2e 3c 62 72 3e 0d ted by GML.<br>.
1cf0: 0a 42 6f 74 68 20 53 68 61 70 65 66 69 6c 65 20 .Both Shapefile
1d00: 61 6e 64 20 47 65 6f 4a 53 4f 4e 20 61 72 65 20 and GeoJSON are
1d10: 63 6c 65 61 72 6c 79 20 69 6e 66 65 72 69 6f 72 clearly inferior
1d20: 20 75 6e 64 65 72 20 74 68 69 73 20 70 65 63 75 under this pecu
1d30: 6c 69 61 72 20 61 73 70 65 63 74 2e 0d 0a 3c 2f liar aspect...</
1d40: 74 64 3e 0d 0a 3c 2f 74 72 3e 0d 0a 3c 74 72 3e td>..</tr>..<tr>
1d50: 0d 0a 3c 74 68 3e 4e 6f 6e 2d 73 70 61 74 69 61 ..<th>Non-spatia
1d60: 6c 20 61 74 74 72 69 62 75 74 65 73 3c 2f 74 68 l attributes</th
1d70: 3e 0d 0a 3c 74 64 3e 0d 0a 3c 75 6c 3e 0d 0a 3c >..<td>..<ul>..<
1d80: 6c 69 3e 43 48 41 52 20 28 6c 69 6d 69 74 65 64 li>CHAR (limited
1d90: 20 74 6f 20 6d 61 78 2e 20 32 35 34 20 62 79 74 to max. 254 byt
1da0: 65 73 29 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 4e 55 es)</li>..<li>NU
1db0: 4d 42 45 52 20 28 72 65 70 72 65 73 65 6e 74 65 MBER (represente
1dc0: 64 20 62 79 20 61 6e 20 41 53 43 49 49 20 73 74 d by an ASCII st
1dd0: 72 69 6e 67 20 6f 66 20 6d 61 78 2e 20 33 32 20 ring of max. 32
1de0: 62 79 74 65 73 29 3c 2f 6c 69 3e 0d 0a 3c 6c 69 bytes)</li>..<li
1df0: 3e 44 41 54 45 20 28 59 59 59 59 4d 4d 44 44 29 >DATE (YYYYMMDD)
1e00: 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 4c 4f 47 49 43 </li>..<li>LOGIC
1e10: 41 4c 20 28 54 2f 46 29 3c 2f 6c 69 3e 0d 0a 3c AL (T/F)</li>..<
1e20: 2f 75 6c 3e 0d 0a 3c 62 72 3e 0d 0a 3c 75 3e 4e /ul>..<br>..<u>N
1e30: 6f 74 65 3c 2f 75 3e 3a 20 61 6c 6c 20 61 74 74 ote</u>: all att
1e40: 72 69 62 75 74 65 20 6e 61 6d 65 73 20 61 72 65 ribute names are
1e50: 20 6c 69 6d 69 74 65 64 20 74 6f 20 61 20 6c 65 limited to a le
1e60: 6e 67 74 68 20 6f 66 20 6d 61 78 2e 20 31 30 20 ngth of max. 10
1e70: 62 79 74 65 73 2e 20 54 68 65 72 65 20 69 73 20 bytes. There is
1e80: 6e 6f 20 73 61 66 65 20 77 61 79 20 66 6f 72 20 no safe way for
1e90: 64 65 63 6c 61 72 69 6e 67 20 3c 62 3e 4e 55 4c declaring <b>NUL
1ea0: 4c 3c 2f 62 3e 20 76 61 6c 75 65 73 2e 0d 0a 3c L</b> values...<
1eb0: 2f 74 64 3e 0d 0a 3c 74 64 3e 0d 0a 41 6e 79 20 /td>..<td>..Any
1ec0: 70 6f 73 73 69 62 6c 65 20 64 61 74 61 74 79 70 possible datatyp
1ed0: 65 20 79 6f 75 20 63 61 6e 20 69 6d 61 67 69 6e e you can imagin
1ee0: 65 2e 3c 62 72 3e 0d 0a 41 6e 64 20 64 65 66 69 e.<br>..And defi
1ef0: 6e 69 6e 67 20 66 75 72 74 68 65 72 20 64 65 72 ning further der
1f00: 69 76 65 64 20 64 61 74 61 74 79 70 65 73 20 69 ived datatypes i
1f10: 73 20 61 6e 20 6f 70 74 69 6f 6e 20 73 75 70 70 s an option supp
1f20: 6f 72 74 65 64 20 62 79 20 58 4d 4c 20 53 63 68 orted by XML Sch
1f30: 65 6d 61 2e 3c 62 72 3e 3c 62 72 3e 0d 0a 3c 75 ema.<br><br>..<u
1f40: 3e 4e 6f 74 65 3c 2f 75 3e 3a 20 61 74 74 72 69 >Note</u>: attri
1f50: 62 75 74 65 20 6e 61 6d 65 73 20 61 6e 64 20 74 bute names and t
1f60: 65 78 74 20 76 61 6c 75 65 73 20 63 61 6e 20 68 ext values can h
1f70: 61 76 65 20 61 6e 79 20 61 72 62 69 74 72 61 72 ave any arbitrar
1f80: 79 20 75 6e 63 6f 6e 73 74 72 61 69 6e 65 64 20 y unconstrained
1f90: 6c 65 6e 67 74 68 2e 0d 0a 3c 2f 74 64 3e 0d 0a length...</td>..
1fa0: 3c 74 64 3e 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e <td>..<ul>..<li>
1fb0: 74 65 78 74 20 28 75 6e 63 6f 6e 73 74 72 61 69 text (unconstrai
1fc0: 6e 65 64 20 6c 65 6e 67 74 68 29 3c 2f 6c 69 3e ned length)</li>
1fd0: 0d 0a 3c 6c 69 3e 6e 75 6d 62 65 72 3c 2f 6c 69 ..<li>number</li
1fe0: 3e 0d 0a 3c 6c 69 3e 6e 75 6c 6c 3c 2f 6c 69 3e >..<li>null</li>
1ff0: 0d 0a 3c 6c 69 3e 74 72 75 65 3c 2f 6c 69 3e 0d ..<li>true</li>.
2000: 0a 3c 6c 69 3e 66 61 6c 73 65 3c 2f 6c 69 3e 0d .<li>false</li>.
2010: 0a 3c 2f 75 6c 3e 0d 0a 3c 62 72 3e 0d 0a 3c 75 .</ul>..<br>..<u
2020: 3e 4e 6f 74 65 3c 2f 75 3e 3a 20 61 74 74 72 69 >Note</u>: attri
2030: 62 75 74 65 20 6e 61 6d 65 73 20 20 63 61 6e 20 bute names can
2040: 68 61 76 65 20 61 6e 79 20 61 72 62 69 74 72 61 have any arbitra
2050: 72 79 20 75 6e 63 6f 6e 73 74 72 61 69 6e 65 64 ry unconstrained
2060: 20 6c 65 6e 67 74 68 2e 0d 0a 3c 2f 74 64 3e 0d length...</td>.
2070: 0a 3c 74 64 3e 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 .<td>..<ul>..<li
2080: 3e 53 68 61 70 65 66 69 6c 65 20 28 6f 72 20 6d >Shapefile (or m
2090: 6f 72 65 20 70 72 65 63 69 73 65 6c 79 20 69 6e ore precisely in
20a0: 20 74 68 69 73 20 63 61 73 65 20 44 42 46 29 20 this case DBF)
20b0: 63 6c 65 61 72 6c 79 20 73 75 66 66 65 72 73 20 clearly suffers
20c0: 66 72 6f 6d 20 74 6f 6f 20 6d 61 6e 79 20 75 6e from too many un
20d0: 70 6c 65 61 73 61 6e 74 20 6c 69 6d 69 74 61 74 pleasant limitat
20e0: 69 6f 6e 73 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e ions.</li>..<li>
20f0: 47 4d 4c 20 28 6d 6f 72 65 20 70 72 65 63 69 73 GML (more precis
2100: 65 6c 79 20 58 4d 4c 29 20 63 61 6e 20 65 66 66 ely XML) can eff
2110: 65 63 74 69 76 65 6c 79 20 73 75 70 70 6f 72 74 ectively support
2120: 20 61 6e 20 69 6d 70 72 65 73 73 69 76 65 20 66 an impressive f
2130: 6c 65 78 69 62 69 6c 69 74 79 20 62 75 74 20 63 lexibility but c
2140: 61 6e 20 65 61 73 69 6c 79 20 62 65 63 6f 6d 65 an easily become
2150: 20 74 6f 6f 20 6d 75 63 68 20 63 6f 6d 70 6c 65 too much comple
2160: 78 20 61 6e 64 20 68 65 61 76 79 20 74 6f 20 62 x and heavy to b
2170: 65 20 70 61 72 73 65 64 2e 3c 2f 6c 69 3e 0d 0a e parsed.</li>..
2180: 3c 6c 69 3e 47 65 6f 4a 53 4f 4e 20 6f 66 66 65 <li>GeoJSON offe
2190: 72 73 20 61 20 77 65 6c 6c 20 62 61 6c 61 6e 63 rs a well balanc
21a0: 65 64 20 6d 69 78 3b 20 69 74 27 73 20 73 74 69 ed mix; it's sti
21b0: 6c 6c 20 72 65 61 73 6f 6e 61 62 6c 79 20 73 69 ll reasonably si
21c0: 6d 70 6c 65 20 61 6e 64 20 69 74 27 73 20 70 6f mple and it's po
21d0: 77 65 72 66 75 6c 20 61 74 20 74 68 65 20 73 61 werful at the sa
21e0: 6d 65 20 74 69 6d 65 2e 3c 2f 6c 69 3e 0d 0a 3c me time.</li>..<
21f0: 2f 75 6c 3e 0d 0a 3c 2f 74 64 3e 0d 0a 3c 2f 74 /ul>..</td>..</t
2200: 72 3e 0d 0a 3c 74 72 3e 0d 0a 3c 74 68 3e 43 68 r>..<tr>..<th>Ch
2210: 61 72 73 65 74 20 65 6e 63 6f 64 69 6e 67 3c 2f arset encoding</
2220: 74 68 3e 0d 0a 3c 74 64 3e 0d 0a 4e 6f 74 20 69 th>..<td>..Not i
2230: 6e 74 65 72 6e 61 6c 6c 79 20 64 65 66 69 6e 65 nternally define
2240: 64 20 62 79 20 74 68 65 20 53 68 61 70 65 66 69 d by the Shapefi
2250: 6c 65 20 69 74 73 65 6c 66 2e 3c 62 72 3e 0d 0a le itself.<br>..
2260: 41 74 74 65 6d 70 74 69 6e 67 20 74 6f 20 67 75 Attempting to gu
2270: 65 73 73 20 74 68 65 20 61 70 70 72 6f 70 72 69 ess the appropri
2280: 61 74 65 20 63 68 61 72 73 65 74 20 65 6e 63 6f ate charset enco
2290: 64 69 6e 67 20 72 65 71 75 69 72 65 64 20 62 79 ding required by
22a0: 20 73 6f 6d 65 20 53 68 61 70 65 66 69 6c 65 20 some Shapefile
22b0: 69 73 20 6d 6f 72 65 20 61 20 6d 61 67 69 63 20 is more a magic
22c0: 61 72 74 20 74 68 61 6e 20 72 61 74 69 6f 6e 61 art than rationa
22d0: 6c 20 73 63 69 65 6e 63 65 2e 0d 0a 3c 2f 74 64 l science...</td
22e0: 3e 0d 0a 3c 74 64 3e 0d 0a 41 6c 77 61 79 73 20 >..<td>..Always
22f0: 69 6e 74 65 72 6e 61 6c 6c 79 20 64 65 66 69 6e internally defin
2300: 65 64 20 62 79 20 74 68 65 20 47 4d 4c 2f 58 4d ed by the GML/XM
2310: 4c 20 66 69 6c 65 20 69 74 73 65 6c 66 2e 0d 0a L file itself...
2320: 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 0d 0a 52 46 43 </td>..<td>..RFC
2330: 20 37 39 34 36 20 73 74 72 69 63 74 6c 79 20 72 7946 strictly r
2340: 65 71 75 69 72 65 73 20 74 68 61 74 20 61 6c 6c equires that all
2350: 20 47 65 6f 4a 53 4f 4e 20 66 69 6c 65 73 20 6d GeoJSON files m
2360: 75 73 74 20 62 65 20 65 6e 63 6f 64 65 64 20 61 ust be encoded a
2370: 73 20 3c 62 3e 55 54 46 2d 38 3c 2f 62 3e 3c 62 s <b>UTF-8</b><b
2380: 72 3e 3c 62 72 3e 0d 0a 49 6e 20 70 75 72 65 20 r><br>..In pure
2390: 74 68 65 6f 72 79 20 62 6f 74 68 20 3c 62 3e 55 theory both <b>U
23a0: 54 46 2d 31 36 3c 2f 62 3e 20 61 6e 64 20 3c 62 TF-16</b> and <b
23b0: 3e 55 54 46 2d 33 32 3c 2f 62 3e 20 63 6f 75 6c >UTF-32</b> coul
23c0: 64 20 62 65 20 75 73 65 64 20 66 6f 72 20 65 6e d be used for en
23d0: 63 6f 64 69 6e 67 20 61 20 6c 65 67 69 74 69 6d coding a legitim
23e0: 61 74 65 20 47 65 6f 4a 53 4f 4e 20 66 69 6c 65 ate GeoJSON file
23f0: 2c 20 62 75 74 20 73 75 63 68 20 6f 70 74 69 6f , but such optio
2400: 6e 73 20 73 65 65 6d 73 20 74 6f 20 62 65 20 76 ns seems to be v
2410: 65 72 79 20 72 61 72 65 6c 79 20 28 69 66 20 6e ery rarely (if n
2420: 65 76 65 72 29 20 61 64 6f 70 74 65 64 20 69 6e ever) adopted in
2430: 20 72 65 61 6c 20 77 6f 72 6c 64 2e 0d 0a 3c 2f real world...</
2440: 74 64 3e 0d 0a 3c 74 64 3e 0d 0a 3c 75 6c 3e 0d td>..<td>..<ul>.
2450: 0a 3c 6c 69 3e 53 68 61 70 65 66 69 6c 65 73 20 .<li>Shapefiles
2460: 6c 65 61 76 65 73 20 61 20 6c 6f 74 20 74 6f 20 leaves a lot to
2470: 62 65 20 64 65 73 69 72 65 64 2c 20 61 6e 64 20 be desired, and
2480: 6e 6f 74 20 72 61 72 65 6c 79 20 6d 69 73 75 6e not rarely misun
2490: 64 65 72 73 74 75 6e 64 69 6e 67 20 74 68 65 20 derstunding the
24a0: 61 70 70 72 6f 70 72 69 61 74 65 20 63 68 61 72 appropriate char
24b0: 73 65 74 20 65 6e 63 6f 64 69 6e 67 20 63 61 75 set encoding cau
24c0: 73 65 73 20 6d 61 6e 79 20 73 65 72 69 6f 75 73 ses many serious
24d0: 20 70 6f 72 74 61 62 69 6c 69 74 79 20 69 73 73 portability iss
24e0: 75 65 73 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 47 ues.</li>..<li>G
24f0: 4d 4c 2f 58 4d 4c 20 6e 69 63 65 6c 79 20 73 75 ML/XML nicely su
2500: 70 70 6f 72 74 73 20 61 6e 79 20 70 6f 73 73 69 pports any possi
2510: 62 6c 65 20 63 68 61 72 73 65 74 20 69 6e 20 74 ble charset in t
2520: 68 65 20 6d 6f 73 74 20 66 6c 65 78 69 62 6c 65 he most flexible
2530: 20 28 61 6e 64 20 73 61 66 65 29 0d 0a 77 61 79 (and safe)..way
2540: 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 4f 6e 63 65 20 </li>..<li>Once
2550: 61 67 61 69 6e 2c 20 47 65 6f 4a 53 4f 4e 20 69 again, GeoJSON i
2560: 73 20 73 74 72 61 69 67 68 74 66 6f 72 77 61 72 s straightforwar
2570: 64 20 73 69 6d 70 6c 65 20 62 75 74 20 72 65 61 d simple but rea
2580: 6c 6c 79 20 65 66 66 65 63 74 69 76 65 3c 2f 6c lly effective</l
2590: 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c 2f 74 64 3e i>..</ul>..</td>
25a0: 0d 0a 3c 2f 74 72 3e 0d 0a 3c 2f 74 61 62 6c 65 ..</tr>..</table
25b0: 3e 0d 0a 3c 68 32 3e 53 6b 65 6c 65 74 61 6c 20 >..<h2>Skeletal
25c0: 47 65 6f 4a 53 4f 4e 20 61 6e 61 74 68 6f 6d 79 GeoJSON anathomy
25d0: 3c 2f 68 32 3e 0d 0a 3c 76 65 72 62 61 74 69 6d </h2>..<verbatim
25e0: 3e 0d 0a 7b 0d 0a 20 20 20 22 74 79 70 65 22 3a >..{.. "type":
25f0: 20 22 46 65 61 74 75 72 65 43 6f 6c 6c 65 63 74 "FeatureCollect
2600: 69 6f 6e 22 2c 0d 0a 20 20 20 22 66 65 61 74 75 ion",.. "featu
2610: 72 65 73 22 3a 20 0d 0a 20 20 20 5b 7b 0d 0a 20 res": .. [{..
2620: 20 20 20 20 20 20 22 74 79 70 65 22 3a 20 22 46 "type": "F
2630: 65 61 74 75 72 65 22 2c 0d 0a 20 20 20 20 20 20 eature",..
2640: 20 22 67 65 6f 6d 65 74 72 79 22 3a 20 0d 0a 20 "geometry": ..
2650: 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 {..
2660: 20 20 20 20 22 74 79 70 65 22 3a 20 22 50 6f 69 "type": "Poi
2670: 6e 74 22 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 nt",..
2680: 20 22 63 6f 6f 72 64 69 6e 61 74 65 73 22 3a 20 "coordinates":
2690: 5b 31 30 32 2e 30 2c 20 30 2e 35 5d 0d 0a 20 20 [102.0, 0.5]..
26a0: 20 20 20 20 20 7d 2c 0d 0a 20 20 20 20 20 20 20 },..
26b0: 22 70 72 6f 70 65 72 74 69 65 73 22 3a 20 0d 0a "properties": ..
26c0: 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 {..
26d0: 20 20 20 20 20 22 70 72 6f 70 30 22 3a 20 22 76 "prop0": "v
26e0: 61 6c 75 65 30 22 0d 0a 20 20 20 20 20 20 20 7d alue0".. }
26f0: 0d 0a 20 20 20 20 7d 2c 20 0d 0a 20 20 20 20 7b .. }, .. {
2700: 0d 0a 20 20 20 20 20 20 20 22 74 79 70 65 22 3a .. "type":
2710: 20 22 46 65 61 74 75 72 65 22 2c 0d 0a 20 20 20 "Feature",..
2720: 20 20 20 20 22 67 65 6f 6d 65 74 72 79 22 3a 20 "geometry":
2730: 0d 0a 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 .. {..
2740: 20 20 20 20 20 20 20 22 74 79 70 65 22 3a 20 22 "type": "
2750: 4c 69 6e 65 53 74 72 69 6e 67 22 2c 0d 0a 20 20 LineString",..
2760: 20 20 20 20 20 20 20 20 20 22 63 6f 6f 72 64 69 "coordi
2770: 6e 61 74 65 73 22 3a 20 0d 0a 20 20 20 20 20 20 nates": ..
2780: 20 20 20 20 5b 0d 0a 20 20 20 20 20 20 20 20 20 [..
2790: 20 20 20 20 20 20 5b 31 30 32 2e 30 2c 20 30 2e [102.0, 0.
27a0: 30 5d 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 0],..
27b0: 20 20 20 20 5b 31 30 33 2e 30 2c 20 31 2e 30 5d [103.0, 1.0]
27c0: 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ,..
27d0: 20 20 5b 31 30 34 2e 30 2c 20 30 2e 30 5d 2c 0d [104.0, 0.0],.
27e0: 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .
27f0: 5b 31 30 35 2e 30 2c 20 31 2e 30 5d 0d 0a 20 20 [105.0, 1.0]..
2800: 20 20 20 20 20 20 20 20 20 5d 0d 0a 20 20 20 20 ]..
2810: 20 20 20 7d 2c 0d 0a 20 20 20 20 20 20 20 22 70 },.. "p
2820: 72 6f 70 65 72 74 69 65 73 22 3a 20 0d 0a 20 20 roperties": ..
2830: 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 {..
2840: 20 20 20 22 70 72 6f 70 30 22 3a 20 22 76 61 6c "prop0": "val
2850: 75 65 30 22 2c 0d 0a 20 20 20 20 20 20 20 20 20 ue0",..
2860: 20 20 22 70 72 6f 70 31 22 3a 20 30 2e 30 0d 0a "prop1": 0.0..
2870: 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 7d 2c }.. },
2880: 20 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 .. {..
2890: 20 22 74 79 70 65 22 3a 20 22 46 65 61 74 75 72 "type": "Featur
28a0: 65 22 2c 0d 0a 20 20 20 20 20 20 20 22 67 65 6f e",.. "geo
28b0: 6d 65 74 72 79 22 3a 20 0d 0a 20 20 20 20 20 20 metry": ..
28c0: 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 22 {.. "
28d0: 74 79 70 65 22 3a 20 22 50 6f 6c 79 67 6f 6e 22 type": "Polygon"
28e0: 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 22 63 ,.. "c
28f0: 6f 6f 72 64 69 6e 61 74 65 73 22 3a 20 0d 0a 20 oordinates": ..
2900: 20 20 20 20 20 20 20 20 20 20 5b 0d 0a 20 20 20 [..
2910: 20 20 20 20 20 20 20 20 20 20 20 20 5b 0d 0a 20 [..
2920: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
2930: 20 20 5b 31 30 30 2e 30 2c 20 30 2e 30 5d 2c 0d [100.0, 0.0],.
2940: 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .
2950: 20 20 20 20 5b 31 30 31 2e 30 2c 20 30 2e 30 5d [101.0, 0.0]
2960: 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ,..
2970: 20 20 20 20 20 20 5b 31 30 31 2e 30 2c 20 31 2e [101.0, 1.
2980: 30 5d 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 0],..
2990: 20 20 20 20 20 20 20 20 5b 31 30 30 2e 30 2c 20 [100.0,
29a0: 31 2e 30 5d 2c 0d 0a 20 20 20 20 20 20 20 20 20 1.0],..
29b0: 20 20 20 20 20 20 20 20 20 20 5b 31 30 30 2e 30 [100.0
29c0: 2c 20 30 2e 30 5d 0d 0a 20 20 20 20 20 20 20 20 , 0.0]..
29d0: 20 20 20 20 20 20 20 5d 0d 0a 20 20 20 20 20 20 ]..
29e0: 20 20 20 20 20 5d 0d 0a 20 20 20 20 20 20 20 7d ].. }
29f0: 2c 0d 0a 20 20 20 20 20 20 20 22 70 72 6f 70 65 ,.. "prope
2a00: 72 74 69 65 73 22 3a 20 0d 0a 20 20 20 20 20 20 rties": ..
2a10: 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 22 {.. "
2a20: 70 72 6f 70 30 22 3a 20 22 76 61 6c 75 65 30 22 prop0": "value0"
2a30: 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 22 70 ,.. "p
2a40: 72 6f 70 31 22 3a 20 7b 22 74 68 69 73 22 3a 20 rop1": {"this":
2a50: 22 74 68 61 74 22 7d 0d 0a 20 20 20 20 20 20 20 "that"}..
2a60: 7d 0d 0a 20 20 20 7d 5d 0d 0a 7d 0d 0a 3c 2f 76 }.. }]..}..</v
2a70: 65 72 62 61 74 69 6d 3e 0d 0a 41 73 20 79 6f 75 erbatim>..As you
2a80: 20 63 61 6e 20 65 61 73 69 6c 79 20 6e 6f 74 69 can easily noti
2a90: 63 65 2c 20 47 65 6f 4a 53 4f 4e 20 68 61 73 20 ce, GeoJSON has
2aa0: 61 20 70 6c 61 69 6e 20 72 65 67 75 6c 61 72 20 a plain regular
2ab0: 73 74 72 75 63 74 75 72 65 20 61 6e 64 20 69 73 structure and is
2ac0: 20 64 65 63 69 73 65 6c 79 20 6d 6f 73 74 20 63 decisely most c
2ad0: 6f 6e 63 69 73 65 20 61 6e 64 20 6c 65 73 73 20 oncise and less
2ae0: 76 65 72 62 6f 73 65 20 74 68 61 6e 20 47 4d 4c verbose than GML
2af0: 2f 58 4d 4c 3a 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 /XML:..<ul>..<li
2b00: 3e 45 76 65 72 79 20 47 65 6f 4a 53 4f 4e 20 66 >Every GeoJSON f
2b10: 69 6c 65 20 6d 75 73 74 20 63 6f 6e 74 61 69 6e ile must contain
2b20: 20 61 20 3c 62 3e 46 65 61 74 75 72 65 43 6f 6c a <b>FeatureCol
2b30: 6c 65 63 74 69 6f 6e 3c 2f 62 3e 20 6f 62 6a 65 lection</b> obje
2b40: 63 74 2e 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 41 ct...<ul>..<li>A
2b50: 20 20 3c 62 3e 46 65 61 74 75 72 65 43 6f 6c 6c <b>FeatureColl
2b60: 65 63 74 69 6f 6e 3c 2f 62 3e 20 63 6f 6e 74 61 ection</b> conta
2b70: 69 6e 73 20 6f 6e 65 20 6f 72 20 6d 6f 72 65 20 ins one or more
2b80: 69 6e 64 69 76 69 64 75 61 6c 20 3c 62 3e 46 65 individual <b>Fe
2b90: 61 74 75 72 65 3c 2f 62 3e 20 6f 62 6a 65 63 74 ature</b> object
2ba0: 73 2e 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 45 61 s...<ul>..<li>Ea
2bb0: 63 68 20 3c 62 3e 46 65 61 74 75 72 65 3c 2f 62 ch <b>Feature</b
2bc0: 3e 20 69 73 20 65 78 70 65 63 74 65 64 20 74 6f > is expected to
2bd0: 20 64 65 63 6c 61 72 65 20 61 20 3c 62 3e 47 65 declare a <b>Ge
2be0: 6f 6d 65 74 72 79 3c 2f 62 3e 20 61 6e 64 20 61 ometry</b> and a
2bf0: 20 3c 62 3e 70 72 6f 70 65 72 74 69 65 73 3c 2f <b>properties</
2c00: 62 3e 20 61 72 72 61 79 2e 0d 0a 3c 75 6c 3e 0d b> array...<ul>.
2c10: 0a 3c 6c 69 3e 45 61 63 68 20 70 72 6f 70 65 72 .<li>Each proper
2c20: 74 79 20 63 6f 72 65 73 70 6f 6e 64 73 20 74 6f ty coresponds to
2c30: 20 61 6e 20 61 74 74 72 69 62 75 74 65 20 77 69 an attribute wi
2c40: 74 68 20 61 20 3c 62 3e 6e 61 6d 65 3c 2f 62 3e th a <b>name</b>
2c50: 20 61 6e 64 20 61 20 3c 62 3e 76 61 6c 75 65 3c and a <b>value<
2c60: 2f 62 3e 3c 2f 6c 69 3e 2e 0d 0a 3c 2f 6c 69 3e /b></li>...</li>
2c70: 3c 2f 75 6c 3e 0d 0a 3c 2f 6c 69 3e 3c 2f 75 6c </ul>..</li></ul
2c80: 3e 0d 0a 3c 2f 6c 69 3e 3c 2f 75 6c 3e 0d 0a 3c >..</li></ul>..<
2c90: 2f 75 6c 3e 0d 0a 3c 68 33 3e 53 68 6f 72 74 20 /ul>..<h3>Short
2ca0: 63 6f 6e 63 6c 75 73 69 6f 6e 73 3c 2f 68 33 3e conclusions</h3>
2cb0: 0d 0a 47 65 6f 4a 53 4f 4e 20 69 73 20 77 69 64 ..GeoJSON is wid
2cc0: 65 6c 79 20 61 64 6f 70 74 65 64 20 62 79 20 6d ely adopted by m
2cd0: 61 6e 79 20 77 65 62 2d 61 70 70 73 3b 20 62 65 any web-apps; be
2ce0: 69 6e 67 20 61 20 6e 6f 74 61 74 69 6f 6e 20 64 ing a notation d
2cf0: 69 72 65 63 74 6c 79 20 62 61 73 65 64 20 6f 6e irectly based on
2d00: 20 3c 62 3e 4a 61 76 61 53 63 72 69 70 74 3c 2f <b>JavaScript</
2d10: 62 3e 20 69 74 20 68 61 73 20 61 20 6e 61 74 75 b> it has a natu
2d20: 72 61 6c 20 69 6e 74 65 67 72 61 74 69 6f 6e 20 ral integration
2d30: 69 6e 20 70 6f 70 75 6c 61 72 20 3c 69 3e 63 6c in popular <i>cl
2d40: 69 65 6e 74 2d 73 69 64 65 3c 2f 69 3e 20 4a 53 ient-side</i> JS
2d50: 20 6c 69 62 72 61 72 69 65 73 20 73 75 63 68 20 libraries such
2d60: 61 73 20 3c 61 20 68 72 65 66 3d 22 68 74 74 70 as <a href="http
2d70: 73 3a 2f 2f 65 6e 2e 77 69 6b 69 70 65 64 69 61 s://en.wikipedia
2d80: 2e 6f 72 67 2f 77 69 6b 69 2f 4f 70 65 6e 4c 61 .org/wiki/OpenLa
2d90: 79 65 72 73 22 3e 4f 70 65 6e 4c 61 79 65 72 73 yers">OpenLayers
2da0: 3c 2f 61 3e 20 61 6e 64 20 3c 61 20 68 72 65 66 </a> and <a href
2db0: 3d 22 68 74 74 70 73 3a 2f 2f 65 6e 2e 77 69 6b ="https://en.wik
2dc0: 69 70 65 64 69 61 2e 6f 72 67 2f 77 69 6b 69 2f ipedia.org/wiki/
2dd0: 4c 65 61 66 6c 65 74 5f 28 73 6f 66 74 77 61 72 Leaflet_(softwar
2de0: 65 29 22 3e 4c 65 61 66 6c 65 74 3c 2f 61 3e 2e e)">Leaflet</a>.
2df0: 3c 62 72 3e 0d 0a 49 74 27 73 20 61 64 65 71 75 <br>..It's adequ
2e00: 61 74 65 6c 79 20 73 75 70 70 6f 72 74 65 64 20 ately supported
2e10: 62 79 20 3c 61 20 68 72 65 66 3d 22 68 74 74 70 by <a href="http
2e20: 73 3a 2f 2f 65 6e 2e 77 69 6b 69 70 65 64 69 61 s://en.wikipedia
2e30: 2e 6f 72 67 2f 77 69 6b 69 2f 47 44 41 4c 22 3e .org/wiki/GDAL">
2e40: 47 44 41 4c 3c 2f 61 3e 2c 20 61 6e 64 20 63 6f GDAL</a>, and co
2e50: 6e 73 65 71 75 65 6e 74 6c 79 20 62 79 20 6d 61 nsequently by ma
2e60: 6e 79 20 6f 74 68 65 72 73 20 66 72 65 65 2f 6c ny others free/l
2e70: 69 62 72 65 20 73 77 20 63 6f 6d 70 6f 6e 65 6e ibre sw componen
2e80: 74 73 20 28 61 73 20 65 2e 67 2e 20 3c 61 20 68 ts (as e.g. <a h
2e90: 72 65 66 3d 22 68 74 74 70 73 3a 2f 2f 65 6e 2e ref="https://en.
2ea0: 77 69 6b 69 70 65 64 69 61 2e 6f 72 67 2f 77 69 wikipedia.org/wi
2eb0: 6b 69 2f 4d 61 70 53 65 72 76 65 72 3e 4d 61 70 ki/MapServer>Map
2ec0: 53 65 72 76 65 72 22 3e 4d 61 70 53 65 72 76 65 Server">MapServe
2ed0: 72 3c 2f 61 3e 20 61 6e 64 20 3c 61 20 68 72 65 r</a> and <a hre
2ee0: 66 3d 22 68 74 74 70 73 3a 2f 2f 65 6e 2e 77 69 f="https://en.wi
2ef0: 6b 69 70 65 64 69 61 2e 6f 72 67 2f 77 69 6b 69 kipedia.org/wiki
2f00: 2f 47 65 6f 53 65 72 76 65 72 22 3e 47 65 6f 53 /GeoServer">GeoS
2f10: 65 72 76 65 72 3c 2f 61 3e 29 2e 3c 62 72 3e 3c erver</a>).<br><
2f20: 62 72 3e 0d 0a 4f 75 74 73 69 64 65 20 74 68 65 br>..Outside the
2f30: 20 77 65 62 2d 67 69 73 20 61 72 65 6e 61 20 47 web-gis arena G
2f40: 65 6f 4a 53 4f 4e 20 73 74 69 6c 6c 20 68 61 73 eoJSON still has
2f50: 20 6c 69 6d 69 74 65 64 20 61 64 6f 70 74 69 6f limited adoptio
2f60: 6e 2c 20 61 6e 64 20 69 74 27 73 20 61 20 72 65 n, and it's a re
2f70: 61 6c 20 70 69 74 79 20 62 65 63 61 75 73 65 20 al pity because
2f80: 75 6e 64 65 72 20 6d 61 6e 79 20 61 73 70 65 63 under many aspec
2f90: 74 73 20 69 74 27 73 20 61 20 76 65 72 79 20 76 ts it's a very v
2fa0: 61 6c 69 64 20 66 75 6c 6c 20 72 65 70 6c 61 63 alid full replac
2fb0: 65 6d 65 6e 74 20 66 6f 72 20 74 68 65 20 6e 6f ement for the no
2fc0: 77 61 64 61 79 73 20 69 72 72 65 6d 65 64 69 61 wadays irremedia
2fd0: 62 6c 79 20 6f 62 73 6f 6c 65 74 65 20 53 68 61 bly obsolete Sha
2fe0: 70 65 66 69 6c 65 2e 3c 62 72 3e 0d 0a 53 74 61 pefile.<br>..Sta
2ff0: 72 74 69 6e 67 20 73 69 6e 63 65 20 76 65 72 73 rting since vers
3000: 69 6f 6e 20 3c 62 3e 35 2e 30 2e 30 3c 2f 62 3e ion <b>5.0.0</b>
3010: 20 53 70 61 74 69 61 4c 69 74 65 20 6f 66 66 65 SpatiaLite offe
3020: 72 73 20 66 75 6c 6c 20 73 75 70 70 6f 72 74 73 rs full supports
3030: 20 74 6f 20 47 65 6f 4a 53 4f 4e 20 61 73 20 64 to GeoJSON as d
3040: 65 66 69 6e 65 64 20 62 79 20 52 46 43 20 37 39 efined by RFC 79
3050: 34 36 2e 3c 62 72 3e 0d 0a 54 68 65 20 69 6d 70 46.<br>..The imp
3060: 6c 65 6d 65 6e 74 61 74 69 6f 6e 20 73 74 72 6f lementation stro
3070: 6e 67 6c 79 20 72 65 73 65 6d 62 6c 65 73 20 74 ngly resembles t
3080: 68 65 20 6f 6e 65 20 73 75 70 70 6f 72 74 65 64 he one supported
3090: 20 62 79 20 61 6c 6c 20 70 72 65 76 69 6f 75 73 by all previous
30a0: 20 76 65 72 73 69 6f 6e 73 20 66 6f 72 20 53 68 versions for Sh
30b0: 61 70 65 66 69 6c 65 2c 20 61 6e 64 20 74 68 69 apefile, and thi
30c0: 73 20 69 73 6e 27 74 20 61 74 20 61 6c 6c 20 73 s isn't at all s
30d0: 75 72 70 72 69 73 69 6e 67 20 62 65 63 61 75 73 urprising becaus
30e0: 65 20 62 6f 74 68 20 74 68 65 6d 20 63 6f 76 65 e both them cove
30f0: 72 20 74 68 65 20 73 61 6d 65 20 66 75 6e 63 74 r the same funct
3100: 69 6f 6e 61 6c 20 61 72 65 61 2e 0d 0a 3c 62 72 ional area...<br
3110: 3e 3c 62 72 3e 0d 0a 3c 68 72 3e 3c 62 72 3e 0d ><br>..<hr><br>.
3120: 0a 3c 61 20 68 72 65 66 3d 22 68 74 74 70 73 3a .<a href="https:
3130: 2f 2f 77 77 77 2e 67 61 69 61 2d 67 69 73 2e 69 //www.gaia-gis.i
3140: 74 2f 66 6f 73 73 69 6c 2f 6c 69 62 73 70 61 74 t/fossil/libspat
3150: 69 61 6c 69 74 65 2f 77 69 6b 69 3f 6e 61 6d 65 ialite/wiki?name
3160: 3d 34 2e 33 2e 30 2d 64 6f 63 22 3e 62 61 63 6b =4.3.0-doc">back
3170: 3c 2f 61 3e 0a 5a 20 65 37 37 65 66 64 31 38 37 </a>.Z e77efd187
3180: 37 65 62 31 30 36 31 36 33 62 36 31 30 35 38 33 7eb106163b610583
3190: 33 62 35 32 33 65 31 0a 3b523e1.