add functional tests

These are the tests that were formerly located at
https://github.com/lonvia/test-nominatim
This commit is contained in:
Sarah Hoffmann
2014-09-07 17:02:10 +02:00
parent e7ee9c2d84
commit 86d90bc460
43 changed files with 4601 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
n-edge-NS | POINT(1.0040019 2.000324)
n-inner | POINT(1.0039385 2.0003548)
n-outer | POINT(1.0039478 2.0004676)
n-edge-WE | POINT(1.0039599 2.0002345)
w-WE | LINESTRING(1.0031759 2.0002316,1.0040361 2.0002211,1.0042735 2.0002264)
w-NS | LINESTRING(1.0040414 2.0001051,1.0040361 2.0002211,1.0040364 2.0006377)
w-building | MULTIPOLYGON(((1.0040019 2.000324,1.0040016 2.0002344,1.0039599 2.0002345,1.0039037 2.0002347,1.0039043 2.0004389,1.0040023 2.0004386,1.0040019 2.000324)))

View File

@@ -0,0 +1 @@
select country_code, st_astext(st_pointonsurface(st_collect(geometry))) from country_osm_grid group by country_code order by country_code

View File

@@ -0,0 +1,250 @@
ad | POINT(1.58972361752509 42.54241545)
ae | POINT(54.6158905029297 24.8243131637573)
af | POINT(65.9026412963867 34.8470859527588)
ag | POINT(-61.7243069800293 17.069)
ai | POINT(-63.1057155298182 18.2546197)
al | POINT(19.8494176864624 40.2123275624912)
am | POINT(44.6422958374023 40.3782157897949)
ao | POINT(16.2192406654358 -12.7701482772827)
aq | POINT(44.999999975 -75.6569557189941)
ar | POINT(-61.1075973510742 -34.3761558532715)
as | POINT(-170.684700024275 -14.2930755)
at | POINT(14.2574706077576 47.3654232025146)
au | POINT(138.231559753418 -23.7206888198853)
aw | POINT(-69.98255055 12.555)
ax | POINT(19.9183956313477 59.81682435)
az | POINT(48.385555267334 40.6163997650146)
ba | POINT(17.1851491928101 44.2558269500732)
bb | POINT(-59.53342165 13.19)
bd | POINT(89.759895324707 24.3420524597168)
be | POINT(4.90078139305115 50.3468225048828)
bf | POINT(-0.567435041069984 11.9047117233276)
bg | POINT(24.8061628341675 43.0985908508301)
bh | POINT(50.5203291219829 25.94685735)
bi | POINT(29.5456137866089 -2.99057915)
bj | POINT(2.70062518119812 10.0279288291931)
bl | POINT(-62.7934947763772 17.907)
bm | POINT(-64.7740692745195 32.30199165)
bn | POINT(114.521968608887 4.2863885)
bo | POINT(-62.0247344970703 -17.7772369384766)
bq | POINT(-63.1432235610045 17.566)
br | POINT(-45.7706508636475 -9.5868501663208)
bs | POINT(-77.6091675884277 23.8745)
bt | POINT(90.0135078430176 27.281379699707)
bv | POINT(3.35744155625 -54.4215)
bw | POINT(23.5150556564331 -23.4839134216309)
by | POINT(26.7725925445557 53.1588516235352)
bz | POINT(-88.6348991394043 16.3395160487277)
ca | POINT(-107.74817276001 67.1261215209961)
cc | POINT(96.8442066294247 -12.0173443)
cd | POINT(24.0954418182373 -1.67713665962219)
cf | POINT(22.5870132446289 5.98438787460327)
cg | POINT(15.7887516021729 0.403886616230011)
ch | POINT(7.65705513954163 46.5744686126709)
ci | POINT(-6.31190967559814 6.6278383731842)
ck | POINT(-159.778351359569 -21.23349585)
cl | POINT(-70.4179039001465 -53.7718944549561)
cm | POINT(13.260226726532 5.94519567489624)
cn | POINT(96.4428558349609 38.0426063537598)
co | POINT(-72.5295104980469 2.45174860954285)
cr | POINT(-83.8331413269043 9.935142993927)
cu | POINT(-80.8167381286621 21.8885278701782)
cv | POINT(-24.508106575 14.929)
cw | POINT(-68.9640918594077 12.1845)
cx | POINT(105.624119513558 -10.48417)
cy | POINT(32.959223486499 35.37010195)
cz | POINT(16.3209805488586 49.5069274902344)
de | POINT(9.30716800689697 50.2128944396973)
dj | POINT(42.969040422876 11.41542855)
dk | POINT(9.18490123748779 55.5634002685547)
dm | POINT(-61.0035801928854 15.6547055)
do | POINT(-69.6285591125488 18.5884169089722)
dz | POINT(4.24749487638474 25.797215461731)
ec | POINT(-77.4583168029785 -0.982844322919846)
ee | POINT(23.9428863525391 58.439525604248)
eg | POINT(28.952935218811 28.1771860122681)
eh | POINT(-13.6903142929077 25.0124177932739)
er | POINT(39.0122375488281 14.960337638855)
es | POINT(-2.59110307693481 38.7935485839844)
et | POINT(38.6169757843018 7.71399855613708)
fi | POINT(26.8979873657227 63.5619449615479)
fj | POINT(177.918533325195 -17.7423753738403)
fk | POINT(-60.0855102539062 -51.6555919647217)
fm | POINT(151.9535889125 8.5045)
fo | POINT(-6.60483694084778 62.10000995)
fr | POINT(0.284105718135834 47.5104522705078)
ga | POINT(10.8107047080994 -0.0742915570735931)
gb | POINT(-0.928231082856655 52.0161876678467)
gd | POINT(-61.6452430375 12.191)
ge | POINT(44.1666488647461 42.0038585662842)
gf | POINT(-53.4652481079102 3.56188893318176)
gg | POINT(-2.50580395030125 49.5854381)
gh | POINT(-0.463488027453423 7.16051578521729)
gi | POINT(-5.32053155848457 36.1106663)
gl | POINT(-33.8551120758057 74.6635551452637)
gm | POINT(-16.4096023535368 13.25)
gn | POINT(-13.839409828186 10.9629158973694)
gp | POINT(-61.6871265247053 16.23049055)
gq | POINT(10.2397356033325 1.43119311332703)
gr | POINT(23.1785039901733 39.0620670318604)
gs | POINT(-36.4943086948773 -54.4306784)
gt | POINT(-90.7436828613281 15.2042865753174)
gu | POINT(144.733626445767 13.444138)
gw | POINT(-14.8352527618408 11.9248690605164)
gy | POINT(-58.4516773223877 5.73698806762695)
hk | POINT(114.18577775 22.3492361)
hm | POINT(73.6823082266602 -53.22105985)
hn | POINT(-86.9541435241699 15.2382001876831)
hr | POINT(17.499662399292 45.5268955230713)
ht | POINT(-73.5192565917969 18.3249206691162)
hu | POINT(20.3536291122437 47.5172100067139)
id | POINT(123.345050811768 -0.837919592857361)
ie | POINT(-9.00520038604736 52.8772506713867)
il | POINT(35.4631499949707 32.86165655)
im | POINT(-4.86740773691101 54.023)
in | POINT(88.6762087020508 27.86155515)
io | POINT(71.4274391359073 -6.14349685)
iq | POINT(42.5810985565186 34.2610359191895)
ir | POINT(51.268892288208 34.1931705474854)
is | POINT(-17.5178508758545 64.7168769836426)
it | POINT(10.4263944625854 44.8790493011475)
je | POINT(-2.19261599848299 49.1245833)
jm | POINT(-76.8402003547852 18.3935)
jo | POINT(36.5555210113525 30.7574186325073)
jp | POINT(138.725311279297 35.9209995269775)
ke | POINT(36.9060287475586 1.08512867614627)
kg | POINT(76.1557197570801 41.6649742126465)
kh | POINT(104.319019317627 12.9555516242981)
ki | POINT(173.633537933333 0.139)
km | POINT(44.3147485207764 -12.241)
kn | POINT(-62.6937987175 17.2555)
kp | POINT(126.655757904053 39.6457576751709)
kr | POINT(127.277404785156 36.4138870239258)
kw | POINT(47.3068407840576 29.6918055)
ky | POINT(-81.0745526670982 19.2994923579778)
kz | POINT(72.008113861084 49.8885555267334)
la | POINT(102.443916320801 19.8160953521729)
lb | POINT(35.4846443715483 33.4176673878926)
lc | POINT(-60.978944125 13.891)
li | POINT(9.54693948514429 47.15934115)
lk | POINT(80.3852043151855 8.41649961471558)
lr | POINT(-11.169605255127 4.04122126102448)
ls | POINT(28.6698419546997 -29.9453849)
lt | POINT(24.5173501968384 55.4929389953613)
lu | POINT(6.08649672997471 49.81533445)
lv | POINT(23.5103368759155 56.6714401245117)
ly | POINT(15.3684158325195 28.1217727661133)
ma | POINT(-4.0306156873703 33.2169628143311)
mc | POINT(7.47743150426578 43.62917385)
md | POINT(29.6172503477783 46.6651745)
me | POINT(19.7229134314941 43.02441345)
mf | POINT(-63.0666651534257 18.0810209)
mg | POINT(45.8637886047363 -20.5024528503418)
mh | POINT(171.949820566667 5.983)
mk | POINT(21.421085357666 41.0898007597656)
ml | POINT(-1.93310506641865 16.4699301719666)
mm | POINT(95.5462455749512 21.0962018966675)
mn | POINT(99.8113822937012 48.1861572265625)
mo | POINT(113.564416766761 22.16209625)
mp | POINT(145.213452483189 14.1490205)
mq | POINT(-60.8112834227783 14.43706925)
mr | POINT(-9.42324566841125 22.5925149917603)
ms | POINT(-62.1945521583333 16.745)
mt | POINT(14.3836306158583 35.9446731)
mu | POINT(57.551211475 -20.41)
mv | POINT(73.3929214477539 4.19375014305115)
mw | POINT(33.9572296142578 -12.2821822166443)
mx | POINT(-105.892219543457 25.8682699203491)
my | POINT(112.711540222168 2.10098683834076)
mz | POINT(37.5868968963623 -15.5801844596863)
na | POINT(16.6856970787048 -21.4657220840454)
nc | POINT(164.953224182129 -20.3888988494873)
ne | POINT(10.060417175293 19.0827360153198)
nf | POINT(167.95718166875 -29.0645)
ng | POINT(10.1778125762939 10.1780409812927)
ni | POINT(-85.8797492980957 13.2171587944031)
nl | POINT(-68.5706209441406 12.041)
no | POINT(23.1155624389648 70.0993499755859)
np | POINT(83.3625984191895 28.1310758590698)
nr | POINT(166.934792270833 -0.5275)
nu | POINT(-169.848737911905 -19.05305275)
nz | POINT(167.972099304199 -45.1305675506592)
om | POINT(56.8605518341064 20.4741315841675)
pa | POINT(-79.4016036987305 8.80656003952026)
pe | POINT(-78.6654052734375 -7.54711985588074)
pf | POINT(-145.057191213086 -16.7086236)
pg | POINT(146.646003723145 -7.37427568435669)
ph | POINT(121.483592987061 15.0996527671814)
pk | POINT(72.1134796142578 31.1462965011597)
pl | POINT(17.8813629150391 52.771821975708)
pm | POINT(-56.1951589074841 46.7832469)
pn | POINT(-130.106425528029 -25.0695595)
pr | POINT(-65.8875553967285 18.3716905)
ps | POINT(35.3980153741943 32.24773475)
pt | POINT(-8.45743942260742 40.1115436553955)
pw | POINT(134.496454875 7.3245)
py | POINT(-59.5178718566895 -22.4128150939941)
qa | POINT(51.4990362304443 24.9981677)
re | POINT(55.7734550547607 -21.3638828)
ro | POINT(26.3763284683228 45.3612003326416)
rs | POINT(20.4037199020386 44.5641384124756)
ru | POINT(116.440608978271 59.0678024291992)
rw | POINT(29.5788261333252 -1.6240443)
sa | POINT(47.7316932678223 22.4379062652588)
sb | POINT(164.638946533203 -10.2360653877258)
sc | POINT(46.3656697 -9.454)
sd | POINT(28.1472072601318 14.5642309188843)
se | POINT(15.6866798400879 60.3556804656982)
sg | POINT(103.84187219299 1.304)
sh | POINT(-12.2815573611979 -37.11546755)
si | POINT(14.0473856628607 46.390855)
sj | POINT(15.2755260467529 79.2336540222168)
sk | POINT(20.416033744812 48.869701385498)
sl | POINT(-11.4777312278748 8.78156280517578)
sm | POINT(12.4606268797657 43.9427969)
sn | POINT(-15.3711128234863 14.9947791099548)
so | POINT(46.9338359832764 9.34094429016113)
sr | POINT(-56.4855213165283 4.5773549079895)
ss | POINT(28.1357345581055 8.50933408737183)
st | POINT(6.61025854583333 0.2215)
sv | POINT(-89.3666543301004 13.4307287)
sx | POINT(-63.1539330807882 17.9345)
sy | POINT(38.1551322937012 35.3422107696533)
sz | POINT(31.782634398523 -26.14244365)
tc | POINT(-71.325541342334 21.35)
td | POINT(17.4209251403809 13.4622311592102)
tf | POINT(137.5 -67.5)
tg | POINT(1.0698350071907 7.87677597999573)
th | POINT(102.008777618408 16.4231028556824)
tj | POINT(71.9134941101074 39.0152739312988)
tk | POINT(-171.826039878679 -9.209903)
tl | POINT(126.225208282471 -8.72636747360229)
tm | POINT(57.7160358428955 39.9253444671631)
tn | POINT(9.04958724975586 34.8419933319092)
to | POINT(-176.993202209473 -23.1110429763794)
tr | POINT(32.8200283050537 39.8635063171387)
tt | POINT(-60.70793924375 11.1385)
tv | POINT(178.774993896484 -9.41685771942139)
tw | POINT(120.300746917725 23.1700229644775)
tz | POINT(33.5389289855957 -5.01840615272522)
ua | POINT(33.4433536529541 49.3061904907227)
ug | POINT(32.9652328491211 2.08584922552109)
um | POINT(-169.509930872296 16.74605815)
us | POINT(-116.395355224609 40.7137908935547)
uy | POINT(-56.4650554656982 -33.6265888214111)
uz | POINT(61.3552989959717 42.9610729217529)
va | POINT(12.3319785703086 42.0493197)
vc | POINT(-61.0990541737305 13.316)
ve | POINT(-64.8832321166992 7.69849991798401)
vg | POINT(-64.6247911940199 18.419)
vi | POINT(-64.8895090795187 18.3226325)
vn | POINT(104.201791331787 10.27644235)
vu | POINT(167.319198608398 -15.8868751525879)
wf | POINT(-176.207816222208 -13.28535775)
ws | POINT(-172.109667323427 -13.850938)
ye | POINT(45.945629119873 16.1633830070496)
yt | POINT(44.9377459760742 -12.6088246)
za | POINT(23.1948881149292 -30.4327602386475)
zm | POINT(26.3861808776855 -14.3996663093567)
zw | POINT(30.1241998672485 -19.8690795898438)

