Hex Artifact Content
Not logged in

Artifact 49ca03ea630f3c48b886b388297e61eaf51150d0:

Wiki page [OSM tools] by sandro 2014-11-13 15:47:10.
0000: 44 20 32 30 31 34 2d 31 31 2d 31 33 54 31 35 3a  D 2014-11-13T15:
0010: 34 37 3a 31 30 2e 38 32 32 0a 4c 20 4f 53 4d 5c  47:10.822.L OSM\
0020: 73 74 6f 6f 6c 73 0a 50 20 33 65 35 62 32 38 37  stools.P 3e5b287
0030: 32 38 31 38 36 62 34 63 33 34 65 32 31 38 62 37  28186b4c34e218b7
0040: 64 32 31 33 37 33 65 33 66 66 61 63 32 32 64 34  d21373e3ffac22d4
0050: 31 0a 55 20 73 61 6e 64 72 6f 0a 57 20 38 31 31  1.U sandro.W 811
0060: 39 0a 3c 68 33 3e 46 65 77 20 62 61 73 69 63 20  9.<h3>Few basic 
0070: 6e 6f 74 69 63 65 73 20 79 6f 75 20 6d 75 73 74  notices you must
0080: 20 61 62 73 6f 6c 75 74 65 6c 79 20 6b 6e 6f 77   absolutely know
0090: 20 61 62 6f 75 74 20 4f 53 4d 20 64 61 74 61 73   about OSM datas
00a0: 65 74 73 3c 2f 68 33 3e 0d 0a 3c 61 20 68 72 65  ets</h3>..<a hre
00b0: 66 3d 22 68 74 74 70 3a 2f 2f 77 77 77 2e 6f 70  f="http://www.op
00c0: 65 6e 73 74 72 65 65 74 6d 61 70 2e 6f 72 67 2f  enstreetmap.org/
00d0: 22 3e 4f 70 65 6e 20 53 74 72 65 65 74 20 4d 61  ">Open Street Ma
00e0: 70 3c 2f 61 3e 20 28 3c 62 3e 4f 53 4d 3c 2f 62  p</a> (<b>OSM</b
00f0: 3e 29 20 69 73 20 61 20 63 6f 6d 6d 75 6e 69 74  >) is a communit
0100: 79 2d 64 72 69 76 65 6e 20 70 72 6f 6a 65 63 74  y-driven project
0110: 20 61 69 6d 65 64 20 74 6f 20 70 72 6f 64 75 63   aimed to produc
0120: 65 20 61 20 68 69 67 68 2d 71 75 61 6c 69 74 79  e a high-quality
0130: 20 64 65 74 61 69 6c 65 64 20 6d 61 70 20 6f 66   detailed map of
0140: 20 74 68 65 20 77 6f 72 6c 64 2e 3c 62 72 3e 0d   the world.<br>.
0150: 0a 4f 53 4d 20 64 61 74 61 73 65 74 73 20 61 72  .OSM datasets ar
0160: 65 20 66 72 65 65 6c 79 20 61 76 61 69 6c 61 62  e freely availab
0170: 6c 65 20 75 6e 64 65 72 20 74 68 65 20 3c 61 20  le under the <a 
0180: 68 72 65 66 3d 22 68 74 74 70 73 3a 2f 2f 62 6c  href="https://bl
0190: 6f 67 2e 6f 70 65 6e 73 74 72 65 65 74 6d 61 70  og.openstreetmap
01a0: 2e 6f 72 67 2f 32 30 31 32 2f 30 39 2f 31 32 2f  .org/2012/09/12/
01b0: 6f 70 65 6e 73 74 72 65 65 74 6d 61 70 2d 64 61  openstreetmap-da
01c0: 74 61 2d 6c 69 63 65 6e 73 65 2d 69 73 2d 6f 64  ta-license-is-od
01d0: 62 6c 2f 22 3e 4f 70 65 6e 20 44 61 74 61 62 61  bl/">Open Databa
01e0: 73 65 3c 2f 61 3e 20 6c 69 63 65 6e 73 65 20 74  se</a> license t
01f0: 65 72 6d 73 3a 20 74 77 6f 20 70 6f 70 75 6c 61  erms: two popula
0200: 72 20 64 6f 77 6e 6c 6f 61 64 20 73 69 74 65 73  r download sites
0210: 20 61 72 65 20 3c 61 20 68 72 65 66 3d 22 68 74   are <a href="ht
0220: 74 70 3a 2f 2f 77 77 77 2e 67 65 6f 66 61 62 72  tp://www.geofabr
0230: 69 6b 2e 64 65 2f 64 61 74 61 2f 64 6f 77 6e 6c  ik.de/data/downl
0240: 6f 61 64 2e 68 74 6d 6c 22 3e 47 65 6f 66 61 62  oad.html">Geofab
0250: 72 69 6b 3c 2f 61 3e 20 61 6e 64 20 3c 61 20 68  rik</a> and <a h
0260: 72 65 66 3d 22 68 74 74 70 3a 2f 2f 64 6f 77 6e  ref="http://down
0270: 6c 6f 61 64 73 2e 63 6c 6f 75 64 6d 61 64 65 2e  loads.cloudmade.
0280: 63 6f 6d 2f 22 3e 43 6c 6f 75 64 4d 61 64 65 3c  com/">CloudMade<
0290: 2f 61 3e 3c 62 72 3e 3c 62 72 3e 0d 0a 4f 53 4d  /a><br><br>..OSM
02a0: 20 61 64 6f 70 74 73 20 61 20 3c 69 3e 71 75 61   adopts a <i>qua
02b0: 73 69 2d 74 6f 70 6f 6c 6f 67 69 63 61 6c 3c 2f  si-topological</
02c0: 69 3e 20 64 61 74 61 20 6d 6f 64 65 6c 3a 20 6d  i> data model: m
02d0: 61 70 20 6f 62 6a 65 63 74 20 61 72 65 20 72 65  ap object are re
02e0: 70 72 65 73 65 6e 74 65 64 20 61 63 63 6f 72 64  presented accord
02f0: 69 6e 67 6c 79 20 74 6f 20 74 68 65 20 66 6f 6c  ingly to the fol
0300: 6c 6f 77 69 6e 67 20 6f 62 6a 65 63 74 20 68 69  lowing object hi
0310: 65 72 61 72 63 68 79 3a 3c 75 6c 3e 0d 0a 3c 6c  erarchy:<ul>..<l
0320: 69 3e 3c 62 3e 4e 6f 64 65 3c 2f 62 3e 3a 20 61  i><b>Node</b>: a
0330: 6e 20 4f 53 4d 2d 4e 6f 64 65 20 73 69 6d 70 6c  n OSM-Node simpl
0340: 79 20 63 6f 72 72 65 73 70 6f 6e 64 73 20 74 6f  y corresponds to
0350: 20 61 20 50 4f 49 4e 54 20 47 65 6f 6d 65 74 72   a POINT Geometr
0360: 79 3b 20 74 68 65 20 67 65 6f 67 72 61 70 68 69  y; the geographi
0370: 63 20 63 6f 6f 72 64 69 6e 61 74 65 73 20 61 72  c coordinates ar
0380: 65 20 61 6c 77 61 79 73 20 65 78 70 72 65 73 73  e always express
0390: 65 64 20 61 73 20 4c 6f 6e 67 69 74 75 64 65 20  ed as Longitude 
03a0: 61 6e 64 20 4c 61 74 69 74 75 64 65 20 28 74 68  and Latitude (th
03b0: 75 73 20 63 6f 72 72 65 73 70 6f 6e 64 69 6e 67  us corresponding
03c0: 20 74 6f 20 53 52 49 44 20 34 33 32 36 29 2e 3c   to SRID 4326).<
03d0: 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 57 61 79  /li>..<li><b>Way
03e0: 3c 2f 62 3e 3a 20 61 6e 20 4f 53 4d 2d 57 61 79  </b>: an OSM-Way
03f0: 20 63 6f 72 72 65 73 70 6f 6e 64 73 20 74 6f 20   corresponds to 
0400: 61 20 4c 49 4e 45 53 54 52 49 4e 47 20 47 65 6f  a LINESTRING Geo
0410: 6d 65 74 72 79 3a 20 61 6c 6c 20 70 6f 69 6e 74  metry: all point
0420: 73 20 72 65 70 72 65 73 65 6e 74 69 6e 67 20 74  s representing t
0430: 68 65 20 6c 69 6e 65 20 61 72 65 20 72 65 70 72  he line are repr
0440: 65 73 65 6e 74 65 64 20 62 79 20 69 6e 64 69 72  esented by indir
0450: 65 63 74 6c 79 20 72 65 66 65 72 65 6e 63 65 64  ectly referenced
0460: 20 4e 6f 64 65 73 2e 3c 2f 6c 69 3e 0d 0a 3c 6c   Nodes.</li>..<l
0470: 69 3e 3c 62 3e 52 65 6c 61 74 69 6f 6e 3c 2f 62  i><b>Relation</b
0480: 3e 3a 20 61 6e 20 4f 53 4d 2d 52 65 6c 61 74 69  >: an OSM-Relati
0490: 6f 6e 20 69 73 20 61 20 63 6f 6d 70 6c 65 78 20  on is a complex 
04a0: 6f 62 6a 65 63 74 2e 0d 0a 49 74 20 63 61 6e 20  object...It can 
04b0: 63 6f 72 72 65 73 70 6f 6e 64 20 74 6f 20 61 20  correspond to a 
04c0: 50 4f 4c 59 47 4f 4e 2c 20 74 6f 20 61 20 4d 55  POLYGON, to a MU
04d0: 4c 54 49 4c 49 4e 45 53 54 52 49 4e 47 2c 20 6f  LTILINESTRING, o
04e0: 72 20 65 76 65 6e 20 74 6f 20 61 20 20 47 45 4f  r even to a  GEO
04f0: 4d 45 54 52 59 43 4f 4c 4c 45 43 54 49 4f 4e 2e  METRYCOLLECTION.
0500: 3c 62 72 3e 0d 0a 41 6e 20 4f 53 4d 2d 52 65 6c  <br>..An OSM-Rel
0510: 61 74 69 6f 6e 20 6f 62 6a 65 63 74 20 63 61 6e  ation object can
0520: 20 69 6e 64 69 72 65 63 74 6c 79 20 72 65 66 65   indirectly refe
0530: 72 65 6e 63 65 20 61 6e 79 20 6f 74 68 65 72 20  rence any other 
0540: 6b 69 6e 64 20 6f 66 20 4f 53 4d 20 6f 62 6a 65  kind of OSM obje
0550: 63 74 73 3a 20 4e 6f 64 65 73 2c 20 57 61 79 73  cts: Nodes, Ways
0560: 20 6f 72 20 6f 74 68 65 72 20 52 65 6c 61 74 69   or other Relati
0570: 6f 6e 73 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e  ons.</li>..</ul>
0580: 3c 62 72 3e 0d 0a 41 6c 6c 20 4f 53 4d 20 6d 61  <br>..All OSM ma
0590: 70 20 6f 62 6a 65 63 74 73 20 63 61 6e 20 62 65  p objects can be
05a0: 20 65 76 65 6e 74 75 61 6c 6c 79 20 71 75 61 6c   eventually qual
05b0: 69 66 69 65 64 20 62 79 20 61 20 72 69 63 68 20  ified by a rich 
05c0: 73 65 74 20 6f 66 20 64 61 74 61 20 61 74 74 72  set of data attr
05d0: 69 62 75 74 65 73 3a 3c 75 6c 3e 0d 0a 3c 6c 69  ibutes:<ul>..<li
05e0: 3e 3c 62 3e 69 64 3c 2f 62 3e 3a 20 61 20 6e 75  ><b>id</b>: a nu
05f0: 6d 62 65 72 20 75 6e 69 71 75 65 6c 79 20 69 64  mber uniquely id
0600: 65 6e 74 69 66 79 69 6e 67 20 65 61 63 68 20 4f  entifying each O
0610: 53 4d 20 6d 61 70 20 6f 62 6a 65 63 74 2e 3c 2f  SM map object.</
0620: 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 76 65 72 73  li>..<li><b>vers
0630: 69 6f 6e 3c 2f 62 3e 3a 20 61 20 70 72 6f 67 72  ion</b>: a progr
0640: 65 73 73 69 76 65 20 6e 75 6d 62 65 72 20 69 64  essive number id
0650: 65 6e 74 69 66 79 69 6e 67 20 73 75 62 73 65 71  entifying subseq
0660: 75 65 6e 74 20 76 65 72 73 69 6f 6e 73 20 6f 66  uent versions of
0670: 20 74 68 65 20 73 61 6d 65 20 6f 62 6a 65 63 74   the same object
0680: 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 63  .</li>..<li><b>c
0690: 68 61 6e 67 65 73 65 74 3c 2f 62 3e 3a 20 61 20  hangeset</b>: a 
06a0: 70 72 6f 67 72 65 73 73 69 76 65 20 6e 75 6d 62  progressive numb
06b0: 65 72 20 69 64 65 6e 74 69 66 79 69 6e 67 20 61  er identifying a
06c0: 20 3c 69 3e 63 68 61 6e 67 65 73 65 74 3c 2f 69   <i>changeset</i
06d0: 3e 2c 20 69 2e 65 2e 20 61 20 62 61 74 63 68 20  >, i.e. a batch 
06e0: 69 6e 73 65 72 74 2f 75 70 64 61 74 65 20 70 65  insert/update pe
06f0: 72 66 6f 72 6d 65 64 20 62 79 20 73 61 6d 65 20  rformed by same 
0700: 75 73 65 72 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e  user.</li>..<li>
0710: 3c 62 3e 75 73 65 72 3c 2f 62 3e 3a 20 6e 69 63  <b>user</b>: nic
0720: 6b 6e 61 6d 65 20 6f 66 20 74 68 65 20 75 73 65  kname of the use
0730: 72 20 28 61 6b 61 20 3c 69 3e 6d 61 70 70 65 72  r (aka <i>mapper
0740: 3c 2f 69 3e 20 69 6e 20 4f 53 4d 20 70 61 72 6c  </i> in OSM parl
0750: 61 6e 63 65 29 20 63 6f 6d 6d 69 74 74 69 6e 67  ance) committing
0760: 20 74 68 65 20 63 68 61 6e 67 65 73 65 74 2e 3c   the changeset.<
0770: 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 75 69 64  /li>..<li><b>uid
0780: 3c 2f 62 3e 3a 20 61 20 6e 75 6d 62 65 72 20 75  </b>: a number u
0790: 6e 69 71 75 65 6c 79 20 69 64 65 6e 74 69 66 79  niquely identify
07a0: 69 6e 67 20 74 68 65 20 75 73 65 72 2e 3c 2f 6c  ing the user.</l
07b0: 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 74 69 6d 65 73  i>..<li><b>times
07c0: 74 65 6d 70 3c 2f 62 3e 3a 20 63 6f 6d 6d 69 74  temp</b>: commit
07d0: 20 64 61 74 65 2d 74 69 6d 65 3c 2f 6c 69 3e 0d   date-time</li>.
07e0: 0a 3c 6c 69 3e 41 6e 79 20 66 75 72 74 68 65 72  .<li>Any further
07f0: 20 61 72 62 69 74 72 61 72 79 20 64 61 74 61 20   arbitrary data 
0800: 61 74 74 72 69 62 75 74 65 20 63 6f 75 6c 64 20  attribute could 
0810: 62 65 20 66 72 65 65 6c 79 20 73 70 65 63 69 66  be freely specif
0820: 69 65 64 20 75 73 69 6e 67 20 61 20 3c 62 3e 74  ied using a <b>t
0830: 61 67 20 6c 69 73 74 3c 2f 62 3e 2c 20 69 2e 65  ag list</b>, i.e
0840: 2e 20 69 6e 63 6c 75 64 69 6e 67 20 61 20 3c 69  . including a <i
0850: 3e 3c 75 3e 64 69 63 74 69 6f 6e 61 72 79 3c 2f  ><u>dictionary</
0860: 75 3e 3c 2f 69 3e 20 62 61 73 65 64 20 6f 6e 20  u></i> based on 
0870: 3c 69 3e 3c 75 3e 6b 65 79 3a 76 61 6c 75 65 3c  <i><u>key:value<
0880: 2f 75 3e 3c 2f 69 3e 20 70 61 69 72 73 2e 3c 62  /u></i> pairs.<b
0890: 72 3e 0d 0a 41 20 73 74 61 6e 64 61 72 64 20 3c  r>..A standard <
08a0: 61 20 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f 77  a href="http://w
08b0: 69 6b 69 2e 6f 70 65 6e 73 74 72 65 65 74 6d 61  iki.openstreetma
08c0: 70 2e 6f 72 67 2f 77 69 6b 69 2f 4d 61 70 5f 46  p.org/wiki/Map_F
08d0: 65 61 74 75 72 65 73 22 3e 74 61 67 20 73 70 65  eatures">tag spe
08e0: 63 69 66 69 63 61 74 69 6f 6e 3c 2f 61 3e 20 65  cification</a> e
08f0: 78 69 73 74 73 2c 20 62 75 74 20 61 6e 79 77 61  xists, but anywa
0900: 79 20 74 68 69 73 20 6f 6e 65 20 69 73 20 62 79  y this one is by
0910: 20 64 65 66 69 6e 69 74 69 6f 6e 20 61 20 76 61   definition a va
0920: 72 69 61 62 6c 65 20 6c 69 73 74 3a 20 65 61 63  riable list: eac
0930: 68 20 73 69 6e 67 6c 65 20 6d 61 70 70 65 72 20  h single mapper 
0940: 63 61 6e 20 66 72 65 65 6c 79 20 61 64 64 20 66  can freely add f
0950: 75 72 74 68 65 72 20 74 61 67 73 20 61 63 63 6f  urther tags acco
0960: 72 64 69 6e 67 6c 79 20 74 6f 20 68 69 73 2f 68  rdingly to his/h
0970: 65 72 20 70 65 72 73 6f 6e 61 6c 20 74 61 73 74  er personal tast
0980: 65 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 3c 62  e.</li>..</ul><b
0990: 72 3e 0d 0a 55 73 75 61 6c 6c 79 20 4f 53 4d 20  r>..Usually OSM 
09a0: 64 61 74 61 73 65 74 73 20 61 72 65 20 72 65 6c  datasets are rel
09b0: 65 61 73 65 64 20 61 73 20 58 4d 4c 20 66 69 6c  eased as XML fil
09c0: 65 3a 20 73 6f 20 74 68 65 20 66 6f 6c 6c 6f 77  e: so the follow
09d0: 69 6e 67 20 58 4d 4c 20 73 6e 69 70 70 65 74 20  ing XML snippet 
09e0: 77 69 6c 6c 20 70 72 6f 62 61 62 6c 79 20 68 65  will probably he
09f0: 6c 70 20 79 6f 75 20 74 6f 20 62 65 74 74 65 72  lp you to better
0a00: 20 75 6e 64 65 72 73 74 61 6e 64 20 74 68 65 20   understand the 
0a10: 67 65 6e 65 72 61 6c 20 4f 53 4d 20 64 61 74 61  general OSM data
0a20: 20 6d 6f 64 65 6c 3a 0d 0a 3c 74 61 62 6c 65 20   model:..<table 
0a30: 62 6f 72 64 65 72 3d 22 31 22 3e 3c 74 72 3e 3c  border="1"><tr><
0a40: 74 64 3e 3c 76 65 72 62 61 74 69 6d 3e 0d 0a 3c  td><verbatim>..<
0a50: 6e 6f 64 65 20 69 64 3d 22 31 30 30 31 22 20 6c  node id="1001" l
0a60: 61 74 3d 22 36 2e 36 22 20 6c 6f 6e 3d 22 37 2e  at="6.6" lon="7.
0a70: 37 22 20 76 65 72 73 69 6f 6e 3d 22 31 22 20 63  7" version="1" c
0a80: 68 61 6e 67 65 73 65 74 3d 22 32 22 20 75 73 65  hangeset="2" use
0a90: 72 3d 22 65 74 61 22 20 75 69 64 3d 22 36 22 20  r="eta" uid="6" 
0aa0: 74 69 6d 65 73 74 61 6d 70 3d 22 32 30 30 35 2d  timestamp="2005-
0ab0: 30 32 2d 32 38 54 31 37 3a 34 35 3a 31 35 5a 22  02-28T17:45:15Z"
0ac0: 3e 0d 0a 20 20 20 20 3c 74 61 67 20 6b 65 79 3d  >..    <tag key=
0ad0: 22 63 72 65 61 74 65 64 5f 62 79 22 20 76 61 6c  "created_by" val
0ae0: 75 65 3d 22 4a 4f 53 4d 22 20 2f 3e 0d 0a 20 20  ue="JOSM" />..  
0af0: 20 20 3c 74 61 67 20 6b 65 79 3d 22 74 6f 75 72    <tag key="tour
0b00: 69 73 6d 22 20 76 61 6c 75 65 3d 22 63 61 6d 70  ism" value="camp
0b10: 5f 73 69 74 65 22 20 2f 3e 0d 0a 3c 2f 6e 6f 64  _site" />..</nod
0b20: 65 3e 0d 0a 3c 77 61 79 20 69 64 3d 22 35 30 30  e>..<way id="500
0b30: 30 22 20 76 65 72 73 69 6f 6e 3d 22 31 22 20 63  0" version="1" c
0b40: 68 61 6e 67 65 73 65 74 3d 22 32 22 20 75 73 65  hangeset="2" use
0b50: 72 3d 22 65 74 61 22 20 75 69 64 3d 22 36 22 20  r="eta" uid="6" 
0b60: 74 69 6d 65 73 74 61 6d 70 3d 22 32 30 30 35 2d  timestamp="2005-
0b70: 30 32 2d 32 38 54 31 37 3a 34 35 3a 31 35 5a 22  02-28T17:45:15Z"
0b80: 3e 0d 0a 20 20 20 20 3c 6e 64 20 72 65 66 3d 22  >..    <nd ref="
0b90: 31 30 30 31 22 20 2f 3e 0d 0a 20 20 20 20 3c 6e  1001" />..    <n
0ba0: 64 20 72 65 66 3d 22 31 30 30 32 22 20 2f 3e 0d  d ref="1002" />.
0bb0: 0a 20 20 20 20 3c 6e 64 20 72 65 66 3d 22 31 30  .    <nd ref="10
0bc0: 30 33 22 20 2f 3e 0d 0a 20 20 20 20 3c 74 61 67  03" />..    <tag
0bd0: 20 6b 65 79 3d 22 63 72 65 61 74 65 64 5f 62 79   key="created_by
0be0: 22 20 76 61 6c 75 65 3d 22 4a 4f 53 4d 22 20 2f  " value="JOSM" /
0bf0: 3e 0d 0a 20 20 20 20 3c 74 61 67 20 6b 65 79 3d  >..    <tag key=
0c00: 22 74 6f 75 72 69 73 6d 22 20 76 61 6c 75 65 3d  "tourism" value=
0c10: 22 63 61 6d 70 5f 73 69 74 65 22 20 2f 3e 0d 0a  "camp_site" />..
0c20: 3c 2f 77 61 79 3e 0d 0a 3c 72 65 6c 61 74 69 6f  </way>..<relatio
0c30: 6e 20 69 64 3d 22 39 30 30 30 22 20 76 65 72 73  n id="9000" vers
0c40: 69 6f 6e 3d 22 31 22 20 63 68 61 6e 67 65 73 65  ion="1" changese
0c50: 74 3d 22 32 22 20 75 73 65 72 3d 22 65 74 61 22  t="2" user="eta"
0c60: 20 75 69 64 3d 22 36 22 20 74 69 6d 65 73 74 61   uid="6" timesta
0c70: 6d 70 3d 22 32 30 30 35 2d 30 32 2d 32 38 54 31  mp="2005-02-28T1
0c80: 37 3a 34 35 3a 31 35 5a 22 3e 0d 0a 20 20 20 20  7:45:15Z">..    
0c90: 3c 6d 65 6d 62 65 72 20 74 79 70 65 3d 22 77 61  <member type="wa
0ca0: 79 22 20 72 65 66 3d 22 35 30 30 30 22 20 72 6f  y" ref="5000" ro
0cb0: 6c 65 3d 22 6f 75 74 65 72 22 20 2f 3e 0d 0a 20  le="outer" />.. 
0cc0: 20 20 20 3c 6d 65 6d 62 65 72 20 74 79 70 65 3d     <member type=
0cd0: 22 77 61 79 22 20 72 65 66 3d 22 35 30 30 31 22  "way" ref="5001"
0ce0: 20 72 6f 6c 65 3d 22 69 6e 6e 65 72 22 20 2f 3e   role="inner" />
0cf0: 0d 0a 20 20 20 20 3c 74 61 67 20 6b 65 79 3d 22  ..    <tag key="
0d00: 63 72 65 61 74 65 64 5f 62 79 22 20 76 61 6c 75  created_by" valu
0d10: 65 3d 22 4a 4f 53 4d 22 20 2f 3e 0d 0a 20 20 20  e="JOSM" />..   
0d20: 20 3c 74 61 67 20 6b 65 79 3d 22 74 6f 75 72 69   <tag key="touri
0d30: 73 6d 22 20 76 61 6c 75 65 3d 22 63 61 6d 70 5f  sm" value="camp_
0d40: 73 69 74 65 22 20 2f 3e 0d 0a 3c 72 65 6c 61 74  site" />..<relat
0d50: 69 6f 6e 3e 0d 0a 3c 2f 76 65 72 62 61 74 69 6d  ion>..</verbatim
0d60: 3e 3c 2f 74 64 3e 3c 2f 74 72 3e 3c 2f 74 61 62  ></td></tr></tab
0d70: 6c 65 3e 3c 62 72 3e 0d 0a 55 73 75 61 6c 6c 79  le><br>..Usually
0d80: 20 4f 53 4d 20 64 61 74 61 73 65 74 73 20 63 61   OSM datasets ca
0d90: 6e 20 62 65 20 64 6f 77 6e 6c 6f 61 64 65 64 20  n be downloaded 
0da0: 69 6e 20 74 77 6f 20 64 69 66 66 65 72 65 6e 74  in two different
0db0: 20 66 6f 72 6d 61 74 73 3a 3c 75 6c 3e 0d 0a 3c   formats:<ul>..<
0dc0: 6c 69 3e 4f 53 4d 20 66 69 6c 65 73 20 69 64 65  li>OSM files ide
0dd0: 6e 74 69 66 69 65 64 20 62 79 20 74 68 65 20 3c  ntified by the <
0de0: 62 3e 3c 69 3e 2e 6f 73 6d 3c 2f 69 3e 3c 2f 62  b><i>.osm</i></b
0df0: 3e 20 73 75 66 66 69 78 20 61 72 65 20 58 4d 4c  > suffix are XML
0e00: 20 66 69 6c 65 73 3a 20 74 68 65 79 20 61 72 65   files: they are
0e10: 20 6f 66 74 65 6e 20 73 68 69 70 70 65 64 20 61   often shipped a
0e20: 73 20 68 69 67 68 6c 79 20 63 6f 6d 70 72 65 73  s highly compres
0e30: 73 65 64 20 66 69 6c 65 73 2c 20 61 6e 64 20 69  sed files, and i
0e40: 6e 20 74 68 69 73 20 63 61 73 65 20 74 68 65 79  n this case they
0e50: 20 61 72 65 20 69 64 65 6e 74 69 66 69 65 64 20   are identified 
0e60: 62 79 20 74 68 65 20 3c 69 3e 3c 62 3e 2e 6f 73  by the <i><b>.os
0e70: 6d 2e 62 7a 32 3c 2f 62 3e 3c 2f 69 3e 20 73 75  m.bz2</b></i> su
0e80: 66 66 69 78 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e  ffix.</li>..<li>
0e90: 54 68 65 20 61 6c 74 65 72 6e 61 74 69 76 65 20  The alternative 
0ea0: 4f 53 4d 2d 70 72 6f 74 6f 62 75 66 20 66 6f 72  OSM-protobuf for
0eb0: 6d 61 74 20 69 73 20 69 64 65 6e 74 69 66 69 65  mat is identifie
0ec0: 64 20 62 79 20 74 68 65 20 3c 62 3e 3c 69 3e 2e  d by the <b><i>.
0ed0: 70 62 66 3c 2f 69 3e 3c 2f 62 3e 20 6f 72 20 3c  pbf</i></b> or <
0ee0: 62 3e 3c 69 3e 2e 6f 73 6d 2e 70 62 66 3c 2f 69  b><i>.osm.pbf</i
0ef0: 3e 3c 2f 62 3e 20 73 75 66 66 69 78 2e 3c 62 72  ></b> suffix.<br
0f00: 3e 0d 0a 54 68 69 73 20 66 6f 72 6d 61 74 20 69  >..This format i
0f10: 73 20 6d 75 63 68 20 6d 6f 72 65 20 63 6f 6d 70  s much more comp
0f20: 61 63 74 20 74 68 61 6e 20 58 4d 4c 20 28 73 6d  act than XML (sm
0f30: 61 6c 6c 65 72 20 73 69 7a 65 29 2c 20 61 6e 64  aller size), and
0f40: 20 6e 6f 20 70 72 65 6c 69 6d 69 6e 61 72 79 20   no preliminary 
0f50: 64 65 63 6f 6d 70 72 65 73 73 69 6f 6e 20 69 73  decompression is
0f60: 20 72 65 71 75 69 72 65 64 2e 3c 2f 6c 69 3e 0d   required.</li>.
0f70: 0a 3c 6c 69 3e 41 6c 6c 20 53 70 61 74 69 61 4c  .<li>All SpatiaL
0f80: 69 74 65 20 74 6f 6f 6c 73 20 73 75 70 70 6f 72  ite tools suppor
0f90: 74 69 6e 67 20 4f 53 4d 20 63 61 6e 20 69 6e 64  ting OSM can ind
0fa0: 69 66 66 65 72 65 6e 63 74 6c 79 20 70 61 72 73  ifferenctly pars
0fb0: 65 20 62 6f 74 68 20 66 6f 72 6d 61 74 73 20 69  e both formats i
0fc0: 6e 64 69 66 66 65 72 65 6e 63 74 6c 79 20 28 74  ndifferenctly (t
0fd0: 68 61 6e 6b 73 20 74 6f 20 3c 62 3e 3c 69 3e 72  hanks to <b><i>r
0fe0: 65 61 64 6f 73 6d 3c 2f 69 3e 3c 2f 62 3e 20 73  eadosm</i></b> s
0ff0: 75 70 70 6f 72 74 29 2e 3c 2f 6c 69 3e 0d 0a 3c  upport).</li>..<
1000: 2f 75 6c 3e 0d 0a 3c 68 33 3e 73 70 61 74 69 61  /ul>..<h3>spatia
1010: 6c 69 74 65 5f 6f 73 6d 5f 6d 61 70 3c 2f 68 33  lite_osm_map</h3
1020: 3e 0d 0a 54 68 69 73 20 74 6f 6f 6c 20 69 73 20  >..This tool is 
1030: 69 6e 74 65 6e 64 65 64 20 74 6f 20 70 61 72 73  intended to pars
1040: 65 20 61 20 77 68 6f 6c 65 20 4f 53 4d 20 64 61  e a whole OSM da
1050: 74 61 73 65 74 2c 20 74 68 75 73 20 63 72 65 61  taset, thus crea
1060: 74 69 6e 67 20 74 68 65 20 63 6f 72 72 65 73 70  ting the corresp
1070: 6f 6e 64 69 6e 67 20 53 70 61 74 69 61 4c 69 74  onding SpatiaLit
1080: 65 27 73 20 44 42 2d 66 69 6c 65 2e 3c 62 72 3e  e's DB-file.<br>
1090: 0d 0a 47 65 6f 6d 65 74 72 69 65 73 20 61 72 65  ..Geometries are
10a0: 20 72 65 61 73 73 65 6d 62 6c 65 64 20 69 6e 20   reassembled in 
10b0: 74 68 65 20 63 61 6e 6f 6e 69 63 61 6c 20 66 6f  the canonical fo
10c0: 72 6d 20 6f 66 20 50 4f 49 4e 54 73 2c 20 4c 49  rm of POINTs, LI
10d0: 4e 45 53 54 52 49 4e 47 73 20 61 6e 64 20 50 4f  NESTRINGs and PO
10e0: 4c 59 47 4f 4e 73 2e 3c 62 72 3e 0d 0a 4d 61 70  LYGONs.<br>..Map
10f0: 73 20 6f 62 6a 65 63 74 73 20 61 72 65 20 74 68  s objects are th
1100: 65 6e 20 61 67 67 72 65 67 61 74 65 64 20 62 79  en aggregated by
1110: 20 64 69 73 74 69 6e 63 74 20 6f 6d 6f 67 65 6e   distinct omogen
1120: 65 6f 75 73 20 3c 75 3e 3c 69 3e 6c 61 79 65 72  eous <u><i>layer
1130: 73 3c 2f 69 3e 3c 2f 75 3e 20 28 61 6b 61 20 3c  s</i></u> (aka <
1140: 75 3e 3c 69 3e 74 61 62 6c 65 73 3c 2f 69 3e 3c  u><i>tables</i><
1150: 2f 75 3e 20 69 6e 20 44 42 4d 53 20 70 61 72 6c  /u> in DBMS parl
1160: 61 6e 63 65 29 20 61 63 63 6f 72 64 69 6e 67 6c  ance) accordingl
1170: 79 20 74 6f 20 64 65 63 6c 61 72 65 64 20 3c 62  y to declared <b
1180: 3e 3c 69 3e 74 61 67 73 3c 2f 69 3e 3c 2f 62 3e  ><i>tags</i></b>
1190: 2e 3c 62 72 3e 0d 0a 54 68 65 20 69 6e 74 65 6e  .<br>..The inten
11a0: 64 65 64 20 67 6f 61 6c 20 6f 66 20 74 68 69 73  ded goal of this
11b0: 20 74 6f 6f 6c 20 69 73 20 74 68 65 20 6f 6e 65   tool is the one
11c0: 20 74 6f 20 70 72 6f 64 75 63 65 20 61 20 44 42   to produce a DB
11d0: 2d 66 69 6c 65 20 73 75 69 74 65 64 20 74 6f 20  -file suited to 
11e0: 62 65 20 69 6d 6d 65 64 69 61 74 65 6c 79 20 75  be immediately u
11f0: 73 65 64 20 77 69 74 68 20 73 6f 6d 65 20 61 70  sed with some ap
1200: 70 72 6f 70 72 69 61 74 65 20 47 49 53 20 61 70  propriate GIS ap
1210: 70 6c 69 63 61 74 69 6f 6e 20 28 65 2e 67 2e 20  plication (e.g. 
1220: 3c 62 3e 51 47 49 53 3c 2f 62 3e 29 2e 3c 62 72  <b>QGIS</b>).<br
1230: 3e 0d 0a 57 61 6e 74 20 74 6f 20 6c 65 61 72 6e  >..Want to learn
1240: 20 6d 6f 72 65 20 3f 20 72 65 61 64 20 61 20 70   more ? read a p
1250: 72 61 63 74 69 63 61 6c 20 3c 61 20 68 72 65 66  ractical <a href
1260: 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 67 61  ="https://www.ga
1270: 69 61 2d 67 69 73 2e 69 74 2f 66 6f 73 73 69 6c  ia-gis.it/fossil
1280: 2f 73 70 61 74 69 61 6c 69 74 65 2d 74 6f 6f 6c  /spatialite-tool
1290: 73 2f 77 69 6b 69 3f 6e 61 6d 65 3d 73 70 61 74  s/wiki?name=spat
12a0: 69 61 6c 69 74 65 5f 6f 73 6d 5f 6d 61 70 22 3e  ialite_osm_map">
12b0: 65 78 61 6d 70 6c 65 3c 2f 61 3e 0d 0a 3c 68 33  example</a>..<h3
12c0: 3e 73 70 61 74 69 61 6c 69 74 65 5f 6f 73 6d 5f  >spatialite_osm_
12d0: 72 61 77 3c 2f 68 33 3e 0d 0a 41 6c 73 6f 20 74  raw</h3>..Also t
12e0: 68 69 73 20 74 6f 6f 6c 20 69 73 20 69 6e 74 65  his tool is inte
12f0: 6e 64 65 64 20 74 6f 20 70 61 72 73 65 20 61 20  nded to parse a 
1300: 77 68 6f 6c 65 20 4f 53 4d 20 64 61 74 61 73 65  whole OSM datase
1310: 74 2c 20 74 68 75 73 20 63 72 65 61 74 69 6e 67  t, thus creating
1320: 20 74 68 65 20 63 6f 72 72 65 73 70 6f 6e 64 69   the correspondi
1330: 6e 67 20 53 70 61 74 69 61 4c 69 74 65 27 73 20  ng SpatiaLite's 
1340: 44 42 2d 66 69 6c 65 3b 20 62 75 74 20 69 6e 20  DB-file; but in 
1350: 74 68 69 73 20 63 61 73 65 20 74 68 65 20 67 65  this case the ge
1360: 6e 65 72 61 74 65 64 20 44 42 2d 66 69 6c 65 20  nerated DB-file 
1370: 77 69 6c 6c 20 61 64 6f 70 74 20 61 20 63 6f 6d  will adopt a com
1380: 70 6c 65 74 65 6c 79 20 64 69 66 66 65 72 65 6e  pletely differen
1390: 74 20 64 61 74 61 20 6c 61 79 6f 75 74 20 74 68  t data layout th
13a0: 61 6e 20 69 6e 20 74 68 65 20 70 72 65 76 69 6f  an in the previo
13b0: 75 73 20 73 63 65 6e 61 72 69 6f 2e 3c 62 72 3e  us scenario.<br>
13c0: 0d 0a 49 6e 20 74 68 69 73 20 63 61 73 65 20 77  ..In this case w
13d0: 69 6c 6c 20 62 65 20 61 64 6f 70 74 65 64 20 61  ill be adopted a
13e0: 20 64 61 74 61 20 6c 61 79 6f 75 74 20 63 6c 6f   data layout clo
13f0: 73 65 6c 79 20 6d 61 70 70 69 6e 67 20 4f 53 4d  sely mapping OSM
1400: 20 6f 62 6a 65 63 74 73 2c 20 74 68 65 69 72 20   objects, their 
1410: 64 61 74 61 20 61 74 74 72 69 62 75 74 65 73 20  data attributes 
1420: 61 6e 64 20 74 68 65 69 72 20 6d 75 74 75 61 6c  and their mutual
1430: 20 72 65 6c 61 74 69 6f 6e 73 68 69 70 73 3b 20   relationships; 
1440: 66 75 6c 6c 79 20 70 72 65 73 65 72 76 69 6e 67  fully preserving
1450: 20 74 68 65 20 6f 72 69 67 69 6e 61 6c 20 4f 53   the original OS
1460: 4d 20 64 61 74 61 20 6d 6f 64 65 6c 2c 20 61 6e  M data model, an
1470: 64 20 63 61 72 65 66 75 6c 6c 79 20 61 76 6f 69  d carefully avoi
1480: 64 69 6e 67 20 74 6f 20 69 6e 74 72 6f 64 75 63  ding to introduc
1490: 65 20 61 6e 79 20 75 6e 70 6c 65 61 73 61 6e 74  e any unpleasant
14a0: 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 73 75 70   information sup
14b0: 70 72 65 73 73 69 6f 6e 2e 3c 62 72 3e 0d 0a 54  pression.<br>..T
14c0: 68 65 20 69 6e 74 65 6e 64 65 64 20 67 6f 61 6c  he intended goal
14d0: 20 6f 66 20 74 68 69 73 20 74 6f 6f 6c 20 69 73   of this tool is
14e0: 20 6e 6f 74 20 61 74 20 61 6c 6c 20 74 6f 20 70   not at all to p
14f0: 72 6f 64 75 63 65 20 61 20 44 42 2d 66 69 6c 65  roduce a DB-file
1500: 20 75 73 61 62 6c 65 20 62 79 20 47 49 53 20 61   usable by GIS a
1510: 70 70 6c 69 63 61 74 69 6f 6e 73 3a 20 69 74 27  pplications: it'
1520: 73 20 69 6e 73 74 65 61 64 20 74 68 65 20 6f 6e  s instead the on
1530: 65 20 74 6f 20 67 65 74 20 61 20 44 42 2d 66 69  e to get a DB-fi
1540: 6c 65 20 79 6f 75 20 63 61 6e 20 75 73 65 20 69  le you can use i
1550: 6e 20 6f 72 64 65 72 20 74 6f 20 67 61 74 68 65  n order to gathe
1560: 72 20 73 74 61 74 69 73 74 69 63 61 6c 20 69 6e  r statistical in
1570: 66 6f 73 2c 20 74 6f 20 73 75 70 70 6f 72 74 20  fos, to support 
1580: 73 6f 6d 65 20 70 6f 73 74 2d 70 72 6f 63 65 73  some post-proces
1590: 73 69 6e 67 20 74 61 73 6b 20 61 6e 64 20 73 6f  sing task and so
15a0: 20 6f 6e 2e 3c 62 72 3e 0d 0a 57 61 6e 74 20 74   on.<br>..Want t
15b0: 6f 20 6c 65 61 72 6e 20 6d 6f 72 65 20 3f 20 72  o learn more ? r
15c0: 65 61 64 20 61 20 70 72 61 63 74 69 63 61 6c 20  ead a practical 
15d0: 3c 61 20 68 72 65 66 3d 22 68 74 74 70 73 3a 2f  <a href="https:/
15e0: 2f 77 77 77 2e 67 61 69 61 2d 67 69 73 2e 69 74  /www.gaia-gis.it
15f0: 2f 66 6f 73 73 69 6c 2f 73 70 61 74 69 61 6c 69  /fossil/spatiali
1600: 74 65 2d 74 6f 6f 6c 73 2f 77 69 6b 69 3f 6e 61  te-tools/wiki?na
1610: 6d 65 3d 73 70 61 74 69 61 6c 69 74 65 5f 6f 73  me=spatialite_os
1620: 6d 5f 72 61 77 22 3e 65 78 61 6d 70 6c 65 3c 2f  m_raw">example</
1630: 61 3e 0d 0a 3c 68 33 3e 73 70 61 74 69 61 6c 69  a>..<h3>spatiali
1640: 74 65 5f 6f 73 6d 5f 66 69 6c 74 65 72 3c 2f 68  te_osm_filter</h
1650: 33 3e 0d 0a 54 68 69 73 20 74 6f 6f 6c 20 77 6f  3>..This tool wo
1660: 72 6b 73 20 74 68 65 20 6f 70 70 6f 73 69 74 65  rks the opposite
1670: 20 77 61 79 3a 20 61 20 44 42 2d 66 69 6c 65 20   way: a DB-file 
1680: 28 6f 6e 65 20 70 72 65 76 69 6f 75 73 6c 79 20  (one previously 
1690: 63 72 65 61 74 65 64 20 62 79 20 3c 62 3e 3c 69  created by <b><i
16a0: 3e 73 70 61 74 69 61 6c 69 74 65 5f 6f 73 6d 5f  >spatialite_osm_
16b0: 72 61 77 3c 2f 69 3e 3c 2f 62 3e 29 20 77 69 6c  raw</i></b>) wil
16c0: 6c 20 62 65 20 70 72 6f 63 65 73 73 65 64 20 73  l be processed s
16d0: 6f 20 74 6f 20 63 72 65 61 74 65 20 61 6e 20 4f  o to create an O
16e0: 53 4d 2d 58 4d 4c 20 66 69 6c 65 2e 3c 62 72 3e  SM-XML file.<br>
16f0: 0d 0a 41 20 3c 69 3e 3c 75 3e 6d 61 73 6b 3c 2f  ..A <i><u>mask</
1700: 75 3e 3c 2f 69 3e 20 28 69 2e 65 2e 20 61 6e 20  u></i> (i.e. an 
1710: 61 72 62 69 74 72 61 72 79 20 70 6f 6c 79 67 6f  arbitrary polygo
1720: 6e 61 6c 20 73 68 61 70 65 29 20 77 69 6c 6c 20  nal shape) will 
1730: 62 65 20 75 73 65 64 20 69 6e 20 6f 72 64 65 72  be used in order
1740: 20 74 6f 20 3c 69 3e 3c 75 3e 73 70 61 74 69 61   to <i><u>spatia
1750: 6c 6c 79 20 66 69 6c 74 65 72 3c 2f 75 3e 3c 2f  lly filter</u></
1760: 69 3e 20 74 68 65 20 6d 61 70 20 6f 62 6a 65 63  i> the map objec
1770: 74 73 20 74 6f 20 62 65 20 69 6e 73 65 72 74 65  ts to be inserte
1780: 64 20 69 6e 74 6f 20 74 68 65 20 6f 75 74 70 75  d into the outpu
1790: 74 20 66 69 6c 65 2e 20 41 6e 79 20 6d 61 70 20  t file. Any map 
17a0: 6f 62 6a 65 63 74 20 66 75 6c 6c 79 20 6f 72 20  object fully or 
17b0: 70 61 72 74 69 61 6c 6c 79 20 6f 76 65 72 6c 61  partially overla
17c0: 70 70 69 6e 67 20 74 68 65 20 67 69 76 65 6e 20  pping the given 
17d0: 6d 61 73 6b 20 77 69 6c 6c 20 62 65 20 65 78 70  mask will be exp
17e0: 6f 72 74 65 64 3b 20 61 6e 79 20 6f 74 68 65 72  orted; any other
17f0: 20 6f 62 6a 65 63 74 20 77 69 6c 6c 20 62 65 20   object will be 
1800: 73 69 6c 65 6e 74 6c 79 20 69 67 6e 6f 72 65 64  silently ignored
1810: 2e 3c 62 72 3e 0d 0a 54 68 65 20 69 6e 74 65 6e  .<br>..The inten
1820: 64 65 64 20 67 6f 61 6c 20 6f 66 20 74 68 69 73  ded goal of this
1830: 20 74 6f 6f 6c 20 69 73 20 74 68 65 20 6f 6e 65   tool is the one
1840: 20 74 6f 20 70 72 6f 64 75 63 65 20 73 65 6c 65   to produce sele
1850: 63 74 65 64 20 64 61 74 61 73 65 74 73 2c 20 74  cted datasets, t
1860: 6f 20 62 65 20 66 75 72 74 68 65 72 20 70 72 6f  o be further pro
1870: 63 65 73 73 65 64 2e 3c 62 72 3e 0d 0a 57 61 6e  cessed.<br>..Wan
1880: 74 20 74 6f 20 6c 65 61 72 6e 20 6d 6f 72 65 20  t to learn more 
1890: 3f 20 72 65 61 64 20 61 20 70 72 61 63 74 69 63  ? read a practic
18a0: 61 6c 20 3c 61 20 68 72 65 66 3d 22 68 74 74 70  al <a href="http
18b0: 73 3a 2f 2f 77 77 77 2e 67 61 69 61 2d 67 69 73  s://www.gaia-gis
18c0: 2e 69 74 2f 66 6f 73 73 69 6c 2f 73 70 61 74 69  .it/fossil/spati
18d0: 61 6c 69 74 65 2d 74 6f 6f 6c 73 2f 77 69 6b 69  alite-tools/wiki
18e0: 3f 6e 61 6d 65 3d 73 70 61 74 69 61 6c 69 74 65  ?name=spatialite
18f0: 5f 6f 73 6d 5f 66 69 6c 74 65 72 22 3e 65 78 61  _osm_filter">exa
1900: 6d 70 6c 65 3c 2f 61 3e 0d 0a 3c 68 33 3e 73 70  mple</a>..<h3>sp
1910: 61 74 69 61 6c 69 74 65 5f 6f 73 6d 5f 6e 65 74  atialite_osm_net
1920: 3c 2f 68 33 3e 0d 0a 59 65 74 20 61 67 61 69 6e  </h3>..Yet again
1930: 20 74 68 69 73 20 74 6f 6f 6c 20 77 69 6c 6c 20   this tool will 
1940: 70 61 72 73 65 20 61 20 77 68 6f 6c 65 20 4f 53  parse a whole OS
1950: 4d 20 64 61 74 61 73 65 74 2c 20 74 68 75 73 20  M dataset, thus 
1960: 63 72 65 61 74 69 6e 67 20 61 20 63 6f 72 72 65  creating a corre
1970: 73 70 6f 6e 64 69 6e 67 20 53 70 61 74 69 61 4c  sponding SpatiaL
1980: 69 74 65 27 73 20 44 42 2d 66 69 6c 65 2e 3c 62  ite's DB-file.<b
1990: 72 3e 0d 0a 49 6e 20 74 68 69 73 20 73 70 65 63  r>..In this spec
19a0: 69 66 69 63 20 63 61 73 65 20 61 6e 79 20 70 6f  ific case any po
19b0: 73 73 69 62 6c 65 20 65 66 66 6f 72 74 20 77 69  ssible effort wi
19c0: 6c 6c 20 62 65 20 64 6f 6e 65 20 69 6e 20 6f 72  ll be done in or
19d0: 64 65 72 20 74 6f 20 65 78 74 72 61 63 74 20 66  der to extract f
19e0: 72 6f 6d 20 74 68 65 20 4f 53 4d 20 64 61 74 61  rom the OSM data
19f0: 73 65 74 20 61 20 76 61 6c 69 64 20 52 6f 61 64  set a valid Road
1a00: 20 28 6f 72 20 52 61 69 6c 77 61 79 29 20 4e 65   (or Railway) Ne
1a10: 74 77 6f 72 6b 20 72 65 70 72 65 73 65 6e 74 65  twork represente
1a20: 64 20 62 79 20 4e 6f 64 65 73 20 61 6e 64 20 41  d by Nodes and A
1a30: 72 63 73 2e 3c 62 72 3e 0d 0a 54 68 65 20 69 6e  rcs.<br>..The in
1a40: 74 65 6e 64 65 64 20 67 6f 61 6c 20 6f 66 20 74  tended goal of t
1a50: 68 69 73 20 74 6f 6f 6c 20 69 73 20 74 68 65 20  his tool is the 
1a60: 6f 6e 65 20 74 6f 20 70 72 6f 64 75 63 65 20 61  one to produce a
1a70: 20 76 61 6c 69 64 20 3c 69 3e 3c 75 3e 67 72 61   valid <i><u>gra
1a80: 70 68 3c 2f 75 3e 3c 2f 69 3e 20 74 6f 20 62 65  ph</u></i> to be
1a90: 20 75 73 65 64 20 69 6e 20 61 20 6c 61 74 65 72   used in a later
1aa0: 20 73 74 65 70 20 69 6e 20 6f 72 64 65 72 20 74   step in order t
1ab0: 6f 20 73 75 70 70 6f 72 74 20 74 68 65 20 53 70  o support the Sp
1ac0: 61 74 69 61 4c 69 74 65 27 73 20 6f 77 6e 20 52  atiaLite's own R
1ad0: 6f 75 74 69 6e 67 20 6d 6f 64 75 6c 65 20 28 3c  outing module (<
1ae0: 69 3e 3c 62 3e 56 69 72 74 75 61 6c 4e 65 74 77  i><b>VirtualNetw
1af0: 6f 72 6b 3c 2f 62 3e 3c 2f 69 3e 29 2e 3c 62 72  ork</b></i>).<br
1b00: 3e 0d 0a 57 61 6e 74 20 74 6f 20 6c 65 61 72 6e  >..Want to learn
1b10: 20 6d 6f 72 65 20 3f 20 72 65 61 64 20 61 20 70   more ? read a p
1b20: 72 61 63 74 69 63 61 6c 20 3c 61 20 68 72 65 66  ractical <a href
1b30: 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 67 61  ="https://www.ga
1b40: 69 61 2d 67 69 73 2e 69 74 2f 66 6f 73 73 69 6c  ia-gis.it/fossil
1b50: 2f 73 70 61 74 69 61 6c 69 74 65 2d 74 6f 6f 6c  /spatialite-tool
1b60: 73 2f 77 69 6b 69 3f 6e 61 6d 65 3d 73 70 61 74  s/wiki?name=spat
1b70: 69 61 6c 69 74 65 5f 6f 73 6d 5f 6e 65 74 22 3e  ialite_osm_net">
1b80: 65 78 61 6d 70 6c 65 3c 2f 61 3e 2c 20 61 6e 64  example</a>, and
1b90: 20 67 65 74 20 6d 6f 72 65 20 64 65 74 61 69 6c   get more detail
1ba0: 65 64 20 69 6e 66 6f 73 20 61 62 6f 75 74 20 3c  ed infos about <
1bb0: 61 20 68 72 65 66 3d 22 68 74 74 70 73 3a 2f 2f  a href="https://
1bc0: 77 77 77 2e 67 61 69 61 2d 67 69 73 2e 69 74 2f  www.gaia-gis.it/
1bd0: 66 6f 73 73 69 6c 2f 73 70 61 74 69 61 6c 69 74  fossil/spatialit
1be0: 65 2d 74 6f 6f 6c 73 2f 77 69 6b 69 3f 6e 61 6d  e-tools/wiki?nam
1bf0: 65 3d 67 72 61 70 68 73 2d 69 6e 74 72 6f 22 3e  e=graphs-intro">
1c00: 4f 53 4d 20 4e 65 74 77 6f 72 6b 73 20 61 6e 64  OSM Networks and
1c10: 20 67 72 61 70 68 73 3c 2f 61 3e 0d 0a 3c 68 33   graphs</a>..<h3
1c20: 3e 73 70 61 74 69 61 6c 69 74 65 5f 6f 73 6d 5f  >spatialite_osm_
1c30: 6f 76 65 72 70 61 73 73 3c 2f 68 33 3e 0d 0a 59  overpass</h3>..Y
1c40: 65 74 20 61 6e 6f 74 68 65 72 20 74 6f 6f 6c 20  et another tool 
1c50: 69 6e 74 65 6e 64 65 64 20 74 6f 20 73 75 70 70  intended to supp
1c60: 6f 72 74 20 4f 53 4d 20 64 61 74 61 73 65 74 73  ort OSM datasets
1c70: 3b 20 63 6f 61 72 73 65 6c 79 20 73 70 65 61 6b  ; coarsely speak
1c80: 69 6e 67 20 69 74 20 63 6f 75 6c 64 20 62 65 20  ing it could be 
1c90: 63 6f 6e 73 69 64 65 72 65 64 20 61 20 73 74 72  considered a str
1ca0: 69 63 74 20 65 71 75 69 76 61 6c 65 6e 74 20 6f  ict equivalent o
1cb0: 66 20 3c 69 3e 73 70 61 74 69 61 6c 69 74 65 5f  f <i>spatialite_
1cc0: 6f 73 6d 5f 72 61 77 3c 2f 69 3e 2c 20 3c 69 3e  osm_raw</i>, <i>
1cd0: 73 70 61 74 69 61 6c 69 74 65 5f 6f 73 6d 5f 6d  spatialite_osm_m
1ce0: 61 70 3c 2f 69 3e 20 61 6e 64 20 3c 69 3e 73 70  ap</i> and <i>sp
1cf0: 61 74 69 61 6c 69 74 65 5f 6f 73 6d 5f 6e 65 74  atialite_osm_net
1d00: 3c 2f 69 3e 20 61 6c 74 6f 67 65 74 68 65 72 2e  </i> altogether.
1d10: 3c 62 72 3e 0d 0a 41 6e 79 77 61 79 20 3c 62 3e  <br>..Anyway <b>
1d20: 73 70 61 74 69 61 6c 69 74 65 5f 6f 73 6d 5f 6f  spatialite_osm_o
1d30: 76 65 72 70 61 73 73 3c 2f 62 3e 20 69 73 20 61  verpass</b> is a
1d40: 6e 20 61 64 76 61 6e 63 65 64 20 77 65 62 20 63  n advanced web c
1d50: 6c 69 65 6e 74 2c 20 61 6e 64 20 63 6f 6e 73 65  lient, and conse
1d60: 71 75 65 6e 74 6c 79 20 69 74 20 68 61 73 20 74  quently it has t
1d70: 68 65 20 63 61 70 61 62 69 6c 69 74 79 20 74 6f  he capability to
1d80: 20 64 69 72 65 63 74 6c 79 20 71 75 65 72 79 20   directly query 
1d90: 61 20 72 65 6d 6f 74 65 20 73 65 72 76 65 72 20  a remote server 
1da0: 73 75 70 70 6f 72 74 69 6e 67 20 74 68 65 20 3c  supporting the <
1db0: 61 20 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f 77  a href="http://w
1dc0: 69 6b 69 2e 6f 70 65 6e 73 74 72 65 65 74 6d 61  iki.openstreetma
1dd0: 70 2e 6f 72 67 2f 77 69 6b 69 2f 4f 76 65 72 70  p.org/wiki/Overp
1de0: 61 73 73 5f 41 50 49 22 3e 4f 53 4d 20 4f 76 65  ass_API">OSM Ove
1df0: 72 70 61 73 73 20 41 50 49 3c 2f 61 3e 2e 3c 62  rpass API</a>.<b
1e00: 72 3e 0d 0a 54 68 65 72 65 20 69 73 20 6e 6f 20  r>..There is no 
1e10: 6e 65 65 64 20 74 6f 20 70 72 65 76 65 6e 74 69  need to preventi
1e20: 76 65 6c 79 20 64 6f 77 6e 6c 6f 61 64 20 61 6e  vely download an
1e30: 79 20 69 6e 70 75 74 20 66 69 6c 65 20 6f 66 20  y input file of 
1e40: 74 68 65 20 4f 53 4d 2d 58 4d 4c 20 6f 72 20 50  the OSM-XML or P
1e50: 72 6f 74 6f 42 75 66 20 74 79 70 65 3b 20 3c 62  rotoBuf type; <b
1e60: 3e 73 70 61 74 69 61 6c 69 74 65 5f 6f 73 6d 5f  >spatialite_osm_
1e70: 6f 76 65 72 70 61 73 73 3c 2f 62 3e 20 77 69 6c  overpass</b> wil
1e80: 6c 20 64 79 6e 61 6d 69 63 61 6c 6c 79 20 71 75  l dynamically qu
1e90: 65 72 79 20 74 68 65 20 4f 76 65 72 70 61 73 73  ery the Overpass
1ea0: 20 41 50 49 20 73 65 72 76 65 72 20 74 68 75 73   API server thus
1eb0: 20 70 72 65 63 69 73 65 6c 79 20 65 78 74 72 61   precisely extra
1ec0: 63 74 69 6e 67 20 3c 62 3e 3c 69 3e 6f 6e 20 74  cting <b><i>on t
1ed0: 68 65 20 66 6c 79 3c 2f 69 3e 3c 2f 62 3e 20 61  he fly</i></b> a
1ee0: 6e 79 20 72 65 71 75 69 72 65 64 20 64 61 74 61  ny required data
1ef0: 2e 3c 62 72 3e 0d 0a 41 6e 64 20 69 74 20 77 69  .<br>..And it wi
1f00: 6c 6c 20 69 6d 6d 65 64 69 61 74 65 6c 79 20 70  ll immediately p
1f10: 65 72 66 6f 72 6d 20 61 6e 79 20 61 70 70 72 6f  erform any appro
1f20: 70 72 69 61 74 65 20 70 6f 73 74 2d 70 72 6f 63  priate post-proc
1f30: 65 73 73 69 6e 67 20 74 61 73 6b 20 73 6f 20 74  essing task so t
1f40: 6f 20 63 72 65 61 74 65 20 69 6e 20 61 20 73 69  o create in a si
1f50: 6e 67 6c 65 20 70 61 73 73 20 61 20 44 42 2d 66  ngle pass a DB-f
1f60: 69 6c 65 20 63 6f 6e 74 61 69 6e 69 6e 67 20 61  ile containing a
1f70: 20 73 65 6c 65 63 74 65 64 20 4f 53 4d 20 64 61   selected OSM da
1f80: 74 61 73 65 74 2e 3c 62 72 3e 0d 0a 57 61 6e 74  taset.<br>..Want
1f90: 20 74 6f 20 6c 65 61 72 6e 20 6d 6f 72 65 20 3f   to learn more ?
1fa0: 20 72 65 61 64 20 61 20 70 72 61 63 74 69 63 61   read a practica
1fb0: 6c 20 3c 61 20 68 72 65 66 3d 22 68 74 74 70 73  l <a href="https
1fc0: 3a 2f 2f 77 77 77 2e 67 61 69 61 2d 67 69 73 2e  ://www.gaia-gis.
1fd0: 69 74 2f 66 6f 73 73 69 6c 2f 73 70 61 74 69 61  it/fossil/spatia
1fe0: 6c 69 74 65 2d 74 6f 6f 6c 73 2f 77 69 6b 69 3f  lite-tools/wiki?
1ff0: 6e 61 6d 65 3d 73 70 61 74 69 61 6c 69 74 65 5f  name=spatialite_
2000: 6f 73 6d 5f 6f 76 65 72 70 61 73 73 22 3e 65 78  osm_overpass">ex
2010: 61 6d 70 6c 65 3c 2f 61 3e 0a 5a 20 61 65 35 37  ample</a>.Z ae57
2020: 32 39 32 39 65 32 63 31 30 35 37 32 65 32 62 32  2929e2c10572e2b2
2030: 61 32 37 39 61 62 65 64 30 38 35 62 0a           a279abed085b.