Hex Artifact Content
Not logged in

Artifact 7e082c1ae170f5d23dea4ef2a8d80eb9ddb9a3c2:

Wiki page [WFS] by sandro 2013-05-31 12:51:49.
0000: 44 20 32 30 31 33 2d 30 35 2d 33 31 54 31 32 3a  D 2013-05-31T12:
0010: 35 31 3a 34 39 2e 36 35 33 0a 4c 20 57 46 53 0a  51:49.653.L WFS.
0020: 50 20 33 65 65 34 39 63 31 32 34 38 38 66 65 66  P 3ee49c12488fef
0030: 65 35 34 36 64 38 63 66 63 31 39 36 30 30 39 30  e546d8cfc1960090
0040: 36 61 36 36 31 37 62 62 65 66 0a 55 20 73 61 6e  6a6617bbef.U san
0050: 64 72 6f 0a 57 20 31 32 38 32 38 0a 62 61 63 6b  dro.W 12828.back
0060: 20 74 6f 20 3c 61 20 68 72 65 66 3d 22 68 74 74   to <a href="htt
0070: 70 73 3a 2f 2f 77 77 77 2e 67 61 69 61 2d 67 69  ps://www.gaia-gi
0080: 73 2e 69 74 2f 66 6f 73 73 69 6c 2f 6c 69 62 73  s.it/fossil/libs
0090: 70 61 74 69 61 6c 69 74 65 2f 77 69 6b 69 3f 6e  patialite/wiki?n
00a0: 61 6d 65 3d 34 2e 31 2e 30 2d 64 6f 63 22 3e 34  ame=4.1.0-doc">4
00b0: 2e 31 2e 30 2d 64 6f 63 3c 2f 61 3e 0d 0a 3c 68  .1.0-doc</a>..<h
00c0: 32 3e 4c 6f 61 64 69 6e 67 20 67 65 6f 73 70 61  2>Loading geospa
00d0: 74 69 61 6c 20 64 61 74 61 20 66 72 6f 6d 20 61  tial data from a
00e0: 20 57 46 53 20 64 61 74 61 73 6f 75 72 63 65 3c   WFS datasource<
00f0: 2f 68 32 3e 0d 0a 53 74 61 72 74 69 6e 67 20 73  /h2>..Starting s
0100: 69 6e 63 65 20 76 65 72 73 69 6f 6e 20 3c 62 3e  ince version <b>
0110: 34 2e 31 2e 30 3c 2f 62 3e 20 53 70 61 74 69 61  4.1.0</b> Spatia
0120: 4c 69 74 65 20 73 75 70 70 6f 72 74 73 20 74 68  Lite supports th
0130: 65 20 63 61 70 61 62 69 6c 69 74 79 20 74 6f 20  e capability to 
0140: 6c 6f 61 64 20 67 65 6f 73 70 61 74 69 61 6c 20  load geospatial 
0150: 64 61 74 61 20 66 6f 72 6d 20 61 6e 20 65 78 74  data form an ext
0160: 65 72 6e 61 6c 20 3c 61 20 68 72 65 66 3d 22 68  ernal <a href="h
0170: 74 74 70 3a 2f 2f 65 6e 2e 77 69 6b 69 70 65 64  ttp://en.wikiped
0180: 69 61 2e 6f 72 67 2f 77 69 6b 69 2f 57 65 62 5f  ia.org/wiki/Web_
0190: 46 65 61 74 75 72 65 5f 53 65 72 76 69 63 65 22  Feature_Service"
01a0: 3e 57 46 53 20 64 61 74 61 73 6f 75 72 63 65 3c  >WFS datasource<
01b0: 2f 61 3e 2e 3c 62 72 3e 0d 0a 4a 75 73 74 20 61  /a>.<br>..Just a
01c0: 20 76 65 72 79 20 73 68 6f 72 74 20 69 6e 74 72   very short intr
01d0: 6f 64 75 63 74 69 6f 6e 3a 20 74 68 65 20 3c 75  oduction: the <u
01e0: 3e 57 65 62 20 46 65 61 74 75 72 65 20 53 65 72  >Web Feature Ser
01f0: 76 69 63 65 3c 2f 75 3e 20 28 61 6b 61 20 3c 62  vice</u> (aka <b
0200: 3e 57 46 53 3c 2f 62 3e 29 20 69 73 20 61 20 77  >WFS</b>) is a w
0210: 65 6c 6c 20 6b 6e 6f 77 6e 20 61 6e 64 20 77 69  ell known and wi
0220: 64 65 6c 79 20 75 73 65 64 20 73 74 61 6e 64 61  dely used standa
0230: 72 64 20 57 45 42 20 70 72 6f 74 6f 63 6f 6c 20  rd WEB protocol 
0240: 61 6c 6c 6f 77 69 6e 67 20 74 6f 20 72 65 71 75  allowing to requ
0250: 65 73 74 20 3c 75 3e 67 65 6f 67 72 61 70 68 69  est <u>geographi
0260: 63 20 66 65 61 74 75 72 65 73 3c 2f 75 3e 20 66  c features</u> f
0270: 72 6f 6d 20 61 20 72 65 6d 6f 74 65 20 57 45 42  rom a remote WEB
0280: 20 73 65 72 76 65 72 20 6a 75 73 74 20 73 70 65   server just spe
0290: 63 69 66 79 69 6e 67 20 61 6e 20 61 70 70 72 6f  cifying an appro
02a0: 70 72 69 61 74 65 20 3c 61 20 68 72 65 66 3d 22  priate <a href="
02b0: 68 74 74 70 3a 2f 2f 65 6e 2e 77 69 6b 69 70 65  http://en.wikipe
02c0: 64 69 61 2e 6f 72 67 2f 77 69 6b 69 2f 55 6e 69  dia.org/wiki/Uni
02d0: 66 6f 72 6d 5f 72 65 73 6f 75 72 63 65 5f 6c 6f  form_resource_lo
02e0: 63 61 74 6f 72 22 3e 72 65 71 75 65 73 74 20 55  cator">request U
02f0: 52 4c 3c 2f 61 3e 2e 0d 0a 3c 75 6c 3e 0d 0a 3c  RL</a>...<ul>..<
0300: 6c 69 3e 54 68 65 20 70 61 79 6c 6f 61 64 20 72  li>The payload r
0310: 65 74 75 72 6e 65 64 20 62 79 20 61 20 57 46 53  eturned by a WFS
0320: 20 72 65 71 75 65 73 74 20 75 73 75 61 6c 6c 79   request usually
0330: 20 63 6f 6e 73 69 73 74 20 69 6e 20 73 6f 6d 65   consist in some
0340: 20 3c 61 20 68 72 65 66 3d 22 68 74 74 70 73 3a   <a href="https:
0350: 2f 2f 65 6e 2e 77 69 6b 69 70 65 64 69 61 2e 6f  //en.wikipedia.o
0360: 72 67 2f 77 69 6b 69 2f 58 4d 4c 22 3e 58 4d 4c  rg/wiki/XML">XML
0370: 20 64 6f 63 75 6d 65 6e 74 3c 2f 61 3e 2e 3c 2f   document</a>.</
0380: 6c 69 3e 0d 0a 3c 6c 69 3e 54 68 65 20 73 70 65  li>..<li>The spe
0390: 63 69 66 69 63 20 63 6f 6e 74 65 6e 74 20 6f 66  cific content of
03a0: 20 73 75 63 68 20 58 4d 4c 20 64 65 70 65 6e 64   such XML depend
03b0: 73 20 6f 6e 20 74 68 65 20 6e 61 74 75 72 65 20  s on the nature 
03c0: 6f 66 20 74 68 65 20 72 65 71 75 65 73 74 3b 20  of the request; 
03d0: 74 68 65 20 6d 6f 73 74 20 63 6f 6d 6d 6f 6e 6c  the most commonl
03e0: 79 20 75 73 65 64 20 57 46 53 20 72 65 71 75 65  y used WFS reque
03f0: 73 74 73 20 61 72 65 3a 3c 75 6c 3e 0d 0a 3c 6c  sts are:<ul>..<l
0400: 69 3e 3c 62 3e 47 65 74 43 61 70 61 62 69 6c 69  i><b>GetCapabili
0410: 74 65 73 3c 2f 62 3e 3a 20 77 69 6c 6c 20 72 65  tes</b>: will re
0420: 74 75 72 6e 20 6d 61 6e 79 20 75 73 65 66 75 6c  turn many useful
0430: 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 73 20 64 65   informations de
0440: 73 63 72 69 62 69 6e 67 20 69 6e 20 61 20 76 65  scribing in a ve
0450: 72 79 20 64 65 74 61 69 6c 65 64 20 77 61 79 20  ry detailed way 
0460: 61 6e 79 20 6f 74 68 65 72 20 73 75 70 70 6f 72  any other suppor
0470: 74 65 64 20 72 65 71 75 65 73 74 2e 20 54 68 69  ted request. Thi
0480: 73 20 69 6e 63 6c 75 64 69 6e 67 20 61 20 66 75  s including a fu
0490: 6c 6c 20 6c 69 73 74 20 6f 66 20 61 6c 6c 20 3c  ll list of all <
04a0: 75 3e 46 65 61 74 75 72 65 20 54 79 70 65 73 3c  u>Feature Types<
04b0: 2f 75 3e 20 28 69 2e 65 2e 20 3c 69 3e 3c 75 3e  /u> (i.e. <i><u>
04c0: 67 65 6f 67 72 61 70 68 69 63 20 6c 61 79 65 72  geographic layer
04d0: 73 3c 2f 75 3e 3c 2f 69 3e 29 20 6d 61 64 65 20  s</u></i>) made 
04e0: 61 76 61 69 6c 61 62 6c 65 20 6f 6e 20 74 68 61  available on tha
04f0: 74 20 73 65 72 76 65 72 2e 3c 2f 6c 69 3e 0d 0a  t server.</li>..
0500: 3c 6c 69 3e 3c 62 3e 44 65 73 63 72 69 62 65 46  <li><b>DescribeF
0510: 65 61 74 75 72 65 54 79 70 65 3c 2f 62 3e 3a 20  eatureType</b>: 
0520: 77 69 6c 6c 20 72 65 74 75 72 6e 20 61 20 64 65  will return a de
0530: 74 61 69 6c 65 64 20 3c 75 3e 44 61 74 61 20 53  tailed <u>Data S
0540: 63 68 65 6d 61 3c 2f 75 3e 20 64 65 73 63 72 69  chema</u> descri
0550: 62 69 6e 67 20 65 61 63 68 20 3c 75 3e 46 65 61  bing each <u>Fea
0560: 74 75 72 65 20 54 79 70 65 3c 2f 75 3e 20 28 61  ture Type</u> (a
0570: 6b 61 20 3c 75 3e 6c 61 79 65 72 3c 2f 75 3e 29  ka <u>layer</u>)
0580: 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 47  .</li>..<li><b>G
0590: 65 74 46 65 61 74 75 72 65 3c 2f 62 3e 3a 20 77  etFeature</b>: w
05a0: 69 6c 6c 20 72 65 74 75 72 6e 20 61 20 6c 69 73  ill return a lis
05b0: 74 20 6f 66 20 3c 75 3e 46 65 61 74 75 72 65 73  t of <u>Features
05c0: 3c 2f 75 3e 2c 20 65 61 63 68 20 6f 6e 65 20 6f  </u>, each one o
05d0: 66 20 74 68 65 6d 20 66 6f 72 6d 61 74 74 65 64  f them formatted
05e0: 20 61 63 63 6f 72 64 69 6e 67 6c 79 20 74 6f 20   accordingly to 
05f0: 74 68 65 20 63 6f 72 72 65 73 70 6f 6e 64 69 6e  the correspondin
0600: 67 20 64 65 63 6c 61 72 65 64 20 3c 75 3e 44 61  g declared <u>Da
0610: 74 61 20 53 63 68 65 6d 61 3c 2f 55 3e 2e 3c 62  ta Schema</U>.<b
0620: 72 3e 0d 0a 55 73 75 61 6c 6c 79 20 65 61 63 68  r>..Usually each
0630: 20 3c 75 3e 46 65 61 74 75 72 65 3c 2f 75 3e 20   <u>Feature</u> 
0640: 77 69 6c 6c 20 69 6e 63 6c 75 64 65 20 61 20 3c  will include a <
0650: 61 20 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f 65  a href="http://e
0660: 6e 2e 77 69 6b 69 70 65 64 69 61 2e 6f 72 67 2f  n.wikipedia.org/
0670: 77 69 6b 69 2f 47 65 6f 67 72 61 70 68 79 5f 4d  wiki/Geography_M
0680: 61 72 6b 75 70 5f 4c 61 6e 67 75 61 67 65 22 3e  arkup_Language">
0690: 47 4d 4c 20 47 65 6f 6d 65 74 72 79 3c 2f 61 3e  GML Geometry</a>
06a0: 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 3c 2f 6c  .</li>..</ul></l
06b0: 69 3e 0d 0a 3c 6c 69 3e 54 68 65 20 57 46 53 20  i>..<li>The WFS 
06c0: 70 72 6f 74 6f 63 6f 6c 20 69 73 20 61 20 71 75  protocol is a qu
06d0: 69 63 6b 6c 79 20 65 76 6f 6c 76 69 6e 67 20 6f  ickly evolving o
06e0: 6e 65 2c 20 61 6e 64 20 68 61 73 20 6d 61 6e 79  ne, and has many
06f0: 20 64 69 66 66 65 72 65 6e 74 20 66 6c 61 76 6f   different flavo
0700: 72 73 3b 20 74 68 65 20 6d 61 69 6e 20 76 65 72  rs; the main ver
0710: 73 69 6f 6e 73 20 73 75 70 70 6f 72 74 65 64 20  sions supported 
0720: 6e 6f 77 61 64 61 79 73 20 61 72 65 20 74 68 65  nowadays are the
0730: 20 72 61 74 68 65 72 20 6f 62 73 6f 6c 65 73 63   rather obsolesc
0740: 65 6e 74 20 3c 62 3e 31 2e 30 2e 30 3c 2f 62 3e  ent <b>1.0.0</b>
0750: 2c 20 74 68 65 20 77 69 64 65 73 70 72 65 61 64  , the widespread
0760: 20 3c 62 3e 31 2e 31 2e 30 3c 2f 62 3e 20 61 6e   <b>1.1.0</b> an
0770: 64 20 74 68 65 20 72 65 63 65 6e 74 6c 79 20 69  d the recently i
0780: 6e 74 72 6f 64 75 63 65 64 20 61 6e 64 20 6e 6f  ntroduced and no
0790: 74 20 79 65 74 20 77 69 64 65 6c 79 20 64 69 66  t yet widely dif
07a0: 66 75 73 65 64 20 3c 62 3e 32 2e 30 2e 30 3c 2f  fused <b>2.0.0</
07b0: 62 3e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 3c 62  b></li>..</ul><b
07c0: 72 3e 0d 0a 57 46 53 20 69 73 20 75 73 75 61 6c  r>..WFS is usual
07d0: 6c 79 20 61 73 73 6f 63 69 61 74 65 64 20 77 69  ly associated wi
07e0: 74 68 20 69 6e 74 65 72 61 63 74 69 76 65 20 3c  th interactive <
07f0: 61 20 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f 65  a href="http://e
0800: 6e 2e 77 69 6b 69 70 65 64 69 61 2e 6f 72 67 2f  n.wikipedia.org/
0810: 77 69 6b 69 2f 57 65 62 5f 6d 61 70 70 69 6e 67  wiki/Web_mapping
0820: 22 3e 57 45 42 20 6d 61 70 70 69 6e 67 3c 2f 61  ">WEB mapping</a
0830: 3e 20 61 70 70 6c 69 63 61 74 69 6f 6e 73 2c 20  > applications, 
0840: 62 75 74 20 6e 6f 74 68 69 6e 67 20 66 6f 72 62  but nothing forb
0850: 69 64 73 20 75 73 69 6e 67 20 57 46 53 20 61 73  ids using WFS as
0860: 20 61 20 67 65 6e 65 72 61 6c 20 70 75 72 70 6f   a general purpo
0870: 73 65 20 70 72 6f 74 6f 63 6f 6c 20 73 75 70 70  se protocol supp
0880: 6f 72 74 69 6e 67 20 6e 65 75 74 72 61 6c 20 64  orting neutral d
0890: 61 74 61 20 65 78 63 68 61 6e 67 65 20 69 6e 20  ata exchange in 
08a0: 76 65 6e 64 6f 72 2d 61 67 6e 6f 73 74 69 63 20  vendor-agnostic 
08b0: 66 61 73 68 69 6f 6e 2e 3c 62 72 3e 0d 0a 57 68  fashion.<br>..Wh
08c0: 61 74 20 53 70 61 74 69 61 4c 69 74 65 20 64 6f  at SpatiaLite do
08d0: 65 73 20 69 73 20 73 69 6d 70 6c 79 20 61 63 63  es is simply acc
08e0: 65 73 73 69 6e 67 20 61 6e 20 65 78 74 65 72 6e  essing an extern
08f0: 61 6c 20 57 46 53 20 64 61 74 61 73 6f 75 72 63  al WFS datasourc
0900: 65 20 61 6e 64 20 74 68 65 6e 20 70 65 72 6d 61  e and then perma
0910: 6e 65 6e 74 6c 79 20 73 74 6f 72 69 6e 67 20 74  nently storing t
0920: 68 65 20 72 65 63 65 69 76 65 64 20 64 61 74 61  he received data
0930: 20 69 6e 74 6f 20 61 20 44 42 20 74 61 62 6c 65   into a DB table
0940: 2e 0d 0a 54 68 65 72 65 20 69 73 20 61 62 73 6f  ...There is abso
0950: 6c 75 74 65 6c 79 20 6e 6f 74 68 69 6e 67 20 6f  lutely nothing o
0960: 64 64 20 69 6e 20 74 68 69 73 3b 20 61 73 20 79  dd in this; as y
0970: 6f 75 20 70 72 6f 62 61 62 6c 79 20 61 6c 72 65  ou probably alre
0980: 61 64 79 20 6b 6e 6f 77 20 53 70 61 74 69 61 4c  ady know SpatiaL
0990: 69 74 65 20 73 75 70 70 6f 72 74 73 20 69 6d 70  ite supports imp
09a0: 6f 72 74 69 6e 67 20 64 61 74 61 20 65 2e 67 2e  orting data e.g.
09b0: 20 66 72 6f 6d 20 61 20 3c 61 20 68 72 65 66 3d   from a <a href=
09c0: 22 68 74 74 70 3a 2f 2f 65 6e 2e 77 69 6b 69 70  "http://en.wikip
09d0: 65 64 69 61 2e 6f 72 67 2f 77 69 6b 69 2f 53 68  edia.org/wiki/Sh
09e0: 61 70 65 66 69 6c 65 22 3e 53 68 61 70 65 66 69  apefile">Shapefi
09f0: 6c 65 3c 2f 61 3e 2e 20 41 63 63 65 73 73 69 6e  le</a>. Accessin
0a00: 67 20 61 20 57 46 53 20 64 61 74 61 73 6f 75 72  g a WFS datasour
0a10: 63 65 20 69 73 20 63 6f 6e 63 65 70 74 75 61 6c  ce is conceptual
0a20: 6c 79 20 65 78 61 63 74 6c 79 20 74 68 65 20 73  ly exactly the s
0a30: 61 6d 65 2c 20 65 78 63 65 70 74 20 74 68 61 74  ame, except that
0a40: 20 69 6e 20 74 68 69 73 20 63 61 73 65 20 74 68   in this case th
0a50: 65 20 69 6e 70 75 74 20 64 61 74 61 73 6f 75 72  e input datasour
0a60: 63 65 20 69 73 6e 27 74 20 61 20 6c 6f 63 61 6c  ce isn't a local
0a70: 20 6f 6e 65 20 28 66 69 6c 65 2d 73 79 73 74 65   one (file-syste
0a80: 6d 20 62 61 73 65 64 29 20 62 75 74 20 69 73 20  m based) but is 
0a90: 61 20 72 65 6d 6f 74 65 20 6f 6e 65 20 61 63 63  a remote one acc
0aa0: 65 73 73 65 64 20 76 69 61 20 61 6e 20 49 6e 74  essed via an Int
0ab0: 65 72 6e 65 74 20 63 6f 6e 6e 65 63 74 69 6f 6e  ernet connection
0ac0: 2e 0d 0a 3c 62 72 3e 3c 68 72 3e 0d 0a 3c 68 33  ...<br><hr>..<h3
0ad0: 3e 55 73 65 66 75 6c 20 72 65 73 6f 75 72 63 65  >Useful resource
0ae0: 73 20 66 6f 72 20 74 65 73 74 69 6e 67 20 70 75  s for testing pu
0af0: 72 70 6f 73 65 73 3c 2f 68 33 3e 0d 0a 54 68 65  rposes</h3>..The
0b00: 72 65 20 61 72 65 20 6c 6f 74 73 20 6f 66 20 57  re are lots of W
0b10: 46 53 20 73 65 72 76 65 72 73 20 61 74 20 74 68  FS servers at th
0b20: 65 20 66 6f 75 72 20 63 6f 72 6e 65 72 73 20 6f  e four corners o
0b30: 66 20 74 68 65 20 77 6f 72 6c 64 3b 20 61 6e 79  f the world; any
0b40: 77 61 79 2c 20 74 68 65 20 66 6f 6c 6c 6f 77 69  way, the followi
0b50: 6e 67 20 6f 6e 65 73 20 61 72 65 20 66 65 77 20  ng ones are few 
0b60: 55 52 4c 73 20 79 6f 75 20 63 61 6e 20 75 73 65  URLs you can use
0b70: 20 66 6f 72 20 79 6f 75 72 20 66 69 72 73 74 20   for your first 
0b80: 74 65 73 74 73 2e 0d 0a 3c 76 65 72 62 61 74 69  tests...<verbati
0b90: 6d 3e 0d 0a 68 74 74 70 3a 2f 2f 77 65 62 67 69  m>..http://webgi
0ba0: 73 2e 72 65 67 69 6f 6e 65 2e 73 61 72 64 65 67  s.regione.sardeg
0bb0: 6e 61 2e 69 74 2f 67 65 6f 73 65 72 76 65 72 2f  na.it/geoserver/
0bc0: 6f 77 73 3f 73 65 72 76 69 63 65 3d 57 46 53 26  ows?service=WFS&
0bd0: 72 65 71 75 65 73 74 3d 47 65 74 43 61 70 61 62  request=GetCapab
0be0: 69 6c 69 74 69 65 73 0d 0a 0d 0a 68 74 74 70 3a  ilities....http:
0bf0: 2f 2f 67 65 6f 6d 61 70 2e 72 65 74 65 75 6e 69  //geomap.reteuni
0c00: 74 61 72 69 61 2e 70 69 65 6d 6f 6e 74 65 2e 69  taria.piemonte.i
0c10: 74 2f 77 73 2f 67 73 61 72 65 70 72 6f 74 2f 72  t/ws/gsareprot/r
0c20: 70 2d 30 31 2f 61 72 65 65 70 72 6f 74 77 66 73  p-01/areeprotwfs
0c30: 2f 77 66 73 5f 67 73 61 72 65 70 72 6f 74 5f 31  /wfs_gsareprot_1
0c40: 3f 73 65 72 76 69 63 65 3d 57 46 53 26 72 65 71  ?service=WFS&req
0c50: 75 65 73 74 3d 67 65 74 43 61 70 61 62 69 6c 69  uest=getCapabili
0c60: 74 69 65 73 20 0d 0a 0d 0a 68 74 74 70 3a 2f 2f  ties ....http://
0c70: 64 65 6d 6f 2e 6f 70 65 6e 67 65 6f 2e 6f 72 67  demo.opengeo.org
0c80: 2f 67 65 6f 73 65 72 76 65 72 2f 77 66 73 3f 73  /geoserver/wfs?s
0c90: 65 72 76 69 63 65 3d 77 66 73 26 76 65 72 73 69  ervice=wfs&versi
0ca0: 6f 6e 3d 31 2e 31 2e 30 26 72 65 71 75 65 73 74  on=1.1.0&request
0cb0: 3d 67 65 74 43 61 70 61 62 69 6c 69 74 69 65 73  =getCapabilities
0cc0: 0d 0a 0d 0a 68 74 74 70 3a 2f 2f 6d 72 64 61 74  ....http://mrdat
0cd0: 61 2e 75 73 67 73 2e 67 6f 76 2f 73 65 72 76 69  a.usgs.gov/servi
0ce0: 63 65 73 2f 6d 74 3f 72 65 71 75 65 73 74 3d 67  ces/mt?request=g
0cf0: 65 74 63 61 70 61 62 69 6c 69 74 69 65 73 26 73  etcapabilities&s
0d00: 65 72 76 69 63 65 3d 57 46 53 26 76 65 72 73 69  ervice=WFS&versi
0d10: 6f 6e 3d 31 2e 30 2e 30 26 0d 0a 0d 0a 68 74 74  on=1.0.0&....htt
0d20: 70 3a 2f 2f 6d 72 64 61 74 61 2e 75 73 67 73 2e  p://mrdata.usgs.
0d30: 67 6f 76 2f 73 65 72 76 69 63 65 73 2f 74 78 3f  gov/services/tx?
0d40: 72 65 71 75 65 73 74 3d 67 65 74 63 61 70 61 62  request=getcapab
0d50: 69 6c 69 74 69 65 73 26 73 65 72 76 69 63 65 3d  ilities&service=
0d60: 57 46 53 26 76 65 72 73 69 6f 6e 3d 31 2e 30 2e  WFS&version=1.0.
0d70: 30 26 0d 0a 0d 0a 68 74 74 70 3a 2f 2f 6d 72 64  0&....http://mrd
0d80: 61 74 61 2e 75 73 67 73 2e 67 6f 76 2f 73 65 72  ata.usgs.gov/ser
0d90: 76 69 63 65 73 2f 6d 72 64 73 3f 72 65 71 75 65  vices/mrds?reque
0da0: 73 74 3d 67 65 74 63 61 70 61 62 69 6c 69 74 69  st=getcapabiliti
0db0: 65 73 26 73 65 72 76 69 63 65 3d 57 46 53 26 76  es&service=WFS&v
0dc0: 65 72 73 69 6f 6e 3d 31 2e 30 2e 30 0d 0a 0d 0a  ersion=1.0.0....
0dd0: 68 74 74 70 3a 2f 2f 73 64 69 2e 67 65 6f 70 6f  http://sdi.geopo
0de0: 72 74 61 6c 2e 67 6f 76 2e 70 6c 2f 77 66 73 5f  rtal.gov.pl/wfs_
0df0: 70 72 67 2f 77 66 73 65 72 76 69 63 65 2e 61 73  prg/wfservice.as
0e00: 70 78 3f 52 45 51 55 45 53 54 3d 47 65 74 43 61  px?REQUEST=GetCa
0e10: 70 61 62 69 6c 69 74 69 65 73 26 53 45 52 56 49  pabilities&SERVI
0e20: 43 45 3d 57 46 53 26 56 45 52 53 49 4f 4e 3d 31  CE=WFS&VERSION=1
0e30: 2e 31 2e 30 0d 0a 3c 2f 76 65 72 62 61 74 69 6d  .1.0..</verbatim
0e40: 3e 0d 0a 3c 62 72 3e 3c 68 72 3e 0d 0a 3c 68 33  >..<br><hr>..<h3
0e50: 3e 4c 6f 61 64 69 6e 67 20 57 46 53 20 64 61 74  >Loading WFS dat
0e60: 61 20 6f 6e 20 3c 62 3e 73 70 61 74 69 61 6c 69  a on <b>spatiali
0e70: 74 65 5f 67 75 69 3c 2f 68 33 3e 0d 0a 3c 74 61  te_gui</h3>..<ta
0e80: 62 6c 65 20 77 69 64 74 68 3d 22 25 31 30 30 22  ble width="%100"
0e90: 20 62 6f 72 64 65 72 3d 22 31 22 20 63 65 6c 6c   border="1" cell
0ea0: 73 70 61 63 69 6e 67 3d 22 36 22 20 63 65 6c 6c  spacing="6" cell
0eb0: 70 61 64 64 69 6e 67 3d 22 36 22 3e 0d 0a 3c 74  padding="6">..<t
0ec0: 72 3e 3c 74 64 3e 59 6f 75 20 63 61 6e 20 73 74  r><td>You can st
0ed0: 61 72 74 20 61 20 57 46 53 20 64 6f 77 6e 6c 6f  art a WFS downlo
0ee0: 61 64 20 73 65 73 73 69 6f 6e 20 69 6e 64 69 66  ad session indif
0ef0: 66 65 72 65 6e 74 6c 79 20 66 72 6f 6d 20 74 68  ferently from th
0f00: 65 20 6d 61 69 6e 20 6d 65 6e 75 20 6f 72 20 62  e main menu or b
0f10: 79 20 70 72 65 73 73 69 6e 67 20 74 68 65 20 63  y pressing the c
0f20: 6f 72 72 65 73 70 6f 6e 64 69 6e 67 20 74 6f 6f  orresponding too
0f30: 6c 62 61 72 20 62 75 74 74 6f 6e 2e 0d 0a 3c 2f  lbar button...</
0f40: 74 64 3e 3c 74 64 3e 0d 0a 3c 69 6d 67 20 73 72  td><td>..<img sr
0f50: 63 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 67  c="https://www.g
0f60: 61 69 61 2d 67 69 73 2e 69 74 2f 67 61 69 61 2d  aia-gis.it/gaia-
0f70: 73 69 6e 73 2f 77 66 73 2f 77 66 73 31 2e 70 6e  sins/wfs/wfs1.pn
0f80: 67 22 20 61 6c 74 3d 22 77 66 73 2d 31 22 20 62  g" alt="wfs-1" b
0f90: 6f 72 64 65 72 3d 22 31 22 3e 0d 0a 3c 2f 74 64  order="1">..</td
0fa0: 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e  ></tr>..<tr><td>
0fb0: 41 20 64 69 61 6c 6f 67 20 70 61 6e 65 6c 20 77  A dialog panel w
0fc0: 69 6c 6c 20 61 70 70 65 61 72 3b 20 6e 6f 77 20  ill appear; now 
0fd0: 79 6f 75 20 73 69 6d 70 6c 79 20 68 61 76 65 20  you simply have 
0fe0: 74 6f 20 74 79 70 65 20 28 6f 72 20 70 6f 73 73  to type (or poss
0ff0: 69 62 6c 79 20 70 61 73 74 65 29 20 74 68 65 20  ibly paste) the 
1000: 55 52 4c 20 69 64 65 6e 74 69 66 79 69 6e 67 20  URL identifying 
1010: 74 68 65 20 3c 62 3e 47 65 74 43 61 70 61 62 69  the <b>GetCapabi
1020: 74 69 65 73 3c 2f 62 3e 20 57 46 53 20 73 65 72  ties</b> WFS ser
1030: 76 69 63 65 20 79 6f 75 20 61 72 65 20 69 6e 74  vice you are int
1040: 65 6e 64 69 6e 67 20 74 6f 20 61 63 63 65 73 73  ending to access
1050: 2e 3c 62 72 3e 0d 0a 54 68 65 6e 20 70 72 65 73  .<br>..Then pres
1060: 73 20 74 68 65 20 3c 62 3e 4c 6f 61 64 3c 2f 62  s the <b>Load</b
1070: 3e 20 62 75 74 74 6f 6e 2e 0d 0a 3c 2f 74 64 3e  > button...</td>
1080: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65  <td align="cente
1090: 72 22 3e 0d 0a 3c 69 6d 67 20 73 72 63 3d 22 68  r">..<img src="h
10a0: 74 74 70 73 3a 2f 2f 77 77 77 2e 67 61 69 61 2d  ttps://www.gaia-
10b0: 67 69 73 2e 69 74 2f 67 61 69 61 2d 73 69 6e 73  gis.it/gaia-sins
10c0: 2f 77 66 73 2f 77 66 73 32 2e 70 6e 67 22 20 61  /wfs/wfs2.png" a
10d0: 6c 74 3d 22 77 66 73 2d 32 22 20 62 6f 72 64 65  lt="wfs-2" borde
10e0: 72 3d 22 31 22 3e 0d 0a 3c 2f 74 64 3e 3c 2f 74  r="1">..</td></t
10f0: 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 0d 0a 3c 75  r>..<tr><td>..<u
1100: 6c 3e 0d 0a 3c 6c 69 3e 41 66 74 65 72 20 61 20  l>..<li>After a 
1110: 6c 69 74 74 6c 65 20 77 68 69 6c 65 20 61 20 66  little while a f
1120: 75 6c 6c 20 6c 69 73 74 20 6f 66 20 61 76 61 69  ull list of avai
1130: 6c 61 62 6c 65 20 3c 62 3e 46 65 61 74 75 72 65  lable <b>Feature
1140: 20 54 79 70 65 73 3c 2f 62 3e 20 28 61 6b 61 20   Types</b> (aka 
1150: 3c 69 3e 6c 61 79 65 72 73 3c 2f 69 3e 29 20 77  <i>layers</i>) w
1160: 69 6c 6c 20 62 65 20 73 68 6f 77 6e 3b 20 73 65  ill be shown; se
1170: 6c 65 63 74 20 6f 6e 65 20 69 74 65 6d 20 28 6a  lect one item (j
1180: 75 73 74 20 63 6c 69 63 6b 20 6f 6e 20 74 68 65  ust click on the
1190: 20 63 6f 72 72 65 73 70 6f 6e 64 69 6e 67 20 72   corresponding r
11a0: 6f 77 29 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 54  ow).</li>..<li>T
11b0: 68 65 6e 20 66 69 6c 6c 2d 69 6e 20 74 68 65 20  hen fill-in the 
11c0: 72 65 71 75 65 73 74 20 61 72 67 75 6d 65 6e 74  request argument
11d0: 73 20 28 61 74 20 6c 65 61 73 74 20 74 68 65 20  s (at least the 
11e0: 6e 61 6d 65 20 6f 66 20 74 68 65 20 74 61 72 67  name of the targ
11f0: 65 74 20 44 42 20 74 61 62 6c 65 20 69 73 20 72  et DB table is r
1200: 65 71 75 69 72 65 64 29 2e 3c 2f 6c 69 3e 0d 0a  equired).</li>..
1210: 3c 6c 69 3e 41 6e 64 20 66 69 6e 61 6c 6c 79 20  <li>And finally 
1220: 70 72 65 73 73 20 74 68 65 20 3c 62 3e 4c 6f 61  press the <b>Loa
1230: 64 20 44 61 74 61 3c 2f 62 3e 20 62 75 74 74 6f  d Data</b> butto
1240: 6e 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 3c 62  n.</li>..</ul><b
1250: 72 3e 3c 62 72 3e 0d 0a 54 68 65 20 64 6f 77 6e  r><br>..The down
1260: 6c 6f 61 64 20 77 69 6c 6c 20 69 6d 6d 65 64 69  load will immedi
1270: 61 74 65 6c 79 20 73 74 61 72 74 2e 3c 62 72 3e  ately start.<br>
1280: 0d 0a 3c 62 3e 3c 75 3e 50 6c 65 61 73 65 20 6e  ..<b><u>Please n
1290: 6f 74 65 3c 2f 75 3e 3c 2f 62 3e 3a 20 61 20 6c  ote</u></b>: a l
12a0: 6f 6e 67 20 74 69 6d 65 20 63 6f 75 6c 64 20 62  ong time could b
12b0: 65 20 72 65 71 75 69 72 65 64 2c 20 64 65 70 65  e required, depe
12c0: 6e 64 69 6e 67 20 6f 6e 20 64 61 74 61 20 73 69  nding on data si
12d0: 7a 65 2c 20 61 76 61 69 6c 61 62 6c 65 20 62 61  ze, available ba
12e0: 6e 64 77 69 64 74 68 20 61 6e 64 20 73 6f 20 6f  ndwidth and so o
12f0: 6e 20 2e 2e 2e 2e 20 70 61 74 69 65 6e 74 6c 79  n .... patiently
1300: 20 77 61 69 74 20 75 6e 74 69 6c 20 63 6f 6d 70   wait until comp
1310: 6c 65 74 69 6f 6e 2e 0d 0a 3c 2f 74 64 3e 3c 74  letion...</td><t
1320: 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22  d align="center"
1330: 3e 0d 0a 3c 69 6d 67 20 73 72 63 3d 22 68 74 74  >..<img src="htt
1340: 70 73 3a 2f 2f 77 77 77 2e 67 61 69 61 2d 67 69  ps://www.gaia-gi
1350: 73 2e 69 74 2f 67 61 69 61 2d 73 69 6e 73 2f 77  s.it/gaia-sins/w
1360: 66 73 2f 77 66 73 33 2e 70 6e 67 22 20 61 6c 74  fs/wfs3.png" alt
1370: 3d 22 77 66 73 2d 33 22 20 62 6f 72 64 65 72 3d  ="wfs-3" border=
1380: 22 31 22 3e 0d 0a 3c 2f 74 64 3e 3c 2f 74 72 3e  "1">..</td></tr>
1390: 0d 0a 3c 74 72 3e 3c 74 64 3e 41 74 20 74 68 65  ..<tr><td>At the
13a0: 20 65 6e 64 20 6f 66 20 74 68 65 20 64 61 74 61   end of the data
13b0: 20 69 6d 70 6f 72 74 20 70 72 6f 63 65 73 73 20   import process 
13c0: 61 20 64 69 61 67 6e 6f 73 74 69 63 20 6d 65 73  a diagnostic mes
13d0: 73 61 67 65 20 77 69 6c 6c 20 61 70 70 65 61 72  sage will appear
13e0: 2e 3c 62 72 3e 3c 62 72 3e 0d 0a 49 6e 20 74 68  .<br><br>..In th
13f0: 69 73 20 63 61 73 65 20 61 6c 6c 20 73 65 6c 65  is case all sele
1400: 63 74 65 64 20 64 61 74 61 20 68 61 76 65 20 62  cted data have b
1410: 65 65 6e 20 73 75 63 63 65 73 73 66 75 6c 6c 79  een successfully
1420: 20 64 6f 77 6e 6c 6f 61 64 65 64 20 61 6e 64 20   downloaded and 
1430: 70 65 72 6d 61 6e 65 6e 74 6c 79 20 73 61 76 65  permanently save
1440: 64 20 69 6e 74 6f 20 79 6f 75 72 20 6c 6f 63 61  d into your loca
1450: 6c 20 44 42 2e 0d 0a 3c 2f 74 64 3e 3c 74 64 20  l DB...</td><td 
1460: 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 0d  align="center">.
1470: 0a 3c 69 6d 67 20 73 72 63 3d 22 68 74 74 70 73  .<img src="https
1480: 3a 2f 2f 77 77 77 2e 67 61 69 61 2d 67 69 73 2e  ://www.gaia-gis.
1490: 69 74 2f 67 61 69 61 2d 73 69 6e 73 2f 77 66 73  it/gaia-sins/wfs
14a0: 2f 77 66 73 34 2e 70 6e 67 22 20 61 6c 74 3d 22  /wfs4.png" alt="
14b0: 77 66 73 2d 34 22 20 62 6f 72 64 65 72 3d 22 31  wfs-4" border="1
14c0: 22 3e 0d 0a 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a  ">..</td></tr>..
14d0: 3c 74 72 3e 3c 74 64 3e 0d 0a 3c 68 34 3e 48 69  <tr><td>..<h4>Hi
14e0: 6e 74 73 20 61 6e 64 20 74 72 69 63 6b 73 20 23  nts and tricks #
14f0: 31 3c 2f 68 34 3e 0d 0a 53 6f 6d 65 74 69 6d 65  1</h4>..Sometime
1500: 73 20 74 68 65 20 46 65 61 74 75 72 65 20 54 79  s the Feature Ty
1510: 70 65 73 20 72 65 74 75 72 6e 65 64 20 62 79 20  pes returned by 
1520: 61 20 57 46 53 20 64 61 74 61 73 6f 75 72 63 65  a WFS datasource
1530: 20 63 6f 75 6c 64 20 63 6f 6e 74 61 69 6e 20 6d   could contain m
1540: 61 6e 79 20 74 65 6e 74 68 20 28 6f 72 20 65 76  any tenth (or ev
1550: 65 6e 20 6d 61 6e 79 20 68 75 6e 64 72 65 64 74  en many hundredt
1560: 68 29 20 64 69 66 66 65 72 65 6e 74 20 6c 61 79  h) different lay
1570: 65 72 73 2e 3c 62 72 3e 3c 62 72 3e 0d 0a 49 6e  ers.<br><br>..In
1580: 20 74 68 69 73 20 63 61 73 65 20 79 6f 75 20 63   this case you c
1590: 61 6e 20 75 73 65 66 75 6c 6c 79 20 61 70 70 6c  an usefully appl
15a0: 79 20 61 20 3c 62 3e 66 69 6c 74 65 72 3c 2f 62  y a <b>filter</b
15b0: 3e 20 62 61 73 65 64 20 6f 6e 20 73 6f 6d 65 20  > based on some 
15c0: 73 70 65 63 69 66 69 63 20 3c 62 3e 4b 65 79 77  specific <b>Keyw
15d0: 6f 72 64 3c 2f 62 3e 20 28 79 6f 75 20 63 61 6e  ord</b> (you can
15e0: 20 73 65 6c 65 63 74 20 73 6f 6d 65 20 61 70 70   select some app
15f0: 72 6f 70 72 69 61 74 65 20 76 61 6c 75 65 20 66  ropriate value f
1600: 72 6f 6d 20 74 68 65 20 63 6f 72 72 65 73 70 6f  rom the correspo
1610: 6e 64 69 6e 67 20 3c 75 3e 43 6f 6d 62 6f 42 6f  nding <u>ComboBo
1620: 78 20 6c 69 73 74 3c 2f 75 3e 20 69 66 20 79 6f  x list</u> if yo
1630: 75 20 68 61 76 65 6e 27 74 20 61 6e 79 20 69 64  u haven't any id
1640: 65 61 20 61 62 6f 75 74 20 74 68 65 20 64 65 63  ea about the dec
1650: 6c 61 72 65 64 20 4b 65 79 77 6f 72 64 73 29 2e  lared Keywords).
1660: 0d 0a 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e  ..</td><td align
1670: 3d 22 63 65 6e 74 65 72 22 3e 0d 0a 3c 69 6d 67  ="center">..<img
1680: 20 73 72 63 3d 22 68 74 74 70 73 3a 2f 2f 77 77   src="https://ww
1690: 77 2e 67 61 69 61 2d 67 69 73 2e 69 74 2f 67 61  w.gaia-gis.it/ga
16a0: 69 61 2d 73 69 6e 73 2f 77 66 73 2f 77 66 73 35  ia-sins/wfs/wfs5
16b0: 2e 70 6e 67 22 20 61 6c 74 3d 22 77 66 73 2d 35  .png" alt="wfs-5
16c0: 22 20 62 6f 72 64 65 72 3d 22 31 22 3e 0d 0a 3c  " border="1">..<
16d0: 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c  /td></tr>..<tr><
16e0: 74 64 3e 0d 0a 3c 68 34 3e 48 69 6e 74 73 20 61  td>..<h4>Hints a
16f0: 6e 64 20 74 72 69 63 6b 73 20 23 32 3c 2f 68 34  nd tricks #2</h4
1700: 3e 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 59 6f 75  >..<ul>..<li>You
1710: 20 63 61 6e 20 65 76 65 6e 74 75 61 6c 6c 79 20   can eventually 
1720: 73 70 65 63 69 66 79 20 73 6f 6d 65 20 46 65 61  specify some Fea
1730: 74 75 72 65 20 41 74 74 72 69 62 75 74 65 20 74  ture Attribute t
1740: 6f 20 62 65 20 75 73 65 64 20 61 73 20 74 68 65  o be used as the
1750: 20 3c 62 3e 50 72 69 6d 61 72 79 20 4b 65 79 3c   <b>Primary Key<
1760: 2f 62 3e 20 73 75 70 70 6f 72 74 69 6e 67 20 74  /b> supporting t
1770: 68 65 20 74 61 72 67 65 74 20 44 42 20 74 61 62  he target DB tab
1780: 6c 65 20 28 73 68 6f 75 6c 64 20 63 6f 6e 74 61  le (should conta
1790: 69 6e 20 75 6e 69 71 75 65 20 76 61 6c 75 65 73  in unique values
17a0: 29 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 59 6f 75  ).</li>..<li>You
17b0: 20 63 61 6e 20 73 65 6c 65 63 74 20 61 20 70 72   can select a pr
17c0: 65 66 65 72 72 65 64 20 57 46 53 20 70 72 6f 74  eferred WFS prot
17d0: 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 3b 20 61 6e  ocol version; an
17e0: 64 20 79 6f 75 20 63 61 6e 20 63 68 6f 6f 73 65  d you can choose
17f0: 20 62 65 74 77 65 65 6e 20 61 20 6d 6f 6e 6f 6c   between a monol
1800: 69 74 68 69 63 20 64 6f 77 6e 6c 6f 61 64 20 6f  ithic download o
1810: 72 20 61 20 57 46 53 20 70 61 67 65 64 20 64 6f  r a WFS paged do
1820: 77 6e 6c 6f 61 64 20 28 6e 6f 74 20 61 6c 6c 20  wnload (not all 
1830: 73 65 72 76 65 72 73 20 73 75 70 70 6f 72 74 20  servers support 
1840: 74 68 69 73 20 6f 70 74 69 6f 6e 3b 20 70 6c 65  this option; ple
1850: 61 73 65 20 73 65 65 20 62 65 6c 6f 77 29 2e 3c  ase see below).<
1860: 2f 6c 69 3e 0d 0a 3c 6c 69 3e 53 6f 6d 65 74 69  /li>..<li>Someti
1870: 6d 65 73 20 74 68 65 20 57 46 53 20 73 65 72 76  mes the WFS serv
1880: 65 72 20 73 75 70 70 6f 72 74 73 20 6d 6f 72 65  er supports more
1890: 20 74 68 61 6e 20 61 20 73 69 6e 67 6c 65 20 3c   than a single <
18a0: 62 3e 53 52 49 44 3c 2f 62 3e 3b 20 74 68 65 6e  b>SRID</b>; then
18b0: 20 79 6f 75 20 63 61 6e 20 73 65 6c 65 63 74 20   you can select 
18c0: 74 68 65 20 6d 6f 73 74 20 61 70 70 72 6f 70 72  the most appropr
18d0: 69 61 74 65 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e  iate.</li>..<li>
18e0: 4f 74 68 65 72 20 74 69 6d 65 73 20 69 74 20 63  Other times it c
18f0: 6f 75 6c 64 20 62 65 20 6e 65 63 65 73 73 61 72  ould be necessar
1900: 79 20 3c 62 3e 73 77 61 70 70 69 6e 67 20 74 68  y <b>swapping th
1910: 65 20 61 78 65 73 3c 2f 62 3e 20 66 6f 72 20 65  e axes</b> for e
1920: 76 65 72 79 20 47 4d 4c 20 47 65 6f 6d 65 74 72  very GML Geometr
1930: 79 20 28 74 68 65 20 57 46 53 2f 47 4d 4c 20 73  y (the WFS/GML s
1940: 74 61 6e 64 61 72 64 73 20 61 72 65 20 72 61 74  tandards are rat
1950: 68 65 72 20 63 6f 6e 66 75 73 65 64 20 61 62 6f  her confused abo
1960: 75 74 20 65 78 70 65 63 74 65 64 20 61 78 65 73  ut expected axes
1970: 20 6f 72 64 65 72 69 6e 67 29 2e 3c 2f 6c 69 3e   ordering).</li>
1980: 0d 0a 3c 2f 75 6c 3e 0d 0a 3c 2f 74 64 3e 3c 74  ..</ul>..</td><t
1990: 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22  d align="center"
19a0: 3e 0d 0a 3c 69 6d 67 20 73 72 63 3d 22 68 74 74  >..<img src="htt
19b0: 70 73 3a 2f 2f 77 77 77 2e 67 61 69 61 2d 67 69  ps://www.gaia-gi
19c0: 73 2e 69 74 2f 67 61 69 61 2d 73 69 6e 73 2f 77  s.it/gaia-sins/w
19d0: 66 73 2f 77 66 73 36 2e 70 6e 67 22 20 61 6c 74  fs/wfs6.png" alt
19e0: 3d 22 77 66 73 2d 36 22 20 62 6f 72 64 65 72 3d  ="wfs-6" border=
19f0: 22 31 22 3e 0d 0a 3c 2f 74 64 3e 3c 2f 74 72 3e  "1">..</td></tr>
1a00: 0d 0a 3c 74 72 3e 3c 74 64 3e 0d 0a 3c 68 34 3e  ..<tr><td>..<h4>
1a10: 48 6f 72 72 6f 72 20 53 74 6f 72 69 65 73 3c 2f  Horror Stories</
1a20: 68 34 3e 0d 0a 54 68 65 20 6c 65 66 74 20 66 69  h4>..The left fi
1a30: 67 75 72 65 20 28 67 72 65 65 6e 69 73 68 29 20  gure (greenish) 
1a40: 72 65 70 72 65 73 65 6e 74 73 20 55 53 41 20 66  represents USA f
1a50: 61 6d 69 6c 69 61 72 20 73 68 61 70 65 3b 20 74  amiliar shape; t
1a60: 68 65 20 72 69 67 68 74 20 66 69 67 75 72 65 20  he right figure 
1a70: 28 79 65 6c 6c 6f 77 69 73 68 29 20 69 73 20 65  (yellowish) is e
1a80: 78 61 63 74 6c 79 20 74 68 65 20 73 61 6d 65 20  xactly the same 
1a90: 62 75 74 20 70 72 65 73 65 6e 74 69 6e 67 20 62  but presenting b
1aa0: 61 64 6c 79 20 3c 62 3e 3c 69 3e 73 77 61 70 70  adly <b><i>swapp
1ab0: 65 64 20 61 78 65 73 3c 2f 69 3e 3c 2f 62 3e 2e  ed axes</i></b>.
1ac0: 3c 62 72 3e 3c 62 72 3e 0d 0a 41 6e 79 77 61 79  <br><br>..Anyway
1ad0: 20 64 6f 6e 27 74 20 64 65 73 70 61 69 72 3b 20   don't despair; 
1ae0: 69 66 20 79 6f 75 27 76 65 20 69 6e 63 75 72 72  if you've incurr
1af0: 65 64 20 69 6e 20 73 75 63 68 20 61 20 6d 69 73  ed in such a mis
1b00: 68 61 70 20 61 20 73 69 6e 67 6c 65 20 53 51 4c  hap a single SQL
1b10: 20 71 75 65 72 79 20 69 73 20 61 6c 6c 20 79 6f   query is all yo
1b20: 75 20 6e 65 65 64 20 74 6f 20 64 65 66 69 6e 69  u need to defini
1b30: 74 65 6c 79 20 72 65 73 6f 6c 76 65 20 79 6f 75  tely resolve you
1b40: 72 20 74 72 6f 75 62 6c 65 73 3a 0d 0a 3c 76 65  r troubles:..<ve
1b50: 72 62 61 74 69 6d 3e 0d 0a 55 50 44 41 54 45 20  rbatim>..UPDATE 
1b60: 6d 79 5f 74 61 62 6c 65 20 53 45 54 20 67 65 6f  my_table SET geo
1b70: 6d 20 3d 20 53 77 61 70 43 6f 6f 72 64 73 28 67  m = SwapCoords(g
1b80: 65 6f 6d 29 3b 0d 0a 3c 2f 76 65 72 62 61 74 69  eom);..</verbati
1b90: 6d 3e 0d 0a 3c 2f 74 64 3e 3c 74 64 3e 3c 74 61  m>..</td><td><ta
1ba0: 62 6c 65 3e 3c 74 72 3e 0d 0a 3c 74 64 20 61 6c  ble><tr>..<td al
1bb0: 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 0d 0a 3c  ign="center">..<
1bc0: 69 6d 67 20 73 72 63 3d 22 68 74 74 70 73 3a 2f  img src="https:/
1bd0: 2f 77 77 77 2e 67 61 69 61 2d 67 69 73 2e 69 74  /www.gaia-gis.it
1be0: 2f 67 61 69 61 2d 73 69 6e 73 2f 77 66 73 2f 75  /gaia-sins/wfs/u
1bf0: 73 2d 6e 6f 72 6d 2e 70 6e 67 22 20 61 6c 74 3d  s-norm.png" alt=
1c00: 22 75 73 20 6e 6f 72 6d 61 6c 22 3e 0d 0a 3c 2f  "us normal">..</
1c10: 74 64 3e 3c 74 64 3e 0d 0a 3c 69 6d 67 20 73 72  td><td>..<img sr
1c20: 63 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 67  c="https://www.g
1c30: 61 69 61 2d 67 69 73 2e 69 74 2f 67 61 69 61 2d  aia-gis.it/gaia-
1c40: 73 69 6e 73 2f 77 66 73 2f 75 73 2d 73 77 61 70  sins/wfs/us-swap
1c50: 2e 70 6e 67 22 20 61 6c 74 3d 22 75 73 20 73 77  .png" alt="us sw
1c60: 61 70 22 3e 0d 0a 3c 2f 74 64 3e 0d 0a 3c 2f 74  ap">..</td>..</t
1c70: 64 3e 3c 2f 74 72 3e 0d 0a 3c 2f 74 64 3e 3c 2f  d></tr>..</td></
1c80: 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 0d 0a 3c  tr>..<tr><td>..<
1c90: 68 34 3e 41 64 76 61 6e 63 65 64 20 57 46 53 20  h4>Advanced WFS 
1ca0: 6f 70 74 69 6f 6e 73 3c 2f 68 34 3e 0d 0a 3c 75  options</h4>..<u
1cb0: 6c 3e 0d 0a 3c 6c 69 3e 54 68 65 20 57 46 53 20  l>..<li>The WFS 
1cc0: 70 72 6f 74 6f 63 6f 6c 20 73 75 70 70 6f 72 74  protocol support
1cd0: 73 20 6d 61 6e 79 20 69 6e 74 65 72 65 73 74 69  s many interesti
1ce0: 6e 67 20 61 64 76 61 6e 63 65 64 20 6f 70 74 69  ng advanced opti
1cf0: 6f 6e 73 2e 3c 62 72 3e 0d 0a 53 6f 6d 65 74 69  ons.<br>..Someti
1d00: 6d 65 73 20 79 6f 75 20 63 6f 75 6c 64 20 70 72  mes you could pr
1d10: 6f 62 61 62 6c 79 20 6e 6f 74 20 62 65 20 69 6e  obably not be in
1d20: 74 65 72 65 73 74 65 64 20 69 6e 20 64 6f 77 6e  terested in down
1d30: 6c 6f 61 64 69 6e 67 20 61 20 77 68 6f 6c 65 20  loading a whole 
1d40: 64 61 74 61 73 65 74 20 28 6d 61 79 20 62 65 2c  dataset (may be,
1d50: 20 61 20 72 65 61 6c 6c 79 20 68 75 67 65 20 6f   a really huge o
1d60: 6e 65 29 2e 3c 62 72 3e 0d 0a 59 6f 75 27 6c 6c  ne).<br>..You'll
1d70: 20 77 69 73 68 20 62 65 74 74 65 72 20 64 6f 77   wish better dow
1d80: 6e 6c 6f 61 64 69 6e 67 20 61 20 76 65 72 79 20  nloading a very 
1d90: 73 70 65 63 69 66 69 63 20 70 6f 72 74 69 6f 6e  specific portion
1da0: 20 6f 66 20 74 68 65 20 64 61 74 61 73 65 74 2c   of the dataset,
1db0: 20 61 63 63 75 72 61 74 65 6c 79 20 73 65 6c 65   accurately sele
1dc0: 63 74 65 64 20 61 63 63 6f 72 64 69 6e 67 6c 79  cted accordingly
1dd0: 20 74 6f 20 79 6f 75 72 20 73 70 65 63 69 66 69   to your specifi
1de0: 63 20 72 65 71 75 69 72 65 6d 65 6e 74 73 2e 3c  c requirements.<
1df0: 2f 6c 69 3e 0d 0a 3c 6c 69 3e 49 6e 20 74 68 69  /li>..<li>In thi
1e00: 73 20 63 61 73 65 20 79 6f 75 20 63 61 6e 20 65  s case you can e
1e10: 76 65 6e 74 75 61 6c 6c 79 20 73 70 65 63 69 66  ventually specif
1e20: 79 20 61 20 6d 6f 72 65 20 63 6f 6d 70 6c 65 78  y a more complex
1e30: 20 57 46 53 20 72 65 71 75 65 73 74 20 55 52 4c   WFS request URL
1e40: 2c 20 73 6f 20 74 6f 20 73 70 65 63 69 66 79 20  , so to specify 
1e50: 73 6f 6d 65 20 61 70 70 72 6f 70 72 69 61 74 65  some appropriate
1e60: 20 3c 62 3e 66 69 6c 74 65 72 3c 2f 62 3e 2e 3c   <b>filter</b>.<
1e70: 2f 6c 69 3e 0d 0a 3c 6c 69 3e 53 6f 20 79 6f 75  /li>..<li>So you
1e80: 20 63 61 6e 20 65 76 65 6e 74 75 61 6c 6c 79 20   can eventually 
1e90: 73 70 65 63 69 66 79 20 61 20 3c 62 3e 66 69 6c  specify a <b>fil
1ea0: 74 65 72 3c 2f 62 3e 20 62 61 73 65 64 20 6f 6e  ter</b> based on
1eb0: 20 73 6f 6d 65 20 3c 75 3e 3c 69 3e 61 74 74 72   some <u><i>attr
1ec0: 69 62 75 74 65 20 76 61 6c 75 65 3c 2f 69 3e 3c  ibute value</i><
1ed0: 2f 75 3e 3a 20 65 2e 67 2e 20 79 6f 75 20 63 61  /u>: e.g. you ca
1ee0: 6e 20 73 70 65 63 69 66 79 20 61 20 72 75 6c 65  n specify a rule
1ef0: 20 64 69 63 74 61 74 69 6e 67 20 74 68 61 74 20   dictating that 
1f00: 3c 62 3e 3c 69 3e 66 69 70 73 5f 63 6f 64 3d 27  <b><i>fips_cod='
1f10: 66 49 54 27 3c 2f 69 3e 3c 2f 62 3e 2c 20 73 6f  fIT'</i></b>, so
1f20: 20 74 6f 20 61 63 74 75 61 6c 6c 79 20 64 6f 77   to actually dow
1f30: 6e 6c 6f 61 64 20 66 72 6f 6d 20 74 68 65 20 77  nload from the w
1f40: 6f 72 6c 64 77 69 64 65 20 20 64 61 74 61 73 65  orldwide  datase
1f50: 74 20 6f 6e 6c 79 20 74 68 65 20 66 65 77 20 66  t only the few f
1f60: 65 61 74 75 72 65 73 20 63 6f 72 72 65 73 70 6f  eatures correspo
1f70: 6e 64 69 6e 67 20 74 6f 20 3c 75 3e 3c 69 3e 49  nding to <u><i>I
1f80: 74 61 6c 79 3c 2f 69 3e 3c 2f 75 3e 2e 20 0d 0a  taly</i></u>. ..
1f90: 3c 76 65 72 62 61 74 69 6d 3e 0d 0a 46 69 6c 74  <verbatim>..Filt
1fa0: 65 72 3d 3c 46 69 6c 74 65 72 3e 3c 50 72 6f 70  er=<Filter><Prop
1fb0: 65 72 74 79 49 73 45 71 75 61 6c 54 6f 3e 0d 0a  ertyIsEqualTo>..
1fc0: 20 20 3c 50 72 6f 70 65 72 74 79 4e 61 6d 65 3e    <PropertyName>
1fd0: 66 69 70 73 5f 63 6f 64 65 3c 2f 50 72 6f 70 65  fips_code</Prope
1fe0: 72 74 79 4e 61 6d 65 3e 0d 0a 20 20 3c 4c 69 74  rtyName>..  <Lit
1ff0: 65 72 61 6c 3e 66 49 54 3c 2f 4c 69 74 65 72 61  eral>fIT</Litera
2000: 6c 3e 0d 0a 3c 2f 50 72 6f 70 65 72 74 79 49 73  l>..</PropertyIs
2010: 45 71 75 61 6c 54 6f 3e 3c 2f 46 69 6c 74 65 72  EqualTo></Filter
2020: 3e 0d 0a 3c 2f 76 65 72 62 61 74 69 6d 3e 3c 2f  >..</verbatim></
2030: 6c 69 3e 0d 0a 3c 6c 69 3e 41 6c 74 65 72 6e 61  li>..<li>Alterna
2040: 74 69 76 65 6c 79 2c 20 79 6f 75 20 63 6f 75 6c  tively, you coul
2050: 64 20 73 70 65 63 69 66 79 20 61 20 3c 62 3e 73  d specify a <b>s
2060: 70 61 74 69 61 6c 20 66 69 6c 74 65 72 3c 2f 62  patial filter</b
2070: 3e 20 62 61 73 65 64 20 6f 6e 20 73 6f 6d 65 20  > based on some 
2080: 3c 75 3e 3c 69 3e 62 6f 75 6e 64 69 6e 67 20 62  <u><i>bounding b
2090: 6f 78 3c 2f 69 3e 3c 2f 75 3e 2c 20 65 2e 67 2e  ox</i></u>, e.g.
20a0: 20 0d 0a 3c 76 65 72 62 61 74 69 6d 3e 0d 0a 42   ..<verbatim>..B
20b0: 42 4f 58 3d 31 30 2c 34 30 2c 31 35 2c 34 35 0d  BOX=10,40,15,45.
20c0: 0a 3c 2f 76 65 72 62 61 74 69 6d 3e 3c 2f 6c 69  .</verbatim></li
20d0: 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c 2f 74 64 3e 3c  >..</ul>..</td><
20e0: 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72  td align="center
20f0: 22 3e 0d 0a 3c 69 6d 67 20 73 72 63 3d 22 68 74  ">..<img src="ht
2100: 74 70 73 3a 2f 2f 77 77 77 2e 67 61 69 61 2d 67  tps://www.gaia-g
2110: 69 73 2e 69 74 2f 67 61 69 61 2d 73 69 6e 73 2f  is.it/gaia-sins/
2120: 77 66 73 2f 77 66 73 37 2e 70 6e 67 22 20 61 6c  wfs/wfs7.png" al
2130: 74 3d 22 77 66 73 2d 37 22 20 62 6f 72 64 65 72  t="wfs-7" border
2140: 3d 22 31 22 3e 0d 0a 3c 2f 74 64 3e 3c 2f 74 72  ="1">..</td></tr
2150: 3e 0d 0a 3c 2f 74 61 62 6c 65 3e 0d 0a 3c 68 33  >..</table>..<h3
2160: 3e 4d 6f 6e 6f 6c 69 74 68 69 63 20 57 46 53 20  >Monolithic WFS 
2170: 3c 69 3e 76 73 3c 2f 69 3e 20 57 46 53 20 70 61  <i>vs</i> WFS pa
2180: 67 69 6e 67 3c 2f 68 33 3e 0d 0a 3c 74 61 62 6c  ging</h3>..<tabl
2190: 65 20 77 69 64 74 68 3d 22 25 31 30 30 22 20 62  e width="%100" b
21a0: 67 63 6f 6c 6f 72 3d 22 23 66 66 66 38 64 30 22  gcolor="#fff8d0"
21b0: 20 63 65 6c 6c 73 70 61 63 69 6e 67 3d 22 36 22   cellspacing="6"
21c0: 20 63 65 6c 6c 70 61 64 64 69 6e 67 3d 22 36 22   cellpadding="6"
21d0: 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 0d 0a 41 20 72  >..<tr><td>..A r
21e0: 65 61 6c 6c 79 20 69 6e 74 65 72 65 73 74 69 6e  eally interestin
21f0: 67 20 66 65 61 74 75 72 65 20 69 6e 74 72 6f 64  g feature introd
2200: 75 63 65 64 20 62 79 20 74 68 65 20 6d 6f 73 74  uced by the most
2210: 20 72 65 63 65 6e 74 20 3c 62 3e 57 46 53 20 32   recent <b>WFS 2
2220: 2e 30 2e 30 3c 2f 62 3e 20 69 73 20 74 68 65 20  .0.0</b> is the 
2230: 61 62 69 6c 69 74 79 20 74 6f 20 73 75 70 70 6f  ability to suppo
2240: 72 74 20 3c 75 3e 3c 62 3e 70 61 67 65 64 20 57  rt <u><b>paged W
2250: 46 53 20 72 65 71 75 65 73 74 73 3c 2f 75 3e 3c  FS requests</u><
2260: 2f 62 3e 3b 20 75 73 69 6e 67 20 74 68 69 73 20  /b>; using this 
2270: 6f 70 74 69 6f 6e 20 79 6f 75 20 63 61 6e 20 64  option you can d
2280: 6f 77 6e 6c 6f 61 64 20 61 20 77 68 6f 6c 65 20  ownload a whole 
2290: 6c 61 79 65 72 20 62 79 20 72 65 70 65 61 74 65  layer by repeate
22a0: 64 6c 79 20 71 75 65 72 79 69 6e 67 20 6a 75 73  dly querying jus
22b0: 74 20 61 20 72 65 61 73 6f 6e 61 62 6c 65 20 6e  t a reasonable n
22c0: 75 6d 62 65 72 20 6f 66 20 46 65 61 74 75 72 65  umber of Feature
22d0: 73 20 61 74 20 65 61 63 68 20 74 69 6d 65 20 69  s at each time i
22e0: 6e 73 74 65 61 64 20 6f 66 20 72 65 71 75 65 73  nstead of reques
22f0: 74 69 6e 67 20 61 6c 6c 20 74 68 65 20 46 65 61  ting all the Fea
2300: 74 75 72 65 73 20 69 6e 20 73 69 6e 67 6c 65 20  tures in single 
2310: 28 70 6f 73 73 69 62 6c 79 20 68 75 67 65 29 20  (possibly huge) 
2320: 6d 6f 6e 6f 6c 69 74 68 69 63 20 62 6c 6f 63 6b  monolithic block
2330: 2e 3c 62 72 3e 0d 0a 54 68 69 73 20 6f 6e 65 20  .<br>..This one 
2340: 69 73 20 61 6e 20 68 69 67 68 6c 79 20 61 74 74  is an highly att
2350: 72 61 63 74 69 76 65 20 6f 70 74 69 6f 6e 20 77  ractive option w
2360: 68 65 6e 20 61 63 63 65 73 73 69 6e 67 20 61 20  hen accessing a 
2370: 57 46 53 20 64 61 74 61 73 6f 75 72 63 65 3a 0d  WFS datasource:.
2380: 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 74 72 61 6e 73  .<ul>..<li>trans
2390: 66 65 72 72 69 6e 67 20 6d 61 6e 79 20 73 6d 61  ferring many sma
23a0: 6c 6c 20 70 61 63 6b 61 67 65 73 20 68 61 73 20  ll packages has 
23b0: 61 20 6c 6f 77 65 72 20 62 61 6e 64 77 69 64 74  a lower bandwidt
23c0: 68 20 69 6d 70 61 63 74 2e 3c 2f 6c 69 3e 0d 0a  h impact.</li>..
23d0: 3c 6c 69 3e 70 61 72 73 69 6e 67 20 6d 61 6e 79  <li>parsing many
23e0: 20 73 6d 61 6c 6c 20 58 4d 4c 20 44 6f 63 75 6d   small XML Docum
23f0: 65 6e 74 73 20 68 61 73 20 61 20 6c 6f 77 65 72  ents has a lower
2400: 20 69 6d 70 61 63 74 20 6f 6e 20 73 79 73 74 65   impact on syste
2410: 6d 20 72 65 73 6f 75 72 63 65 2e 3c 2f 6c 69 3e  m resource.</li>
2420: 0d 0a 3c 6c 69 3e 6c 61 73 74 20 62 75 74 20 6e  ..<li>last but n
2430: 6f 74 20 6c 65 61 73 74 3a 20 6e 6f 74 20 72 61  ot least: not ra
2440: 72 65 6c 79 20 57 46 53 20 73 65 72 76 65 72 73  rely WFS servers
2450: 20 61 70 70 6c 79 20 61 20 3c 69 3e 3c 62 3e 73   apply a <i><b>s
2460: 69 6c 65 6e 74 20 74 72 75 6e 63 61 74 69 6f 6e  ilent truncation
2470: 3c 2f 62 3e 3c 2f 69 3e 3a 20 61 66 74 65 72 20  </b></i>: after 
2480: 74 72 61 6e 73 66 65 72 72 69 6e 67 20 61 20 70  transferring a p
2490: 72 65 64 65 74 65 72 6d 69 6e 65 64 20 6e 75 6d  redetermined num
24a0: 62 65 72 20 6f 66 20 46 65 61 74 75 72 65 73 20  ber of Features 
24b0: 74 68 65 20 72 65 71 75 65 73 74 20 77 69 6c 6c  the request will
24c0: 20 62 65 20 63 6f 6e 73 69 64 65 72 65 64 20 74   be considered t
24d0: 65 72 6d 69 6e 61 74 65 64 3b 20 61 6c 6c 20 73  erminated; all s
24e0: 75 62 73 65 71 75 65 6e 74 20 46 65 61 74 75 72  ubsequent Featur
24f0: 65 73 20 77 69 6c 6c 20 6e 6f 74 20 62 65 20 73  es will not be s
2500: 65 6e 74 20 61 74 20 61 6c 6c 2e 3c 62 72 3e 0d  ent at all.<br>.
2510: 0a 53 75 63 68 20 61 20 62 65 68 61 76 69 6f 72  .Such a behavior
2520: 20 69 73 20 6f 62 76 69 6f 75 73 6c 79 20 69 6e   is obviously in
2530: 74 65 6e 64 65 64 20 74 6f 20 73 68 69 65 6c 64  tended to shield
2540: 20 74 68 65 20 57 46 53 20 73 65 72 76 65 72 20   the WFS server 
2550: 66 72 6f 6d 20 68 61 72 6d 66 75 6c 20 28 61 6e  from harmful (an
2560: 64 20 70 6f 73 73 69 62 6c 79 20 6d 61 6c 69 63  d possibly malic
2570: 69 6f 75 73 29 20 65 78 63 65 65 64 69 6e 67 20  ious) exceeding 
2580: 72 65 71 75 65 73 74 73 3b 20 62 75 74 20 69 6e  requests; but in
2590: 20 6d 61 6e 79 20 63 61 73 65 73 20 74 68 69 73   many cases this
25a0: 20 77 69 6c 6c 20 66 6f 72 62 69 64 20 74 6f 20   will forbid to 
25b0: 65 66 66 65 63 74 69 76 65 6c 79 20 64 6f 77 6e  effectively down
25c0: 6c 6f 61 64 20 61 20 77 68 6f 6c 65 20 6c 61 79  load a whole lay
25d0: 65 72 2e 0d 0a 55 73 69 6e 67 20 57 46 53 20 70  er...Using WFS p
25e0: 61 67 69 6e 67 20 77 69 6c 6c 20 65 66 66 65 63  aging will effec
25f0: 74 69 76 65 6c 79 20 63 69 72 63 75 6d 76 65 6e  tively circumven
2600: 74 20 74 68 69 73 20 73 70 65 63 69 66 69 63 20  t this specific 
2610: 69 73 73 75 65 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75  issue.</li>..</u
2620: 6c 3e 3c 62 72 3e 0d 0a 3c 62 3e 3c 75 3e 50 6c  l><br>..<b><u>Pl
2630: 65 61 73 65 20 6e 6f 74 65 3c 2f 75 3e 3c 2f 62  ease note</u></b
2640: 3e 3a 20 62 6f 74 68 20 3c 61 20 68 72 65 66 3d  >: both <a href=
2650: 22 68 74 74 70 3a 2f 2f 65 6e 2e 77 69 6b 69 70  "http://en.wikip
2660: 65 64 69 61 2e 6f 72 67 2f 77 69 6b 69 2f 4d 61  edia.org/wiki/Ma
2670: 70 53 65 72 76 65 72 22 3e 4d 61 70 53 65 72 76  pServer">MapServ
2680: 65 72 3c 2f 61 3e 20 61 6e 64 20 3c 61 20 68 72  er</a> and <a hr
2690: 65 66 3d 22 68 74 74 70 3a 2f 2f 65 6e 2e 77 69  ef="http://en.wi
26a0: 6b 69 70 65 64 69 61 2e 6f 72 67 2f 77 69 6b 69  kipedia.org/wiki
26b0: 2f 47 65 6f 53 65 72 76 65 72 22 3e 47 65 6f 53  /GeoServer">GeoS
26c0: 65 72 76 65 72 3c 2f 61 3e 20 28 74 77 6f 20 6f  erver</a> (two o
26d0: 70 65 6e 20 73 6f 75 72 63 65 20 57 46 53 20 73  pen source WFS s
26e0: 65 72 76 65 72 20 69 6d 70 6c 65 6d 65 6e 74 61  erver implementa
26f0: 74 69 6f 6e 73 29 20 64 6f 20 65 66 66 65 63 74  tions) do effect
2700: 69 76 65 6c 79 20 73 75 70 70 6f 72 74 20 57 46  ively support WF
2710: 53 20 70 61 67 69 6e 67 20 65 76 65 6e 20 66 6f  S paging even fo
2720: 72 20 3c 75 3e 57 46 53 20 31 2e 30 2e 30 3c 2f  r <u>WFS 1.0.0</
2730: 75 3e 20 61 6e 64 20 3c 75 3e 57 46 53 20 31 2e  u> and <u>WFS 1.
2740: 31 2e 30 3c 2f 75 3e 20 6f 6e 20 74 68 65 69 72  1.0</u> on their
2750: 20 6d 6f 73 74 20 72 65 63 65 6e 74 20 76 65 72   most recent ver
2760: 73 69 6f 6e 73 2e 0d 0a 42 6f 74 68 20 70 72 6f  sions...Both pro
2770: 64 75 63 74 73 20 61 72 65 20 77 69 64 65 6c 79  ducts are widely
2780: 20 75 73 65 64 2c 20 73 6f 20 61 66 74 65 72 20   used, so after 
2790: 61 6c 6c 20 69 73 20 6e 6f 74 20 61 74 20 61 6c  all is not at al
27a0: 6c 20 64 69 66 66 69 63 75 6c 74 20 74 6f 20 65  l difficult to e
27b0: 6e 63 6f 75 6e 74 65 72 20 73 6f 6d 65 20 57 46  ncounter some WF
27c0: 53 20 73 65 72 76 65 72 20 65 66 66 65 63 74 69  S server effecti
27d0: 76 65 6c 79 20 73 75 70 70 6f 72 74 69 6e 67 20  vely supporting 
27e0: 57 46 53 20 70 61 67 69 6e 67 2e 3c 62 72 3e 3c  WFS paging.<br><
27f0: 62 72 3e 0d 0a 53 70 61 74 69 61 4c 69 74 65 20  br>..SpatiaLite 
2800: 77 69 6c 6c 20 61 6c 77 61 79 73 20 73 69 6c 65  will always sile
2810: 6e 74 6c 79 20 63 68 65 63 6b 20 69 66 20 74 68  ntly check if th
2820: 65 20 74 61 72 67 65 74 20 73 65 72 76 65 72 20  e target server 
2830: 65 66 66 65 63 74 69 76 65 6c 79 20 73 75 70 70  effectively supp
2840: 6f 72 74 73 20 57 46 53 20 50 61 67 69 6e 67 3b  orts WFS Paging;
2850: 20 69 66 20 6e 6f 74 2c 20 61 6e 20 65 72 72 6f   if not, an erro
2860: 72 20 77 69 6c 6c 20 62 65 20 72 65 74 75 72 6e  r will be return
2870: 65 64 20 69 66 20 50 61 67 69 6e 67 20 77 61 73  ed if Paging was
2880: 20 65 78 70 6c 69 63 69 74 6c 79 20 73 70 65 63   explicitly spec
2890: 69 66 69 65 64 20 69 6e 20 74 68 65 20 75 73 65  ified in the use
28a0: 72 20 72 65 71 75 65 73 74 2e 0d 0a 3c 2f 74 64  r request...</td
28b0: 3e 3c 2f 74 72 3e 0d 0a 3c 2f 74 61 62 6c 65 3e  ></tr>..</table>
28c0: 0d 0a 3c 62 72 3e 3c 68 72 3e 0d 0a 3c 68 33 3e  ..<br><hr>..<h3>
28d0: 4c 6f 61 64 69 6e 67 20 57 46 53 20 64 61 74 61  Loading WFS data
28e0: 20 6f 6e 20 3c 62 3e 73 70 61 74 69 61 6c 69 74   on <b>spatialit
28f0: 65 3c 2f 62 3e 20 28 63 6f 6d 6d 61 6e 64 20 6c  e</b> (command l
2900: 69 6e 65 20 74 6f 6f 6c 29 3c 2f 68 33 3e 0d 0a  ine tool)</h3>..
2910: 3c 74 61 62 6c 65 20 77 69 64 74 68 3d 22 25 31  <table width="%1
2920: 30 30 22 20 62 6f 72 64 65 72 3d 22 31 22 20 63  00" border="1" c
2930: 65 6c 6c 73 70 61 63 69 6e 67 3d 22 36 22 20 63  ellspacing="6" c
2940: 65 6c 6c 70 61 64 64 69 6e 67 3d 22 36 22 3e 0d  ellpadding="6">.
2950: 0a 3c 74 72 3e 3c 74 64 3e 0d 0a 3c 69 6d 67 20  .<tr><td>..<img 
2960: 73 72 63 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77  src="https://www
2970: 2e 67 61 69 61 2d 67 69 73 2e 69 74 2f 67 61 69  .gaia-gis.it/gai
2980: 61 2d 73 69 6e 73 2f 77 66 73 2f 77 66 73 2d 63  a-sins/wfs/wfs-c
2990: 6c 69 2e 70 6e 67 22 20 61 6c 74 3d 22 77 66 73  li.png" alt="wfs
29a0: 2d 63 6c 69 22 20 62 6f 72 64 65 72 3d 22 31 22  -cli" border="1"
29b0: 3e 0d 0a 3c 2f 74 64 3e 3c 74 64 3e 3c 75 6c 3e  >..</td><td><ul>
29c0: 0d 0a 3c 6c 69 3e 6e 6f 74 20 72 65 61 6c 6c 79  ..<li>not really
29d0: 20 64 69 66 66 65 72 65 6e 74 20 66 72 6f 6d 20   different from 
29e0: 77 68 61 74 20 73 75 70 70 6f 72 74 65 64 20 62  what supported b
29f0: 79 20 74 68 65 20 47 55 49 20 74 6f 6f 6c 20 28  y the GUI tool (
2a00: 6e 6f 74 20 73 75 72 70 72 69 73 69 6e 67 6c 79  not surprisingly
2a10: 3a 20 74 68 65 20 75 6e 64 65 72 6c 61 79 69 6e  : the underlayin
2a20: 67 20 63 6f 64 65 20 69 73 20 65 78 61 63 74 6c  g code is exactl
2a30: 79 20 74 68 65 20 73 61 6d 65 20 66 6f 72 20 62  y the same for b
2a40: 6f 74 68 29 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e  oth).</li>..<li>
2a50: 74 68 65 20 6d 61 69 6e 20 64 69 66 66 65 72 65  the main differe
2a60: 6e 63 65 20 69 73 20 69 6e 20 74 68 61 74 20 74  nce is in that t
2a70: 68 65 20 43 4c 49 20 74 6f 6f 6c 20 61 62 73 6f  he CLI tool abso
2a80: 6c 75 74 65 6c 79 20 72 65 71 75 69 72 65 73 20  lutely requires 
2a90: 61 20 77 65 6c 6c 2d 66 6f 72 6d 65 64 20 28 68  a well-formed (h
2aa0: 61 6e 64 20 77 72 69 74 74 65 6e 29 20 3c 62 3e  and written) <b>
2ab0: 47 65 74 46 65 61 74 75 72 65 3c 2f 62 3e 20 72  GetFeature</b> r
2ac0: 65 71 75 65 73 74 20 55 52 4c 2e 3c 62 72 3e 0d  equest URL.<br>.
2ad0: 0a 41 6e 79 77 61 79 20 74 68 69 73 20 6f 66 66  .Anyway this off
2ae0: 65 72 73 20 61 20 6d 6f 72 65 20 66 6c 65 78 69  ers a more flexi
2af0: 62 6c 65 20 61 70 70 72 6f 61 63 68 2c 20 62 65  ble approach, be
2b00: 63 61 75 73 65 20 74 68 69 73 20 77 61 79 20 79  cause this way y
2b10: 6f 75 20 63 61 6e 20 74 61 6b 65 20 66 75 6c 6c  ou can take full
2b20: 20 70 72 6f 66 69 74 20 62 79 20 74 68 65 20 6d   profit by the m
2b30: 61 6e 79 20 70 6f 73 73 69 62 6c 65 20 6f 70 74  any possible opt
2b40: 69 6f 6e 73 20 73 75 70 70 6f 72 74 65 64 20 62  ions supported b
2b50: 79 20 57 46 53 20 28 65 2e 67 2e 20 66 69 6c 74  y WFS (e.g. filt
2b60: 65 72 69 6e 67 20 66 65 61 74 75 72 65 73 20 62  ering features b
2b70: 79 20 42 42 4f 58 20 6f 72 20 62 79 20 73 6f 6d  y BBOX or by som
2b80: 65 20 61 74 74 72 69 62 75 74 65 20 76 61 6c 75  e attribute valu
2b90: 65 20 61 6e 64 20 73 6f 20 6f 6e 29 2e 3c 2f 6c  e and so on).</l
2ba0: 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c 2f 74 64 3e  i>..</ul>..</td>
2bb0: 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 20 63  </tr>..<tr><td c
2bc0: 6f 6c 73 70 61 6e 3d 22 32 22 3e 0d 0a 3c 76 65  olspan="2">..<ve
2bd0: 72 62 61 74 69 6d 3e 0d 0a 2e 6c 6f 61 64 77 66  rbatim>...loadwf
2be0: 73 20 57 46 53 5f 70 61 74 68 5f 6f 72 5f 55 52  s WFS_path_or_UR
2bf0: 4c 20 6c 61 79 65 72 5f 6e 61 6d 65 20 74 61 62  L layer_name tab
2c00: 6c 65 5f 6e 61 6d 65 20 5b 70 6b 5f 63 6f 6c 75  le_name [pk_colu
2c10: 6d 6e 5d 20 5b 73 77 61 70 5d 20 5b 70 61 67 65  mn] [swap] [page
2c20: 5f 73 69 7a 65 5d 20 5b 77 69 74 68 5f 73 70 61  _size] [with_spa
2c30: 74 69 61 6c 5f 69 6e 64 65 78 5d 0d 0a 3c 2f 76  tial_index]..</v
2c40: 65 72 62 61 74 69 6d 3e 0d 0a 41 73 20 61 20 6d  erbatim>..As a m
2c50: 69 6e 69 6d 75 6d 20 79 6f 75 20 61 72 65 20 72  inimum you are r
2c60: 65 71 75 69 72 65 64 20 74 6f 20 69 6e 76 6f 6b  equired to invok
2c70: 65 20 3c 62 3e 2e 6c 6f 61 64 77 66 73 3c 2f 62  e <b>.loadwfs</b
2c80: 3e 20 62 79 20 73 70 65 63 69 66 79 69 6e 67 20  > by specifying 
2c90: 61 6c 6c 20 6d 61 6e 64 61 74 6f 72 79 20 61 72  all mandatory ar
2ca0: 67 75 6d 65 6e 74 73 3b 20 79 6f 75 20 63 61 6e  guments; you can
2cb0: 20 6f 70 74 69 6f 6e 61 6c 6c 79 20 73 65 74 20   optionally set 
2cc0: 61 6c 6c 20 74 68 65 20 6f 74 68 65 72 20 6f 70  all the other op
2cd0: 74 69 6f 6e 61 6c 20 61 72 67 75 6d 65 6e 74 73  tional arguments
2ce0: 20 28 72 65 73 70 65 63 74 69 6e 67 20 74 68 65   (respecting the
2cf0: 69 72 20 65 78 70 65 63 74 65 64 20 72 65 6c 61  ir expected rela
2d00: 74 69 76 65 20 6f 72 64 65 72 29 2e 0d 0a 3c 76  tive order)...<v
2d10: 65 72 62 61 74 69 6d 3e 0d 0a 2e 6c 6f 61 64 77  erbatim>...loadw
2d20: 66 73 20 68 74 74 70 3a 2f 2f 77 65 62 67 69 73  fs http://webgis
2d30: 2e 72 65 67 69 6f 6e 65 2e 73 61 72 64 65 67 6e  .regione.sardegn
2d40: 61 2e 69 74 2f 67 65 6f 73 65 72 76 65 72 2f 6f  a.it/geoserver/o
2d50: 77 73 3f 73 65 72 76 69 63 65 3d 57 46 53 26 72  ws?service=WFS&r
2d60: 65 71 75 65 73 74 3d 47 65 74 46 65 61 74 75 72  equest=GetFeatur
2d70: 65 26 74 79 70 65 4e 61 6d 65 3d 64 62 75 3a 41  e&typeName=dbu:A
2d80: 53 4c 20 5c 0d 0a 20 20 20 20 64 62 75 3a 41 53  SL \..    dbu:AS
2d90: 4c 20 61 73 6c 5f 73 61 72 64 65 67 6e 61 0d 0a  L asl_sardegna..
2da0: 3c 2f 76 65 72 62 61 74 69 6d 3e 0d 0a 54 68 65  </verbatim>..The
2db0: 20 61 62 6f 76 65 20 6d 69 6e 69 6d 61 6c 20 72   above minimal r
2dc0: 65 71 75 65 73 74 20 77 69 6c 6c 20 61 74 74 65  equest will atte
2dd0: 6d 70 74 20 74 6f 20 63 6f 6e 74 61 63 74 20 74  mpt to contact t
2de0: 68 65 20 73 70 65 63 69 66 69 65 64 20 55 52 4c  he specified URL
2df0: 20 61 6e 64 20 74 68 65 6e 20 64 6f 77 6e 6c 6f   and then downlo
2e00: 61 64 20 61 6c 6c 20 46 65 61 74 75 72 65 73 20  ad all Features 
2e10: 66 72 6f 6d 20 74 68 65 20 3c 62 3e 64 62 75 3a  from the <b>dbu:
2e20: 41 53 4c 3c 2f 62 3e 20 57 46 53 20 46 65 61 74  ASL</b> WFS Feat
2e30: 75 72 65 20 54 79 70 65 20 3c 69 3e 61 6b 61 3c  ure Type <i>aka<
2e40: 2f 69 3e 20 6c 61 79 65 72 2e 3c 62 72 3e 0d 0a  /i> layer.<br>..
2e50: 41 6c 6c 20 64 6f 77 6e 6c 6f 61 64 65 64 20 66  All downloaded f
2e60: 65 61 74 75 72 65 73 20 77 69 6c 6c 20 74 68 65  eatures will the
2e70: 6e 20 62 65 20 69 6e 73 65 72 74 65 64 20 69 6e  n be inserted in
2e80: 74 6f 20 61 20 44 42 20 74 61 62 6c 65 20 6e 61  to a DB table na
2e90: 6d 65 64 20 3c 62 3e 61 73 6c 5f 73 61 72 64 65  med <b>asl_sarde
2ea0: 67 6e 61 3c 2f 62 3e 2e 0d 0a 3c 76 65 72 62 61  gna</b>...<verba
2eb0: 74 69 6d 3e 0d 0a 2e 6c 6f 61 64 77 66 73 20 68  tim>...loadwfs h
2ec0: 74 74 70 3a 2f 2f 77 65 62 67 69 73 2e 72 65 67  ttp://webgis.reg
2ed0: 69 6f 6e 65 2e 73 61 72 64 65 67 6e 61 2e 69 74  ione.sardegna.it
2ee0: 2f 67 65 6f 73 65 72 76 65 72 2f 6f 77 73 3f 73  /geoserver/ows?s
2ef0: 65 72 76 69 63 65 3d 57 46 53 26 72 65 71 75 65  ervice=WFS&reque
2f00: 73 74 3d 47 65 74 46 65 61 74 75 72 65 26 74 79  st=GetFeature&ty
2f10: 70 65 4e 61 6d 65 3d 64 62 75 3a 44 42 54 43 4f  peName=dbu:DBTCO
2f20: 4d 55 4e 45 20 5c 0d 0a 20 20 20 20 64 62 75 3a  MUNE \..    dbu:
2f30: 44 42 54 43 4f 4d 55 4e 45 20 63 6f 6d 75 6e 69  DBTCOMUNE comuni
2f40: 5f 73 61 72 64 65 67 6e 61 20 44 42 54 43 4f 44  _sardegna DBTCOD
2f50: 49 43 45 49 53 54 41 54 20 6e 6f 20 31 35 20 79  ICEISTAT no 15 y
2f60: 65 73 0d 0a 3c 2f 76 65 72 62 61 74 69 6d 3e 0d  es..</verbatim>.
2f70: 0a 54 68 69 73 20 73 65 63 6f 6e 64 20 72 65 71  .This second req
2f80: 75 65 73 74 20 69 73 20 66 75 6c 6c 79 20 71 75  uest is fully qu
2f90: 61 6c 69 66 69 65 64 3a 20 74 68 65 20 73 65 6c  alified: the sel
2fa0: 65 63 74 65 64 20 57 46 53 20 46 65 61 74 75 72  ected WFS Featur
2fb0: 65 20 54 79 70 65 20 69 73 20 3c 62 3e 64 62 75  e Type is <b>dbu
2fc0: 3a 44 42 54 43 4f 4d 55 4e 45 3c 2f 62 3e 20 61  :DBTCOMUNE</b> a
2fd0: 6e 64 20 74 68 65 20 74 61 72 67 65 74 20 44 42  nd the target DB
2fe0: 20 74 61 62 6c 65 20 69 73 20 3c 62 3e 63 6f 6d   table is <b>com
2ff0: 75 6e 69 5f 73 61 72 64 65 67 6e 61 3c 2f 62 3e  uni_sardegna</b>
3000: 2e 3c 62 72 3e 0d 0a 54 68 69 73 20 74 61 62 6c  .<br>..This tabl
3010: 65 20 77 69 6c 6c 20 73 75 70 70 6f 72 74 20 61  e will support a
3020: 20 50 72 69 6d 61 72 79 20 4b 65 79 20 6e 61 6d   Primary Key nam
3030: 65 64 20 3c 62 3e 44 42 54 43 4f 44 49 43 45 49  ed <b>DBTCODICEI
3040: 53 54 41 54 3c 2f 62 3e 2c 20 63 6f 72 72 65 73  STAT</b>, corres
3050: 70 6f 6e 64 69 6e 67 20 74 6f 20 74 68 65 20 57  ponding to the W
3060: 46 53 20 61 74 74 72 69 62 75 74 65 20 6f 66 20  FS attribute of 
3070: 74 68 65 20 73 61 6d 65 20 6e 61 6d 65 2e 3c 62  the same name.<b
3080: 72 3e 0d 0a 41 78 65 73 20 61 72 65 20 65 78 70  r>..Axes are exp
3090: 65 63 74 65 64 20 74 6f 20 61 6c 72 65 61 64 79  ected to already
30a0: 20 62 65 20 69 6e 20 74 68 65 20 63 6f 72 72 65   be in the corre
30b0: 63 74 20 6f 72 64 65 72 20 28 3c 62 3e 6e 6f 20  ct order (<b>no 
30c0: 7c 20 73 77 61 70 20 7c 20 73 77 61 70 5f 61 78  | swap | swap_ax
30d0: 65 73 3c 2f 62 3e 29 2e 3c 62 72 3e 0d 0a 49 6e  es</b>).<br>..In
30e0: 20 74 68 69 73 20 63 61 73 65 20 57 46 53 20 50   this case WFS P
30f0: 61 67 69 6e 67 20 69 73 20 72 65 71 75 65 73 74  aging is request
3100: 65 64 20 62 79 20 73 70 65 63 69 66 79 69 6e 67  ed by specifying
3110: 20 61 20 70 61 67 65 20 73 69 7a 65 20 6f 66 20   a page size of 
3120: 3c 62 3e 31 35 3c 2f 62 3e 20 66 65 61 74 75 72  <b>15</b> featur
3130: 65 73 20 66 6f 72 20 65 61 63 68 20 70 61 67 65  es for each page
3140: 20 28 61 20 3c 62 3e 6e 65 67 61 74 69 76 65 3c   (a <b>negative<
3150: 2f 62 3e 20 6f 72 20 3c 62 3e 7a 65 72 6f 3c 2f  /b> or <b>zero</
3160: 62 3e 20 73 69 7a 65 20 6d 65 61 6e 73 20 64 69  b> size means di
3170: 73 61 62 6c 69 6e 67 20 57 46 53 20 50 61 67 69  sabling WFS Pagi
3180: 6e 67 20 61 74 20 61 6c 6c 29 2e 3c 62 72 3e 0d  ng at all).<br>.
3190: 0a 41 6e 64 20 66 69 6e 61 6c 6c 79 20 28 3c 62  .And finally (<b
31a0: 3e 79 65 73 3c 2f 62 3e 29 20 74 68 65 20 63 72  >yes</b>) the cr
31b0: 65 61 74 69 6f 6e 20 6f 66 20 61 20 3c 62 3e 53  eation of a <b>S
31c0: 70 61 74 69 61 6c 20 49 6e 64 65 78 3c 2f 62 3e  patial Index</b>
31d0: 20 73 75 70 70 6f 72 74 69 6e 67 20 74 68 65 20   supporting the 
31e0: 44 42 20 74 61 62 6c 65 20 69 73 20 72 65 71 75  DB table is requ
31f0: 65 73 74 65 64 2e 20 20 0d 0a 3c 2f 74 64 3e 3c  ested.  ..</td><
3200: 2f 74 72 3e 3c 2f 74 61 62 6c 65 3e 0d 0a 3c 68  /tr></table>..<h
3210: 72 3e 3c 62 72 3e 0d 0a 62 61 63 6b 20 74 6f 20  r><br>..back to 
3220: 3c 61 20 68 72 65 66 3d 22 68 74 74 70 73 3a 2f  <a href="https:/
3230: 2f 77 77 77 2e 67 61 69 61 2d 67 69 73 2e 69 74  /www.gaia-gis.it
3240: 2f 66 6f 73 73 69 6c 2f 6c 69 62 73 70 61 74 69  /fossil/libspati
3250: 61 6c 69 74 65 2f 77 69 6b 69 3f 6e 61 6d 65 3d  alite/wiki?name=
3260: 34 2e 31 2e 30 2d 64 6f 63 22 3e 34 2e 31 2e 30  4.1.0-doc">4.1.0
3270: 2d 64 6f 63 3c 2f 61 3e 0a 5a 20 66 32 32 30 64  -doc</a>.Z f220d
3280: 35 39 63 35 34 34 30 32 61 30 36 38 31 61 64 37  59c54402a0681ad7
3290: 35 39 34 63 64 39 36 34 33 33 61 0a              594cd96433a.