View File

@@ -0,0 +1,8 @@
n-N-unglued | POINT(1.004922 2.0005155)
n-S-unglued | POINT(1.0046259 2.0002949)
n-NE | POINT(1.0050661 2.0006118)
n-SE | POINT(1.0051339 2.0003349)
n-NW | POINT(1.0047583 2.0004087)
n-SW | POINT(1.0047275 2.0003564)
w-north | LINESTRING(1.0044996 2.0004302,1.0046259 2.0003841,1.0047583 2.0004087,1.004922 2.0005155,1.0050661 2.0006118,1.0053155 2.0006241)
w-south | LINESTRING(1.0045243 2.0002241,1.0046259 2.0002949,1.0047275 2.0003564,1.004826 2.0002918,1.0049368 2.0002641,1.0051339 2.0003349,1.0053278 2.0003687)

View File

@@ -0,0 +1,11 @@
0.0001 | MULTIPOLYGON(((0.001 0,0 0,0 0.1,0.001 0.1,0.001 0)))
0.0005 | MULTIPOLYGON(((0.005 0,0 0,0 0.1,0.005 0.1,0.005 0)))
0.001 | MULTIPOLYGON(((0.01 0,0 0,0 0.1,0.01 0.1,0.01 0)))
0.005 | MULTIPOLYGON(((0.05 0,0 0,0 0.1,0.05 0.1,0.05 0)))
0.01 | MULTIPOLYGON(((0.1 0,0 0,0 0.1,0.1 0.1,0.1 0)))
0.05 | MULTIPOLYGON(((0.5 0,0 0,0 0.1,0.5 0.1,0.5 0)))
0.1 | MULTIPOLYGON(((0.1 0,0 0,0 1,0.1 1,0.1 0)))
0.5 | MULTIPOLYGON(((0.5 0,0 0,0 1,0.5 1,0.5 0)))
1.0 | MULTIPOLYGON(((1 0,0 0,0 1,1 1,1 0)))
2.0 | MULTIPOLYGON(((2 0,0 0,0 1,2 1,2 0)))
5.0 | MULTIPOLYGON(((5 0,0 0,0 1,5 1,5 0)))

