Artifact
e344f3a0dcb2ff335b17e8f48fdb03a9e98d8868:
Wiki page
[ReadOSM] by
sandro
2012-04-21 07:43:41.
0000: 44 20 32 30 31 32 2d 30 34 2d 32 31 54 30 37 3a D 2012-04-21T07:
0010: 34 33 3a 34 31 2e 31 39 38 0a 4c 20 52 65 61 64 43:41.198.L Read
0020: 4f 53 4d 0a 50 20 65 66 62 34 30 33 66 64 32 32 OSM.P efb403fd22
0030: 36 35 32 66 66 33 65 65 37 33 37 36 37 62 62 65 652ff3ee73767bbe
0040: 39 62 32 34 34 32 62 65 34 62 39 38 38 63 0a 55 9b2442be4b988c.U
0050: 20 73 61 6e 64 72 6f 0a 57 20 32 36 35 32 0a 3c sandro.W 2652.<
0060: 74 61 62 6c 65 20 63 65 6c 6c 73 70 61 63 69 6e table cellspacin
0070: 67 3d 22 31 30 22 20 63 65 6c 6c 70 61 64 64 69 g="10" cellpaddi
0080: 6e 67 3d 22 33 30 22 3e 3c 74 72 3e 0d 0a 3c 74 ng="30"><tr>..<t
0090: 64 20 62 67 63 6f 6c 6f 72 3d 22 23 66 30 66 30 d bgcolor="#f0f0
00a0: 66 38 22 20 77 69 64 74 68 3d 22 35 30 25 22 3e f8" width="50%">
00b0: 0d 0a 52 65 61 64 4f 53 4d 20 69 73 20 61 6e 20 ..ReadOSM is an
00c0: 3c 62 3e 3c 69 3e 6f 70 65 6e 20 73 6f 75 72 63 <b><i>open sourc
00d0: 65 3c 69 3e 3c 2f 62 3e 20 6c 69 62 72 61 72 79 e<i></b> library
00e0: 20 74 6f 20 65 78 74 72 61 63 74 20 76 61 6c 69 to extract vali
00f0: 64 20 64 61 74 61 20 66 72 6f 6d 20 77 69 74 68 d data from with
0100: 69 6e 20 61 6e 20 4f 70 65 6e 20 53 74 72 65 65 in an Open Stree
0110: 74 20 4d 61 70 20 69 6e 70 75 74 20 66 69 6c 65 t Map input file
0120: 2e 20 53 75 63 68 20 4f 53 4d 20 66 69 6c 65 73 . Such OSM files
0130: 20 63 6f 6d 65 20 69 6e 20 74 77 6f 20 64 69 66 come in two dif
0140: 66 65 72 65 6e 74 20 66 6f 72 6d 61 74 73 3a 3c ferent formats:<
0150: 75 6c 3e 0d 0a 3c 6c 69 3e 66 69 6c 65 73 20 69 ul>..<li>files i
0160: 64 65 6e 74 69 66 69 65 64 20 62 79 20 74 68 65 dentified by the
0170: 20 2e 6f 73 6d 20 73 75 66 66 69 78 20 73 69 6d .osm suffix sim
0180: 70 6c 79 20 61 72 65 20 70 6c 61 69 6e 20 58 4d ply are plain XM
0190: 4c 20 66 69 6c 65 73 2e 3c 2f 6c 69 3e 0d 0a 3c L files.</li>..<
01a0: 6c 69 3e 66 69 6c 65 73 20 69 64 65 6e 74 69 66 li>files identif
01b0: 69 65 64 20 62 79 20 74 68 65 20 2e 6f 73 6d 2e ied by the .osm.
01c0: 70 62 66 20 73 75 66 66 69 78 20 64 6f 65 73 20 pbf suffix does
01d0: 63 6f 6e 74 61 69 6e 74 20 74 68 65 20 73 61 6d containt the sam
01e0: 65 20 69 64 65 6e 74 69 63 61 6c 20 64 61 74 61 e identical data
01f0: 2c 20 62 75 74 20 61 64 6f 70 74 69 6e 67 20 74 , but adopting t
0200: 68 65 20 47 6f 6f 67 6c 65 27 73 20 50 72 6f 74 he Google's Prot
0210: 6f 63 6f 6c 20 42 75 66 66 65 72 20 73 65 72 69 ocol Buffer seri
0220: 61 6c 69 7a 61 74 69 6f 6e 20 66 6f 72 6d 61 74 alization format
0230: 20 61 6e 64 20 74 68 75 73 20 72 65 71 75 69 72 and thus requir
0240: 69 6e 67 20 6d 75 63 68 20 6c 65 73 73 20 73 74 ing much less st
0250: 6f 72 61 67 65 20 73 70 61 63 65 2e 3c 2f 6c 69 orage space.</li
0260: 3e 0d 0a 3c 2f 75 6c 3e 3c 62 72 3e 0d 0a 54 68 >..</ul><br>..Th
0270: 65 20 52 65 61 64 4f 53 4d 20 64 65 73 69 67 6e e ReadOSM design
0280: 20 67 6f 61 6c 73 20 61 72 65 3a 3c 75 6c 3e 0d goals are:<ul>.
0290: 0a 3c 6c 69 3e 74 6f 20 62 65 20 73 69 6d 70 6c .<li>to be simpl
02a0: 65 20 61 6e 64 20 6c 69 67 68 74 77 65 69 67 68 e and lightweigh
02b0: 74 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 74 6f 20 62 t</li>..<li>to b
02c0: 65 20 73 74 61 62 6c 65 2c 20 72 6f 62 75 73 74 e stable, robust
02d0: 20 61 6e 64 20 65 66 66 69 63 69 65 6e 74 3c 2f and efficient</
02e0: 6c 69 3e 0d 0a 3c 6c 69 3e 74 6f 20 62 65 20 65 li>..<li>to be e
02f0: 61 73 69 6c 79 20 61 6e 64 20 75 6e 69 76 65 72 asily and univer
0300: 73 61 6c 6c 79 20 70 6f 72 74 61 62 6c 65 3c 2f sally portable</
0310: 6c 69 3e 0d 0a 3c 6c 69 3e 6d 61 6b 69 6e 67 20 li>..<li>making
0320: 74 68 65 20 77 68 6f 6c 65 20 70 61 72 73 69 6e the whole parsin
0330: 67 20 70 72 6f 63 65 73 73 20 6f 66 20 62 6f 74 g process of bot
0340: 68 20 2e 6f 73 6d 20 6f 72 20 2e 6f 73 6d 2e 70 h .osm or .osm.p
0350: 62 66 20 66 69 6c 65 73 20 63 6f 6d 70 6c 65 74 bf files complet
0360: 65 6c 79 20 74 72 61 6e 73 70 61 72 65 6e 74 20 ely transparent
0370: 66 72 6f 6d 20 74 68 65 20 61 70 70 6c 69 63 61 from the applica
0380: 74 69 6f 6e 20 6f 77 6e 20 70 65 72 73 70 65 63 tion own perspec
0390: 74 69 76 65 2e 3c 2f 6c 69 3e 3c 2f 75 6c 3e 0d tive.</li></ul>.
03a0: 0a 0d 0a 52 65 61 64 4f 53 4d 20 69 73 20 73 74 ...ReadOSM is st
03b0: 72 75 63 74 75 72 61 6c 6c 79 20 73 69 6d 70 6c ructurally simpl
03c0: 65 20 61 6e 64 20 71 75 69 74 65 20 6c 69 67 68 e and quite ligh
03d0: 74 2d 77 65 69 67 68 74 20 28 74 79 70 69 63 61 t-weight (typica
03e0: 6c 6c 79 20 61 62 6f 75 74 20 32 30 4b 20 6f 66 lly about 20K of
03f0: 20 6f 62 6a 65 63 74 20 63 6f 64 65 2c 20 73 74 object code, st
0400: 72 69 70 70 65 64 29 2e 20 0d 0a 0d 0a 52 65 61 ripped). ....Rea
0410: 64 4f 53 4d 20 69 73 20 6c 69 63 65 6e 73 65 64 dOSM is licensed
0420: 20 75 6e 64 65 72 20 74 68 65 20 3c 61 20 68 72 under the <a hr
0430: 65 66 3d 22 68 74 74 70 3a 2f 2f 77 77 77 2e 6d ef="http://www.m
0440: 6f 7a 69 6c 6c 61 2e 6f 72 67 2f 4d 50 4c 2f 62 ozilla.org/MPL/b
0450: 6f 69 6c 65 72 70 6c 61 74 65 2d 31 2e 31 2f 6d oilerplate-1.1/m
0460: 70 6c 2d 74 72 69 2d 6c 69 63 65 6e 73 65 2d 68 pl-tri-license-h
0470: 74 6d 6c 22 3e 4d 50 4c 20 74 72 69 2d 6c 69 63 tml">MPL tri-lic
0480: 65 6e 73 65 3c 2f 61 3e 20 74 65 72 6d 73 3b 20 ense</a> terms;
0490: 79 6f 75 20 61 72 65 20 66 72 65 65 20 74 6f 20 you are free to
04a0: 63 68 6f 6f 73 65 20 74 68 65 20 62 65 73 74 2d choose the best-
04b0: 66 69 74 20 6c 69 63 65 6e 73 65 20 62 65 74 77 fit license betw
04c0: 65 65 6e 3a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 74 68 een:<ul>..<li>th
04d0: 65 20 3c 61 20 68 72 65 66 3d 22 68 74 74 70 3a e <a href="http:
04e0: 2f 2f 77 77 77 2e 6d 6f 7a 69 6c 6c 61 2e 6f 72 //www.mozilla.or
04f0: 67 2f 4d 50 4c 2f 4d 50 4c 2d 31 2e 31 2e 68 74 g/MPL/MPL-1.1.ht
0500: 6d 6c 22 3e 4d 50 4c 20 31 2e 31 3c 2f 61 3e 3c ml">MPL 1.1</a><
0510: 2f 6c 69 3e 0d 0a 3c 6c 69 3e 74 68 65 20 3c 61 /li>..<li>the <a
0520: 20 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f 77 77 href="http://ww
0530: 77 2e 67 6e 75 2e 6f 72 67 2f 6c 69 63 65 6e 73 w.gnu.org/licens
0540: 65 73 2f 67 70 6c 2d 32 2e 30 2e 68 74 6d 6c 23 es/gpl-2.0.html#
0550: 54 4f 43 31 22 3e 47 50 4c 20 76 32 2e 30 3c 2f TOC1">GPL v2.0</
0560: 61 3e 20 6f 72 20 61 6e 79 20 73 75 62 73 65 71 a> or any subseq
0570: 75 65 6e 74 20 76 65 72 73 69 6f 6e 3c 2f 6c 69 uent version</li
0580: 3e 0d 0a 3c 6c 69 3e 74 68 65 20 3c 61 20 68 72 >..<li>the <a hr
0590: 65 66 3d 22 68 74 74 70 3a 2f 2f 77 77 77 2e 67 ef="http://www.g
05a0: 6e 75 2e 6f 72 67 2f 6c 69 63 65 6e 73 65 73 2f nu.org/licenses/
05b0: 6c 67 70 6c 2d 32 2e 31 2e 68 74 6d 6c 22 3e 4c lgpl-2.1.html">L
05c0: 47 50 4c 20 76 32 2e 31 3c 2f 61 3e 20 6f 72 20 GPL v2.1</a> or
05d0: 61 6e 79 20 73 75 62 73 65 71 75 65 6e 74 20 76 any subsequent v
05e0: 65 72 73 69 6f 6e 3c 2f 6c 69 3e 3c 2f 75 6c 3e ersion</li></ul>
05f0: 0d 0a 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 0d 0a 3c ..</td>..<td>..<
0600: 74 61 62 6c 65 20 63 65 6c 6c 70 61 64 64 69 6e table cellpaddin
0610: 67 3d 22 32 30 22 3e 0d 0a 3c 74 72 3e 3c 74 64 g="20">..<tr><td
0620: 3e 53 74 72 69 63 74 6c 79 20 72 65 6c 61 74 65 >Strictly relate
0630: 64 20 3c 62 3e 70 72 6f 6a 65 63 74 73 3c 2f 62 d <b>projects</b
0640: 3e 3a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 3c 61 20 68 >:<ul>..<li><a h
0650: 72 65 66 3d 22 2f 66 6f 73 73 69 6c 2f 73 70 61 ref="/fossil/spa
0660: 74 69 61 6c 69 74 65 2d 74 6f 6f 6c 73 22 3e 73 tialite-tools">s
0670: 70 61 74 69 61 6c 69 74 65 2d 74 6f 6f 6c 73 3c patialite-tools<
0680: 2f 61 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 62 61 /a></li>..<li>ba
0690: 63 6b 20 74 6f 20 74 68 65 20 3c 61 20 68 72 65 ck to the <a hre
06a0: 66 3d 22 68 74 74 70 3a 2f 2f 77 77 77 2e 67 61 f="http://www.ga
06b0: 69 61 2d 67 69 73 2e 69 74 2f 67 61 69 61 2d 73 ia-gis.it/gaia-s
06c0: 69 6e 73 22 3e 47 61 69 61 2d 53 49 4e 53 3c 2f ins">Gaia-SINS</
06d0: 61 3e 20 68 6f 6d 65 20 70 61 67 65 3c 2f 6c 69 a> home page</li
06e0: 3e 3c 2f 75 6c 3e 0d 0a 3c 2f 74 64 3e 3c 2f 74 ></ul>..</td></t
06f0: 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 3c 62 3e 53 r>..<tr><td><b>S
0700: 6f 75 72 63 65 73 3c 2f 62 3e 3a 20 63 75 72 72 ources</b>: curr
0710: 65 6e 74 20 76 65 72 73 69 6f 6e 20 69 73 20 3c ent version is <
0720: 62 3e 31 2e 30 2e 30 3c 2f 62 3e 20 28 3c 69 3e b>1.0.0</b> (<i>
0730: 72 65 6c 65 61 73 65 64 20 6f 6e 20 32 30 31 31 released on 2011
0740: 2d 31 32 2d 32 39 29 3c 2f 69 3e 3c 75 6c 3e 0d -12-29)</i><ul>.
0750: 0a 3c 6c 69 3e 64 6f 77 6e 6c 6f 61 64 20 3c 61 .<li>download <a
0760: 20 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f 77 77 href="http://ww
0770: 77 2e 67 61 69 61 2d 67 69 73 2e 69 74 2f 67 61 w.gaia-gis.it/ga
0780: 69 61 2d 73 69 6e 73 2f 72 65 61 64 6f 73 6d 2d ia-sins/readosm-
0790: 31 2e 30 2e 30 2e 74 61 72 2e 67 7a 22 3e 72 65 1.0.0.tar.gz">re
07a0: 61 64 6f 73 6d 2d 31 2e 30 2e 30 2e 74 61 72 2e adosm-1.0.0.tar.
07b0: 67 7a 3c 2f 61 3e 20 28 74 61 72 62 61 6c 6c 2c gz</a> (tarball,
07c0: 20 2e 74 61 72 2e 67 7a 29 3c 2f 6c 69 3e 0d 0a .tar.gz)</li>..
07d0: 3c 6c 69 3e 64 6f 77 6e 6c 6f 61 64 20 3c 61 20 <li>download <a
07e0: 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f 77 77 77 href="http://www
07f0: 2e 67 61 69 61 2d 67 69 73 2e 69 74 2f 67 61 69 .gaia-gis.it/gai
0800: 61 2d 73 69 6e 73 2f 72 65 61 64 6f 73 6d 2d 31 a-sins/readosm-1
0810: 2e 30 2e 30 2e 7a 69 70 22 3e 72 65 61 64 6f 73 .0.0.zip">reados
0820: 6d 2d 31 2e 30 2e 30 2e 7a 69 70 3c 2f 61 3e 20 m-1.0.0.zip</a>
0830: 28 7a 69 70 66 69 6c 65 2c 20 2e 7a 69 70 29 3c (zipfile, .zip)<
0840: 2f 6c 69 3e 0d 0a 3c 6c 69 3e 62 72 6f 77 73 65 /li>..<li>browse
0850: 20 3c 61 20 68 72 65 66 3d 22 68 74 74 70 3a 2f <a href="http:/
0860: 2f 77 77 77 2e 67 61 69 61 2d 67 69 73 2e 69 74 /www.gaia-gis.it
0870: 2f 67 61 69 61 2d 73 69 6e 73 2f 72 65 61 64 6f /gaia-sins/reado
0880: 73 6d 2d 73 6f 75 72 63 65 73 22 3e 6f 6c 64 65 sm-sources">olde
0890: 72 20 76 65 72 73 69 6f 6e 73 3c 2f 61 3e 3c 2f r versions</a></
08a0: 6c 69 3e 3c 2f 75 6c 3e 0d 0a 3c 2f 74 64 3e 3c li></ul>..</td><
08b0: 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 44 6f /tr>..<tr><td>Do
08c0: 78 79 67 65 6e 20 3c 62 3e 64 6f 63 75 6d 65 6e xygen <b>documen
08d0: 74 61 74 69 6f 6e 3c 2f 62 3e 3a 3c 75 6c 3e 0d tation</b>:<ul>.
08e0: 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22 68 74 .<li><a href="ht
08f0: 74 70 3a 2f 2f 77 77 77 2e 67 61 69 61 2d 67 69 tp://www.gaia-gi
0900: 73 2e 69 74 2f 67 61 69 61 2d 73 69 6e 73 2f 72 s.it/gaia-sins/r
0910: 65 61 64 6f 73 6d 2d 31 2e 30 2e 30 2d 64 6f 78 eadosm-1.0.0-dox
0920: 79 2d 64 6f 63 2f 69 6e 64 65 78 2e 68 74 6d 6c y-doc/index.html
0930: 22 3e 6f 6e 6c 69 6e 65 3c 2f 61 3e 20 48 54 4d ">online</a> HTM
0940: 4c 20 64 6f 63 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e L doc</li>..<li>
0950: 3c 61 20 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f <a href="http://
0960: 77 77 77 2e 67 61 69 61 2d 67 69 73 2e 69 74 2f www.gaia-gis.it/
0970: 67 61 69 61 2d 73 69 6e 73 2f 72 65 61 64 6f 73 gaia-sins/reados
0980: 6d 2d 31 2e 30 2e 30 2d 64 6f 78 79 2d 64 6f 63 m-1.0.0-doxy-doc
0990: 2e 74 61 72 2e 67 7a 22 3e 64 6f 77 6e 6c 6f 61 .tar.gz">downloa
09a0: 64 3c 2f 61 3e 20 48 54 4d 4c 20 74 61 72 62 61 d</a> HTML tarba
09b0: 6c 6c 20 28 74 61 72 2e 67 7a 29 3c 2f 6c 69 3e ll (tar.gz)</li>
09c0: 0d 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22 68 ..<li><a href="h
09d0: 74 74 70 3a 2f 2f 77 77 77 2e 67 61 69 61 2d 67 ttp://www.gaia-g
09e0: 69 73 2e 69 74 2f 67 61 69 61 2d 73 69 6e 73 2f is.it/gaia-sins/
09f0: 72 65 61 64 6f 73 6d 2d 31 2e 30 2e 30 2d 64 6f readosm-1.0.0-do
0a00: 78 79 2d 64 6f 63 2e 7a 69 70 22 3e 64 6f 77 6e xy-doc.zip">down
0a10: 6c 6f 61 64 3c 2f 61 3e 20 48 54 4d 4c 20 7a 69 load</a> HTML zi
0a20: 70 66 69 6c 65 20 28 7a 69 70 29 3c 2f 6c 69 3e pfile (zip)</li>
0a30: 0d 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22 68 ..<li><a href="h
0a40: 74 74 70 3a 2f 2f 77 77 77 2e 67 61 69 61 2d 67 ttp://www.gaia-g
0a50: 69 73 2e 69 74 2f 67 61 69 61 2d 73 69 6e 73 2f is.it/gaia-sins/
0a60: 72 65 61 64 6f 73 6d 2d 31 2e 30 2e 30 2d 64 6f readosm-1.0.0-do
0a70: 63 2e 70 64 66 22 3e 50 44 46 20 64 6f 63 75 6d c.pdf">PDF docum
0a80: 65 6e 74 3c 2f 61 3e 3c 2f 6c 69 3e 3c 2f 75 6c ent</a></li></ul
0a90: 3e 0d 0a 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c >..</td></tr>..<
0aa0: 2f 74 61 62 6c 65 3e 3c 2f 74 64 3e 0d 0a 3c 2f /table></td>..</
0ab0: 74 72 3e 3c 2f 74 61 62 6c 65 3e 0a 5a 20 66 31 tr></table>.Z f1
0ac0: 66 64 32 64 32 65 61 65 65 34 32 65 62 32 39 66 fd2d2eaee42eb29f
0ad0: 35 33 30 32 63 66 34 33 65 65 34 32 64 36 0a 5302cf43ee42d6.