Wiki page
[Supporting GeoJSON] by
sandro
2019-01-21 18:27:37.
0000: 44 20 32 30 31 39 2d 30 31 2d 32 31 54 31 38 3a D 2019-01-21T18:
0010: 32 37 3a 33 37 2e 30 39 30 0a 4c 20 53 75 70 70 27:37.090.L Supp
0020: 6f 72 74 69 6e 67 5c 73 47 65 6f 4a 53 4f 4e 0a orting\sGeoJSON.
0030: 50 20 32 63 35 65 65 64 31 39 33 63 34 62 31 32 P 2c5eed193c4b12
0040: 38 32 66 65 31 63 33 31 32 30 62 31 62 38 62 63 82fe1c3120b1b8bc
0050: 63 33 34 30 36 36 37 64 65 33 0a 55 20 73 61 6e c340667de3.U san
0060: 64 72 6f 0a 57 20 31 32 39 39 32 0a 3c 61 20 68 dro.W 12992.<a h
0070: 72 65 66 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 ref="https://www
0080: 2e 67 61 69 61 2d 67 69 73 2e 69 74 2f 66 6f 73 .gaia-gis.it/fos
0090: 73 69 6c 2f 6c 69 62 73 70 61 74 69 61 6c 69 74 sil/libspatialit
00a0: 65 2f 77 69 6b 69 3f 6e 61 6d 65 3d 34 2e 33 2e e/wiki?name=4.3.
00b0: 30 2d 64 6f 63 22 3e 62 61 63 6b 3c 2f 61 3e 3c 0-doc">back</a><
00c0: 68 72 3e 3c 62 72 3e 0d 0a 3c 68 31 3e 49 6e 74 hr><br>..<h1>Int
00d0: 72 6f 64 75 63 74 69 6f 6e 3c 2f 68 31 3e 0d 0a roduction</h1>..
00e0: 3c 61 20 68 72 65 66 3d 22 68 74 74 70 73 3a 2f <a href="https:/
00f0: 2f 65 6e 2e 77 69 6b 69 70 65 64 69 61 2e 6f 72 /en.wikipedia.or
0100: 67 2f 77 69 6b 69 2f 47 65 6f 4a 53 4f 4e 22 3e g/wiki/GeoJSON">
0110: 47 65 6f 4a 53 4f 4e 3c 2f 61 3e 20 69 73 20 61 GeoJSON</a> is a
0120: 6e 20 6f 70 65 6e 20 73 74 61 6e 64 61 72 64 20 n open standard
0130: 64 61 74 61 20 66 6f 72 6d 61 74 20 62 61 73 65 data format base
0140: 64 20 6f 6e 20 3c 61 20 68 72 65 66 3d 22 68 74 d on <a href="ht
0150: 74 70 73 3a 2f 2f 65 6e 2e 77 69 6b 69 70 65 64 tps://en.wikiped
0160: 69 61 2e 6f 72 67 2f 77 69 6b 69 2f 4a 53 4f 4e ia.org/wiki/JSON
0170: 22 3e 4a 53 4f 4e 3c 2f 61 3e 20 28 3c 62 3e 4a ">JSON</a> (<b>J
0180: 61 76 61 53 63 72 69 70 74 20 4f 62 6a 65 63 74 avaScript Object
0190: 20 4e 6f 74 61 74 69 6f 6e 3c 2f 62 3e 29 20 74 Notation</b>) t
01a0: 68 61 74 20 69 73 20 61 20 76 65 72 79 20 70 6f hat is a very po
01b0: 70 75 6c 61 72 20 64 61 74 61 20 66 6f 72 6d 61 pular data forma
01c0: 74 20 77 69 64 65 6c 79 20 75 73 65 64 20 62 79 t widely used by
01d0: 20 6d 61 6e 79 20 77 65 62 2d 61 70 70 73 20 61 many web-apps a
01e0: 73 20 61 20 72 65 70 6c 61 63 65 6d 65 6e 74 20 s a replacement
01f0: 66 6f 72 20 58 4d 4c 2e 3c 62 72 3e 0d 0a 54 68 for XML.<br>..Th
0200: 65 20 69 6e 64 65 6e 64 65 64 20 75 73 65 20 6f e indended use o
0210: 66 20 47 65 6f 4a 53 4f 4e 20 69 73 20 74 68 65 f GeoJSON is the
0220: 20 65 78 74 65 6e 73 69 6f 6e 20 6f 66 20 74 68 extension of th
0230: 65 20 62 61 73 69 63 20 63 61 70 61 62 69 6c 69 e basic capabili
0240: 74 69 65 73 20 6f 66 20 4a 53 4f 4e 20 73 6f 20 ties of JSON so
0250: 74 6f 20 61 64 65 71 75 61 74 65 6c 79 20 73 75 to adequately su
0260: 70 70 6f 72 74 20 3c 62 3e 67 65 6f 67 72 61 70 pport <b>geograp
0270: 68 69 63 20 66 65 61 74 75 72 65 73 3c 2f 62 3e hic features</b>
0280: 20 69 6e 63 6c 75 64 69 6e 67 20 62 6f 74 68 20 including both
0290: 3c 62 3e 47 65 6f 6d 65 74 72 69 65 73 3c 2f 62 <b>Geometries</b
02a0: 3e 20 61 6e 64 0d 0a 3c 62 3e 6e 6f 6e 2d 73 70 > and..<b>non-sp
02b0: 61 74 69 61 6c 20 61 74 74 72 69 62 75 74 65 73 atial attributes
02c0: 3c 2f 62 3e 2e 3c 62 72 3e 3c 62 72 3e 0d 0a 47 </b>.<br><br>..G
02d0: 65 6f 4a 53 4f 4e 2c 20 77 68 69 63 68 20 68 61 eoJSON, which ha
02e0: 73 20 65 78 69 73 74 65 64 20 66 6f 72 20 6d 61 s existed for ma
02f0: 6e 79 20 79 65 61 72 73 2c 20 77 61 73 20 69 6e ny years, was in
0300: 69 74 69 61 6c 6c 79 20 62 61 73 65 64 20 6f 6e itially based on
0310: 20 61 20 6c 6f 6f 73 65 20 61 6e 64 20 69 6e 66 a loose and inf
0320: 6f 72 6d 61 6c 20 64 61 74 61 20 73 70 65 63 69 ormal data speci
0330: 66 69 63 61 74 69 6f 6e 2e 3c 62 72 3e 0d 0a 4f fication.<br>..O
0340: 6e 6c 79 20 76 65 72 79 20 72 65 63 65 6e 74 6c nly very recentl
0350: 79 20 28 32 30 31 36 29 20 69 74 20 68 61 73 20 y (2016) it has
0360: 66 69 6e 61 6c 6c 79 20 62 65 63 6f 6d 65 20 61 finally become a
0370: 20 72 65 73 70 65 63 74 61 62 6c 65 20 73 74 61 respectable sta
0380: 6e 64 61 72 64 20 66 6f 72 6d 61 74 20 62 61 73 ndard format bas
0390: 65 64 20 6f 6e 20 61 20 66 6f 72 6d 61 6c 20 73 ed on a formal s
03a0: 70 65 63 69 66 69 63 61 74 69 6f 6e 2c 20 3c 61 pecification, <a
03b0: 20 68 72 65 66 3d 22 68 74 74 70 73 3a 2f 2f 74 href="https://t
03c0: 6f 6f 6c 73 2e 69 65 74 66 2e 6f 72 67 2f 68 74 ools.ietf.org/ht
03d0: 6d 6c 2f 72 66 63 37 39 34 36 22 3e 52 46 43 20 ml/rfc7946">RFC
03e0: 37 39 34 36 3c 2f 61 3e 2c 20 72 65 6c 65 61 73 7946</a>, releas
03f0: 65 64 20 62 79 20 3c 62 3e 49 45 54 46 3c 2f 62 ed by <b>IETF</b
0400: 3e 20 28 3c 69 3e 49 6e 74 65 72 6e 65 74 20 45 > (<i>Internet E
0410: 6e 67 69 6e 65 65 72 69 6e 67 20 54 61 73 6b 20 ngineering Task
0420: 46 6f 72 63 65 3c 2f 69 3e 29 2e 3c 62 72 3e 0d Force</i>).<br>.
0430: 0a 3c 75 3e 4e 6f 74 65 3c 2f 75 3e 3a 20 52 46 .<u>Note</u>: RF
0440: 43 20 37 39 34 36 20 69 6e 74 72 6f 64 75 63 65 C 7946 introduce
0450: 64 20 73 65 76 65 72 61 6c 20 72 65 6c 65 76 61 d several releva
0460: 6e 74 20 72 65 71 75 69 72 65 6d 65 6e 74 73 20 nt requirements
0470: 61 6e 64 20 72 65 73 74 72 69 63 74 69 6f 6e 73 and restrictions
0480: 2c 20 73 6f 20 74 68 61 74 20 3c 62 3e 70 72 65 , so that <b>pre
0490: 2d 52 46 43 3c 2f 62 3e 20 61 6e 64 20 3c 62 3e -RFC</b> and <b>
04a0: 70 6f 73 74 2d 52 46 43 3c 2f 62 3e 20 47 65 6f post-RFC</b> Geo
04b0: 4a 53 4f 4e 20 66 69 6c 65 73 20 61 72 65 20 6e JSON files are n
04c0: 6f 74 20 6d 75 74 75 61 6c 6c 79 20 69 6e 74 65 ot mutually inte
04d0: 72 6f 70 65 72 61 62 6c 65 2e 3c 62 72 3e 3c 62 roperable.<br><b
04e0: 72 3e 0d 0a 41 20 76 65 72 79 20 72 65 6d 61 72 r>..A very remar
04f0: 6b 61 62 6c 65 20 66 65 61 74 75 72 65 20 6f 66 kable feature of
0500: 20 52 46 43 20 37 39 34 36 20 69 73 20 74 68 61 RFC 7946 is tha
0510: 74 20 69 74 27 73 20 65 78 70 6c 69 63 69 74 6c t it's explicitl
0520: 79 20 64 65 63 6c 61 72 65 64 20 74 6f 20 62 65 y declared to be
0530: 20 61 20 3c 62 3e 66 69 78 65 64 20 61 6e 64 20 a <b>fixed and
0540: 69 6d 6d 75 74 61 62 6c 65 3c 2f 62 3e 20 73 70 immutable</b> sp
0550: 65 63 69 66 69 63 61 74 69 6f 6e 2e 3c 62 72 3e ecification.<br>
0560: 0d 0a 54 68 65 72 65 20 77 69 6c 6c 20 6e 65 76 ..There will nev
0570: 65 72 20 62 65 20 75 70 64 61 74 65 64 20 76 65 er be updated ve
0580: 72 73 69 6f 6e 73 20 6f 66 20 47 65 6f 4a 53 4f rsions of GeoJSO
0590: 4e 3b 20 65 76 65 6e 20 74 68 65 20 73 6c 69 67 N; even the slig
05a0: 68 74 65 73 74 20 63 68 61 6e 67 65 20 77 69 6c htest change wil
05b0: 6c 20 72 65 71 75 69 72 65 20 61 20 72 65 6e 6e l require a renn
05c0: 61 6d 65 20 66 72 6f 6d 20 47 65 6f 4a 53 4f 4e ame from GeoJSON
05d0: 20 74 6f 20 73 6f 6d 65 74 68 69 6e 67 20 65 6c to something el
05e0: 73 65 2e 3c 62 72 3e 0d 0a 53 75 63 68 20 61 20 se.<br>..Such a
05f0: 72 65 73 74 72 69 6e 63 74 69 6f 6e 20 69 73 20 restrinction is
0600: 6f 62 76 69 6f 73 6c 79 20 69 6e 74 65 6e 64 65 obviosly intende
0610: 64 20 74 6f 20 65 6e 73 75 72 65 20 61 20 76 65 d to ensure a ve
0620: 72 79 20 73 74 72 6f 6e 67 20 73 74 61 62 69 6c ry strong stabil
0630: 69 74 79 20 64 75 72 69 6e 67 20 69 74 73 20 6c ity during its l
0640: 69 66 65 74 69 6d 65 20 28 61 6e 64 20 72 65 70 ifetime (and rep
0650: 72 65 73 65 6e 74 73 20 61 20 73 74 72 6f 6e 67 resents a strong
0660: 20 72 65 61 63 74 69 6f 6e 20 74 6f 20 74 68 65 reaction to the
0670: 20 6d 61 6e 79 20 47 4d 4c 20 76 65 72 73 69 6f many GML versio
0680: 6e 73 20 74 68 61 74 20 61 62 72 75 70 74 6c 79 ns that abruptly
0690: 20 69 6e 74 72 6f 64 75 63 65 64 20 72 61 64 69 introduced radi
06a0: 63 61 6c 20 63 68 61 6e 67 65 73 20 75 70 73 65 cal changes upse
06b0: 74 74 69 6e 67 20 74 68 65 20 77 65 6c 6c 20 65 tting the well e
06c0: 73 74 61 62 6c 69 73 68 65 64 20 62 65 68 61 76 stablished behav
06d0: 69 6f 72 20 6f 66 20 65 78 69 73 74 69 6e 67 20 ior of existing
06e0: 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 29 implementations)
06f0: 2e 3c 62 72 3e 3c 62 72 3e 0d 0a 54 68 65 20 6d .<br><br>..The m
0700: 6f 73 74 20 6f 62 76 69 6f 75 73 20 63 6f 6d 70 ost obvious comp
0710: 65 74 69 74 6f 72 73 20 6f 66 20 47 65 6f 4a 53 etitors of GeoJS
0720: 4f 4e 20 61 72 65 20 74 68 65 20 3c 61 20 68 72 ON are the <a hr
0730: 65 66 3d 22 68 74 74 70 73 3a 2f 2f 65 6e 2e 77 ef="https://en.w
0740: 69 6b 69 70 65 64 69 61 2e 6f 72 67 2f 77 69 6b ikipedia.org/wik
0750: 69 2f 53 68 61 70 65 66 69 6c 65 22 3e 45 53 52 i/Shapefile">ESR
0760: 49 20 53 68 61 70 65 66 69 6c 65 3c 2f 61 3e 20 I Shapefile</a>
0770: 61 6e 64 20 3c 61 20 68 72 65 66 3d 22 0d 0a 68 and <a href="..h
0780: 74 74 70 73 3a 2f 2f 65 6e 2e 77 69 6b 69 70 65 ttps://en.wikipe
0790: 64 69 61 2e 6f 72 67 2f 77 69 6b 69 2f 47 65 6f dia.org/wiki/Geo
07a0: 67 72 61 70 68 79 5f 4d 61 72 6b 75 70 5f 4c 61 graphy_Markup_La
07b0: 6e 67 75 61 67 65 22 3e 47 4d 4c 3c 2f 61 3e 3c nguage">GML</a><
07c0: 62 72 3e 0d 0a 54 68 65 20 66 6f 6c 6c 6f 77 69 br>..The followi
07d0: 6e 67 20 63 68 61 72 74 20 77 69 6c 6c 20 71 75 ng chart will qu
07e0: 69 63 6b 6c 79 20 6c 69 73 74 20 74 68 65 20 6d ickly list the m
07f0: 61 69 6e 20 64 69 66 66 65 72 65 6e 63 65 73 20 ain differences
0800: 62 65 74 77 65 65 6e 20 74 68 65 6d 2e 3c 62 72 between them.<br
0810: 3e 3c 62 72 3e 0d 0a 3c 74 61 62 6c 65 20 63 65 ><br>..<table ce
0820: 6c 6c 73 70 61 63 69 6e 67 3d 22 34 22 20 63 65 llspacing="4" ce
0830: 6c 6c 70 61 64 64 69 6e 67 3d 22 38 22 20 62 67 llpadding="8" bg
0840: 63 6f 6c 6f 72 3d 22 23 63 30 65 65 63 30 22 20 color="#c0eec0"
0850: 62 6f 72 64 65 72 3d 22 31 22 3e 0d 0a 3c 74 72 border="1">..<tr
0860: 3e 3c 74 68 3e 54 6f 70 69 63 3c 2f 74 68 3e 3c ><th>Topic</th><
0870: 74 68 3e 53 68 61 70 65 66 69 6c 65 3c 2f 74 68 th>Shapefile</th
0880: 3e 3c 74 68 3e 47 4d 4c 3c 2f 74 68 3e 3c 74 68 ><th>GML</th><th
0890: 3e 47 65 6f 4a 53 4f 4e 3c 2f 74 68 3e 3c 74 68 >GeoJSON</th><th
08a0: 3e 52 65 6d 61 72 6b 73 3c 2f 74 68 3e 3c 2f 74 >Remarks</th></t
08b0: 72 3e 0d 0a 3c 74 72 3e 0d 0a 3c 74 68 20 76 61 r>..<tr>..<th va
08c0: 6c 69 67 6e 3d 22 6d 69 64 64 6c 65 22 3e 46 69 lign="middle">Fi
08d0: 6c 65 20 6f 72 67 61 6e 69 7a 61 74 69 6f 6e 3c le organization<
08e0: 2f 74 68 3e 0d 0a 3c 74 64 20 76 61 6c 69 67 6e /th>..<td valign
08f0: 3d 22 6d 69 64 64 6c 65 22 3e 41 74 20 6c 65 61 ="middle">At lea
0900: 73 74 20 74 68 72 65 65 20 69 6e 64 65 70 65 6e st three indepen
0910: 64 65 6e 74 20 66 69 6c 65 73 20 73 68 61 72 69 dent files shari
0920: 6e 67 20 74 68 65 20 73 61 6d 65 20 6e 61 6d 65 ng the same name
0930: 20 61 6e 64 20 72 65 73 70 65 63 74 69 76 65 6c and respectivel
0940: 79 20 69 64 65 6e 74 69 66 69 65 64 20 62 79 20 y identified by
0950: 73 75 66 66 69 78 65 73 20 3c 62 3e 2e 73 68 70 suffixes <b>.shp
0960: 3c 2f 62 3e 2c 20 3c 62 3e 2e 73 68 78 3c 2f 62 </b>, <b>.shx</b
0970: 3e 20 61 6e 64 20 3c 62 3e 2e 64 62 66 3c 2f 62 > and <b>.dbf</b
0980: 3e 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 42 6f 74 >..<ul>..<li>Bot
0990: 68 20 74 68 65 20 3c 62 3e 2e 73 68 70 3c 2f 62 h the <b>.shp</b
09a0: 3e 20 61 6e 64 20 3c 62 3e 2e 73 68 78 3c 2f 62 > and <b>.shx</b
09b0: 3e 20 6d 65 6d 62 65 72 73 20 61 72 65 20 3c 62 > members are <b
09c0: 3e 62 69 6e 61 72 79 20 66 69 6c 65 73 3c 2f 62 >binary files</b
09d0: 3e 20 69 6e 74 65 6e 64 65 64 20 74 6f 20 73 74 > intended to st
09e0: 6f 72 65 20 47 65 6f 6d 65 74 72 69 65 73 20 61 ore Geometries a
09f0: 6e 64 20 73 68 6f 75 6c 64 20 62 65 20 65 6e 63 nd should be enc
0a00: 6f 64 65 64 20 61 63 63 6f 72 64 69 6e 67 6c 79 oded accordingly
0a10: 20 74 6f 20 74 68 65 20 3c 61 20 68 72 65 66 3d to the <a href=
0a20: 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 65 73 72 "https://www.esr
0a30: 69 2e 63 6f 6d 2f 6c 69 62 72 61 72 79 2f 77 68 i.com/library/wh
0a40: 69 74 65 70 61 70 65 72 73 2f 70 64 66 73 2f 73 itepapers/pdfs/s
0a50: 68 61 70 65 66 69 6c 65 2e 70 64 66 22 3e 45 53 hapefile.pdf">ES
0a60: 52 49 20 6f 70 65 6e 20 73 70 65 63 69 66 69 63 RI open specific
0a70: 61 74 69 6f 6e 3c 2f 61 3e 3c 2f 6c 69 3e 0d 0a ation</a></li>..
0a80: 3c 6c 69 3e 54 68 65 20 3c 62 3e 2e 64 62 66 3c <li>The <b>.dbf<
0a90: 2f 62 3e 20 6d 65 6d 62 65 72 20 69 73 20 69 6e /b> member is in
0aa0: 74 65 6e 64 65 64 20 74 6f 20 73 74 6f 72 65 20 tended to store
0ab0: 6e 6f 6e 2d 73 70 61 74 69 61 6c 20 61 74 74 72 non-spatial attr
0ac0: 69 62 75 74 65 73 2e 3c 62 72 3e 0d 0a 54 68 69 ibutes.<br>..Thi
0ad0: 73 20 3c 62 3e 62 69 6e 61 72 79 20 66 69 6c 65 s <b>binary file
0ae0: 3c 2f 62 3e 20 69 73 20 61 6c 73 6f 20 65 78 70 </b> is also exp
0af0: 65 63 74 65 64 20 74 6f 20 62 65 20 65 6e 63 6f ected to be enco
0b00: 64 65 64 20 61 63 63 6f 72 64 69 6e 67 6c 79 20 ded accordingly
0b10: 74 6f 20 3c 61 20 68 72 65 66 3d 22 68 74 74 70 to <a href="http
0b20: 73 3a 2f 2f 65 6e 2e 77 69 6b 69 70 65 64 69 61 s://en.wikipedia
0b30: 2e 6f 72 67 2f 77 69 6b 69 2f 44 42 61 73 65 22 .org/wiki/DBase"
0b40: 3e 41 73 68 74 6f 6e 2d 54 61 74 65 20 64 42 61 >Ashton-Tate dBa
0b50: 73 65 20 73 70 65 63 69 66 69 63 61 74 69 6f 6e se specification
0b60: 3c 2f 61 3e 3b 20 75 6e 68 61 70 70 69 6c 79 20 </a>; unhappily
0b70: 74 68 69 73 20 76 65 72 79 20 6f 6c 64 20 73 70 this very old sp
0b80: 65 63 69 66 69 63 61 74 69 6f 6e 20 28 62 6f 72 ecification (bor
0b90: 6e 20 69 6e 20 74 68 65 20 27 38 30 73 29 20 68 n in the '80s) h
0ba0: 61 64 20 61 20 73 61 76 61 67 65 20 70 72 6f 6c ad a savage prol
0bb0: 69 66 65 72 61 74 69 6f 6e 20 6f 66 20 64 69 66 iferation of dif
0bc0: 66 65 72 65 6e 74 20 64 69 61 6c 65 63 74 73 20 ferent dialects
0bd0: 28 3c 69 3e 43 6c 69 70 70 65 72 3c 2f 69 3e 2c (<i>Clipper</i>,
0be0: 20 3c 69 3e 46 6f 78 50 72 6f 3c 2f 69 3e 29 20 <i>FoxPro</i>)
0bf0: 62 65 63 6f 6d 69 6e 67 20 71 75 69 74 65 20 6d becoming quite m
0c00: 65 73 73 79 20 61 6e 64 20 63 68 61 6f 74 69 63 essy and chaotic
0c10: 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c .</li>..</ul>..<
0c20: 2f 74 64 3e 0d 0a 3c 74 64 3e 47 4d 4c 20 69 73 /td>..<td>GML is
0c30: 20 62 61 73 65 64 20 6f 6e 20 58 4d 4c 2c 20 61 based on XML, a
0c40: 6e 64 20 69 73 20 6a 75 73 74 20 61 20 73 69 6e nd is just a sin
0c50: 67 6c 65 2c 20 6d 6f 6e 6f 6c 69 74 68 69 63 20 gle, monolithic
0c60: 3c 62 3e 74 65 78 74 20 66 69 6c 65 2e 3c 2f 62 <b>text file.</b
0c70: 3e 3c 62 72 3e 0d 0a 41 73 20 61 6e 79 20 6f 74 ><br>..As any ot
0c80: 68 65 72 20 58 4d 4c 20 66 69 6c 65 2c 20 47 4d her XML file, GM
0c90: 4c 20 74 6f 6f 20 63 61 6e 20 62 65 20 73 74 72 L too can be str
0ca0: 6f 6e 67 6c 79 20 63 6f 6e 73 74 72 61 69 6e 65 ongly constraine
0cb0: 64 20 74 6f 20 63 6f 6e 66 6f 72 6d 20 74 6f 20 d to conform to
0cc0: 61 20 66 6f 72 6d 61 6c 6c 79 20 64 65 66 69 6e a formally defin
0cd0: 65 64 20 3c 61 20 68 72 65 66 3d 22 68 74 74 70 ed <a href="http
0ce0: 73 3a 2f 2f 69 74 2e 77 69 6b 69 70 65 64 69 61 s://it.wikipedia
0cf0: 2e 6f 72 67 2f 77 69 6b 69 2f 58 4d 4c 5f 53 63 .org/wiki/XML_Sc
0d00: 68 65 6d 61 22 3e 58 4d 4c 20 53 63 68 65 6d 61 hema">XML Schema
0d10: 3c 2f 61 3e 0d 0a 3c 2f 74 64 3e 0d 0a 3c 74 64 </a>..</td>..<td
0d20: 20 76 61 6c 69 67 6e 3d 22 6d 69 64 64 6c 65 22 valign="middle"
0d30: 3e 0d 0a 53 69 6e 67 6c 65 20 6d 6f 6e 6f 6c 69 >..Single monoli
0d40: 74 68 69 63 20 3c 62 3e 74 65 78 74 20 66 69 6c thic <b>text fil
0d50: 65 3c 2f 62 3e 2e 3c 62 72 3e 0d 0a 53 69 6d 69 e</b>.<br>..Simi
0d60: 6c 61 72 20 74 6f 20 58 4d 4c 2c 20 62 75 74 20 lar to XML, but
0d70: 69 6e 74 65 6e 64 65 64 20 74 6f 20 62 65 20 66 intended to be f
0d80: 61 72 20 73 69 6d 70 6c 65 72 20 61 6e 64 20 6c ar simpler and l
0d90: 65 73 73 20 76 65 72 62 6f 73 65 2e 0d 0a 3c 2f ess verbose...</
0da0: 74 64 3e 0d 0a 3c 74 64 3e 0d 0a 54 68 65 20 74 td>..<td>..The t
0db0: 68 72 65 65 2d 66 69 6c 65 73 20 6c 61 79 6f 75 hree-files layou
0dc0: 74 20 6f 66 20 53 68 61 70 65 66 69 6c 65 20 69 t of Shapefile i
0dd0: 73 20 63 6c 65 61 72 6c 79 20 6f 62 73 6f 6c 65 s clearly obsole
0de0: 74 65 2c 20 61 6e 64 20 69 74 20 66 72 65 71 75 te, and it frequ
0df0: 65 6e 74 6c 79 20 70 6f 73 65 73 20 6d 61 6e 79 ently poses many
0e00: 20 68 65 61 64 61 63 68 65 73 20 63 61 75 73 69 headaches causi
0e10: 6e 67 20 75 6e 65 78 70 65 63 74 65 64 20 74 72 ng unexpected tr
0e20: 6f 75 62 6c 65 73 2e 3c 62 72 3e 3c 62 72 3e 0d oubles.<br><br>.
0e30: 0a 54 68 65 20 73 69 6e 67 6c 65 2d 66 69 6c 65 .The single-file
0e40: 20 6c 61 79 6f 75 74 20 61 64 6f 70 74 65 64 20 layout adopted
0e50: 62 79 20 62 6f 74 68 20 47 4d 4c 20 61 6e 64 20 by both GML and
0e60: 47 65 6f 4a 53 4f 4e 20 69 73 20 63 6c 65 61 72 GeoJSON is clear
0e70: 6c 79 20 62 65 74 74 65 72 20 61 6e 64 20 73 61 ly better and sa
0e80: 66 65 72 2c 20 61 6e 64 20 62 65 69 6e 67 20 3c fer, and being <
0e90: 62 3e 74 65 78 74 20 66 69 6c 65 73 3c 2f 62 3e b>text files</b>
0ea0: 20 74 68 65 79 20 63 61 6e 20 62 65 20 65 61 73 they can be eas
0eb0: 69 6c 79 20 69 6e 73 70 65 63 74 65 64 20 61 6e ily inspected an
0ec0: 64 20 65 76 65 6e 74 75 61 6c 6c 79 20 64 65 62 d eventually deb
0ed0: 75 67 67 65 64 20 6a 75 73 74 20 75 73 69 6e 67 ugged just using
0ee0: 20 61 6e 79 20 67 65 6e 65 72 69 63 20 3c 62 3e any generic <b>
0ef0: 74 65 78 74 20 65 64 69 74 6f 72 3c 2f 62 3e 20 text editor</b>
0f00: 77 69 74 68 6f 75 74 20 72 65 71 75 69 72 69 6e without requirin
0f10: 67 20 61 6e 79 20 73 70 65 63 69 66 69 63 20 74 g any specific t
0f20: 6f 6f 6c 2e 0d 0a 3c 2f 74 64 3e 0d 0a 3c 2f 74 ool...</td>..</t
0f30: 72 3e 0d 0a 3c 74 72 3e 0d 0a 3c 74 68 3e 47 65 r>..<tr>..<th>Ge
0f40: 6f 6d 65 74 72 79 20 63 6c 61 73 73 65 73 3c 2f ometry classes</
0f50: 74 68 3e 0d 0a 3c 74 64 3e 0d 0a 3c 75 6c 3e 0d th>..<td>..<ul>.
0f60: 0a 3c 6c 69 3e 4e 75 6c 6c 20 53 68 61 70 65 3c .<li>Null Shape<
0f70: 2f 6c 69 3e 0d 0a 3c 6c 69 3e 50 6f 69 6e 74 3c /li>..<li>Point<
0f80: 2f 6c 69 3e 0d 0a 3c 6c 69 3e 4d 75 6c 74 69 50 /li>..<li>MultiP
0f90: 6f 69 6e 74 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 50 oint</li>..<li>P
0fa0: 6f 6c 79 4c 69 6e 65 20 28 77 69 74 68 6f 75 74 olyLine (without
0fb0: 20 64 69 73 74 69 6e 67 75 69 73 68 69 6e 67 20 distinguishing
0fc0: 62 65 74 77 65 65 6e 20 73 69 6e 67 6c 65 2d 20 between single-
0fd0: 61 6e 64 20 6d 75 6c 74 69 2d 70 61 72 74 29 3c and multi-part)<
0fe0: 2f 6c 69 3e 0d 0a 3c 6c 69 3e 50 6f 6c 79 67 6f /li>..<li>Polygo
0ff0: 6e 20 28 77 69 74 68 6f 75 74 20 64 69 73 74 69 n (without disti
1000: 6e 67 75 69 73 68 69 6e 67 20 62 65 74 77 65 65 nguishing betwee
1010: 6e 20 73 69 6e 67 6c 65 2d 20 61 6e 64 20 6d 75 n single- and mu
1020: 6c 74 69 2d 70 61 72 74 29 3c 2f 6c 69 3e 0d 0a lti-part)</li>..
1030: 3c 2f 75 6c 3e 0d 0a 3c 62 72 3e 0d 0a 3c 75 3e </ul>..<br>..<u>
1040: 4e 6f 74 65 73 3c 2f 75 3e 3a 20 0d 0a 3c 75 6c Notes</u>: ..<ul
1050: 3e 0d 0a 3c 6c 69 3e 41 6c 6c 20 47 65 6f 6d 65 >..<li>All Geome
1060: 74 72 69 65 73 20 69 6e 20 74 68 65 20 73 61 6d tries in the sam
1070: 65 20 53 68 61 70 65 66 69 6c 65 20 6d 75 73 74 e Shapefile must
1080: 20 73 68 61 72 65 20 74 68 65 20 73 61 6d 65 20 share the same
1090: 63 6c 61 73 73 20 28 6f 72 20 62 65 20 3c 62 3e class (or be <b>
10a0: 4e 75 6c 6c 3c 2f 62 3e 29 2e 3c 2f 6c 69 3e 0d Null</b>).</li>.
10b0: 0a 3c 6c 69 3e 41 6c 6c 20 47 65 6f 6d 65 74 72 .<li>All Geometr
10c0: 69 65 73 20 69 6e 20 74 68 65 20 73 61 6d 65 20 ies in the same
10d0: 53 68 61 70 65 66 69 6c 65 20 6d 75 73 74 20 73 Shapefile must s
10e0: 68 61 72 65 20 74 68 65 20 73 61 6d 65 20 53 52 hare the same SR
10f0: 49 44 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 54 68 ID.</li>..<li>Th
1100: 65 20 72 75 6c 65 73 20 66 6f 72 20 69 64 65 6e e rules for iden
1110: 74 69 66 79 69 6e 67 20 3c 62 3e 45 78 74 65 72 tifying <b>Exter
1120: 69 6f 72 3c 2f 62 3e 20 61 6e 64 20 3c 62 3e 49 ior</b> and <b>I
1130: 6e 74 65 72 69 6f 72 3c 2f 62 3e 20 50 6f 6c 79 nterior</b> Poly
1140: 67 6f 6e 20 72 69 6e 67 73 0d 0a 61 72 65 20 61 gon rings..are a
1150: 77 6b 77 61 72 64 20 61 6e 64 20 63 61 6e 20 66 wkward and can f
1160: 72 65 71 75 65 6e 74 6c 79 20 63 61 75 73 65 20 requently cause
1170: 69 6e 74 65 72 6f 70 65 72 61 62 69 6c 69 74 79 interoperability
1180: 20 69 73 73 75 65 73 2e 3c 2f 6c 69 3e 0d 0a 3c issues.</li>..<
1190: 2f 75 6c 3e 0d 0a 3c 2f 74 64 3e 0d 0a 3c 74 64 /ul>..</td>..<td
11a0: 3e 0d 0a 47 4d 4c 20 61 6c 6c 6f 77 73 20 6d 61 >..GML allows ma
11b0: 6e 79 20 64 69 66 66 65 72 65 6e 74 20 77 61 79 ny different way
11c0: 73 20 74 6f 20 64 65 66 69 6e 65 20 74 68 65 20 s to define the
11d0: 73 61 6d 65 20 74 79 70 65 20 6f 66 20 47 65 6f same type of Geo
11e0: 6d 65 74 72 79 2c 20 61 6e 64 20 74 68 65 20 73 metry, and the s
11f0: 70 65 63 69 66 69 63 61 74 69 6f 6e 73 20 68 61 pecifications ha
1200: 76 65 20 72 61 64 69 63 61 6c 6c 79 20 63 68 61 ve radically cha
1210: 6e 67 65 64 20 66 72 6f 6d 20 76 65 72 73 69 6f nged from versio
1220: 6e 20 74 6f 20 76 65 72 73 69 6f 6e 2e 3c 62 72 n to version.<br
1230: 3e 3c 62 72 3e 0d 0a 47 4d 4c 20 68 61 73 20 61 ><br>..GML has a
1240: 20 72 65 61 6c 6c 79 20 69 6d 70 72 65 73 73 69 really impressi
1250: 76 65 20 66 6c 65 78 69 62 69 6c 79 20 28 65 2e ve flexibily (e.
1260: 67 2e 20 65 61 63 68 20 73 69 6e 67 6c 65 20 47 g. each single G
1270: 65 6f 6d 65 74 72 79 20 63 61 6e 20 66 72 65 65 eometry can free
1280: 6c 79 20 64 65 63 6c 61 72 65 20 69 74 73 20 6f ly declare its o
1290: 77 6e 20 53 52 49 44 29 2c 20 62 75 74 20 61 74 wn SRID), but at
12a0: 20 74 68 65 20 63 6f 73 74 20 6f 66 20 69 6d 70 the cost of imp
12b0: 6f 73 69 6e 67 20 61 6e 20 6f 76 65 72 77 68 65 osing an overwhe
12c0: 6c 6d 69 6e 67 20 63 6f 6d 70 6c 65 78 69 74 79 lming complexity
12d0: 2e 0d 0a 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 0d 0a ...</td>..<td>..
12e0: 3c 75 6c 3e 0d 0a 3c 6c 69 3e 4e 75 6c 6c 3c 2f <ul>..<li>Null</
12f0: 6c 69 3e 0d 0a 3c 6c 69 3e 50 6f 69 6e 74 3c 2f li>..<li>Point</
1300: 6c 69 3e 0d 0a 3c 6c 69 3e 4c 69 6e 65 73 74 72 li>..<li>Linestr
1310: 69 6e 67 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 50 6f ing</li>..<li>Po
1320: 6c 79 67 6f 6e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e lygon</li>..<li>
1330: 4d 75 6c 74 69 50 6f 69 6e 74 3c 2f 6c 69 3e 0d MultiPoint</li>.
1340: 0a 3c 6c 69 3e 4d 75 6c 74 69 4c 69 6e 65 73 74 .<li>MultiLinest
1350: 72 69 6e 67 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 4d ring</li>..<li>M
1360: 75 6c 74 69 50 6f 6c 79 67 6f 6e 3c 2f 6c 69 3e ultiPolygon</li>
1370: 0d 0a 3c 6c 69 3e 47 65 6f 6d 65 74 72 79 43 6f ..<li>GeometryCo
1380: 6c 6c 65 63 74 69 6f 6e 3c 2f 6c 69 3e 0d 0a 3c llection</li>..<
1390: 2f 75 6c 3e 0d 0a 3c 62 72 3e 0d 0a 3c 75 3e 4e /ul>..<br>..<u>N
13a0: 6f 74 65 73 3c 2f 75 3e 3a 20 0d 0a 3c 75 6c 3e otes</u>: ..<ul>
13b0: 0d 0a 3c 6c 69 3e 54 68 69 73 20 65 78 61 63 74 ..<li>This exact
13c0: 6c 79 20 63 6f 72 72 65 73 70 6f 6e 64 73 20 74 ly corresponds t
13d0: 6f 20 74 68 65 20 73 74 61 6e 64 61 72 64 20 3c o the standard <
13e0: 62 3e 37 20 63 6c 61 73 73 65 73 3c 2f 62 3e 20 b>7 classes</b>
13f0: 6d 6f 64 65 6c 20 61 64 6f 70 74 65 64 20 62 79 model adopted by
1400: 20 53 70 61 74 69 61 6c 20 53 51 4c 2e 3c 2f 6c Spatial SQL.</l
1410: 69 3e 0d 0a 3c 6c 69 3e 54 68 65 20 73 61 6d 65 i>..<li>The same
1420: 20 47 65 6f 4a 53 4f 4e 20 66 69 6c 65 20 63 61 GeoJSON file ca
1430: 6e 20 66 72 65 65 6c 79 20 63 6f 6e 74 61 69 6e n freely contain
1440: 20 61 6e 79 20 6b 69 6e 64 20 6f 66 20 47 65 6f any kind of Geo
1450: 6d 65 74 72 79 20 63 6c 61 73 73 65 73 20 77 69 metry classes wi
1460: 74 68 6f 75 72 20 72 65 73 74 72 69 63 74 69 6f thour restrictio
1470: 6e 73 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 41 6c ns.</li>..<li>Al
1480: 6c 20 47 65 6f 6d 65 74 72 69 65 73 20 69 6e 20 l Geometries in
1490: 74 68 65 20 73 61 6d 65 20 47 65 6f 4a 53 4f 4e the same GeoJSON
14a0: 20 66 69 6c 65 20 6d 75 73 74 20 73 68 61 72 65 file must share
14b0: 20 74 68 65 20 73 61 6d 65 20 53 52 49 44 2e 3c the same SRID.<
14c0: 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c 2f 74 /li>..</ul>..</t
14d0: 64 3e 0d 0a 3c 74 64 3e 0d 0a 3c 75 6c 3e 0d 0a d>..<td>..<ul>..
14e0: 3c 6c 69 3e 53 68 61 70 65 66 69 6c 65 20 69 73 <li>Shapefile is
14f0: 20 6f 62 76 69 6f 75 73 6c 79 20 6f 62 73 6f 6c obviously obsol
1500: 65 74 65 2c 20 61 6e 64 20 73 6f 6d 65 77 61 79 ete, and someway
1510: 20 6d 65 73 73 79 20 61 6e 64 20 6c 69 6d 69 74 messy and limit
1520: 65 64 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 47 4d ed.</li>..<li>GM
1530: 4c 20 69 73 20 65 6c 65 67 61 6e 74 20 61 6e 64 L is elegant and
1540: 20 76 65 72 79 20 73 6f 70 68 69 73 74 69 63 61 very sophistica
1550: 74 65 64 3a 20 73 6f 6d 65 74 69 6d 65 73 20 74 ted: sometimes t
1560: 6f 6f 20 73 6f 70 68 69 73 74 69 63 61 74 65 64 oo sophisticated
1570: 20 61 6e 64 20 63 6f 6d 70 6c 65 78 20 74 6f 20 and complex to
1580: 62 65 20 72 65 61 6c 6c 79 20 75 73 61 62 6c 65 be really usable
1590: 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 47 65 6f 4a .</li>..<li>GeoJ
15a0: 53 4f 4e 20 6d 61 74 63 68 65 73 20 74 68 65 20 SON matches the
15b0: 53 70 61 74 69 61 6c 20 53 51 4c 20 72 65 71 75 Spatial SQL requ
15c0: 69 72 65 6d 65 6e 74 73 2c 20 61 6e 64 20 74 68 irements, and th
15d0: 65 72 66 6f 72 65 20 61 76 6f 69 64 73 20 61 6e erfore avoids an
15e0: 79 20 75 6e 6e 65 63 65 73 73 61 72 79 20 63 6f y unnecessary co
15f0: 6d 70 6c 65 78 69 74 79 2e 3c 2f 6c 69 3e 0d 0a mplexity.</li>..
1600: 3c 2f 75 6c 3e 0d 0a 3c 2f 74 64 3e 0d 0a 3c 2f </ul>..</td>..</
1610: 74 72 3e 0d 0a 3c 74 72 3e 0d 0a 3c 74 68 3e 44 tr>..<tr>..<th>D
1620: 69 6d 65 6e 73 69 6f 6e 73 3c 2f 74 68 3e 0d 0a imensions</th>..
1630: 3c 74 64 3e 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e <td>..<ul>..<li>
1640: 58 59 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 58 59 4d XY</li>..<li>XYM
1650: 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 58 59 5a 3c 2f </li>..<li>XYZ</
1660: 6c 69 3e 0d 0a 3c 6c 69 3e 58 59 5a 4d 3c 2f 6c li>..<li>XYZM</l
1670: 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c 2f 74 64 3e i>..</ul>..</td>
1680: 0d 0a 3c 74 64 3e 0d 0a 3c 75 6c 3e 0d 0a 3c 6c ..<td>..<ul>..<l
1690: 69 3e 58 59 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 58 i>XY</li>..<li>X
16a0: 59 4d 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 58 59 5a YM</li>..<li>XYZ
16b0: 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 58 59 5a 4d 3c </li>..<li>XYZM<
16c0: 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c 2f 74 /li>..</ul>..</t
16d0: 64 3e 0d 0a 3c 74 64 3e 0d 0a 3c 75 6c 3e 0d 0a d>..<td>..<ul>..
16e0: 3c 6c 69 3e 58 59 3c 2f 6c 69 3e 0d 0a 3c 6c 69 <li>XY</li>..<li
16f0: 3e 58 59 5a 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e >XYZ</li>..</ul>
1700: 0d 0a 3c 62 72 3e 0d 0a 3c 75 3e 4e 6f 74 65 3c ..<br>..<u>Note<
1710: 2f 75 3e 3a 20 52 46 43 20 37 39 34 36 20 6a 75 /u>: RFC 7946 ju
1720: 73 74 20 73 75 70 70 6f 72 74 73 20 32 20 6f 72 st supports 2 or
1730: 20 33 20 63 6f 6f 72 64 69 6e 61 74 65 73 2c 20 3 coordinates,
1740: 61 6e 64 20 74 68 65 20 74 68 69 72 64 20 76 61 and the third va
1750: 6c 75 65 20 28 77 68 65 6e 20 64 65 63 6c 61 72 lue (when declar
1760: 65 64 29 20 69 73 20 61 6c 77 61 79 73 20 65 78 ed) is always ex
1770: 70 65 63 74 65 64 20 74 6f 20 63 6f 72 72 65 73 pected to corres
1780: 70 6f 6e 64 20 74 6f 20 61 6e 20 45 6c 65 76 61 pond to an Eleva
1790: 74 69 6f 6e 20 28 5a 20 61 78 69 73 29 2e 3c 62 tion (Z axis).<b
17a0: 72 3e 3c 62 72 3e 0d 0a 53 75 70 70 6f 72 74 69 r><br>..Supporti
17b0: 6e 67 20 58 59 4d 20 6f 72 20 58 59 5a 4d 20 69 ng XYM or XYZM i
17c0: 73 20 6e 6f 74 20 74 65 63 68 6e 69 63 61 6c 6c s not technicall
17d0: 79 20 75 6e 66 65 61 73 69 62 6c 65 2e 0d 0a 42 y unfeasible...B
17e0: 6f 74 68 20 77 72 69 74 65 72 73 20 61 6e 64 20 oth writers and
17f0: 72 65 61 64 65 72 73 20 63 6f 75 6c 64 20 73 75 readers could su
1800: 70 70 6f 72 74 20 73 75 63 68 20 6f 70 74 69 6f pport such optio
1810: 6e 73 2c 20 62 75 74 20 61 6c 6c 20 74 68 69 73 ns, but all this
1820: 20 69 73 20 73 75 72 65 6c 79 20 6f 75 74 73 69 is surely outsi
1830: 64 65 20 74 68 65 20 73 74 61 6e 64 61 72 64 20 de the standard
1840: 61 6e 64 20 77 69 6c 6c 20 73 75 72 65 6c 79 20 and will surely
1850: 69 6d 70 61 69 72 20 74 68 65 20 75 6e 69 76 65 impair the unive
1860: 72 73 61 6c 20 70 6f 72 74 61 62 69 6c 69 74 79 rsal portability
1870: 20 6f 66 20 61 6e 79 20 6e 6f 6e 20 63 61 6e 6f of any non cano
1880: 6e 69 63 61 6c 20 66 69 6c 65 2e 0d 0a 3c 2f 74 nical file...</t
1890: 64 3e 0d 0a 3c 74 64 3e 0d 0a 47 65 6f 4a 53 4f d>..<td>..GeoJSO
18a0: 4e 20 6c 61 63 6b 73 20 74 68 65 20 63 61 70 61 N lacks the capa
18b0: 62 69 6c 69 74 79 20 74 6f 20 73 75 70 70 6f 72 bility to suppor
18c0: 74 20 58 59 4d 20 61 6e 64 20 58 59 5a 4d 2c 20 t XYM and XYZM,
18d0: 6f 74 68 65 72 20 74 68 61 6e 20 62 79 20 61 64 other than by ad
18e0: 6f 70 74 69 6e 67 20 28 61 6e 64 20 74 6f 20 6f opting (and to o
18f0: 74 68 65 72 73 20 75 6e 6b 6e 6f 77 6e 29 20 76 thers unknown) v
1900: 69 63 69 6f 75 73 20 74 72 69 63 6b 73 2e 3c 62 icious tricks.<b
1910: 72 3e 0d 0a 4d 61 79 20 77 65 6c 6c 20 62 65 20 r>..May well be
1920: 69 74 27 73 20 6e 6f 74 20 61 20 66 6f 72 62 69 it's not a forbi
1930: 64 64 69 6e 67 20 6c 69 6d 69 74 61 74 69 6f 6e dding limitation
1940: 20 69 6e 20 6d 61 6e 79 20 63 6f 6d 6d 6f 6e 20 in many common
1950: 63 61 73 65 73 2c 20 62 75 74 20 69 74 27 73 20 cases, but it's
1960: 69 6e 64 69 73 70 75 74 61 62 6c 79 20 61 20 6c indisputably a l
1970: 69 6d 69 74 61 74 69 6f 6e 2e 0d 0a 3c 2f 74 64 imitation...</td
1980: 3e 0d 0a 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 0d 0a >..</tr>..<tr>..
1990: 3c 74 68 3e 53 52 49 44 3c 2f 74 68 3e 0d 0a 3c <th>SRID</th>..<
19a0: 74 64 3e 0d 0a 4e 6f 74 20 69 6e 74 65 72 6e 61 td>..Not interna
19b0: 6c 6c 79 20 64 65 63 6c 61 72 65 64 20 62 79 20 lly declared by
19c0: 74 68 65 20 53 68 61 70 65 66 69 6c 65 20 69 74 the Shapefile it
19d0: 73 65 6c 66 2e 3c 62 72 3e 0d 0a 44 65 70 6c 6f self.<br>..Deplo
19e0: 79 69 6e 67 20 61 20 66 75 72 74 68 65 72 20 3c ying a further <
19f0: 62 3e 2e 70 72 6a 3c 2f 62 3e 20 66 69 6c 65 20 b>.prj</b> file
1a00: 64 65 73 63 72 69 62 69 6e 67 20 74 68 65 20 69 describing the i
1a10: 6e 74 65 6e 64 65 64 20 53 52 49 44 20 69 73 20 ntended SRID is
1a20: 74 68 65 20 75 73 75 61 6c 20 73 6f 6c 75 74 69 the usual soluti
1a30: 6f 6e 20 61 64 6f 70 74 65 64 20 62 79 20 45 53 on adopted by ES
1a40: 52 49 20 69 74 73 65 6c 66 2c 20 62 75 74 20 63 RI itself, but c
1a50: 6f 72 72 65 63 74 6c 79 20 70 61 72 73 69 6e 67 orrectly parsing
1a60: 20 74 68 65 73 65 20 65 78 74 72 61 20 66 69 6c these extra fil
1a70: 65 73 20 69 73 20 61 6e 20 75 73 75 61 6c 6c 79 es is an usually
1a80: 20 66 6c 69 6d 73 79 20 70 72 6f 63 65 73 73 20 flimsy process
1a90: 66 61 6c 6c 69 6e 67 20 6f 75 74 73 69 64 65 20 falling outside
1aa0: 72 65 61 6c 20 63 61 70 61 62 69 6c 69 74 69 65 real capabilitie
1ab0: 73 20 6f 66 20 6d 61 6e 79 20 74 68 69 72 64 20 s of many third
1ac0: 70 61 72 74 79 20 72 65 61 64 65 72 73 2e 0d 0a party readers...
1ad0: 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 0d 0a 45 61 63 </td>..<td>..Eac
1ae0: 68 20 73 69 6e 67 6c 65 20 47 65 6f 6d 65 74 72 h single Geometr
1af0: 79 20 69 73 20 61 6c 6c 6f 77 65 64 20 74 6f 20 y is allowed to
1b00: 66 72 65 65 6c 79 20 64 65 66 69 6e 65 20 69 74 freely define it
1b10: 73 20 6f 77 6e 20 53 52 49 44 2c 20 61 73 20 77 s own SRID, as w
1b20: 65 6c 6c 20 61 73 20 64 65 66 69 6e 69 6e 67 20 ell as defining
1b30: 74 68 65 20 53 52 49 44 20 66 6f 72 20 74 68 65 the SRID for the
1b40: 20 77 68 6f 6c 65 20 6c 61 79 65 72 2e 0d 0a 3c whole layer...<
1b50: 2f 74 64 3e 0d 0a 3c 74 64 3e 0d 0a 41 63 63 6f /td>..<td>..Acco
1b60: 72 64 69 6e 67 6c 79 20 74 6f 20 52 46 43 20 37 rdingly to RFC 7
1b70: 39 34 36 20 61 6c 6c 20 63 6f 6f 72 64 69 6e 61 946 all coordina
1b80: 74 65 73 20 61 72 65 20 61 6c 77 61 79 73 20 65 tes are always e
1b90: 78 70 65 74 65 64 20 74 6f 20 62 65 20 65 78 70 xpeted to be exp
1ba0: 72 65 73 73 65 64 20 61 73 20 3c 62 3e 6c 6f 6e ressed as <b>lon
1bb0: 67 69 74 75 65 73 3c 2f 62 3e 20 61 6e 64 20 3c gitues</b> and <
1bc0: 62 3e 6c 61 74 69 74 75 64 65 73 3c 2f 62 3e 20 b>latitudes</b>
1bd0: 28 28 69 2e 65 3a 20 78 2d 70 6f 73 69 74 69 6f ((i.e: x-positio
1be0: 6e 20 61 6e 64 20 79 2d 70 6f 73 69 74 69 6f 6e n and y-position
1bf0: 29 2e 3c 62 72 3e 0d 0a 53 6f 20 61 6e 79 20 63 ).<br>..So any c
1c00: 61 6e 6f 6e 69 63 61 6c 20 47 65 6f 4a 53 4f 4e anonical GeoJSON
1c10: 20 66 69 6c 65 20 69 73 20 61 6c 77 61 79 73 20 file is always
1c20: 65 78 70 65 63 74 65 64 20 74 6f 20 72 65 66 65 expected to refe
1c30: 72 65 6e 63 65 20 3c 62 3e 53 52 49 44 3d 34 33 rence <b>SRID=43
1c40: 32 36 20 57 47 53 20 38 34 3c 2f 62 3e 20 28 69 26 WGS 84</b> (i
1c50: 2e 65 2e 20 74 68 65 20 53 52 49 44 20 69 73 20 .e. the SRID is
1c60: 3c 62 3e 6e 6f 74 3c 2f 62 3e 20 73 74 6f 72 65 <b>not</b> store
1c70: 64 20 77 69 74 68 69 6e 20 74 68 65 20 47 65 6f d within the Geo
1c80: 4a 53 4f 4e 20 66 69 6c 65 29 2e 3c 62 72 3e 3c JSON file).<br><
1c90: 62 72 3e 0d 0a 55 73 69 6e 67 20 61 6e 79 20 6f br>..Using any o
1ca0: 74 68 65 72 20 53 52 49 44 20 69 73 20 74 65 63 ther SRID is tec
1cb0: 68 6e 69 63 61 6c 6c 79 20 70 6f 73 73 69 62 6c hnically possibl
1cc0: 65 2c 20 62 75 74 20 72 65 71 75 69 72 65 73 20 e, but requires
1cd0: 61 20 63 6f 6e 76 65 6e 74 69 6f 6e 61 6c 20 61 a conventional a
1ce0: 67 72 65 65 6d 65 6e 74 20 62 65 74 77 65 65 6e greement between
1cf0: 20 77 72 69 74 65 72 73 20 61 6e 64 20 72 65 61 writers and rea
1d00: 64 65 72 73 2c 20 62 75 74 20 61 6c 6c 20 74 68 ders, but all th
1d10: 69 73 20 69 73 20 73 75 72 65 6c 79 20 6f 75 74 is is surely out
1d20: 73 69 64 65 20 74 68 65 20 73 74 61 6e 64 61 72 side the standar
1d30: 64 20 61 6e 64 20 77 69 6c 6c 20 73 75 72 65 6c d and will surel
1d40: 79 20 69 6d 70 61 69 72 20 74 68 65 20 75 6e 69 y impair the uni
1d50: 76 65 72 73 61 6c 20 70 6f 72 74 61 62 69 6c 69 versal portabili
1d60: 74 79 20 6f 66 20 61 6e 79 20 6e 6f 6e 20 63 61 ty of any non ca
1d70: 6e 6f 6e 69 63 61 6c 20 66 69 6c 65 2e 0d 0a 3c nonical file...<
1d80: 2f 74 64 3e 0d 0a 3c 74 64 3e 0d 0a 54 68 65 20 /td>..<td>..The
1d90: 75 6e 69 71 75 65 20 65 66 66 65 63 74 69 76 65 unique effective
1da0: 20 73 6f 6c 75 74 69 6f 6e 20 69 73 20 74 68 65 solution is the
1db0: 20 6f 6e 65 20 61 64 6f 70 74 65 64 20 62 79 20 one adopted by
1dc0: 47 4d 4c 2e 3c 62 72 3e 0d 0a 42 6f 74 68 20 53 GML.<br>..Both S
1dd0: 68 61 70 65 66 69 6c 65 20 61 6e 64 20 47 65 6f hapefile and Geo
1de0: 4a 53 4f 4e 20 61 72 65 20 63 6c 65 61 72 6c 79 JSON are clearly
1df0: 20 69 6e 66 65 72 69 6f 72 20 75 6e 64 65 72 20 inferior under
1e00: 74 68 69 73 20 70 65 63 75 6c 69 61 72 20 61 73 this peculiar as
1e10: 70 65 63 74 2e 0d 0a 3c 2f 74 64 3e 0d 0a 3c 2f pect...</td>..</
1e20: 74 72 3e 0d 0a 3c 74 72 3e 0d 0a 3c 74 68 3e 4e tr>..<tr>..<th>N
1e30: 6f 6e 2d 73 70 61 74 69 61 6c 20 61 74 74 72 69 on-spatial attri
1e40: 62 75 74 65 73 3c 2f 74 68 3e 0d 0a 3c 74 64 3e butes</th>..<td>
1e50: 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 43 48 41 52 ..<ul>..<li>CHAR
1e60: 20 28 6c 69 6d 69 74 65 64 20 74 6f 20 6d 61 78 (limited to max
1e70: 2e 20 32 35 34 20 62 79 74 65 73 29 3c 2f 6c 69 . 254 bytes)</li
1e80: 3e 0d 0a 3c 6c 69 3e 4e 55 4d 42 45 52 20 28 72 >..<li>NUMBER (r
1e90: 65 70 72 65 73 65 6e 74 65 64 20 62 79 20 61 6e epresented by an
1ea0: 20 41 53 43 49 49 20 73 74 72 69 6e 67 20 6f 66 ASCII string of
1eb0: 20 6d 61 78 2e 20 33 32 20 62 79 74 65 73 29 3c max. 32 bytes)<
1ec0: 2f 6c 69 3e 0d 0a 3c 6c 69 3e 44 41 54 45 20 28 /li>..<li>DATE (
1ed0: 59 59 59 59 4d 4d 44 44 29 3c 2f 6c 69 3e 0d 0a YYYYMMDD)</li>..
1ee0: 3c 6c 69 3e 4c 4f 47 49 43 41 4c 20 28 54 2f 46 <li>LOGICAL (T/F
1ef0: 29 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c )</li>..</ul>..<
1f00: 62 72 3e 0d 0a 3c 75 3e 4e 6f 74 65 3c 2f 75 3e br>..<u>Note</u>
1f10: 3a 20 61 6c 6c 20 61 74 74 72 69 62 75 74 65 20 : all attribute
1f20: 6e 61 6d 65 73 20 61 72 65 20 6c 69 6d 69 74 65 names are limite
1f30: 64 20 74 6f 20 61 20 6c 65 6e 67 74 68 20 6f 66 d to a length of
1f40: 20 6d 61 78 2e 20 31 30 20 62 79 74 65 73 2e 20 max. 10 bytes.
1f50: 54 68 65 72 65 20 69 73 20 6e 6f 20 73 61 66 65 There is no safe
1f60: 20 77 61 79 20 66 6f 72 20 64 65 63 6c 61 72 69 way for declari
1f70: 6e 67 20 3c 62 3e 4e 55 4c 4c 3c 2f 62 3e 20 76 ng <b>NULL</b> v
1f80: 61 6c 75 65 73 2e 0d 0a 3c 2f 74 64 3e 0d 0a 3c alues...</td>..<
1f90: 74 64 3e 0d 0a 41 6e 79 20 70 6f 73 73 69 62 6c td>..Any possibl
1fa0: 65 20 64 61 74 61 74 79 70 65 20 79 6f 75 20 63 e datatype you c
1fb0: 61 6e 20 69 6d 61 67 69 6e 65 2e 3c 62 72 3e 0d an imagine.<br>.
1fc0: 0a 41 6e 64 20 64 65 66 69 6e 69 6e 67 20 66 75 .And defining fu
1fd0: 72 74 68 65 72 20 64 65 72 69 76 65 64 20 64 61 rther derived da
1fe0: 74 61 74 79 70 65 73 20 69 73 20 61 6e 20 6f 70 tatypes is an op
1ff0: 74 69 6f 6e 20 73 75 70 70 6f 72 74 65 64 20 62 tion supported b
2000: 79 20 74 68 65 20 58 4d 4c 20 53 63 68 65 6d 61 y the XML Schema
2010: 2e 3c 62 72 3e 3c 62 72 3e 0d 0a 3c 75 3e 4e 6f .<br><br>..<u>No
2020: 74 65 3c 2f 75 3e 3a 20 61 74 74 72 69 62 75 74 te</u>: attribut
2030: 65 20 6e 61 6d 65 73 20 61 6e 64 20 74 65 78 74 e names and text
2040: 20 76 61 6c 75 65 73 20 63 61 6e 20 68 61 76 65 values can have
2050: 20 61 6e 79 20 61 72 62 69 74 72 61 72 79 20 6c any arbitrary l
2060: 65 6e 67 74 68 2e 0d 0a 3c 2f 74 64 3e 0d 0a 3c ength...</td>..<
2070: 74 64 3e 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 74 td>..<ul>..<li>t
2080: 65 78 74 20 28 75 6e 63 6f 6e 73 74 72 61 69 6e ext (unconstrain
2090: 65 64 20 6c 65 6e 67 74 68 29 3c 2f 6c 69 3e 0d ed length)</li>.
20a0: 0a 3c 6c 69 3e 6e 75 6d 62 65 72 3c 2f 6c 69 3e .<li>number</li>
20b0: 0d 0a 3c 6c 69 3e 6e 75 6c 6c 3c 2f 6c 69 3e 0d ..<li>null</li>.
20c0: 0a 3c 6c 69 3e 74 72 75 65 3c 2f 6c 69 3e 0d 0a .<li>true</li>..
20d0: 3c 6c 69 3e 66 61 6c 73 65 3c 2f 6c 69 3e 0d 0a <li>false</li>..
20e0: 3c 2f 75 6c 3e 0d 0a 3c 62 72 3e 0d 0a 3c 75 3e </ul>..<br>..<u>
20f0: 4e 6f 74 65 3c 2f 75 3e 3a 20 61 74 74 72 69 62 Note</u>: attrib
2100: 75 74 65 20 6e 61 6d 65 73 20 20 63 61 6e 20 68 ute names can h
2110: 61 76 65 20 61 6e 79 20 61 72 62 69 74 72 61 72 ave any arbitrar
2120: 79 20 6c 65 6e 67 74 68 2e 0d 0a 3c 2f 74 64 3e y length...</td>
2130: 0d 0a 3c 74 64 3e 0d 0a 3c 75 6c 3e 0d 0a 3c 6c ..<td>..<ul>..<l
2140: 69 3e 53 68 61 70 65 66 69 6c 65 20 28 6f 72 20 i>Shapefile (or
2150: 6d 6f 72 65 20 70 72 65 63 69 73 65 6c 79 20 69 more precisely i
2160: 6e 20 74 68 69 73 20 63 61 73 65 20 44 42 46 29 n this case DBF)
2170: 20 63 6c 65 61 72 6c 79 20 73 75 66 66 65 72 73 clearly suffers
2180: 20 66 72 6f 6d 20 74 6f 6f 20 6d 61 6e 79 20 75 from too many u
2190: 6e 70 6c 65 61 73 61 6e 74 20 6c 69 6d 69 74 61 npleasant limita
21a0: 74 69 6f 6e 73 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 tions.</li>..<li
21b0: 3e 47 4d 4c 20 28 6d 6f 72 65 20 70 72 65 63 69 >GML (more preci
21c0: 73 65 6c 79 20 58 4d 4c 29 20 63 61 6e 20 65 66 sely XML) can ef
21d0: 66 65 63 74 69 76 65 6c 79 20 73 75 70 70 6f 72 fectively suppor
21e0: 74 20 61 6e 20 69 6d 70 72 65 73 73 69 76 65 20 t an impressive
21f0: 66 6c 65 78 69 62 69 6c 69 74 79 20 62 75 74 20 flexibility but
2200: 63 61 6e 20 65 61 73 69 6c 79 20 62 65 63 6f 6d can easily becom
2210: 65 20 74 6f 6f 20 63 6f 6d 70 6c 65 78 20 61 6e e too complex an
2220: 64 20 64 69 66 66 65 63 75 74 20 74 6f 20 70 61 d diffecut to pa
2230: 72 73 65 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 47 rse.</li>..<li>G
2240: 65 6f 4a 53 4f 4e 20 6f 66 66 65 72 73 20 61 20 eoJSON offers a
2250: 77 65 6c 6c 20 62 61 6c 61 6e 63 65 64 20 6d 69 well balanced mi
2260: 78 3b 20 69 74 27 73 20 73 74 69 6c 6c 20 72 65 x; it's still re
2270: 61 73 6f 6e 61 62 6c 79 20 73 69 6d 70 6c 65 20 asonably simple
2280: 61 6e 64 20 69 74 27 73 20 70 6f 77 65 72 66 75 and it's powerfu
2290: 6c 20 61 74 20 74 68 65 20 73 61 6d 65 20 74 69 l at the same ti
22a0: 6d 65 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d me.</li>..</ul>.
22b0: 0a 3c 2f 74 64 3e 0d 0a 3c 2f 74 72 3e 0d 0a 3c .</td>..</tr>..<
22c0: 74 72 3e 0d 0a 3c 74 64 20 61 6c 69 67 6e 3d 22 tr>..<td align="
22d0: 63 65 6e 74 65 72 22 3e 0d 0a 3c 62 3e 43 68 61 center">..<b>Cha
22e0: 72 73 65 74 20 65 6e 63 6f 64 69 6e 67 3c 2f 62 rset encoding</b
22f0: 3e 0d 0a 3c 74 61 62 6c 65 20 63 65 6c 6c 70 61 >..<table cellpa
2300: 64 64 69 6e 67 3d 22 34 22 20 63 65 6c 6c 73 70 dding="4" cellsp
2310: 61 63 69 6e 67 3d 22 34 22 3e 0d 0a 3c 74 72 3e acing="4">..<tr>
2320: 3c 74 64 20 61 6c 69 67 6e 3d 22 6c 65 66 74 22 <td align="left"
2330: 3e 0d 0a 73 65 65 20 74 68 65 20 3c 61 20 68 72 >..see the <a hr
2340: 65 66 3d 22 68 74 74 70 3a 2f 2f 77 77 77 2e 67 ef="http://www.g
2350: 61 69 61 2d 67 69 73 2e 69 74 2f 67 61 69 61 2d aia-gis.it/gaia-
2360: 73 69 6e 73 2f 73 70 61 74 69 61 6c 69 74 65 2d sins/spatialite-
2370: 63 6f 6f 6b 62 6f 6f 6b 2d 35 2f 63 6f 6f 6b 62 cookbook-5/cookb
2380: 6f 6f 6b 5f 74 6f 70 69 63 73 2e 30 31 2e 68 74 ook_topics.01.ht
2390: 6d 6c 23 74 6f 70 69 63 5f 41 62 6f 75 74 5f 43 ml#topic_About_C
23a0: 68 61 72 73 65 74 5f 45 6e 63 6f 64 69 6e 67 22 harset_Encoding"
23b0: 3e 43 6f 6f 6b 42 6f 6f 6b 3c 2f 61 3e 20 66 6f >CookBook</a> fo
23c0: 72 20 6d 6f 72 65 20 6f 6e 20 74 68 69 73 20 74 r more on this t
23d0: 6f 70 69 63 2e 0d 0a 3c 2f 74 64 3e 3c 2f 74 72 opic...</td></tr
23e0: 3e 0d 0a 3c 2f 74 61 62 6c 65 3e 0d 0a 3c 2f 74 >..</table>..</t
23f0: 64 3e 0d 0a 3c 74 64 3e 0d 0a 4e 6f 74 20 69 6e d>..<td>..Not in
2400: 74 65 72 6e 61 6c 6c 79 20 64 65 66 69 6e 65 64 ternally defined
2410: 20 62 79 20 74 68 65 20 53 68 61 70 65 66 69 6c by the Shapefil
2420: 65 20 69 74 73 65 6c 66 2e 3c 62 72 3e 0d 0a 41 e itself.<br>..A
2430: 74 74 65 6d 70 74 69 6e 67 20 74 6f 20 67 75 65 ttempting to gue
2440: 73 73 20 74 68 65 20 61 70 70 72 6f 70 72 69 61 ss the appropria
2450: 74 65 20 63 68 61 72 73 65 74 20 65 6e 63 6f 64 te charset encod
2460: 69 6e 67 20 72 65 71 75 69 72 65 64 20 62 79 20 ing required by
2470: 73 6f 6d 65 20 53 68 61 70 65 66 69 6c 65 20 69 some Shapefile i
2480: 73 20 6d 6f 72 65 20 61 20 6d 61 67 69 63 20 61 s more a magic a
2490: 72 74 20 74 68 61 6e 20 72 61 74 69 6f 6e 61 6c rt than rational
24a0: 20 73 63 69 65 6e 63 65 2e 0d 0a 3c 2f 74 64 3e science...</td>
24b0: 0d 0a 3c 74 64 3e 0d 0a 41 6c 77 61 79 73 20 69 ..<td>..Always i
24c0: 6e 74 65 72 6e 61 6c 6c 79 20 64 65 66 69 6e 65 nternally define
24d0: 64 20 62 79 20 74 68 65 20 47 4d 4c 2f 58 4d 4c d by the GML/XML
24e0: 20 66 69 6c 65 20 69 74 73 65 6c 66 2e 0d 0a 3c file itself...<
24f0: 2f 74 64 3e 0d 0a 3c 74 64 3e 0d 0a 52 46 43 20 /td>..<td>..RFC
2500: 37 39 34 36 20 73 74 72 69 63 74 6c 79 20 72 65 7946 strictly re
2510: 71 75 69 72 65 73 20 74 68 61 74 20 61 6c 6c 20 quires that all
2520: 47 65 6f 4a 53 4f 4e 20 66 69 6c 65 73 20 6d 75 GeoJSON files mu
2530: 73 74 20 62 65 20 65 6e 63 6f 64 65 64 20 61 73 st be encoded as
2540: 20 3c 62 3e 55 54 46 2d 38 3c 2f 62 3e 3c 62 72 <b>UTF-8</b><br
2550: 3e 3c 62 72 3e 0d 0a 49 6e 20 70 75 72 65 20 74 ><br>..In pure t
2560: 68 65 6f 72 79 20 62 6f 74 68 20 3c 62 3e 55 54 heory both <b>UT
2570: 46 2d 31 36 3c 2f 62 3e 20 61 6e 64 20 3c 62 3e F-16</b> and <b>
2580: 55 54 46 2d 33 32 3c 2f 62 3e 20 63 6f 75 6c 64 UTF-32</b> could
2590: 20 62 65 20 75 73 65 64 20 66 6f 72 20 65 6e 63 be used for enc
25a0: 6f 64 69 6e 67 20 61 20 6c 65 67 69 74 69 6d 61 oding a legitima
25b0: 74 65 20 47 65 6f 4a 53 4f 4e 20 66 69 6c 65 2c te GeoJSON file,
25c0: 20 62 75 74 20 73 75 63 68 20 6f 70 74 69 6f 6e but such option
25d0: 73 20 73 65 65 6d 73 20 74 6f 20 62 65 20 76 65 s seems to be ve
25e0: 72 79 20 72 61 72 65 6c 79 20 28 69 66 20 65 76 ry rarely (if ev
25f0: 65 72 29 20 61 64 6f 70 74 65 64 20 69 6e 20 72 er) adopted in r
2600: 65 61 6c 20 77 6f 72 6c 64 2e 0d 0a 3c 2f 74 64 eal world...</td
2610: 3e 0d 0a 3c 74 64 3e 0d 0a 3c 75 6c 3e 0d 0a 3c >..<td>..<ul>..<
2620: 6c 69 3e 53 68 61 70 65 66 69 6c 65 73 20 6c 65 li>Shapefiles le
2630: 61 76 65 73 20 61 20 6c 6f 74 20 74 6f 20 62 65 aves a lot to be
2640: 20 64 65 73 69 72 65 64 2c 20 61 6e 64 20 6c 61 desired, and la
2650: 63 6b 20 6f 66 20 64 65 66 69 6e 65 64 20 63 68 ck of defined ch
2660: 61 72 73 65 74 20 65 6e 63 6f 64 69 6e 67 20 63 arset encoding c
2670: 61 75 73 65 73 20 6d 61 6e 79 20 73 65 72 69 6f auses many serio
2680: 75 73 20 70 6f 72 74 61 62 69 6c 69 74 79 20 69 us portability i
2690: 73 73 75 65 73 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 ssues.</li>..<li
26a0: 3e 47 4d 4c 2f 58 4d 4c 20 6e 69 63 65 6c 79 20 >GML/XML nicely
26b0: 73 75 70 70 6f 72 74 73 20 61 6e 79 20 70 6f 73 supports any pos
26c0: 73 69 62 6c 65 20 63 68 61 72 73 65 74 20 69 6e sible charset in
26d0: 20 74 68 65 20 6d 6f 73 74 20 66 6c 65 78 69 62 the most flexib
26e0: 6c 65 20 28 61 6e 64 20 73 61 66 65 29 0d 0a 77 le (and safe)..w
26f0: 61 79 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 4f 6e 63 ay</li>..<li>Onc
2700: 65 20 61 67 61 69 6e 2c 20 47 65 6f 4a 53 4f 4e e again, GeoJSON
2710: 20 69 73 20 73 74 72 61 69 67 68 74 66 6f 72 77 is straightforw
2720: 61 72 64 20 61 6e 64 20 73 69 6d 70 6c 65 2c 20 ard and simple,
2730: 62 75 74 20 72 65 61 6c 6c 79 20 65 66 66 65 63 but really effec
2740: 74 69 76 65 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c tive.</li>..</ul
2750: 3e 0d 0a 3c 2f 74 64 3e 0d 0a 3c 2f 74 72 3e 0d >..</td>..</tr>.
2760: 0a 3c 2f 74 61 62 6c 65 3e 0d 0a 3c 68 32 3e 53 .</table>..<h2>S
2770: 6b 65 6c 65 74 61 6c 20 47 65 6f 4a 53 4f 4e 20 keletal GeoJSON
2780: 61 6e 61 74 68 6f 6d 79 3c 2f 68 32 3e 0d 0a 3c anathomy</h2>..<
2790: 76 65 72 62 61 74 69 6d 3e 0d 0a 7b 0d 0a 20 20 verbatim>..{..
27a0: 20 22 74 79 70 65 22 3a 20 22 46 65 61 74 75 72 "type": "Featur
27b0: 65 43 6f 6c 6c 65 63 74 69 6f 6e 22 2c 0d 0a 20 eCollection",..
27c0: 20 20 22 66 65 61 74 75 72 65 73 22 3a 20 0d 0a "features": ..
27d0: 20 20 20 5b 7b 0d 0a 20 20 20 20 20 20 20 22 74 [{.. "t
27e0: 79 70 65 22 3a 20 22 46 65 61 74 75 72 65 22 2c ype": "Feature",
27f0: 0d 0a 20 20 20 20 20 20 20 22 67 65 6f 6d 65 74 .. "geomet
2800: 72 79 22 3a 20 0d 0a 20 20 20 20 20 20 20 7b 0d ry": .. {.
2810: 0a 20 20 20 20 20 20 20 20 20 20 20 22 74 79 70 . "typ
2820: 65 22 3a 20 22 50 6f 69 6e 74 22 2c 0d 0a 20 20 e": "Point",..
2830: 20 20 20 20 20 20 20 20 20 22 63 6f 6f 72 64 69 "coordi
2840: 6e 61 74 65 73 22 3a 20 5b 31 30 32 2e 30 2c 20 nates": [102.0,
2850: 30 2e 35 5d 0d 0a 20 20 20 20 20 20 20 7d 2c 0d 0.5].. },.
2860: 0a 20 20 20 20 20 20 20 22 70 72 6f 70 65 72 74 . "propert
2870: 69 65 73 22 3a 20 0d 0a 20 20 20 20 20 20 20 7b ies": .. {
2880: 0d 0a 20 20 20 20 20 20 20 20 20 20 20 22 70 72 .. "pr
2890: 6f 70 30 22 3a 20 22 76 61 6c 75 65 30 22 0d 0a op0": "value0"..
28a0: 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 7d 2c }.. },
28b0: 20 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 .. {..
28c0: 20 22 74 79 70 65 22 3a 20 22 46 65 61 74 75 72 "type": "Featur
28d0: 65 22 2c 0d 0a 20 20 20 20 20 20 20 22 67 65 6f e",.. "geo
28e0: 6d 65 74 72 79 22 3a 20 0d 0a 20 20 20 20 20 20 metry": ..
28f0: 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 22 {.. "
2900: 74 79 70 65 22 3a 20 22 4c 69 6e 65 53 74 72 69 type": "LineStri
2910: 6e 67 22 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 ng",..
2920: 20 22 63 6f 6f 72 64 69 6e 61 74 65 73 22 3a 20 "coordinates":
2930: 0d 0a 20 20 20 20 20 20 20 20 20 20 5b 0d 0a 20 .. [..
2940: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 5b 31 [1
2950: 30 32 2e 30 2c 20 30 2e 30 5d 2c 0d 0a 20 20 20 02.0, 0.0],..
2960: 20 20 20 20 20 20 20 20 20 20 20 20 5b 31 30 33 [103
2970: 2e 30 2c 20 31 2e 30 5d 2c 0d 0a 20 20 20 20 20 .0, 1.0],..
2980: 20 20 20 20 20 20 20 20 20 20 5b 31 30 34 2e 30 [104.0
2990: 2c 20 30 2e 30 5d 2c 0d 0a 20 20 20 20 20 20 20 , 0.0],..
29a0: 20 20 20 20 20 20 20 20 5b 31 30 35 2e 30 2c 20 [105.0,
29b0: 31 2e 30 5d 0d 0a 20 20 20 20 20 20 20 20 20 20 1.0]..
29c0: 20 5d 0d 0a 20 20 20 20 20 20 20 7d 2c 0d 0a 20 ].. },..
29d0: 20 20 20 20 20 20 22 70 72 6f 70 65 72 74 69 65 "propertie
29e0: 73 22 3a 20 0d 0a 20 20 20 20 20 20 20 7b 0d 0a s": .. {..
29f0: 20 20 20 20 20 20 20 20 20 20 20 22 70 72 6f 70 "prop
2a00: 30 22 3a 20 22 76 61 6c 75 65 30 22 2c 0d 0a 20 0": "value0",..
2a10: 20 20 20 20 20 20 20 20 20 20 22 70 72 6f 70 31 "prop1
2a20: 22 3a 20 30 2e 30 0d 0a 20 20 20 20 20 20 20 7d ": 0.0.. }
2a30: 0d 0a 20 20 20 20 7d 2c 20 0d 0a 20 20 20 20 7b .. }, .. {
2a40: 0d 0a 20 20 20 20 20 20 20 22 74 79 70 65 22 3a .. "type":
2a50: 20 22 46 65 61 74 75 72 65 22 2c 0d 0a 20 20 20 "Feature",..
2a60: 20 20 20 20 22 67 65 6f 6d 65 74 72 79 22 3a 20 "geometry":
2a70: 0d 0a 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 .. {..
2a80: 20 20 20 20 20 20 20 22 74 79 70 65 22 3a 20 22 "type": "
2a90: 50 6f 6c 79 67 6f 6e 22 2c 0d 0a 20 20 20 20 20 Polygon",..
2aa0: 20 20 20 20 20 20 22 63 6f 6f 72 64 69 6e 61 74 "coordinat
2ab0: 65 73 22 3a 20 0d 0a 20 20 20 20 20 20 20 20 20 es": ..
2ac0: 20 20 5b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 [..
2ad0: 20 20 20 20 5b 0d 0a 20 20 20 20 20 20 20 20 20 [..
2ae0: 20 20 20 20 20 20 20 20 20 20 5b 31 30 30 2e 30 [100.0
2af0: 2c 20 30 2e 30 5d 2c 0d 0a 20 20 20 20 20 20 20 , 0.0],..
2b00: 20 20 20 20 20 20 20 20 20 20 20 20 5b 31 30 31 [101
2b10: 2e 30 2c 20 30 2e 30 5d 2c 0d 0a 20 20 20 20 20 .0, 0.0],..
2b20: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 5b 31 [1
2b30: 30 31 2e 30 2c 20 31 2e 30 5d 2c 0d 0a 20 20 20 01.0, 1.0],..
2b40: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
2b50: 5b 31 30 30 2e 30 2c 20 31 2e 30 5d 2c 0d 0a 20 [100.0, 1.0],..
2b60: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
2b70: 20 20 5b 31 30 30 2e 30 2c 20 30 2e 30 5d 0d 0a [100.0, 0.0]..
2b80: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 5d ]
2b90: 0d 0a 20 20 20 20 20 20 20 20 20 20 20 5d 0d 0a .. ]..
2ba0: 20 20 20 20 20 20 20 7d 2c 0d 0a 20 20 20 20 20 },..
2bb0: 20 20 22 70 72 6f 70 65 72 74 69 65 73 22 3a 20 "properties":
2bc0: 0d 0a 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 .. {..
2bd0: 20 20 20 20 20 20 20 22 70 72 6f 70 30 22 3a 20 "prop0":
2be0: 22 76 61 6c 75 65 30 22 2c 0d 0a 20 20 20 20 20 "value0",..
2bf0: 20 20 20 20 20 20 22 70 72 6f 70 31 22 3a 20 7b "prop1": {
2c00: 22 74 68 69 73 22 3a 20 22 74 68 61 74 22 7d 0d "this": "that"}.
2c10: 0a 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 7d 5d . }.. }]
2c20: 0d 0a 7d 0d 0a 3c 2f 76 65 72 62 61 74 69 6d 3e ..}..</verbatim>
2c30: 0d 0a 41 73 20 79 6f 75 20 63 61 6e 20 65 61 73 ..As you can eas
2c40: 69 6c 79 20 6e 6f 74 69 63 65 2c 20 47 65 6f 4a ily notice, GeoJ
2c50: 53 4f 4e 20 68 61 73 20 61 20 70 6c 61 69 6e 20 SON has a plain
2c60: 72 65 67 75 6c 61 72 20 73 74 72 75 63 74 75 72 regular structur
2c70: 65 20 61 6e 64 20 69 73 20 64 65 63 69 73 65 6c e and is decisel
2c80: 79 20 6d 6f 73 74 20 63 6f 6e 63 69 73 65 20 61 y most concise a
2c90: 6e 64 20 6c 65 73 73 20 76 65 72 62 6f 73 65 20 nd less verbose
2ca0: 74 68 61 6e 20 47 4d 4c 2f 58 4d 4c 3a 0d 0a 3c than GML/XML:..<
2cb0: 75 6c 3e 0d 0a 3c 6c 69 3e 45 76 65 72 79 20 47 ul>..<li>Every G
2cc0: 65 6f 4a 53 4f 4e 20 66 69 6c 65 20 6d 75 73 74 eoJSON file must
2cd0: 20 63 6f 6e 74 61 69 6e 20 61 20 3c 62 3e 46 65 contain a <b>Fe
2ce0: 61 74 75 72 65 43 6f 6c 6c 65 63 74 69 6f 6e 3c atureCollection<
2cf0: 2f 62 3e 20 6f 62 6a 65 63 74 2e 0d 0a 3c 75 6c /b> object...<ul
2d00: 3e 0d 0a 3c 6c 69 3e 41 20 20 3c 62 3e 46 65 61 >..<li>A <b>Fea
2d10: 74 75 72 65 43 6f 6c 6c 65 63 74 69 6f 6e 3c 2f tureCollection</
2d20: 62 3e 20 63 6f 6e 74 61 69 6e 73 20 6f 6e 65 20 b> contains one
2d30: 6f 72 20 6d 6f 72 65 20 69 6e 64 69 76 69 64 75 or more individu
2d40: 61 6c 20 3c 62 3e 46 65 61 74 75 72 65 3c 2f 62 al <b>Feature</b
2d50: 3e 20 6f 62 6a 65 63 74 73 2e 0d 0a 3c 75 6c 3e > objects...<ul>
2d60: 0d 0a 3c 6c 69 3e 45 61 63 68 20 3c 62 3e 46 65 ..<li>Each <b>Fe
2d70: 61 74 75 72 65 3c 2f 62 3e 20 69 73 20 65 78 70 ature</b> is exp
2d80: 65 63 74 65 64 20 74 6f 20 64 65 63 6c 61 72 65 ected to declare
2d90: 20 61 20 3c 62 3e 47 65 6f 6d 65 74 72 79 3c 2f a <b>Geometry</
2da0: 62 3e 20 61 6e 64 20 61 20 3c 62 3e 70 72 6f 70 b> and a <b>prop
2db0: 65 72 74 69 65 73 3c 2f 62 3e 20 61 72 72 61 79 erties</b> array
2dc0: 2e 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 45 61 63 ...<ul>..<li>Eac
2dd0: 68 20 70 72 6f 70 65 72 74 79 20 63 6f 72 65 73 h property cores
2de0: 70 6f 6e 64 73 20 74 6f 20 61 6e 20 61 74 74 72 ponds to an attr
2df0: 69 62 75 74 65 20 77 69 74 68 20 61 20 3c 62 3e ibute with a <b>
2e00: 6e 61 6d 65 3c 2f 62 3e 20 61 6e 64 20 61 20 3c name</b> and a <
2e10: 62 3e 76 61 6c 75 65 3c 2f 62 3e 3c 2f 6c 69 3e b>value</b></li>
2e20: 2e 0d 0a 3c 2f 6c 69 3e 3c 2f 75 6c 3e 0d 0a 3c ...</li></ul>..<
2e30: 2f 6c 69 3e 3c 2f 75 6c 3e 0d 0a 3c 2f 6c 69 3e /li></ul>..</li>
2e40: 3c 2f 75 6c 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c 68 </ul>..</ul>..<h
2e50: 33 3e 53 68 6f 72 74 20 63 6f 6e 63 6c 75 73 69 3>Short conclusi
2e60: 6f 6e 73 3c 2f 68 33 3e 0d 0a 47 65 6f 4a 53 4f ons</h3>..GeoJSO
2e70: 4e 20 69 73 20 77 69 64 65 6c 79 20 61 64 6f 70 N is widely adop
2e80: 74 65 64 20 62 79 20 6d 61 6e 79 20 77 65 62 2d ted by many web-
2e90: 61 70 70 73 3b 20 62 65 69 6e 67 20 61 20 6e 6f apps; being a no
2ea0: 74 61 74 69 6f 6e 20 64 69 72 65 63 74 6c 79 20 tation directly
2eb0: 62 61 73 65 64 20 6f 6e 20 3c 62 3e 4a 61 76 61 based on <b>Java
2ec0: 53 63 72 69 70 74 3c 2f 62 3e 20 69 74 20 68 61 Script</b> it ha
2ed0: 73 20 61 20 6e 61 74 75 72 61 6c 20 69 6e 74 65 s a natural inte
2ee0: 67 72 61 74 69 6f 6e 20 69 6e 20 70 6f 70 75 6c gration in popul
2ef0: 61 72 20 3c 69 3e 63 6c 69 65 6e 74 2d 73 69 64 ar <i>client-sid
2f00: 65 3c 2f 69 3e 20 4a 53 20 6c 69 62 72 61 72 69 e</i> JS librari
2f10: 65 73 20 73 75 63 68 20 61 73 20 3c 61 20 68 72 es such as <a hr
2f20: 65 66 3d 22 68 74 74 70 73 3a 2f 2f 65 6e 2e 77 ef="https://en.w
2f30: 69 6b 69 70 65 64 69 61 2e 6f 72 67 2f 77 69 6b ikipedia.org/wik
2f40: 69 2f 4f 70 65 6e 4c 61 79 65 72 73 22 3e 4f 70 i/OpenLayers">Op
2f50: 65 6e 4c 61 79 65 72 73 3c 2f 61 3e 20 61 6e 64 enLayers</a> and
2f60: 20 3c 61 20 68 72 65 66 3d 22 68 74 74 70 73 3a <a href="https:
2f70: 2f 2f 65 6e 2e 77 69 6b 69 70 65 64 69 61 2e 6f //en.wikipedia.o
2f80: 72 67 2f 77 69 6b 69 2f 4c 65 61 66 6c 65 74 5f rg/wiki/Leaflet_
2f90: 28 73 6f 66 74 77 61 72 65 29 22 3e 4c 65 61 66 (software)">Leaf
2fa0: 6c 65 74 3c 2f 61 3e 2e 3c 62 72 3e 0d 0a 49 74 let</a>.<br>..It
2fb0: 27 73 20 61 64 65 71 75 61 74 65 6c 79 20 73 75 's adequately su
2fc0: 70 70 6f 72 74 65 64 20 62 79 20 3c 61 20 68 72 pported by <a hr
2fd0: 65 66 3d 22 68 74 74 70 73 3a 2f 2f 65 6e 2e 77 ef="https://en.w
2fe0: 69 6b 69 70 65 64 69 61 2e 6f 72 67 2f 77 69 6b ikipedia.org/wik
2ff0: 69 2f 47 44 41 4c 22 3e 47 44 41 4c 3c 2f 61 3e i/GDAL">GDAL</a>
3000: 2c 20 61 6e 64 20 63 6f 6e 73 65 71 75 65 6e 74 , and consequent
3010: 6c 79 20 62 79 20 6d 61 6e 79 20 6f 74 68 65 72 ly by many other
3020: 73 20 66 72 65 65 2f 6c 69 62 72 65 20 73 77 20 s free/libre sw
3030: 63 6f 6d 70 6f 6e 65 6e 74 73 20 28 61 73 20 65 components (as e
3040: 2e 67 2e 20 3c 61 20 68 72 65 66 3d 22 68 74 74 .g. <a href="htt
3050: 70 73 3a 2f 2f 65 6e 2e 77 69 6b 69 70 65 64 69 ps://en.wikipedi
3060: 61 2e 6f 72 67 2f 77 69 6b 69 2f 4d 61 70 53 65 a.org/wiki/MapSe
3070: 72 76 65 72 3e 4d 61 70 53 65 72 76 65 72 22 3e rver>MapServer">
3080: 4d 61 70 53 65 72 76 65 72 3c 2f 61 3e 20 61 6e MapServer</a> an
3090: 64 20 3c 61 20 68 72 65 66 3d 22 68 74 74 70 73 d <a href="https
30a0: 3a 2f 2f 65 6e 2e 77 69 6b 69 70 65 64 69 61 2e ://en.wikipedia.
30b0: 6f 72 67 2f 77 69 6b 69 2f 47 65 6f 53 65 72 76 org/wiki/GeoServ
30c0: 65 72 22 3e 47 65 6f 53 65 72 76 65 72 3c 2f 61 er">GeoServer</a
30d0: 3e 29 2e 3c 62 72 3e 3c 62 72 3e 0d 0a 4f 75 74 >).<br><br>..Out
30e0: 73 69 64 65 20 74 68 65 20 77 65 62 2d 67 69 73 side the web-gis
30f0: 20 61 72 65 6e 61 20 47 65 6f 4a 53 4f 4e 20 73 arena GeoJSON s
3100: 74 69 6c 6c 20 68 61 73 20 6c 69 6d 69 74 65 64 till has limited
3110: 20 61 64 6f 70 74 69 6f 6e 2c 20 61 6e 64 20 69 adoption, and i
3120: 74 27 73 20 61 20 72 65 61 6c 20 70 69 74 79 20 t's a real pity
3130: 62 65 63 61 75 73 65 20 75 6e 64 65 72 20 6d 61 because under ma
3140: 6e 79 20 61 73 70 65 63 74 73 20 69 74 27 73 20 ny aspects it's
3150: 61 20 76 65 72 79 20 76 61 6c 69 64 20 66 75 6c a very valid ful
3160: 6c 20 72 65 70 6c 61 63 65 6d 65 6e 74 20 66 6f l replacement fo
3170: 72 20 74 68 65 20 6e 6f 77 61 64 61 79 73 20 69 r the nowadays i
3180: 72 72 65 6d 65 64 69 61 62 6c 79 20 6f 62 73 6f rremediably obso
3190: 6c 65 74 65 20 53 68 61 70 65 66 69 6c 65 2e 3c lete Shapefile.<
31a0: 62 72 3e 0d 0a 53 74 61 72 74 69 6e 67 20 73 69 br>..Starting si
31b0: 6e 63 65 20 76 65 72 73 69 6f 6e 20 3c 62 3e 35 nce version <b>5
31c0: 2e 30 2e 30 3c 2f 62 3e 20 53 70 61 74 69 61 4c .0.0</b> SpatiaL
31d0: 69 74 65 20 6f 66 66 65 72 73 20 66 75 6c 6c 20 ite offers full
31e0: 73 75 70 70 6f 72 74 73 20 74 6f 20 47 65 6f 4a supports to GeoJ
31f0: 53 4f 4e 20 61 73 20 64 65 66 69 6e 65 64 20 62 SON as defined b
3200: 79 20 52 46 43 20 37 39 34 36 2e 3c 62 72 3e 0d y RFC 7946.<br>.
3210: 0a 54 68 65 20 69 6d 70 6c 65 6d 65 6e 74 61 74 .The implementat
3220: 69 6f 6e 20 73 74 72 6f 6e 67 6c 79 20 72 65 73 ion strongly res
3230: 65 6d 62 6c 65 73 20 74 68 65 20 6f 6e 65 20 73 embles the one s
3240: 75 70 70 6f 72 74 65 64 20 62 79 20 61 6c 6c 20 upported by all
3250: 70 72 65 76 69 6f 75 73 20 76 65 72 73 69 6f 6e previous version
3260: 73 20 66 6f 72 20 53 68 61 70 65 66 69 6c 65 2c s for Shapefile,
3270: 20 61 6e 64 20 74 68 69 73 20 69 73 6e 27 74 20 and this isn't
3280: 61 74 20 61 6c 6c 20 73 75 72 70 72 69 73 69 6e at all surprisin
3290: 67 20 62 65 63 61 75 73 65 20 62 6f 74 68 20 74 g because both t
32a0: 68 65 6d 20 63 6f 76 65 72 20 74 68 65 20 73 61 hem cover the sa
32b0: 6d 65 20 66 75 6e 63 74 69 6f 6e 61 6c 20 61 72 me functional ar
32c0: 65 61 2e 0d 0a 3c 62 72 3e 3c 62 72 3e 0d 0a 3c ea...<br><br>..<
32d0: 68 72 3e 3c 62 72 3e 0d 0a 3c 61 20 68 72 65 66 hr><br>..<a href
32e0: 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 67 61 ="https://www.ga
32f0: 69 61 2d 67 69 73 2e 69 74 2f 66 6f 73 73 69 6c ia-gis.it/fossil
3300: 2f 6c 69 62 73 70 61 74 69 61 6c 69 74 65 2f 77 /libspatialite/w
3310: 69 6b 69 3f 6e 61 6d 65 3d 34 2e 33 2e 30 2d 64 iki?name=4.3.0-d
3320: 6f 63 22 3e 62 61 63 6b 3c 2f 61 3e 0a 5a 20 37 oc">back</a>.Z 7
3330: 39 33 34 66 61 62 31 39 39 38 64 66 37 37 31 39 934fab1998df7719
3340: 61 33 66 38 61 37 36 66 62 38 34 35 61 30 34 0a a3f8a76fb845a04.