View File

@@ -0,0 +1,168 @@
<?xml version='1.0' encoding='UTF-8'?>
<osm version='0.6'>
<node id="100" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1" lat="0.0" lon="0.0" />
<node id="101" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1" lat="0.1" lon="0.0" />
<node id="102" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1" lat="0.1" lon="0.001" />
<node id="103" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1" lat="0.0" lon="0.001" />
<way id="100" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1">
<nd ref="100" />
<nd ref="101" />
<nd ref="102" />
<nd ref="103" />
<nd ref="100" />
<tag k="test:section" v="poly-area"/>
<tag k="test:id" v="0.0001"/>
<tag k="area" v="yes"/>
</way>
<node id="200" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1" lat="0.0" lon="0.0" />
<node id="201" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1" lat="0.1" lon="0.0" />
<node id="202" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1" lat="0.1" lon="0.005" />
<node id="203" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1" lat="0.0" lon="0.005" />
<way id="200" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1">
<nd ref="200" />
<nd ref="201" />
<nd ref="202" />
<nd ref="203" />
<nd ref="200" />
<tag k="test:section" v="poly-area"/>
<tag k="test:id" v="0.0005"/>
<tag k="area" v="yes"/>
</way>
<node id="300" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1" lat="0.0" lon="0.0" />
<node id="301" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1" lat="0.1" lon="0.0" />
<node id="302" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1" lat="0.1" lon="0.01" />
<node id="303" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1" lat="0.0" lon="0.01" />
<way id="300" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1">
<nd ref="300" />
<nd ref="301" />
<nd ref="302" />
<nd ref="303" />
<nd ref="300" />
<tag k="test:section" v="poly-area"/>
<tag k="test:id" v="0.001"/>
<tag k="area" v="yes"/>
</way>
<node id="400" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1" lat="0.0" lon="0.0" />
<node id="401" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1" lat="0.1" lon="0.0" />
<node id="402" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1" lat="0.1" lon="0.05" />
<node id="403" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1" lat="0.0" lon="0.05" />
<way id="400" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1">
<nd ref="400" />
<nd ref="401" />
<nd ref="402" />
<nd ref="403" />
<nd ref="400" />
<tag k="test:section" v="poly-area"/>
<tag k="test:id" v="0.005"/>
<tag k="area" v="yes"/>
</way>
<node id="500" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1" lat="0.0" lon="0.0" />
<node id="501" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1" lat="0.1" lon="0.0" />
<node id="502" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1" lat="0.1" lon="0.1" />
<node id="503" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1" lat="0.0" lon="0.1" />
<way id="500" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1">
<nd ref="500" />
<nd ref="501" />
<nd ref="502" />
<nd ref="503" />
<nd ref="500" />
<tag k="test:section" v="poly-area"/>
<tag k="test:id" v="0.01"/>
<tag k="area" v="yes"/>
</way>
<node id="600" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1" lat="0.0" lon="0.0" />
<node id="601" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1" lat="0.1" lon="0.0" />
<node id="602" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1" lat="0.1" lon="0.5" />
<node id="603" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1" lat="0.0" lon="0.5" />
<way id="600" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1">
<nd ref="600" />
<nd ref="601" />
<nd ref="602" />
<nd ref="603" />
<nd ref="600" />
<tag k="test:section" v="poly-area"/>
<tag k="test:id" v="0.05"/>
<tag k="area" v="yes"/>
</way>
<node id="700" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1" lat="0.0" lon="0.0" />
<node id="701" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1" lat="1.0" lon="0.0" />
<node id="702" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1" lat="1.0" lon="0.1" />
<node id="703" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1" lat="0.0" lon="0.1" />
<way id="700" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1">
<nd ref="700" />
<nd ref="701" />
<nd ref="702" />
<nd ref="703" />
<nd ref="700" />
<tag k="test:section" v="poly-area"/>
<tag k="test:id" v="0.1"/>
<tag k="area" v="yes"/>
</way>
<node id="800" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1" lat="0.0" lon="0.0" />
<node id="801" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1" lat="1.0" lon="0.0" />
<node id="802" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1" lat="1.0" lon="0.5" />
<node id="803" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1" lat="0.0" lon="0.5" />
<way id="800" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1">
<nd ref="800" />
<nd ref="801" />
<nd ref="802" />
<nd ref="803" />
<nd ref="800" />
<tag k="test:section" v="poly-area"/>
<tag k="test:id" v="0.5"/>
<tag k="area" v="yes"/>
</way>
<node id="900" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1" lat="0.0" lon="0.0" />
<node id="901" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1" lat="1.0" lon="0.0" />
<node id="902" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1" lat="1.0" lon="1.0" />
<node id="903" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1" lat="0.0" lon="1.0" />
<way id="900" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1">
<nd ref="900" />
<nd ref="901" />
<nd ref="902" />
<nd ref="903" />
<nd ref="900" />
<tag k="test:section" v="poly-area"/>
<tag k="test:id" v="1.0"/>
<tag k="area" v="yes"/>
</way>
<node id="1000" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1" lat="0.0" lon="0.0" />
<node id="1001" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1" lat="1.0" lon="0.0" />
<node id="1002" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1" lat="1.0" lon="2.0" />
<node id="1003" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1" lat="0.0" lon="2.0" />
<way id="1000" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1">
<nd ref="1000" />
<nd ref="1001" />
<nd ref="1002" />
<nd ref="1003" />
<nd ref="1000" />
<tag k="test:section" v="poly-area"/>
<tag k="test:id" v="2.0"/>
<tag k="area" v="yes"/>
</way>
<node id="1100" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1" lat="0.0" lon="0.0" />
<node id="1101" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1" lat="1.0" lon="0.0" />
<node id="1102" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1" lat="1.0" lon="5.0" />
<node id="1103" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1" lat="0.0" lon="5.0" />
<way id="1100" version="1" timestamp="2014-01-01T00:00:00Z" uid="1" user="test" changeset="1">
<nd ref="1100" />
<nd ref="1101" />
<nd ref="1102" />
<nd ref="1103" />
<nd ref="1100" />
<tag k="test:section" v="poly-area"/>
<tag k="test:id" v="5.0"/>
<tag k="area" v="yes"/>
</way>
</osm>

View File

@@ -0,0 +1,6 @@
n-main-east | POINT(1.0024481 2.0003542)
n-main-west | POINT(1.001552 2.0002662)
n-alley | POINT(1.0019235 2.0005463)
n-corner | POINT(1.0019235 2.0003542)
w-alley | LINESTRING(1.0019594 2.0003086,1.0019594 2.0005756)
w-main | LINESTRING(1.0013435 2.0003118,1.0016759 2.0003053,1.0019594 2.0003086,1.0021255 2.0003151,1.0023699 2.0003118,1.0026078 2.0002988)

View File

@@ -0,0 +1,6 @@
p-N2 | POINT(1.0003904 2.0003399)
p-S1 | POINT(1.0008104 2.0002927)
p-N1 | POINT(1.0005321 2.0005288)
p-S2 | POINT(1.0006398 2.0001064)
w-north | LINESTRING(1.0001174 2.0004055,1.0004298 2.0003976,1.0006608 2.0004579,1.0010624 2.0005419)
w-south | LINESTRING(1.0001384 2.0001903,1.0007212 2.0001982,1.0010677 2.0002192)

300
tests/scenes/data/roads.osm Normal file
View File

@@ -0,0 +1,300 @@
<?xml version='1.0' encoding='UTF-8'?>
<osm version='0.6' upload='false' generator='JOSM'>
<node id='-204' action='modify' visible='true' lat='2.000651586300547' lon='1.005746444902722'>
<tag k='name' v='split-road' />
</node>
<node id='-189' action='modify' visible='true' lat='2.0005350827634585' lon='1.0057490943252971' />
<node id='-187' action='modify' visible='true' lat='2.0005430261867043' lon='1.0058974619895207' />
<node id='-185' action='modify' visible='true' lat='2.0005430261867043' lon='1.0060511284988949' />
<node id='-183' action='modify' visible='true' lat='2.0005324349557014' lon='1.0061306111761574' />
<node id='-174' action='modify' visible='true' lat='2.0005244915324045' lon='1.00551064629351' />
<node id='-172' action='modify' visible='true' lat='2.0005668564562127' lon='1.0056086749288005' />
<node id='-170' action='modify' visible='true' lat='2.000561560840796' lon='1.0056855081834875' />
<node id='-168' action='modify' visible='true' lat='2.0005006612622807' lon='1.0057358472124205' />
<node id='-166' action='modify' visible='true' lat='2.000505956877894' lon='1.0059107091023978' />
<node id='-164' action='modify' visible='true' lat='2.0005112524934896' lon='1.0060537779214704' />
<node id='-162' action='modify' visible='true' lat='2.0004953656466506' lon='1.006135910021308' />
<node id='-160' action='modify' visible='true' lat='2.000513900301281' lon='1.0062842776855314' />
<node id='-158' action='modify' visible='true' lat='2.000471535376104' lon='1.0063717086305204' />
<node id='-156' action='modify' visible='true' lat='2.000296780048186' lon='1.0063584615176433' />
<node id='-154' action='modify' visible='true' lat='2.000262358542008' lon='1.006281628262956' />
<node id='-152' action='modify' visible='true' lat='2.000339144977876' lon='1.0061994961631182' />
<node id='-150' action='modify' visible='true' lat='2.0003576796342712' lon='1.0061041169504032' />
<node id='-148' action='modify' visible='true' lat='2.0003497362101275' lon='1.0060034388925374' />
<node id='-146' action='modify' visible='true' lat='2.000325905937466' lon='1.0058868642992191' />
<node id='-144' action='modify' visible='true' lat='2.000280893199271' lon='1.0057941345090795' />
<node id='-142' action='modify' visible='true' lat='2.0002782453911037' lon='1.0056351691545544' />
<node id='-141' action='modify' visible='true' lat='2.0003603274423103' lon='1.005470904954879' />
<node id='-139' action='modify' visible='true' lat='2.0007265421773432' lon='1.0047054313390744'>
<tag k='name' v='points-on-road' />
</node>
<node id='-112' action='modify' visible='true' lat='2.0005155253763816' lon='1.0049220138358423' />
<node id='-110' action='modify' visible='true' lat='2.0005155253763816' lon='1.0049220138358423'>
<tag k='test:id' v='n-N-unglued' />
<tag k='test:section' v='points-on-roads' />
</node>
<node id='-108' action='modify' visible='true' lat='2.0002948553437463' lon='1.0046258759080025'>
<tag k='test:id' v='n-S-unglued' />
<tag k='test:section' v='points-on-roads' />
</node>
<node id='-106' action='modify' visible='true' lat='2.0002948553437463' lon='1.0046258759080025' />
<node id='-104' action='modify' visible='true' lat='2.0006117740392657' lon='1.0050661381425037'>
<tag k='test:id' v='n-NE' />
<tag k='test:section' v='points-on-roads' />
</node>
<node id='-102' action='modify' visible='true' lat='2.000334854794143' lon='1.0051338707939657'>
<tag k='test:id' v='n-SE' />
<tag k='test:section' v='points-on-roads' />
</node>
<node id='-100' action='modify' visible='true' lat='2.0006240815601832' lon='1.0053155174501582' />
<node id='-98' action='modify' visible='true' lat='2.0004086999307416' lon='1.0047582624540412'>
<tag k='test:id' v='n-NW' />
<tag k='test:section' v='points-on-roads' />
</node>
<node id='-96' action='modify' visible='true' lat='2.0003840848855767' lon='1.0046258759080025' />
<node id='-94' action='modify' visible='true' lat='2.0004302380949586' lon='1.004499646875733' />
<node id='-92' action='modify' visible='true' lat='2.0003687004821606' lon='1.0053278324776966' />
<node id='-90' action='modify' visible='true' lat='2.0002640865351053' lon='1.0049368303533495' />
<node id='-88' action='modify' visible='true' lat='2.000291778462916' lon='1.004825995105503' />
<node id='-86' action='modify' visible='true' lat='2.0003563929593238' lon='1.004727474885195'>
<tag k='test:id' v='n-SW' />
<tag k='test:section' v='points-on-roads' />
</node>
<node id='-84' action='modify' visible='true' lat='2.0002240870829975' lon='1.00452427693081' />
<node id='-82' action='modify' visible='true' lat='2.000715618411992' lon='1.0018322734314236'>
<tag k='name' v='road-with-alley' />
</node>
<node id='-80' action='modify' visible='true' lat='2.0007286441385155' lon='1.0004669962874884'>
<tag k='name' v='roads-with-pois' />
</node>
<node id='-78' action='modify' visible='true' lat='2.000354154459697' lon='1.002448114434296'>
<tag k='test:id' v='n-main-east' />
<tag k='test:section' v='road-with-alley' />
</node>
<node id='-76' action='modify' visible='true' lat='2.000266230783582' lon='1.0015520494830263'>
<tag k='test:id' v='n-main-west' />
<tag k='test:section' v='road-with-alley' />
</node>
<node id='-74' action='modify' visible='true' lat='2.000546283957771' lon='1.0019235091355527'>
<tag k='test:id' v='n-alley' />
<tag k='test:section' v='road-with-alley' />
</node>
<node id='-72' action='modify' visible='true' lat='2.000354154459697' lon='1.0019235091355527'>
<tag k='test:id' v='n-corner' />
<tag k='test:section' v='road-with-alley' />
</node>
<node id='-70' action='modify' visible='true' lat='2.0005755918453296' lon='1.0019593517336036' />
<node id='-68' action='modify' visible='true' lat='2.000298795108618' lon='1.0026077769165225' />
<node id='-66' action='modify' visible='true' lat='2.000311820838452' lon='1.0023699124021854' />
<node id='-64' action='modify' visible='true' lat='2.0003150772708946' lon='1.0021255310518389' />
<node id='-62' action='modify' visible='true' lat='2.0003085644060037' lon='1.0019593517336036' />
<node id='-60' action='modify' visible='true' lat='2.000305307973548' lon='1.0016758693672019' />
<node id='-58' action='modify' visible='true' lat='2.000311820838452' lon='1.0013435107307307' />
<node id='-56' action='modify' visible='true' lat='2.0004054696330322' lon='1.0001173628501097'>
<tag k='test:section' v='roads-with-pois' />
</node>
<node id='-54' action='modify' visible='true' lat='2.000397598928471' lon='1.0004297578433892'>
<tag k='test:section' v='roads-with-pois' />
</node>
<node id='-52' action='modify' visible='true' lat='2.0004579409958114' lon='1.0006607726283354'>
<tag k='test:section' v='roads-with-pois' />
</node>
<node id='-50' action='modify' visible='true' lat='2.0005418951727663' lon='1.0010624233339804'>
<tag k='test:section' v='roads-with-pois' />
</node>
<node id='-48' action='modify' visible='true' lat='2.000190337028091' lon='1.0001383641941959'>
<tag k='test:section' v='roads-with-pois' />
</node>
<node id='-46' action='modify' visible='true' lat='2.000198207733647' lon='1.000721151492583'>
<tag k='test:section' v='roads-with-pois' />
</node>
<node id='-44' action='modify' visible='true' lat='2.000219196281612' lon='1.0010676736700022'>
<tag k='test:section' v='roads-with-pois' />
</node>
<node id='-42' action='modify' visible='true' lat='2.000339880427198' lon='1.000390380323228'>
<tag k='test:id' v='p-N2' />
<tag k='test:section' v='roads-with-pois' />
</node>
<node id='-40' action='modify' visible='true' lat='2.000292656197374' lon='1.0008104072049482'>
<tag k='test:id' v='p-S1' />
<tag k='test:section' v='roads-with-pois' />
</node>
<node id='-38' action='modify' visible='true' lat='2.0005287773329004' lon='1.0005321393958087'>
<tag k='test:id' v='p-N1' />
<tag k='test:section' v='roads-with-pois' />
</node>
<node id='-36' action='modify' visible='true' lat='2.000106382833144' lon='1.0006397712842492'>
<tag k='test:id' v='p-S2' />
<tag k='test:section' v='roads-with-pois' />
</node>
<node id='-34' action='modify' visible='true' lat='2.0007211692424525' lon='1.0035828658185688'>
<tag k='name' v='building-on-street-corner' />
</node>
<node id='-32' action='modify' visible='true' lat='2.000231635335803' lon='1.0031759205058477' />
<node id='-30' action='modify' visible='true' lat='2.000221087674047' lon='1.0040360790429201' />
<node id='-28' action='modify' visible='true' lat='2.0002263615049336' lon='1.0042735461237067' />
<node id='-26' action='modify' visible='true' lat='2.000105063390253' lon='1.0040413560891597' />
<node id='-24' action='modify' visible='true' lat='2.0006377202618473' lon='1.0040363991494512' />
<node id='-22' action='modify' visible='true' lat='2.0004388569487612' lon='1.0039042871025967' />
<node id='-20' action='modify' visible='true' lat='2.0004385547672516' lon='1.0040022536164286' />
<node id='-18' action='modify' visible='true' lat='2.0002343878022306' lon='1.0040016230872442' />
<node id='-16' action='modify' visible='true' lat='2.000234689983778' lon='1.0039036565734125' />
<node id='-14' action='modify' visible='true' lat='2.0003240388594246' lon='1.0040018999567464'>
<tag k='test:id' v='n-edge-NS' />
<tag k='test:section' v='building-on-street-corner' />
</node>
<node id='-12' action='modify' visible='true' lat='2.000354798021768' lon='1.0039384858598128'>
<tag k='test:id' v='n-inner' />
<tag k='test:section' v='building-on-street-corner' />
</node>
<node id='-10' action='modify' visible='true' lat='2.0004676051467527' lon='1.0039478144477645'>
<tag k='test:id' v='n-outer' />
<tag k='test:section' v='building-on-street-corner' />
</node>
<node id='-8' action='modify' visible='true' lat='2.000234516370527' lon='1.0039599415620857'>
<tag k='test:id' v='n-edge-WE' />
<tag k='test:section' v='building-on-street-corner' />
</node>
<node id='100000' timestamp='2014-01-01T00:00:00Z' uid='1' user='test' visible='true' version='1' changeset='1' lat='2.0' lon='1.0' />
<node id='100001' timestamp='2014-01-01T00:00:00Z' uid='1' user='test' visible='true' version='1' changeset='1' lat='3.0' lon='1.0' />
<node id='100002' timestamp='2014-01-01T00:00:00Z' uid='1' user='test' visible='true' version='1' changeset='1' lat='3.0' lon='2.0' />
<node id='100003' timestamp='2014-01-01T00:00:00Z' uid='1' user='test' visible='true' version='1' changeset='1' lat='2.0' lon='2.0' />
<way id='-195' action='modify' visible='true'>
<nd ref='-170' />
<nd ref='-172' />
<nd ref='-174' />
<tag k='test:id' v='w-5' />
<tag k='test:section' v='split-road' />
</way>
<way id='-194' action='modify' visible='true'>
<nd ref='-160' />
<nd ref='-162' />
<nd ref='-164' />
<nd ref='-166' />
<nd ref='-168' />
<nd ref='-170' />
<tag k='test:id' v='w-4a' />
<tag k='test:section' v='split-road' />
</way>
<way id='-193' action='modify' visible='true'>
<nd ref='-152' />
<nd ref='-154' />
<nd ref='-156' />
<nd ref='-158' />
<nd ref='-160' />
<tag k='test:id' v='w-3' />
<tag k='test:section' v='split-road' />
</way>
<way id='-192' action='modify' visible='true'>
<nd ref='-144' />
<nd ref='-146' />
<nd ref='-148' />
<nd ref='-150' />
<nd ref='-152' />
<tag k='test:id' v='w-2' />
<tag k='test:section' v='split-road' />
</way>
<way id='-184' action='modify' visible='true'>
<nd ref='-160' />
<nd ref='-183' />
<nd ref='-185' />
<nd ref='-187' />
<nd ref='-189' />
<nd ref='-170' />
<tag k='test:id' v='w-4b' />
<tag k='test:section' v='split-road' />
</way>
<way id='-143' action='modify' visible='true'>
<nd ref='-141' />
<nd ref='-142' />
<nd ref='-144' />
<tag k='test:id' v='w-1' />
<tag k='test:section' v='split-road' />
</way>
<way id='-134' action='modify' visible='true'>
<nd ref='-94' />
<nd ref='-96' />
<nd ref='-98' />
<nd ref='-112' />
<nd ref='-104' />
<nd ref='-100' />
<tag k='test:id' v='w-north' />
<tag k='test:section' v='points-on-roads' />
</way>
<way id='-132' action='modify' visible='true'>
<nd ref='-84' />
<nd ref='-106' />
<nd ref='-86' />
<nd ref='-88' />
<nd ref='-90' />
<nd ref='-102' />
<nd ref='-92' />
<tag k='test:id' v='w-south' />
<tag k='test:section' v='points-on-roads' />
</way>
<way id='-130' action='modify' visible='true'>
<nd ref='-62' />
<nd ref='-70' />
<tag k='test:id' v='w-alley' />
<tag k='test:section' v='road-with-alley' />
</way>
<way id='-128' action='modify' visible='true'>
<nd ref='-58' />
<nd ref='-60' />
<nd ref='-62' />
<nd ref='-64' />
<nd ref='-66' />
<nd ref='-68' />
<tag k='test:id' v='w-main' />
<tag k='test:section' v='road-with-alley' />
</way>
<way id='-126' action='modify' visible='true'>
<nd ref='-56' />
<nd ref='-54' />
<nd ref='-52' />
<nd ref='-50' />
<tag k='test:id' v='w-north' />
<tag k='test:section' v='roads-with-pois' />
</way>
<way id='-124' action='modify' visible='true'>
<nd ref='-48' />
<nd ref='-46' />
<nd ref='-44' />
<tag k='test:id' v='w-south' />
<tag k='test:section' v='roads-with-pois' />
</way>
<way id='-122' action='modify' visible='true'>
<nd ref='-32' />
<nd ref='-30' />
<nd ref='-28' />
<tag k='test:id' v='w-WE' />
<tag k='test:section' v='building-on-street-corner' />
</way>
<way id='-120' action='modify' visible='true'>
<nd ref='-26' />
<nd ref='-30' />
<nd ref='-24' />
<tag k='test:id' v='w-NS' />
<tag k='test:section' v='building-on-street-corner' />
</way>
<way id='-118' action='modify' visible='true'>
<nd ref='-22' />
<nd ref='-20' />
<nd ref='-14' />
<nd ref='-18' />
<nd ref='-8' />
<nd ref='-16' />
<nd ref='-22' />
<tag k='area' v='yes' />
<tag k='test:id' v='w-building' />
<tag k='test:section' v='building-on-street-corner' />
</way>
<way id='100000' timestamp='2014-01-01T00:00:00Z' uid='1' user='test' visible='true' version='1' changeset='1'>
<nd ref='100000' />
<nd ref='100001' />
<nd ref='100002' />
<nd ref='100003' />
<nd ref='100000' />
<tag k='note' v='test area, do not leave' />
</way>
</osm>

View File

@@ -0,0 +1,6 @@
w-5 | LINESTRING(1.0056855 2.0005616,1.0056087 2.0005669,1.0055106 2.0005245)
w-4a | LINESTRING(1.0062843 2.0005139,1.0061359 2.0004954,1.0060538 2.0005113,1.0059107 2.000506,1.0057358 2.0005007,1.0056855 2.0005616)
w-3 | LINESTRING(1.0061995 2.0003391,1.0062816 2.0002624,1.0063585 2.0002968,1.0063717 2.0004715,1.0062843 2.0005139)
w-2 | LINESTRING(1.0057941 2.0002809,1.0058869 2.0003259,1.0060034 2.0003497,1.0061041 2.0003577,1.0061995 2.0003391)
w-4b | LINESTRING(1.0062843 2.0005139,1.0061306 2.0005324,1.0060511 2.000543,1.0058975 2.000543,1.0057491 2.0005351,1.0056855 2.0005616)
w-1 | LINESTRING(1.0054709 2.0003603,1.0056352 2.0002782,1.0057941 2.0002809)