Changeset 3554 in josm


Ignore:
Timestamp:
Sep 22, 2010 10:28:06 PM (3 years ago)
Author:
bastiK
Message:

see #5179 (patch by viesturs) - improve join areas

Location:
trunk
Files:
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/data_nodist/Join_Areas_Tests.osm

    r3553 r3554  
    11<?xml version='1.0' encoding='UTF-8'?> 
    22<osm version='0.5' generator='JOSM'> 
    3   <bounds minlat='49.62' minlon='8.978' maxlat='49.666' maxlon='9.02' origin='JOSM' /> 
    4   <node id='-671' visible='true' lat='49.632576330191526' lon='9.001884781637644' /> 
    5   <node id='-526' visible='true' lat='49.665557350679464' lon='8.980018030697323'> 
     3  <bounds minlat='49.12' minlon='8.978' maxlat='49.666' maxlon='9.02' origin='JOSM' /> 
     4  <node id='-1401' action='modify' visible='true' lat='49.57492636306551' lon='8.979626352024342' /> 
     5  <node id='-1399' action='modify' visible='true' lat='49.57231627432242' lon='8.988974722001753' /> 
     6  <node id='-1397' action='modify' visible='true' lat='49.57652602588565' lon='8.990987218316336' /> 
     7  <node id='-1396' action='modify' visible='true' lat='49.578799140751336' lon='8.982158202226557' /> 
     8  <node id='-1392' action='modify' visible='true' lat='49.57367109094459' lon='8.978429862636734' /> 
     9  <node id='-1390' action='modify' visible='true' lat='49.57095901379395' lon='8.9918935131491' /> 
     10  <node id='-1388' action='modify' visible='true' lat='49.57697248133264' lon='8.994862093938686' /> 
     11  <node id='-1387' action='modify' visible='true' lat='49.57978062743839' lon='8.981363267063294'> 
     12    <tag k='name' v='join two multipolygons' /> 
     13  </node> 
     14  <node id='-1384' action='modify' visible='true' lat='49.57471587721213' lon='8.98832552964221' /> 
     15  <node id='-1382' action='modify' visible='true' lat='49.57290566140035' lon='8.998128334271303' /> 
     16  <node id='-1380' action='modify' visible='true' lat='49.57450539045097' lon='8.99910212281062' /> 
     17  <node id='-1378' action='modify' visible='true' lat='49.57947263593361' lon='8.995012210945497' /> 
     18  <node id='-1377' action='modify' visible='true' lat='49.5781256362738' lon='8.989753752833204' /> 
     19  <node id='-1374' action='modify' visible='true' lat='49.57349504136129' lon='8.986572710271446' /> 
     20  <node id='-1372' action='modify' visible='true' lat='49.571263779695904' lon='9.00085494218138' /> 
     21  <node id='-1370' action='modify' visible='true' lat='49.57724164754063' lon='9.001244457597107' /> 
     22  <node id='-1368' action='modify' visible='true' lat='49.58140888280521' lon='8.99533680712527' /> 
     23  <node id='-1367' action='modify' visible='true' lat='49.57900960899432' lon='8.988715045057937' /> 
     24  <node id='-1170' action='modify' timestamp='2010-09-01T07:44:52Z' visible='true' lat='49.586548447612444' lon='8.98191058921896' /> 
     25  <node id='-1168' action='modify' timestamp='2010-09-01T07:44:52Z' visible='true' lat='49.58659590060676' lon='8.979665773725651' /> 
     26  <node id='-1166' action='modify' timestamp='2010-09-01T07:44:52Z' visible='true' lat='49.59078239401975' lon='8.979861116140624' /> 
     27  <node id='-1164' action='modify' timestamp='2010-09-01T07:44:52Z' visible='true' lat='49.590687527911356' lon='8.98168069867828' /> 
     28  <node id='-1162' action='modify' timestamp='2010-09-01T07:44:52Z' visible='true' lat='49.59349189817163' lon='8.9824708670199'> 
     29    <tag k='name' v='Invalid shape - should split into 3 individual shapes' /> 
     30  </node> 
     31  <node id='-1160' action='modify' timestamp='2010-09-01T07:44:52Z' visible='true' lat='49.59361897336678' lon='8.985687593206816' /> 
     32  <node id='-1158' action='modify' timestamp='2010-09-01T07:44:52Z' visible='true' lat='49.58663029201514' lon='8.984906374095479' /> 
     33  <node id='-1156' action='modify' timestamp='2010-09-01T07:44:52Z' visible='true' lat='49.58612382692311' lon='8.990374907874841' /> 
     34  <node id='-1154' action='modify' timestamp='2010-09-01T07:44:52Z' visible='true' lat='49.590479254891314' lon='8.99053115169711' /> 
     35  <node id='-1152' action='modify' timestamp='2010-08-22T06:58:34Z' visible='true' lat='49.59299360654739' lon='8.999428858917476' /> 
     36  <node id='-1150' action='modify' timestamp='2010-08-22T06:58:34Z' visible='true' lat='49.592907759510084' lon='8.995386920867338' /> 
     37  <node id='-1148' action='modify' timestamp='2010-08-22T06:58:34Z' visible='true' lat='49.59063794877312' lon='8.998628118047407' /> 
     38  <node id='-1146' action='modify' timestamp='2010-08-22T06:58:34Z' visible='true' lat='49.59395593568672' lon='8.999308852106346' /> 
     39  <node id='-1144' action='modify' timestamp='2010-08-22T06:58:34Z' visible='true' lat='49.5878107930004' lon='9.00095637433437' /> 
     40  <node id='-1142' action='modify' timestamp='2010-08-22T06:58:34Z' visible='true' lat='49.590630159502766' lon='9.002078403822205' /> 
     41  <node id='-1140' action='modify' timestamp='2010-08-22T07:13:40Z' visible='true' lat='49.596813390158815' lon='9.009579167802686'> 
     42    <tag k='name' v='Insane self-overlapping test. Should result in may small polygons no multipolygon' /> 
     43  </node> 
     44  <node id='-1138' action='modify' timestamp='2010-09-01T07:34:34Z' visible='true' lat='49.59190240292961' lon='9.00051199489379' /> 
     45  <node id='-1136' action='modify' timestamp='2010-08-22T06:58:34Z' visible='true' lat='49.589308021229364' lon='9.000654170391176' /> 
     46  <node id='-1134' action='modify' timestamp='2010-08-22T06:58:34Z' visible='true' lat='49.590607739738225' lon='9.005271937488764' /> 
     47  <node id='-1132' action='modify' timestamp='2010-08-22T06:58:34Z' visible='true' lat='49.5953418202474' lon='8.999475001790184'> 
     48    <tag k='name' v='Illegal multipolygon - convert to single polygon' /> 
     49  </node> 
     50  <node id='-1130' action='modify' timestamp='2010-09-01T07:34:34Z' visible='true' lat='49.59410169848016' lon='9.001948669267644' /> 
     51  <node id='-1128' timestamp='2010-09-01T07:44:52Z' visible='true' lat='49.60780984108299' lon='8.997889316593701' /> 
     52  <node id='-1126' timestamp='2010-09-01T07:44:52Z' visible='true' lat='49.60618838737178' lon='8.994377577454202' /> 
     53  <node id='-1124' timestamp='2010-09-01T07:44:52Z' visible='true' lat='49.605068575229296' lon='8.993991716742768' /> 
     54  <node id='-1122' action='modify' timestamp='2010-09-01T07:44:52Z' visible='true' lat='49.604090077543404' lon='9.004544168372842' /> 
     55  <node id='-1120' timestamp='2010-09-01T07:44:52Z' visible='true' lat='49.60523165626767' lon='9.002363216525607' /> 
     56  <node id='-1118' action='modify' timestamp='2010-09-01T07:44:52Z' visible='true' lat='49.60578612771775' lon='8.996189445142672' /> 
     57  <node id='-1116' timestamp='2010-09-01T07:44:52Z' visible='true' lat='49.60676459136411' lon='8.999142118412772' /> 
     58  <node id='-1114' timestamp='2010-09-01T07:44:52Z' visible='true' lat='49.60492723788813' lon='8.998991129438732' /> 
     59  <node id='-1112' action='modify' timestamp='2010-09-01T07:44:52Z' visible='true' lat='49.60822137862924' lon='8.999662191545573' /> 
     60  <node id='-1110' timestamp='2010-09-01T07:44:52Z' visible='true' lat='49.60774303537242' lon='9.001792813734793' /> 
     61  <node id='-1108' timestamp='2010-09-01T07:44:52Z' visible='true' lat='49.60288323668442' lon='9.00095398610124' /> 
     62  <node id='-1106' timestamp='2010-09-01T07:44:52Z' visible='true' lat='49.60285061894932' lon='9.002598088263003' /> 
     63  <node id='-1104' timestamp='2010-09-01T07:44:52Z' visible='true' lat='49.608699717192344' lon='9.003504022107236' /> 
     64  <node id='-1102' action='modify' timestamp='2010-09-01T07:44:52Z' visible='true' lat='49.60878668733591' lon='8.998823363912022'> 
     65    <tag k='name' v='Tricky islands' /> 
     66  </node> 
     67  <node id='-1100' timestamp='2010-09-01T07:44:52Z' visible='true' lat='49.60631884924948' lon='8.99828651422655' /> 
     68  <node id='-1098' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.632576330191526' lon='9.001884781637644' /> 
     69  <node id='-1096' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.665557350679464' lon='8.980018030697323'> 
    670    <tag k='name' v='Multipolygon' /> 
    771  </node> 
    8   <node id='-524' visible='true' lat='49.66293444373006' lon='8.979904268383734' /> 
    9   <node id='-522' visible='true' lat='49.66309431357888' lon='8.98771163350794' /> 
    10   <node id='-520' visible='true' lat='49.66550322539429' lon='8.987481709734286' /> 
    11   <node id='-518' visible='true' lat='49.661140812390876' lon='8.980754551545285' /> 
    12   <node id='-516' visible='true' lat='49.66414787714609' lon='8.98167662069808' /> 
    13   <node id='-514' visible='true' lat='49.66193599760082' lon='8.983668051096597' /> 
    14   <node id='-512' visible='true' lat='49.66423062929877' lon='8.985896954118042' /> 
    15   <node id='-510' visible='true' lat='49.66122094281029' lon='8.987593944961972' /> 
    16   <node id='-508' visible='true' lat='49.665246272951265' lon='8.996673744036638'> 
     72  <node id='-1094' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.66293444373006' lon='8.979904268383734' /> 
     73  <node id='-1092' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.66309431357888' lon='8.98771163350794' /> 
     74  <node id='-1090' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.66550322539429' lon='8.987481709734286' /> 
     75  <node id='-1088' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.661140812390876' lon='8.980754551545285' /> 
     76  <node id='-1086' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.66414787714609' lon='8.98167662069808' /> 
     77  <node id='-1084' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.66193599760082' lon='8.983668051096597' /> 
     78  <node id='-1082' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.66423062929877' lon='8.985896954118042' /> 
     79  <node id='-1080' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.66122094281029' lon='8.987593944961972' /> 
     80  <node id='-1078' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.665246272951265' lon='8.996673744036638'> 
    1781    <tag k='name' v='No Additional Inner Nodes' /> 
    1882  </node> 
    19   <node id='-506' visible='true' lat='49.66260897027721' lon='8.996995205661822' /> 
    20   <node id='-504' visible='true' lat='49.66247822670222' lon='9.006405902938653' /> 
    21   <node id='-502' visible='true' lat='49.66509579743186' lon='9.006492938770437' /> 
    22   <node id='-500' visible='true' lat='49.663673852556485' lon='9.001872836660935' /> 
    23   <node id='-498' visible='true' lat='49.66356462957665' lon='9.003786018319271' /> 
    24   <node id='-496' visible='true' lat='49.659381328509475' lon='9.002998050852923' /> 
    25   <node id='-494' visible='true' lat='49.658143795735675' lon='9.001321365825214' /> 
    26   <node id='-492' visible='true' lat='49.66102960777179' lon='9.004102187558955' /> 
    27   <node id='-490' visible='true' lat='49.65966007592634' lon='8.995756927212474'> 
     83  <node id='-1076' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.66260897027721' lon='8.996995205661822' /> 
     84  <node id='-1074' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.66247822670222' lon='9.006405902938653' /> 
     85  <node id='-1072' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.66509579743186' lon='9.006492938770437' /> 
     86  <node id='-1070' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.663673852556485' lon='9.001872836660935' /> 
     87  <node id='-1068' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.66356462957665' lon='9.003786018319271' /> 
     88  <node id='-1066' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.659381328509475' lon='9.002998050852923' /> 
     89  <node id='-1064' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.658143795735675' lon='9.001321365825214' /> 
     90  <node id='-1062' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.66102960777179' lon='9.004102187558955' /> 
     91  <node id='-1060' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.65966007592634' lon='8.995756927212474'> 
    2892    <tag k='name' v='With Inner Nodes, resolve tag conflicts beforehand' /> 
    2993  </node> 
    30   <node id='-488' visible='true' lat='49.65470614469758' lon='9.000967096568774' /> 
    31   <node id='-486' visible='true' lat='49.658215448844345' lon='8.998101909487305' /> 
    32   <node id='-484' visible='true' lat='49.65482452933729' lon='8.99800181533644' /> 
    33   <node id='-482' visible='true' lat='49.65622420968986' lon='8.999630518959972' /> 
    34   <node id='-480' visible='true' lat='49.656334599426415' lon='8.99596685442522' /> 
    35   <node id='-478' visible='true' lat='49.664767306664714' lon='9.00358600531296' /> 
    36   <node id='-476' visible='true' lat='49.65595437351232' lon='9.002670090930014' /> 
    37   <node id='-474' visible='true' lat='49.66298227683501' lon='9.007574342263663' /> 
    38   <node id='-472' visible='true' lat='49.652897713964435' lon='8.995398194580462'> 
     94  <node id='-1058' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.65470614469758' lon='9.000967096568774' /> 
     95  <node id='-1056' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.658215448844345' lon='8.998101909487305' /> 
     96  <node id='-1054' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.65482452933729' lon='8.99800181533644' /> 
     97  <node id='-1052' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.65622420968986' lon='8.999630518959972' /> 
     98  <node id='-1050' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.656334599426415' lon='8.99596685442522' /> 
     99  <node id='-1048' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.664767306664714' lon='9.00358600531296' /> 
     100  <node id='-1046' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.65595437351232' lon='9.002670090930014' /> 
     101  <node id='-1044' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.66298227683501' lon='9.007574342263663' /> 
     102  <node id='-1042' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.652897713964435' lon='8.995398194580462'> 
    39103    <tag k='name' v='Overlapping Itself' /> 
    40104  </node> 
    41   <node id='-470' visible='true' lat='49.64759565941927' lon='8.995601060044594' /> 
    42   <node id='-468' visible='true' lat='49.657294551336726' lon='9.005523880219158' /> 
    43   <node id='-466' visible='true' lat='49.65131105391522' lon='9.00298658642922' /> 
    44   <node id='-464' visible='true' lat='49.659323888301465' lon='9.00052935158495' /> 
    45   <node id='-462' visible='true' lat='49.65151745640557' lon='8.997992057795011' /> 
    46   <node id='-460' visible='true' lat='49.648042897844014' lon='9.003942985529385' /> 
    47   <node id='-458' visible='true' lat='49.64965980248303' lon='9.003039719712563' /> 
    48   <node id='-456' visible='true' lat='49.647526853143034' lon='8.99921412331189' /> 
    49   <node id='-454' visible='true' lat='49.64862774189198' lon='8.99756699152827' /> 
    50   <node id='-452' visible='true' lat='49.650123242376026' lon='8.984223634986959' /> 
    51   <node id='-450' visible='true' lat='49.6534782364111' lon='9.003730452396017' /> 
    52   <node id='-448' visible='true' lat='49.64965980248303' lon='8.997301325111557' /> 
    53   <node id='-446' visible='true' lat='49.648702988205066' lon='8.99108732452821' /> 
    54   <node id='-444' visible='true' lat='49.6498411096278' lon='8.989584718400737' /> 
    55   <node id='-442' visible='true' lat='49.64837612802103' lon='8.982669694368326' /> 
    56   <node id='-440' visible='true' lat='49.65267519581664' lon='8.982531354736969'> 
     105  <node id='-1040' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64759565941927' lon='8.995601060044594' /> 
     106  <node id='-1038' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.657294551336726' lon='9.005523880219158' /> 
     107  <node id='-1036' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.65131105391522' lon='9.00298658642922' /> 
     108  <node id='-1034' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.659323888301465' lon='9.00052935158495' /> 
     109  <node id='-1032' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.65151745640557' lon='8.997992057795011' /> 
     110  <node id='-1030' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.648042897844014' lon='9.003942985529385' /> 
     111  <node id='-1028' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64965980248303' lon='9.003039719712563' /> 
     112  <node id='-1026' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.647526853143034' lon='8.99921412331189' /> 
     113  <node id='-1024' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64862774189198' lon='8.99756699152827' /> 
     114  <node id='-1022' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.650123242376026' lon='8.984223634986959' /> 
     115  <node id='-1020' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.6534782364111' lon='9.003730452396017' /> 
     116  <node id='-1018' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64965980248303' lon='8.997301325111557' /> 
     117  <node id='-1016' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.648702988205066' lon='8.99108732452821' /> 
     118  <node id='-1014' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.6498411096278' lon='8.989584718400737' /> 
     119  <node id='-1012' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64837612802103' lon='8.982669694368326' /> 
     120  <node id='-1010' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.65267519581664' lon='8.982531354736969'> 
    57121    <tag k='name' v='Joining an two areas with self-overlap' /> 
    58122  </node> 
    59   <node id='-438' visible='true' lat='49.64821655131596' lon='8.986618619738293' /> 
    60   <node id='-436' visible='true' lat='49.65263419499493' lon='8.992015874465995' /> 
    61   <node id='-434' visible='true' lat='49.65180728142213' lon='8.98635078159476' /> 
    62   <node id='-432' visible='true' lat='49.65154365880048' lon='8.989894759403137' /> 
    63   <node id='-430' visible='true' lat='49.664258008517386' lon='8.994834196254615' /> 
    64   <node id='-428' visible='true' lat='49.66111564855195' lon='8.994837077867599' /> 
    65   <node id='-426' visible='true' lat='49.661575265881794' lon='9.002417415068946' /> 
    66   <node id='-424' visible='true' lat='49.64910487989931' lon='8.98434746261959' /> 
    67   <node id='-422' visible='true' lat='49.66439890567706' lon='9.000253362850133' /> 
    68   <node id='-420' visible='true' lat='49.66336086872286' lon='9.000172520579218' /> 
    69   <node id='-418' visible='true' lat='49.66163205844883' lon='8.996182583343169' /> 
    70   <node id='-416' visible='true' lat='49.66327697326473' lon='8.996037451903568' /> 
    71   <node id='-414' visible='true' lat='49.65366266054767' lon='8.983765181752341' /> 
    72   <node id='-412' visible='true' lat='49.65093842995153' lon='8.98362536207706' /> 
    73   <node id='-410' visible='true' lat='49.65083240952062' lon='8.981009751040055' /> 
    74   <node id='-408' visible='true' lat='49.653656418352305' lon='8.980925219001294' /> 
    75   <node id='-406' visible='true' lat='49.65918199608578' lon='8.97945358407826'> 
     123  <node id='-1008' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64821655131596' lon='8.986618619738293' /> 
     124  <node id='-1006' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.65263419499493' lon='8.992015874465995' /> 
     125  <node id='-1004' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.65180728142213' lon='8.98635078159476' /> 
     126  <node id='-1002' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.65154365880048' lon='8.989894759403137' /> 
     127  <node id='-1000' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.664258008517386' lon='8.994834196254615' /> 
     128  <node id='-998' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.66111564855195' lon='8.994837077867599' /> 
     129  <node id='-996' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.661575265881794' lon='9.002417415068946' /> 
     130  <node id='-994' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64910487989931' lon='8.98434746261959' /> 
     131  <node id='-992' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.66439890567706' lon='9.000253362850133' /> 
     132  <node id='-990' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.66336086872286' lon='9.000172520579218' /> 
     133  <node id='-988' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.66163205844883' lon='8.996182583343169' /> 
     134  <node id='-986' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.66327697326473' lon='8.996037451903568' /> 
     135  <node id='-984' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.65366266054767' lon='8.983765181752341' /> 
     136  <node id='-982' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.65093842995153' lon='8.98362536207706' /> 
     137  <node id='-980' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.65083240952062' lon='8.981009751040055' /> 
     138  <node id='-978' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.653656418352305' lon='8.980925219001294' /> 
     139  <node id='-976' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.65918199608578' lon='8.97945358407826'> 
    76140    <tag k='name' v='Intersection already have nodes added' /> 
    77141  </node> 
    78   <node id='-404' visible='true' lat='49.65687579780412' lon='8.979558364399258' /> 
    79   <node id='-402' visible='true' lat='49.65684188230803' lon='8.984902160770126' /> 
    80   <node id='-400' visible='true' lat='49.65918199608578' lon='8.984744990288629' /> 
    81   <node id='-398' visible='true' lat='49.65687579780412' lon='8.980815728251226' /> 
    82   <node id='-396' visible='true' lat='49.65809673992071' lon='8.980815728251226' /> 
    83   <node id='-394' visible='true' lat='49.65792716645855' lon='8.983382846115664' /> 
    84   <node id='-392' visible='true' lat='49.65701145955204' lon='8.98306850515267' /> 
    85   <node id='-390' visible='true' lat='49.65545132661812' lon='8.981025288893223' /> 
    86   <node id='-388' visible='true' lat='49.65558501959522' lon='8.988437026602341' /> 
    87   <node id='-386' visible='true' lat='49.65931567881406' lon='8.986865321787379'> 
     142  <node id='-974' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.65687579780412' lon='8.979558364399258' /> 
     143  <node id='-972' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.65684188230803' lon='8.984902160770126' /> 
     144  <node id='-970' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.65918199608578' lon='8.984744990288629' /> 
     145  <node id='-968' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.65687579780412' lon='8.980815728251226' /> 
     146  <node id='-966' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.65809673992071' lon='8.980815728251226' /> 
     147  <node id='-964' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.65792716645855' lon='8.983382846115664' /> 
     148  <node id='-962' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.65701145955204' lon='8.98306850515267' /> 
     149  <node id='-960' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.65545132661812' lon='8.981025288893223' /> 
     150  <node id='-958' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.65558501959522' lon='8.988437026602341' /> 
     151  <node id='-956' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.65931567881406' lon='8.986865321787379'> 
    88152    <tag k='name' v='SOME Intersection already have nodes added' /> 
    89153  </node> 
    90   <node id='-384' visible='true' lat='49.65700948686801' lon='8.986970102108378' /> 
    91   <node id='-382' visible='true' lat='49.65823042563044' lon='8.988227465960346' /> 
    92   <node id='-380' visible='true' lat='49.65931567881406' lon='8.992156727997747' /> 
    93   <node id='-378' visible='true' lat='49.65697557146509' lon='8.992313898479246' /> 
    94   <node id='-376' visible='true' lat='49.65806085263415' lon='8.990794583824783' /> 
    95   <node id='-374' visible='true' lat='49.65700948686801' lon='8.988227465960346' /> 
    96   <node id='-372' visible='true' lat='49.660221488976575' lon='8.977137289660517' /> 
    97   <node id='-370' visible='true' lat='49.66019710027813' lon='9.021519330497165' /> 
    98   <node id='-368' visible='true' lat='49.66824309940781' lon='8.99379608098765' /> 
    99   <node id='-366' visible='true' lat='49.665325869211465' lon='9.010629016616129'> 
     154  <node id='-954' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.65700948686801' lon='8.986970102108378' /> 
     155  <node id='-952' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.65823042563044' lon='8.988227465960346' /> 
     156  <node id='-950' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.65931567881406' lon='8.992156727997747' /> 
     157  <node id='-948' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.65697557146509' lon='8.992313898479246' /> 
     158  <node id='-946' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.65806085263415' lon='8.990794583824783' /> 
     159  <node id='-944' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.65700948686801' lon='8.988227465960346' /> 
     160  <node id='-942' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.660221488976575' lon='8.977137289660517' /> 
     161  <node id='-940' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.66019710027813' lon='9.021519330497165' /> 
     162  <node id='-938' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.66824309940781' lon='8.99379608098765' /> 
     163  <node id='-936' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.665325869211465' lon='9.010629016616129'> 
    100164    <tag k='name' v='Member of some (i.e. not multigon) relation' /> 
    101165  </node> 
    102   <node id='-364' visible='true' lat='49.65418064466472' lon='9.02166564057246' /> 
    103   <node id='-362' visible='true' lat='49.66084008723247' lon='9.01744447037755' /> 
    104   <node id='-360' visible='true' lat='49.66089950426598' lon='9.010651964271892' /> 
    105   <node id='-358' visible='true' lat='49.66770174614116' lon='9.008788568211484' /> 
    106   <node id='-356' visible='true' lat='49.61790602056547' lon='8.993872862460284' /> 
    107   <node id='-354' visible='true' lat='49.654142227092336' lon='8.97793106762297' /> 
    108   <node id='-352' visible='true' lat='49.6179783304037' lon='9.009806812371261' /> 
    109   <node id='-350' visible='true' lat='49.66149367061061' lon='9.016824883671967' /> 
    110   <node id='-348' visible='true' lat='49.66156794089354' lon='9.014644856374543' /> 
    111   <node id='-346' visible='true' lat='49.6657566013461' lon='9.017559208656362' /> 
    112   <node id='-344' visible='true' lat='49.665266457583265' lon='9.016733093048918' /> 
    113   <node id='-342' visible='true' lat='49.662236368338334' lon='9.011707556436962' /> 
    114   <node id='-340' visible='true' lat='49.66210268358402' lon='9.017513313344837' /> 
    115   <node id='-338' visible='true' lat='49.663929676767346' lon='9.01471369934183' /> 
    116   <node id='-336' visible='true' lat='49.663989090028004' lon='9.01179934706001' /> 
    117   <node id='-334' visible='true' lat='49.656561909834345' lon='9.011712617586559' /> 
    118   <node id='-332' visible='true' lat='49.65825541574074' lon='9.014718760491427' /> 
    119   <node id='-330' visible='true' lat='49.65507724377221' lon='9.016274166792183' /> 
    120   <node id='-328' visible='true' lat='49.65831483593041' lon='9.011804408209608' /> 
    121   <node id='-326' visible='true' lat='49.65954150350348' lon='9.010225255249217'> 
     166  <node id='-934' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.65418064466472' lon='9.02166564057246' /> 
     167  <node id='-932' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.66084008723247' lon='9.01744447037755' /> 
     168  <node id='-930' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.66089950426598' lon='9.010651964271892' /> 
     169  <node id='-928' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.66770174614116' lon='9.008788568211484' /> 
     170  <node id='-926' action='modify' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.58144205087815' lon='8.993437879659092' /> 
     171  <node id='-924' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.654142227092336' lon='8.97793106762297' /> 
     172  <node id='-922' action='modify' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.582683357701704' lon='9.00815487768719' /> 
     173  <node id='-920' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.66149367061061' lon='9.016824883671967' /> 
     174  <node id='-918' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.66156794089354' lon='9.014644856374543' /> 
     175  <node id='-916' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.6657566013461' lon='9.017559208656362' /> 
     176  <node id='-914' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.665266457583265' lon='9.016733093048918' /> 
     177  <node id='-912' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.662236368338334' lon='9.011707556436962' /> 
     178  <node id='-910' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.66210268358402' lon='9.017513313344837' /> 
     179  <node id='-908' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.663929676767346' lon='9.01471369934183' /> 
     180  <node id='-906' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.663989090028004' lon='9.01179934706001' /> 
     181  <node id='-904' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.656561909834345' lon='9.011712617586559' /> 
     182  <node id='-902' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.65825541574074' lon='9.014718760491427' /> 
     183  <node id='-900' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.65507724377221' lon='9.016274166792183' /> 
     184  <node id='-898' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.65831483593041' lon='9.011804408209608' /> 
     185  <node id='-896' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.65954150350348' lon='9.010225255249217'> 
    122186    <tag k='name' v='One Area already part of multipolygon (as outer)' /> 
    123187  </node> 
    124   <node id='-324' visible='true' lat='49.65948208481168' lon='9.016329331682007' /> 
    125   <node id='-322' visible='true' lat='49.66572689580407' lon='9.018683643788718' /> 
    126   <node id='-320' visible='true' lat='49.66467233731082' lon='9.018729539100242' /> 
    127   <node id='-318' visible='true' lat='49.650467504431084' lon='9.01556653387284' /> 
    128   <node id='-316' visible='true' lat='49.650467504431084' lon='9.012653673442712' /> 
    129   <node id='-314' visible='true' lat='49.6577783879124' lon='9.01859068072843' /> 
    130   <node id='-312' visible='true' lat='49.659950690584154' lon='9.018522543642344' /> 
    131   <node id='-310' visible='true' lat='49.659983770585875' lon='9.015660786026782' /> 
    132   <node id='-308' visible='true' lat='49.65777838791238' lon='9.0156778202983' /> 
    133   <node id='-306' visible='true' lat='49.655114612313845' lon='9.01024820290498' /> 
    134   <node id='-304' visible='true' lat='49.65649630973553' lon='9.01456121513066' /> 
    135   <node id='-302' visible='true' lat='49.649790825127035' lon='9.010994229724082' /> 
    136   <node id='-300' visible='true' lat='49.64907390166997' lon='9.010241166221228' /> 
    137   <node id='-298' visible='true' lat='49.64972521590133' lon='9.013842827268181' /> 
    138   <node id='-296' visible='true' lat='49.652640133446276' lon='9.015498396786755' /> 
    139   <node id='-294' visible='true' lat='49.65267321841768' lon='9.012636639171191' /> 
    140   <node id='-292' visible='true' lat='49.653441916259965' lon='9.016322294998254' /> 
    141   <node id='-290' visible='true' lat='49.651484566652904' lon='9.01400037262895' /> 
    142   <node id='-288' visible='true' lat='49.649036528490285' lon='9.01626713010843' /> 
    143   <node id='-286' visible='true' lat='49.64474487637503' lon='9.013313148784425' /> 
    144   <node id='-284' visible='true' lat='49.64329477394559' lon='9.00982115694612' /> 
    145   <node id='-282' visible='true' lat='49.64633804682556' lon='9.016044421132413' /> 
    146   <node id='-280' visible='true' lat='49.6440995060445' lon='9.015089670434026' /> 
    147   <node id='-278' visible='true' lat='49.64698953060391' lon='8.97763933322747' /> 
    148   <node id='-276' visible='true' lat='49.64702795382207' lon='9.021373906176958' /> 
    149   <node id='-274' visible='true' lat='49.651543995109876' lon='9.011086020347133' /> 
    150   <node id='-272' visible='true' lat='49.65350134232707' lon='9.010218218565463'> 
     188  <node id='-894' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.65948208481168' lon='9.016329331682007' /> 
     189  <node id='-892' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.66572689580407' lon='9.018683643788718' /> 
     190  <node id='-890' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.66467233731082' lon='9.018729539100242' /> 
     191  <node id='-888' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.650467504431084' lon='9.01556653387284' /> 
     192  <node id='-886' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.650467504431084' lon='9.012653673442712' /> 
     193  <node id='-884' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.6577783879124' lon='9.01859068072843' /> 
     194  <node id='-882' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.659950690584154' lon='9.018522543642344' /> 
     195  <node id='-880' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.659983770585875' lon='9.015660786026782' /> 
     196  <node id='-878' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.65777838791238' lon='9.0156778202983' /> 
     197  <node id='-876' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.655114612313845' lon='9.01024820290498' /> 
     198  <node id='-874' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.65649630973553' lon='9.01456121513066' /> 
     199  <node id='-872' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.649790825127035' lon='9.010994229724082' /> 
     200  <node id='-870' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64907390166997' lon='9.010241166221228' /> 
     201  <node id='-868' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64972521590133' lon='9.013842827268181' /> 
     202  <node id='-866' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.652640133446276' lon='9.015498396786755' /> 
     203  <node id='-864' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.65267321841768' lon='9.012636639171191' /> 
     204  <node id='-862' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.653441916259965' lon='9.016322294998254' /> 
     205  <node id='-860' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.651484566652904' lon='9.01400037262895' /> 
     206  <node id='-858' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.649036528490285' lon='9.01626713010843' /> 
     207  <node id='-856' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64474487637503' lon='9.013313148784425' /> 
     208  <node id='-854' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64329477394559' lon='9.00982115694612' /> 
     209  <node id='-852' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64633804682556' lon='9.016044421132413' /> 
     210  <node id='-850' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.6440995060445' lon='9.015089670434026' /> 
     211  <node id='-848' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64698953060391' lon='8.97763933322747' /> 
     212  <node id='-846' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64702795382207' lon='9.021373906176958' /> 
     213  <node id='-844' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.651543995109876' lon='9.011086020347133' /> 
     214  <node id='-842' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.65350134232707' lon='9.010218218565463'> 
    151215    <tag k='name' v='One Area already part of multipolygon (as inner)' /> 
    152216  </node> 
    153   <node id='-270' visible='true' lat='49.64442618533402' lon='9.018507236795525' /> 
    154   <node id='-268' visible='true' lat='49.64634787643868' lon='9.01859251804108' /> 
    155   <node id='-266' visible='true' lat='49.646377327053195' lon='9.017591884759854' /> 
    156   <node id='-264' visible='true' lat='49.64446300005248' lon='9.017591884759854' /> 
    157   <node id='-262' visible='true' lat='49.644279396738646' lon='8.99701844322583' /> 
    158   <node id='-260' visible='true' lat='49.645108516691536' lon='9.00501200093294' /> 
    159   <node id='-258' visible='true' lat='49.64579713321828' lon='9.001725329495672' /> 
    160   <node id='-256' visible='true' lat='49.643570600890634' lon='9.005424239693767' /> 
    161   <node id='-254' visible='true' lat='49.645694403782294' lon='9.012131348650524' /> 
    162   <node id='-252' visible='true' lat='49.646452701397266' lon='9.00974135512665'> 
     217  <node id='-840' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64442618533402' lon='9.018507236795525' /> 
     218  <node id='-838' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64634787643868' lon='9.01859251804108' /> 
     219  <node id='-836' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.646377327053195' lon='9.017591884759854' /> 
     220  <node id='-834' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64446300005248' lon='9.017591884759854' /> 
     221  <node id='-832' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.644279396738646' lon='8.99701844322583' /> 
     222  <node id='-830' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.645108516691536' lon='9.00501200093294' /> 
     223  <node id='-828' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64579713321828' lon='9.001725329495672' /> 
     224  <node id='-826' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.643570600890634' lon='9.005424239693767' /> 
     225  <node id='-824' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.645694403782294' lon='9.012131348650524' /> 
     226  <node id='-822' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.646452701397266' lon='9.00974135512665'> 
    163227    <tag k='name' v='Both part of other relations' /> 
    164228  </node> 
    165   <node id='-250' visible='true' lat='49.64566131406722' lon='9.01503858959705' /> 
    166   <node id='-248' visible='true' lat='49.64477854294109' lon='9.010865000644996' /> 
    167   <node id='-246' visible='true' lat='49.6436516438452' lon='9.013337536747516' /> 
    168   <node id='-244' visible='true' lat='49.64333102750582' lon='9.015932402078883' /> 
    169   <node id='-242' visible='true' lat='49.64364363066422' lon='9.010830064185653' /> 
    170   <node id='-240' visible='true' lat='49.6440995060445' lon='9.012176810003897' /> 
    171   <node id='-238' visible='true' lat='49.644215448513066' lon='8.987601210318644' /> 
    172   <node id='-236' visible='true' lat='49.64509437228782' lon='8.985632145182455' /> 
    173   <node id='-234' visible='true' lat='49.64512070290696' lon='8.990191229749867' /> 
    174   <node id='-232' visible='true' lat='49.64400653203681' lon='8.985527741087623' /> 
    175   <node id='-230' visible='true' lat='49.64362715512701' lon='8.983795590458412' /> 
    176   <node id='-228' visible='true' lat='49.6438359138228' lon='8.988873075900425' /> 
    177   <node id='-226' visible='true' lat='49.64624752120218' lon='8.990209078516749' /> 
    178   <node id='-224' visible='true' lat='49.64561767902291' lon='8.987111582364214' /> 
    179   <node id='-222' visible='true' lat='49.645870282835396' lon='9.000573288940334' /> 
    180   <node id='-220' visible='true' lat='49.644533441390884' lon='9.001738472218983' /> 
    181   <node id='-218' visible='true' lat='49.64620102922634' lon='8.995285052653605' /> 
    182   <node id='-216' visible='true' lat='49.645549394972946' lon='8.997512960693886' /> 
    183   <node id='-214' visible='true' lat='49.64390917555046' lon='9.00236900726505' /> 
    184   <node id='-212' visible='true' lat='49.643583272941804' lon='8.996426078862356' /> 
    185   <node id='-210' visible='true' lat='49.645064815871' lon='8.999528632035787' /> 
    186   <node id='-208' visible='true' lat='49.64660348405886' lon='9.007804150387257' /> 
    187   <node id='-206' visible='true' lat='49.67180165588925' lon='9.019276197911166'> 
     229  <node id='-820' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64566131406722' lon='9.01503858959705' /> 
     230  <node id='-818' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64477854294109' lon='9.010865000644996' /> 
     231  <node id='-816' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.6436516438452' lon='9.013337536747516' /> 
     232  <node id='-814' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64333102750582' lon='9.015932402078883' /> 
     233  <node id='-812' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64364363066422' lon='9.010830064185653' /> 
     234  <node id='-810' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.6440995060445' lon='9.012176810003897' /> 
     235  <node id='-808' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.644215448513066' lon='8.987601210318644' /> 
     236  <node id='-806' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64509437228782' lon='8.985632145182455' /> 
     237  <node id='-804' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64512070290696' lon='8.990191229749867' /> 
     238  <node id='-802' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64400653203681' lon='8.985527741087623' /> 
     239  <node id='-800' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64362715512701' lon='8.983795590458412' /> 
     240  <node id='-798' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.6438359138228' lon='8.988873075900425' /> 
     241  <node id='-796' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64624752120218' lon='8.990209078516749' /> 
     242  <node id='-794' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64561767902291' lon='8.987111582364214' /> 
     243  <node id='-792' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.645870282835396' lon='9.000573288940334' /> 
     244  <node id='-790' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.644533441390884' lon='9.001738472218983' /> 
     245  <node id='-788' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64620102922634' lon='8.995285052653605' /> 
     246  <node id='-786' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.645549394972946' lon='8.997512960693886' /> 
     247  <node id='-784' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64390917555046' lon='9.00236900726505' /> 
     248  <node id='-782' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.643583272941804' lon='8.996426078862356' /> 
     249  <node id='-780' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.645064815871' lon='8.999528632035787' /> 
     250  <node id='-778' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64660348405886' lon='9.007804150387257' /> 
     251  <node id='-776' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.67180165588925' lon='9.019276197911166'> 
    188252    <tag k='name' v='out of bounds' /> 
    189253  </node> 
    190   <node id='-204' visible='true' lat='49.66726589111355' lon='9.018808975183893' /> 
    191   <node id='-202' visible='true' lat='49.64294039575888' lon='8.98264180269116' /> 
    192   <node id='-200' visible='true' lat='49.64654691824636' lon='8.982418392157395' /> 
    193   <node id='-198' visible='true' lat='49.6465677851024' lon='8.992596999330347' /> 
    194   <node id='-196' visible='true' lat='49.64305580574678' lon='8.992869020494213' /> 
    195   <node id='-194' visible='true' lat='49.66722269132057' lon='9.026351284924155' /> 
    196   <node id='-192' visible='true' lat='49.671931242953896' lon='9.026017554404675' /> 
    197   <node id='-190' visible='true' lat='49.66903704959538' lon='9.022880487521558' /> 
    198   <node id='-188' visible='true' lat='49.664846643627826' lon='9.02334771024883' /> 
    199   <node id='-186' visible='true' lat='49.64619224514668' lon='8.984061673983168' /> 
    200   <node id='-184' visible='true' lat='49.64560080131112' lon='8.988407502515859' /> 
    201   <node id='-182' visible='true' lat='49.66476023970688' lon='9.029688590118962' /> 
    202   <node id='-180' visible='true' lat='49.6687778596993' lon='9.028553906352727' /> 
    203   <node id='-178' visible='true' lat='49.64226790264086' lon='9.020479682913138' /> 
    204   <node id='-176' visible='true' lat='49.64222947566583' lon='8.976745109963648' /> 
    205   <node id='-174' visible='true' lat='49.63766059241029' lon='8.985426371428245' /> 
    206   <node id='-172' visible='true' lat='49.64113713627012' lon='8.99764014460778' /> 
    207   <node id='-170' visible='true' lat='49.63620969614912' lon='8.984267584902272' /> 
    208   <node id='-168' visible='true' lat='49.63831098015055' lon='8.986005764691233' /> 
    209   <node id='-166' visible='true' lat='49.63833608786159' lon='9.001965476258553' /> 
    210   <node id='-164' visible='true' lat='49.63866179944343' lon='9.001060174285136' /> 
    211   <node id='-162' visible='true' lat='49.636707497273726' lon='8.996902491147958' /> 
    212   <node id='-160' visible='true' lat='49.63672921217317' lon='9.001496060420484' /> 
    213   <node id='-158' visible='true' lat='49.64166284075567' lon='8.990370527272402' /> 
    214   <node id='-156' visible='true' lat='49.64038715981111' lon='8.984846978165258' /> 
    215   <node id='-154' visible='true' lat='49.63635979087037' lon='8.9920314546263' /> 
    216   <node id='-152' visible='true' lat='49.63665997892509' lon='8.979825569886037' /> 
    217   <node id='-150' visible='true' lat='49.64158780162527' lon='8.984460715989934' /> 
    218   <node id='-148' visible='true' lat='49.63671001008765' lon='8.985696754950974' /> 
    219   <node id='-146' visible='true' lat='49.639336573937996' lon='8.985619502515908' /> 
    220   <node id='-144' visible='true' lat='49.64153777547409' lon='8.98052084180162' /> 
    221   <node id='-142' visible='true' lat='49.63919649619353' lon='9.000021094269913' /> 
    222   <node id='-140' visible='true' lat='49.63655427055324' lon='9.003685105162774' /> 
    223   <node id='-138' visible='true' lat='49.638889008438305' lon='9.003170088929009' /> 
    224   <node id='-136' visible='true' lat='49.63766439678692' lon='9.008322826347838' /> 
    225   <node id='-134' visible='true' lat='49.636803870494575' lon='9.005634441607576' /> 
    226   <node id='-132' visible='true' lat='49.64135304304343' lon='9.008042625328157' /> 
    227   <node id='-130' visible='true' lat='49.641397690721426' lon='9.002032535663991' /> 
    228   <node id='-128' visible='true' lat='49.639702839791006' lon='9.002946110514843' /> 
    229   <node id='-126' visible='true' lat='49.641505032635514' lon='9.005561427326938' /> 
    230   <node id='-124' visible='true' lat='49.640355464550595' lon='9.000557228744347' /> 
    231   <node id='-122' visible='true' lat='49.63983876223289' lon='8.999763400318008' /> 
    232   <node id='-120' visible='true' lat='49.640963432528' lon='9.002300773285747' /> 
    233   <node id='-118' visible='true' lat='49.640355464550595' lon='9.00163017923136' /> 
    234   <node id='-116' visible='true' lat='49.641650361020126' lon='9.011375542032631' /> 
    235   <node id='-114' visible='true' lat='49.63994510769946' lon='9.011537754906723' /> 
    236   <node id='-112' visible='true' lat='49.63989778320692' lon='9.01301762121565' /> 
    237   <node id='-110' visible='true' lat='49.63851559945754' lon='9.011923928883068' /> 
    238   <node id='-108' visible='true' lat='49.63931004998166' lon='9.014994879645652' /> 
    239   <node id='-106' visible='true' lat='49.63656290879177' lon='9.01184224653937' /> 
    240   <node id='-104' visible='true' lat='49.638495992538296' lon='9.013041516659012' /> 
    241   <node id='-102' visible='true' lat='49.639297465489946' lon='9.013075043737933' /> 
    242   <node id='-100' visible='true' lat='49.63932787364639' lon='9.011341760369241' /> 
    243   <node id='-98' visible='true' lat='49.6362341674196' lon='9.011212347946481' /> 
    244   <node id='-96' visible='true' lat='49.63846974351432' lon='9.014959728094702' /> 
    245   <node id='-94' visible='true' lat='49.639285639926086' lon='9.016386267202325' /> 
    246   <node id='-92' visible='true' lat='49.63614569649766' lon='9.016254920813461' /> 
    247   <node id='-90' visible='true' lat='49.636497278618506' lon='9.01558299248487' /> 
    248   <node id='-88' visible='true' lat='49.64173715249402' lon='9.01288893804428' /> 
    249   <node id='-86' visible='true' lat='49.63997057825359' lon='9.017121223877993' /> 
    250   <node id='-84' visible='true' lat='49.6418769973781' lon='9.016690773382148' /> 
    251   <node id='-82' visible='true' lat='49.638457370514' lon='9.015664984322639' /> 
    252   <node id='-80' visible='true' lat='49.631502879910435' lon='8.984843899814363' /> 
    253   <node id='-78' visible='true' lat='49.63276591351912' lon='8.988186843940152' /> 
    254   <node id='-76' visible='true' lat='49.63332524651039' lon='8.982503838926318' /> 
    255   <node id='-74' visible='true' lat='49.631033744799794' lon='8.984788184078935' /> 
    256   <node id='-72' visible='true' lat='49.63087135082409' lon='8.987936123130721' /> 
    257   <node id='-70' visible='true' lat='49.632224617411495' lon='8.98487175768208' /> 
    258   <node id='-68' visible='true' lat='49.63191788028032' lon='8.988911148500739' /> 
    259   <node id='-66' visible='true' lat='49.63282112167936' lon='8.984873752905482' /> 
    260   <node id='-64' visible='true' lat='49.629896975600474' lon='8.982336691720024' /> 
    261   <node id='-62' visible='true' lat='49.633361332289276' lon='8.984899615549795' /> 
    262   <node id='-60' visible='true' lat='49.63146679275468' lon='8.988019696733868' /> 
    263   <node id='-58' visible='true' lat='49.63204418403885' lon='8.988131128204722' /> 
    264   <node id='-56' visible='true' lat='49.629734577834874' lon='8.988799717029881' /> 
    265   <node id='-54' visible='true' lat='49.62984284307208' lon='8.984760326211225' /> 
    266   <node id='-52' visible='true' lat='49.633235031946306' lon='8.989050437839317' /> 
    267   <node id='-50' visible='true' lat='49.634715291319765' lon='8.977209351682495' /> 
    268   <node id='-48' visible='true' lat='49.6347537242248' lon='9.020943924631984' /> 
    269   <node id='-46' visible='true' lat='49.62789803392637' lon='8.977125941387275' /> 
    270   <node id='-44' visible='true' lat='49.62793647221095' lon='9.020860514336768' /> 
    271   <node id='-42' visible='true' lat='49.633374730988635' lon='9.000934610919133' /> 
    272   <node id='-40' visible='true' lat='49.6315080216117' lon='8.997138044228079' /> 
    273   <node id='-38' visible='true' lat='49.631610067691966' lon='9.003079417313643' /> 
    274   <node id='-36' visible='true' lat='49.629711140902785' lon='8.999277013032064' /> 
    275   <node id='-34' visible='true' lat='49.63246699537921' lon='8.999116354145995' /> 
    276   <node id='-32' visible='true' lat='49.632576330191526' lon='9.001884781637644' /> 
    277   <node id='-30' visible='true' lat='49.633942630142286' lon='9.011036145015492' /> 
    278   <node id='-28' visible='true' lat='49.63397051736248' lon='9.010775661985484' /> 
    279   <node id='-26' visible='true' lat='49.63376409638575' lon='9.010301073275484' /> 
    280   <node id='-24' visible='true' lat='49.63394262769327' lon='9.011036375275484' /> 
    281   <node id='-22' visible='true' lat='49.63389375219822' lon='9.010963515015485' /> 
    282   <node id='-20' visible='true' lat='49.633856212166755' lon='9.010893473725478' /> 
    283   <node id='-18' visible='true' lat='49.63394377111033' lon='9.010928613485484' /> 
    284   <node id='-16' visible='true' lat='49.63365009319664' lon='9.01041866293549' /> 
    285   <node id='-14' visible='true' lat='49.6339376312857' lon='9.010915330605481' /> 
    286   <node id='-12' visible='true' lat='49.6339459893696' lon='9.010719537165489' /> 
    287   <node id='-10' visible='true' lat='49.633945127068216' lon='9.010800819035481' /> 
    288   <node id='-8' visible='true' lat='49.63397651971739' lon='9.010999225285477' /> 
    289   <node id='-6' visible='true' lat='49.63393264307744' lon='9.011047179395488' /> 
    290   <node id='-4' visible='true' lat='49.633945117271765' lon='9.010801740085483' /> 
    291   <node id='-2' visible='true' lat='49.634297623749426' lon='9.009913613166118'> 
     254  <node id='-774' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.66726589111355' lon='9.018808975183893' /> 
     255  <node id='-772' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64294039575888' lon='8.98264180269116' /> 
     256  <node id='-770' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64654691824636' lon='8.982418392157395' /> 
     257  <node id='-768' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.6465677851024' lon='8.992596999330347' /> 
     258  <node id='-766' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64305580574678' lon='8.992869020494213' /> 
     259  <node id='-764' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.66722269132057' lon='9.026351284924155' /> 
     260  <node id='-762' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.671931242953896' lon='9.026017554404675' /> 
     261  <node id='-760' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.66903704959538' lon='9.022880487521558' /> 
     262  <node id='-758' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.664846643627826' lon='9.02334771024883' /> 
     263  <node id='-756' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64619224514668' lon='8.984061673983168' /> 
     264  <node id='-754' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64560080131112' lon='8.988407502515859' /> 
     265  <node id='-752' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.66476023970688' lon='9.029688590118962' /> 
     266  <node id='-750' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.6687778596993' lon='9.028553906352727' /> 
     267  <node id='-748' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64226790264086' lon='9.020479682913138' /> 
     268  <node id='-746' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64222947566583' lon='8.976745109963648' /> 
     269  <node id='-744' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.63766059241029' lon='8.985426371428245' /> 
     270  <node id='-742' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64113713627012' lon='8.99764014460778' /> 
     271  <node id='-740' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.63620969614912' lon='8.984267584902272' /> 
     272  <node id='-738' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.63831098015055' lon='8.986005764691233' /> 
     273  <node id='-736' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.63833608786159' lon='9.001965476258553' /> 
     274  <node id='-734' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.63866179944343' lon='9.001060174285136' /> 
     275  <node id='-732' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.636707497273726' lon='8.996902491147958' /> 
     276  <node id='-730' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.63672921217317' lon='9.001496060420484' /> 
     277  <node id='-728' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64166284075567' lon='8.990370527272402' /> 
     278  <node id='-726' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64038715981111' lon='8.984846978165258' /> 
     279  <node id='-724' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.63635979087037' lon='8.9920314546263' /> 
     280  <node id='-722' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.63665997892509' lon='8.979825569886037' /> 
     281  <node id='-720' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64158780162527' lon='8.984460715989934' /> 
     282  <node id='-718' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.63671001008765' lon='8.985696754950974' /> 
     283  <node id='-716' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.639336573937996' lon='8.985619502515908' /> 
     284  <node id='-714' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64153777547409' lon='8.98052084180162' /> 
     285  <node id='-712' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.63919649619353' lon='9.000021094269913' /> 
     286  <node id='-710' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.63655427055324' lon='9.003685105162774' /> 
     287  <node id='-708' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.638889008438305' lon='9.003170088929009' /> 
     288  <node id='-706' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.63766439678692' lon='9.008322826347838' /> 
     289  <node id='-704' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.636803870494575' lon='9.005634441607576' /> 
     290  <node id='-702' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64135304304343' lon='9.008042625328157' /> 
     291  <node id='-700' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.641397690721426' lon='9.002032535663991' /> 
     292  <node id='-698' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.639702839791006' lon='9.002946110514843' /> 
     293  <node id='-696' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.641505032635514' lon='9.005561427326938' /> 
     294  <node id='-694' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.640355464550595' lon='9.000557228744347' /> 
     295  <node id='-692' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.63983876223289' lon='8.999763400318008' /> 
     296  <node id='-690' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.640963432528' lon='9.002300773285747' /> 
     297  <node id='-688' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.640355464550595' lon='9.00163017923136' /> 
     298  <node id='-686' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.641650361020126' lon='9.011375542032631' /> 
     299  <node id='-684' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.63994510769946' lon='9.011537754906723' /> 
     300  <node id='-682' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.63989778320692' lon='9.01301762121565' /> 
     301  <node id='-680' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.63851559945754' lon='9.011923928883068' /> 
     302  <node id='-678' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.63931004998166' lon='9.014994879645652' /> 
     303  <node id='-676' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.63656290879177' lon='9.01184224653937' /> 
     304  <node id='-674' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.638495992538296' lon='9.013041516659012' /> 
     305  <node id='-672' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.639297465489946' lon='9.013075043737933' /> 
     306  <node id='-670' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.63932787364639' lon='9.011341760369241' /> 
     307  <node id='-668' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.6362341674196' lon='9.011212347946481' /> 
     308  <node id='-666' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.63846974351432' lon='9.014959728094702' /> 
     309  <node id='-664' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.639285639926086' lon='9.016386267202325' /> 
     310  <node id='-662' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.63614569649766' lon='9.016254920813461' /> 
     311  <node id='-660' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.636497278618506' lon='9.01558299248487' /> 
     312  <node id='-658' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64173715249402' lon='9.01288893804428' /> 
     313  <node id='-656' action='modify' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.63993662729721' lon='9.01494551470347' /> 
     314  <node id='-654' action='modify' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.64179212326588' lon='9.014488850844076' /> 
     315  <node id='-652' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.638457370514' lon='9.015664984322639' /> 
     316  <node id='-650' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.631502879910435' lon='8.984843899814363' /> 
     317  <node id='-648' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.63276591351912' lon='8.988186843940152' /> 
     318  <node id='-646' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.63332524651039' lon='8.982503838926318' /> 
     319  <node id='-644' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.631033744799794' lon='8.984788184078935' /> 
     320  <node id='-642' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.63087135082409' lon='8.987936123130721' /> 
     321  <node id='-640' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.632224617411495' lon='8.98487175768208' /> 
     322  <node id='-638' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.63191788028032' lon='8.988911148500739' /> 
     323  <node id='-636' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.63282112167936' lon='8.984873752905482' /> 
     324  <node id='-634' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.629896975600474' lon='8.982336691720024' /> 
     325  <node id='-632' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.633361332289276' lon='8.984899615549795' /> 
     326  <node id='-630' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.63146679275468' lon='8.988019696733868' /> 
     327  <node id='-628' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.63204418403885' lon='8.988131128204722' /> 
     328  <node id='-626' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.629734577834874' lon='8.988799717029881' /> 
     329  <node id='-624' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.62984284307208' lon='8.984760326211225' /> 
     330  <node id='-622' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.633235031946306' lon='8.989050437839317' /> 
     331  <node id='-620' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.634715291319765' lon='8.977209351682495' /> 
     332  <node id='-618' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.6347537242248' lon='9.020943924631984' /> 
     333  <node id='-616' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.62789803392637' lon='8.977125941387275' /> 
     334  <node id='-614' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.62793647221095' lon='9.020860514336768' /> 
     335  <node id='-612' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.633374730988635' lon='9.000934610919133' /> 
     336  <node id='-610' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.6315080216117' lon='8.997138044228079' /> 
     337  <node id='-608' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.631610067691966' lon='9.003079417313643' /> 
     338  <node id='-606' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.629711140902785' lon='8.999277013032064' /> 
     339  <node id='-604' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.63246699537921' lon='8.999116354145995' /> 
     340  <node id='-602' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.632576330191526' lon='9.001884781637644' /> 
     341  <node id='-600' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.633942630142286' lon='9.011036145015492' /> 
     342  <node id='-598' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.63397051736248' lon='9.010775661985484' /> 
     343  <node id='-596' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.63376409638575' lon='9.010301073275484' /> 
     344  <node id='-594' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.63394262769327' lon='9.011036375275484' /> 
     345  <node id='-592' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.63389375219822' lon='9.010963515015485' /> 
     346  <node id='-590' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.633856212166755' lon='9.010893473725478' /> 
     347  <node id='-588' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.63394377111033' lon='9.010928613485484' /> 
     348  <node id='-586' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.63365009319664' lon='9.01041866293549' /> 
     349  <node id='-584' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.6339376312857' lon='9.010915330605481' /> 
     350  <node id='-582' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.6339459893696' lon='9.010719537165489' /> 
     351  <node id='-580' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.633945127068216' lon='9.010800819035481' /> 
     352  <node id='-578' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.63397651971739' lon='9.010999225285477' /> 
     353  <node id='-576' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.63393264307744' lon='9.011047179395488' /> 
     354  <node id='-574' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.633945117271765' lon='9.010801740085483' /> 
     355  <node id='-572' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.634297623749426' lon='9.009913613166118'> 
    292356    <tag k='name' v='two nodes are overlapping, but not identical' /> 
    293357  </node> 
    294   <way id='-642' visible='true'> 
    295     <nd ref='-186' /> 
    296     <nd ref='-226' /> 
    297     <nd ref='-234' /> 
    298     <nd ref='-236' /> 
    299     <nd ref='-232' /> 
    300     <nd ref='-238' /> 
    301     <nd ref='-224' /> 
    302     <nd ref='-184' /> 
    303     <nd ref='-228' /> 
    304     <nd ref='-230' /> 
    305     <nd ref='-186' /> 
     358  <node id='-570' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.626279053225524' lon='8.981414002506174'> 
     359    <tag k='name' v='Self-intersecting area' /> 
     360  </node> 
     361  <node id='-568' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.62213994271339' lon='8.988098410211036' /> 
     362  <node id='-566' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.62498429234751' lon='8.99252191530984' /> 
     363  <node id='-564' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.627255407522924' lon='8.988884811117488' /> 
     364  <node id='-562' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.62216116981817' lon='8.980955268644076' /> 
     365  <node id='-560' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.62551493621301' lon='8.98813117691547' /> 
     366  <node id='-558' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.62485693695976' lon='8.99075251327032' /> 
     367  <node id='-556' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.623413552631625' lon='8.988000110097728' /> 
     368  <node id='-554' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.623230260988386' lon='8.996387956370246' /> 
     369  <node id='-552' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.626201899176685' lon='8.996838498556237'> 
     370    <tag k='name' v='Two touching areas, should NOT be combined into one' /> 
     371  </node> 
     372  <node id='-550' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.62628149413567' lon='9.002204046407563' /> 
     373  <node id='-548' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.6245303749984' lon='9.001139128513406' /> 
     374  <node id='-546' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.62468957024812' lon='9.0049072995235' /> 
     375  <node id='-544' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.62251385681077' lon='9.004866341142955' /> 
     376  <node id='-542' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.622089316031165' lon='9.00208117126593' /> 
     377  <node id='-540' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.62673252978008' lon='9.011501598791163'> 
     378    <tag k='name' v='Touching areas, should not be combined where only touching' /> 
     379  </node> 
     380  <node id='-538' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.62681212387209' lon='9.014245810287644' /> 
     381  <node id='-536' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.625591666837664' lon='9.013180892393487' /> 
     382  <node id='-534' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.62479570012563' lon='9.015310728181802' /> 
     383  <node id='-532' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.62360172567424' lon='9.013549517818388' /> 
     384  <node id='-530' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.622832259967964' lon='9.015064977898536' /> 
     385  <node id='-528' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.62121368899072' lon='9.014983061137446' /> 
     386  <node id='-526' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.62089527525643' lon='9.011460640410618' /> 
     387  <node id='-524' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.62691824912582' lon='9.018259731581004' /> 
     388  <node id='-522' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.62131982643976' lon='9.017891106156107' /> 
     389  <node id='-520' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.623654791826745' lon='9.016047979031603' /> 
     390  <node id='-518' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.62577739053262' lon='9.016088937412146' /> 
     391  <node id='-516' action='modify' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.619780616819725' lon='8.976919630914859' /> 
     392  <node id='-514' action='modify' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.61981906150899' lon='9.02065420386435' /> 
     393  <node id='-512' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.61808335500149' lon='8.979625921855847'> 
     394    <tag k='name' v='Inner touchin aras, should create three inner parts' /> 
     395  </node> 
     396  <node id='-510' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.61813642716417' lon='8.982902592299407' /> 
     397  <node id='-508' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.616544237141035' lon='8.982902592299407' /> 
     398  <node id='-506' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.61537659806236' lon='8.981591924121982' /> 
     399  <node id='-504' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.614686616366264' lon='8.983148342582673' /> 
     400  <node id='-502' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.613959471238125' lon='8.98192122950156' /> 
     401  <node id='-500' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.61333316235859' lon='8.983025467441038' /> 
     402  <node id='-498' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.61142233977348' lon='8.983148342582673' /> 
     403  <node id='-496' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.61158157785009' lon='8.979216338050403' /> 
     404  <node id='-494' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.6182425713161' lon='8.98839101529237' /> 
     405  <node id='-492' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.61460700246505' lon='8.988431973672913' /> 
     406  <node id='-490' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.61553009112371' lon='8.983970131529919' /> 
     407  <node id='-488' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.61511052965412' lon='8.984688429055172' /> 
     408  <node id='-486' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.61449346139858' lon='8.986457183763283' /> 
     409  <node id='-484' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.61138603341918' lon='8.988798633095548' /> 
     410  <node id='-482' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.614062864506266' lon='8.983912462130109' /> 
     411  <node id='-480' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.61410362729504' lon='8.98496099667205' /> 
     412  <node id='-478' action='modify' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.61022835848153' lon='8.975691709364362' /> 
     413  <node id='-476' action='modify' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.61026681070658' lon='9.02106461753563' /> 
     414  <node id='-474' action='modify' timestamp='2010-06-07T04:01:23Z' uid='213040' user='jf01' visible='true' version='1' lat='49.619005572030616' lon='8.996005058584048' /> 
     415  <node id='-472' action='modify' timestamp='2010-06-07T04:01:46Z' uid='213040' user='jf01' visible='true' version='1' lat='49.61923120911822' lon='8.996295158584047' /> 
     416  <node id='-470' action='modify' timestamp='2010-06-07T04:01:18Z' uid='213040' user='jf01' visible='true' version='2' lat='49.61829424299725' lon='8.99553268621828' /> 
     417  <node id='-468' action='modify' timestamp='2010-06-07T04:01:31Z' uid='213040' user='jf01' visible='true' version='2' lat='49.6193399116426' lon='8.995502758584049' /> 
     418  <node id='-466' action='modify' timestamp='2010-06-07T04:01:24Z' uid='213040' user='jf01' visible='true' version='1' lat='49.61906924632146' lon='8.995714758584047' /> 
     419  <node id='-464' action='modify' timestamp='2010-06-07T04:01:20Z' uid='213040' user='jf01' visible='true' version='2' lat='49.61858740669941' lon='8.995430488236533' /> 
     420  <node id='-462' action='modify' timestamp='2010-06-07T04:01:53Z' uid='213040' user='jf01' visible='true' version='1' lat='49.61910723269727' lon='8.99568665858405' /> 
     421  <node id='-460' action='modify' timestamp='2010-06-08T02:49:37Z' uid='213040' user='jf01' visible='true' version='1' lat='49.6188339886587' lon='8.996517858584049' /> 
     422  <node id='-458' action='modify' timestamp='2010-06-07T04:43:01Z' uid='213040' user='jf01' visible='true' version='2' lat='49.61836068594718' lon='8.995422220691438' /> 
     423  <node id='-456' action='modify' timestamp='2010-06-07T04:01:37Z' uid='213040' user='jf01' visible='true' version='2' lat='49.61859496210561' lon='8.995280458584048' /> 
     424  <node id='-454' action='modify' timestamp='2010-06-07T04:01:38Z' uid='213040' user='jf01' visible='true' version='1' lat='49.61903016895301' lon='8.995231258584047' /> 
     425  <node id='-452' action='modify' timestamp='2010-06-07T04:19:46Z' uid='213040' user='jf01' visible='true' version='1' lat='49.61917110534958' lon='8.995703458584048' /> 
     426  <node id='-450' action='modify' timestamp='2010-06-07T04:01:32Z' uid='213040' user='jf01' visible='true' version='2' lat='49.61937056422288' lon='8.996163025302147' /> 
     427  <node id='-448' action='modify' timestamp='2010-06-08T02:48:00Z' uid='213040' user='jf01' visible='true' version='2' lat='49.618441330512404' lon='8.995765258584047' /> 
     428  <node id='-446' action='modify' timestamp='2010-06-07T04:09:41Z' uid='213040' user='jf01' visible='true' version='2' lat='49.619293496479635' lon='8.995280333552733' /> 
     429  <node id='-444' action='modify' timestamp='2010-06-07T04:43:09Z' uid='213040' user='jf01' visible='true' version='1' lat='49.61884529530876' lon='8.995041258584049' /> 
     430  <node id='-442' action='modify' timestamp='2010-06-07T04:01:31Z' uid='213040' user='jf01' visible='true' version='2' lat='49.61925590522109' lon='8.995350358584048' /> 
     431  <node id='-440' action='modify' timestamp='2010-06-07T04:01:49Z' uid='213040' user='jf01' visible='true' version='2' lat='49.61890252842708' lon='8.995086054646046' /> 
     432  <node id='-438' action='modify' timestamp='2010-06-07T04:19:52Z' uid='213040' user='jf01' visible='true' version='3' lat='49.61895548555539' lon='8.995552858584048' /> 
     433  <node id='-436' action='modify' timestamp='2010-06-07T04:01:42Z' uid='213040' user='jf01' visible='true' version='1' lat='49.619252929787' lon='8.996340858584047' /> 
     434  <node id='-434' action='modify' timestamp='2010-06-07T04:01:35Z' uid='213040' user='jf01' visible='true' version='1' lat='49.61914254118215' lon='8.996324358584049' /> 
     435  <node id='-432' action='modify' timestamp='2010-06-07T04:01:24Z' uid='213040' user='jf01' visible='true' version='1' lat='49.61894606334714' lon='8.995811658584048' /> 
     436  <node id='-430' action='modify' timestamp='2010-06-08T02:34:42Z' uid='213040' user='jf01' visible='true' version='2' lat='49.618287025229776' lon='8.995497915492605' /> 
     437  <node id='-428' action='modify' timestamp='2010-06-07T04:01:35Z' uid='213040' user='jf01' visible='true' version='2' lat='49.61934179608414' lon='8.995588458584047' /> 
     438  <node id='-426' action='modify' timestamp='2010-06-07T04:01:21Z' uid='213040' user='jf01' visible='true' version='2' lat='49.6190895756353' lon='8.995710845912319' /> 
     439  <node id='-424' action='modify' timestamp='2010-06-07T04:01:36Z' uid='213040' user='jf01' visible='true' version='1' lat='49.618532378803636' lon='8.995501158584048' /> 
     440  <node id='-422' action='modify' timestamp='2010-06-07T04:01:51Z' uid='213040' user='jf01' visible='true' version='2' lat='49.6191149254759' lon='8.995659844328351' /> 
     441  <node id='-420' action='modify' timestamp='2010-06-07T04:01:19Z' uid='213040' user='jf01' visible='true' version='1' lat='49.61856213314697' lon='8.995770558584049' /> 
     442  <node id='-418' action='modify' timestamp='2010-06-07T04:01:25Z' uid='213040' user='jf01' visible='true' version='2' lat='49.61853988130028' lon='8.995741971475498' /> 
     443  <node id='-416' action='modify' timestamp='2010-06-07T04:02:03Z' uid='213040' user='jf01' visible='true' version='2' lat='49.61916932008913' lon='8.995049658584046' /> 
     444  <node id='-414' action='modify' timestamp='2010-06-07T04:01:41Z' uid='213040' user='jf01' visible='true' version='2' lat='49.618588019425566' lon='8.995251458584047' /> 
     445  <node id='-412' action='modify' timestamp='2010-06-07T04:01:24Z' uid='213040' user='jf01' visible='true' version='2' lat='49.61892166478678' lon='8.995283158584046' /> 
     446  <node id='-410' action='modify' timestamp='2010-06-07T04:19:47Z' uid='213040' user='jf01' visible='true' version='1' lat='49.619181023463256' lon='8.995726458584048' /> 
     447  <node id='-408' action='modify' timestamp='2010-06-07T04:01:24Z' uid='213040' user='jf01' visible='true' version='2' lat='49.61938870876071' lon='8.99615419927907' /> 
     448  <node id='-406' action='modify' timestamp='2010-06-07T04:19:52Z' uid='213040' user='jf01' visible='true' version='2' lat='49.619151070759926' lon='8.995857358584047' /> 
     449  <node id='-404' action='modify' timestamp='2010-06-08T02:47:58Z' uid='213040' user='jf01' visible='true' version='2' lat='49.61839620309099' lon='8.995796258584049' /> 
     450  <node id='-402' action='modify' timestamp='2010-06-07T04:01:20Z' uid='213040' user='jf01' visible='true' version='2' lat='49.6193022153382' lon='8.995326033677996' /> 
     451  <node id='-400' action='modify' timestamp='2010-06-07T04:01:46Z' uid='213040' user='jf01' visible='true' version='2' lat='49.618898258037724' lon='8.99500935858405' /> 
     452  <node id='-398' action='modify' timestamp='2010-06-07T04:01:34Z' uid='213040' user='jf01' visible='true' version='2' lat='49.61926267645462' lon='8.99538470439111' /> 
     453  <node id='-396' action='modify' timestamp='2008-01-02T17:01:25Z' uid='5748' user='fatbozz' visible='true' version='2' lat='49.61895637818563' lon='8.995086758584048' /> 
     454  <node id='-394' action='modify' timestamp='2010-06-07T04:19:51Z' uid='213040' user='jf01' visible='true' version='2' lat='49.618992876844864' lon='8.99570235858405' /> 
     455  <node id='-392' action='modify' timestamp='2010-06-07T04:01:22Z' uid='213040' user='jf01' visible='true' version='1' lat='49.61871526883218' lon='8.995280358584047' /> 
     456  <node id='-390' action='modify' timestamp='2010-06-07T04:01:34Z' uid='213040' user='jf01' visible='true' version='1' lat='49.61893108699506' lon='8.995823458584047' /> 
     457  <node id='-388' action='modify' timestamp='2010-06-07T04:01:40Z' uid='213040' user='jf01' visible='true' version='1' lat='49.61903750835727' lon='8.996497858584048' /> 
     458  <node id='-386' action='modify' timestamp='2010-06-07T04:01:30Z' uid='213040' user='jf01' visible='true' version='2' lat='49.61827668045692' lon='8.99546050345486' /> 
     459  <node id='-384' action='modify' timestamp='2010-06-07T04:01:27Z' uid='213040' user='jf01' visible='true' version='1' lat='49.619291213705324' lon='8.995639958584048' /> 
     460  <node id='-382' action='modify' timestamp='2010-06-07T04:01:38Z' uid='213040' user='jf01' visible='true' version='1' lat='49.618741651016016' lon='8.995973558584048' /> 
     461  <node id='-380' action='modify' timestamp='2010-06-07T04:19:45Z' uid='213040' user='jf01' visible='true' version='2' lat='49.61912320086037' lon='8.995462358584048' /> 
     462  <node id='-378' action='modify' timestamp='2010-06-07T04:01:45Z' uid='213040' user='jf01' visible='true' version='2' lat='49.618550073320144' lon='8.995780621162336' /> 
     463  <node id='-376' action='modify' timestamp='2010-06-07T04:19:49Z' uid='213040' user='jf01' visible='true' version='1' lat='49.61911060485593' lon='8.995633158584049' /> 
     464  <node id='-374' action='modify' timestamp='2010-06-07T04:01:29Z' uid='213040' user='jf01' visible='true' version='2' lat='49.61852011761496' lon='8.995698010732623' /> 
     465  <node id='-372' action='modify' timestamp='2010-06-07T04:01:32Z' uid='213040' user='jf01' visible='true' version='1' lat='49.619263244625124' lon='8.994923858584047' /> 
     466  <node id='-370' action='modify' timestamp='2010-06-07T04:09:42Z' uid='213040' user='jf01' visible='true' version='1' lat='49.618729848460106' lon='8.995120458584049' /> 
     467  <node id='-368' action='modify' timestamp='2010-06-07T04:01:23Z' uid='213040' user='jf01' visible='true' version='1' lat='49.61892979764025' lon='8.995314558584049' /> 
     468  <node id='-366' action='modify' timestamp='2010-06-07T04:19:50Z' uid='213040' user='jf01' visible='true' version='2' lat='49.61912082051308' lon='8.995806758584049' /> 
     469  <node id='-364' action='modify' timestamp='2010-06-08T02:40:40Z' uid='213040' user='jf01' visible='true' version='2' lat='49.61939929556202' lon='8.996194339974096' /> 
     470  <node id='-362' action='modify' timestamp='2010-06-07T04:19:45Z' uid='213040' user='jf01' visible='true' version='1' lat='49.619121713143315' lon='8.995923658584049' /> 
     471  <node id='-360' action='modify' timestamp='2010-06-07T04:01:19Z' uid='213040' user='jf01' visible='true' version='1' lat='49.61834700924229' lon='8.995830458584047' /> 
     472  <node id='-358' action='modify' timestamp='2010-06-07T04:01:50Z' uid='213040' user='jf01' visible='true' version='2' lat='49.61832615179851' lon='8.995697202066708' /> 
     473  <node id='-356' action='modify' timestamp='2010-06-07T04:01:37Z' uid='213040' user='jf01' visible='true' version='2' lat='49.61923234496662' lon='8.99544370009753' /> 
     474  <node id='-354' action='modify' timestamp='2010-09-01T07:18:37Z' visible='true' version='1' lat='49.618649600482655' lon='8.995357966858563' /> 
     475  <node id='-352' action='modify' timestamp='2010-06-07T04:01:38Z' uid='213040' user='jf01' visible='true' version='2' lat='49.619040087066864' lon='8.995677958584048' /> 
     476  <node id='-350' action='modify' timestamp='2010-06-07T04:01:30Z' uid='213040' user='jf01' visible='true' version='2' lat='49.61884954010229' lon='8.99544388066912' /> 
     477  <node id='-348' action='modify' timestamp='2010-06-07T04:01:44Z' uid='213040' user='jf01' visible='true' version='1' lat='49.61893614523317' lon='8.99656535858405' /> 
     478  <node id='-346' action='modify' timestamp='2010-06-07T04:01:32Z' uid='213040' user='jf01' visible='true' version='2' lat='49.61833207873726' lon='8.995450663782876' /> 
     479  <node id='-344' action='modify' timestamp='2010-06-07T04:01:27Z' uid='213040' user='jf01' visible='true' version='2' lat='49.619266021696916' lon='8.995593958584049' /> 
     480  <node id='-342' action='modify' timestamp='2010-06-07T04:01:42Z' uid='213040' user='jf01' visible='true' version='1' lat='49.61911546473168' lon='8.995464758584049' /> 
     481  <node id='-340' action='modify' timestamp='2010-06-07T04:01:52Z' uid='213040' user='jf01' visible='true' version='1' lat='49.61881673114018' lon='8.99613645858405' /> 
     482  <node id='-338' action='modify' timestamp='2010-06-07T04:01:45Z' uid='213040' user='jf01' visible='true' version='2' lat='49.619147004333314' lon='8.99560795858405' /> 
     483  <node id='-336' action='modify' timestamp='2010-06-07T04:01:48Z' uid='213040' user='jf01' visible='true' version='1' lat='49.61917695703665' lon='8.996177458584047' /> 
     484  <node id='-334' action='modify' timestamp='2010-06-07T04:01:25Z' uid='213040' user='jf01' visible='true' version='2' lat='49.61847981279682' lon='8.995689158584046' /> 
     485  <node id='-332' action='modify' timestamp='2010-06-07T04:01:52Z' uid='213040' user='jf01' visible='true' version='2' lat='49.619270345959684' lon='8.995109191708606' /> 
     486  <node id='-330' action='modify' timestamp='2010-06-07T04:09:47Z' uid='213040' user='jf01' visible='true' version='1' lat='49.61876634712032' lon='8.995091558584049' /> 
     487  <node id='-328' action='modify' timestamp='2010-06-07T04:01:18Z' uid='213040' user='jf01' visible='true' version='1' lat='49.61890073756624' lon='8.995328358584048' /> 
     488  <node id='-326' action='modify' timestamp='2010-06-07T04:01:34Z' uid='213040' user='jf01' visible='true' version='2' lat='49.61940786119761' lon='8.996235487252036' /> 
     489  <node id='-324' action='modify' timestamp='2010-06-07T04:01:26Z' uid='213040' user='jf01' visible='true' version='1' lat='49.61894050920333' lon='8.995383958584048' /> 
     490  <node id='-322' action='modify' timestamp='2010-06-07T04:01:28Z' uid='213040' user='jf01' visible='true' version='1' lat='49.619103324713755' lon='8.996014188988203' /> 
     491  <node id='-320' action='modify' timestamp='2010-06-08T02:35:19Z' uid='213040' user='jf01' visible='true' version='3' lat='49.61833539405471' lon='8.99575962626546' /> 
     492  <node id='-318' action='modify' timestamp='2010-09-01T07:18:37Z' visible='true' version='1' lat='49.61830307542173' lon='8.995566402351232' /> 
     493  <node id='-316' action='modify' timestamp='2010-06-07T04:01:42Z' uid='213040' user='jf01' visible='true' version='2' lat='49.6192706109462' lon='8.995475082306038' /> 
     494  <node id='-314' action='modify' timestamp='2010-06-07T04:19:51Z' uid='213040' user='jf01' visible='true' version='2' lat='49.619054567513054' lon='8.99570235858405' /> 
     495  <node id='-312' action='modify' timestamp='2010-09-01T07:18:37Z' visible='true' version='1' lat='49.61860357699268' lon='8.995413148087703' /> 
     496  <node id='-310' action='modify' timestamp='2010-06-07T04:01:27Z' uid='213040' user='jf01' visible='true' version='1' lat='49.618805424490084' lon='8.995240958584048' /> 
     497  <node id='-308' action='modify' timestamp='2010-06-07T04:01:47Z' uid='213040' user='jf01' visible='true' version='1' lat='49.6188769340926' lon='8.996635058584047' /> 
     498  <node id='-306' action='modify' timestamp='2010-06-07T04:43:05Z' uid='213040' user='jf01' visible='true' version='2' lat='49.61833584574924' lon='8.995436718912064' /> 
     499  <node id='-304' action='modify' timestamp='2010-06-07T04:43:15Z' uid='213040' user='jf01' visible='true' version='2' lat='49.61841795744353' lon='8.99538726378288' /> 
     500  <node id='-302' action='modify' timestamp='2010-06-07T04:01:51Z' uid='213040' user='jf01' visible='true' version='2' lat='49.619089213956855' lon='8.9954729834901' /> 
     501  <node id='-300' action='modify' timestamp='2010-06-07T04:01:48Z' uid='213040' user='jf01' visible='true' version='1' lat='49.61911893607148' lon='8.996121758584048' /> 
     502  <node id='-298' action='modify' timestamp='2010-06-07T04:01:21Z' uid='213040' user='jf01' visible='true' version='2' lat='49.61920135559624' lon='8.996245458584049' /> 
     503  <node id='-296' action='modify' timestamp='2010-06-07T04:01:19Z' uid='213040' user='jf01' visible='true' version='1' lat='49.61919104075805' lon='8.995674458584046' /> 
     504  <node id='-294' action='modify' timestamp='2010-06-07T04:01:28Z' uid='213040' user='jf01' visible='true' version='2' lat='49.618452265063404' lon='8.995724652451486' /> 
     505  <node id='-292' action='modify' timestamp='2010-06-07T04:09:52Z' uid='213040' user='jf01' visible='true' version='2' lat='49.61927947311732' lon='8.995179666802553' /> 
     506  <node id='-290' action='modify' timestamp='2010-06-07T04:01:43Z' uid='213040' user='jf01' visible='true' version='2' lat='49.618812565532245' lon='8.995051158584047' /> 
     507  <node id='-288' action='modify' timestamp='2010-06-07T04:01:44Z' uid='213040' user='jf01' visible='true' version='1' lat='49.61891392865787' lon='8.995390158584048' /> 
     508  <node id='-286' action='modify' timestamp='2010-06-07T04:01:47Z' uid='213040' user='jf01' visible='true' version='1' lat='49.618977900492844' lon='8.995539558584047' /> 
     509  <node id='-284' action='modify' timestamp='2010-06-07T04:01:37Z' uid='213040' user='jf01' visible='true' version='2' lat='49.61936490934421' lon='8.996259980085036' /> 
     510  <node id='-282' action='modify' timestamp='2010-09-01T07:19:58Z' visible='true' lat='49.61919862186357' lon='9.01044194354723' /> 
     511  <node id='-280' action='modify' timestamp='2010-09-01T07:19:58Z' visible='true' lat='49.619436130456656' lon='9.010512488801263'> 
     512    <tag k='name' v='Point very close to line, fails if integers used for intersetion testing' /> 
     513  </node> 
     514  <node id='-278' action='modify' timestamp='2010-09-01T07:19:58Z' visible='true' lat='49.6191016733426' lon='9.010641845079641' /> 
     515  <node id='-276' action='modify' timestamp='2010-09-01T07:19:58Z' visible='true' lat='49.61921124616921' lon='9.010768452308135' /> 
     516  <node id='-274' action='modify' timestamp='2010-09-01T07:19:58Z' visible='true' lat='49.61914709414676' lon='9.010694416849152' /> 
     517  <node id='-272' action='modify' timestamp='2010-09-01T07:19:58Z' visible='true' lat='49.619308194472175' lon='9.010568550775721' /> 
     518  <node id='-270' action='modify' timestamp='2010-09-01T07:19:58Z' visible='true' lat='49.61930744074704' lon='9.010363792085391' /> 
     519  <node id='-268' action='modify' timestamp='2010-09-01T07:19:58Z' visible='true' lat='49.61927578427986' lon='9.010843113565025' /> 
     520  <node id='-266' action='modify' timestamp='2010-09-01T07:22:22Z' visible='true' lat='49.608932687099' lon='8.980308090593379' /> 
     521  <node id='-264' action='modify' timestamp='2010-09-01T07:22:22Z' visible='true' lat='49.60936383385557' lon='8.980073090593379'> 
     522    <tag k='name' v='Part of outer way within bounds of outer shell, may get discarded' /> 
     523  </node> 
     524  <node id='-262' action='modify' timestamp='2010-09-01T07:22:22Z' visible='true' lat='49.60902961938861' lon='8.980286090593381' /> 
     525  <node id='-260' action='modify' timestamp='2010-09-01T07:22:22Z' visible='true' lat='49.60879839549169' lon='8.980438090593381' /> 
     526  <node id='-258' action='modify' timestamp='2010-09-01T07:22:22Z' visible='true' lat='49.609234546553864' lon='8.979989841865759' /> 
     527  <node id='-256' action='modify' timestamp='2010-09-01T07:22:22Z' visible='true' lat='49.608938745367084' lon='8.980394090593379' /> 
     528  <node id='-254' action='modify' timestamp='2010-09-01T07:22:22Z' visible='true' lat='49.608793346935066' lon='8.980332090593379' /> 
     529  <node id='-252' action='modify' timestamp='2010-09-01T07:22:22Z' visible='true' lat='49.60922498494282' lon='8.979824552607317' /> 
     530  <node id='-250' action='modify' timestamp='2010-09-01T07:22:22Z' visible='true' lat='49.60897408526418' lon='8.98039109059338' /> 
     531  <node id='-248' action='modify' timestamp='2010-09-01T07:22:22Z' visible='true' lat='49.60897812410956' lon='8.98013709059338' /> 
     532  <node id='-246' action='modify' timestamp='2010-09-01T07:22:22Z' visible='true' lat='49.6087660847294' lon='8.979894090593382' /> 
     533  <node id='-244' action='modify' timestamp='2010-09-01T07:22:22Z' visible='true' lat='49.60896196872802' lon='8.980171090593378' /> 
     534  <node id='-242' action='modify' timestamp='2010-09-01T07:22:22Z' visible='true' lat='49.60897770931492' lon='8.98016627430816' /> 
     535  <node id='-240' action='modify' timestamp='2010-09-01T07:22:22Z' visible='true' lat='49.60876204588413' lon='8.97987409059338' /> 
     536  <node id='-238' action='modify' timestamp='2010-09-01T07:22:22Z' visible='true' lat='49.608954900748586' lon='8.98016809059338' /> 
     537  <node id='-236' action='modify' timestamp='2010-09-01T07:22:22Z' visible='true' lat='49.60891754142889' lon='8.980011090593377' /> 
     538  <node id='-234' action='modify' timestamp='2010-09-01T07:22:22Z' visible='true' lat='49.609068257011565' lon='8.980149604896077' /> 
     539  <node id='-232' action='modify' timestamp='2010-09-01T07:22:22Z' visible='true' lat='49.60860036701766' lon='8.979901130167272' /> 
     540  <node id='-230' action='modify' timestamp='2010-09-01T07:22:22Z' visible='true' lat='49.60895389103724' lon='8.980141090593381' /> 
     541  <node id='-228' action='modify' timestamp='2010-09-01T07:22:22Z' visible='true' lat='49.6089417745011' lon='8.980031090593382' /> 
     542  <node id='-226' action='modify' timestamp='2010-09-01T07:22:22Z' visible='true' lat='49.609030669493556' lon='8.979948937900476' /> 
     543  <node id='-224' action='modify' timestamp='2010-09-01T07:22:22Z' visible='true' lat='49.60921439656928' lon='8.980093090593378' /> 
     544  <node id='-222' action='modify' timestamp='2010-09-01T07:22:22Z' visible='true' lat='49.608612034412964' lon='8.980057791204963' /> 
     545  <node id='-220' action='modify' timestamp='2010-09-01T07:22:22Z' visible='true' lat='49.609371911546816' lon='8.980231090593382' /> 
     546  <node id='-218' action='modify' timestamp='2010-09-01T07:22:22Z' visible='true' lat='49.609014473718254' lon='8.98002109059338' /> 
     547  <node id='-216' action='modify' timestamp='2010-09-01T07:22:22Z' visible='true' lat='49.60863583197044' lon='8.980463090593382' /> 
     548  <node id='-214' action='modify' timestamp='2010-09-01T07:22:22Z' visible='true' lat='49.6092079239068' lon='8.979993067866946' /> 
     549  <node id='-212' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.63892778415116' lon='9.016727595468751'> 
     550    <tag k='name' v='Adjacent areas' /> 
     551  </node> 
     552  <node id='-210' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.63894475998399' lon='9.018300397281658' /> 
     553  <node id='-208' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.6375696983495' lon='9.018300397281658' /> 
     554  <node id='-206' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.636449249050045' lon='9.018300397281658' /> 
     555  <node id='-204' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.63641529563854' lon='9.016911089013588' /> 
     556  <node id='-202' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.637552722037306' lon='9.01966349218618' /> 
     557  <node id='-200' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.6352269113224' lon='9.019663492186178' /> 
     558  <node id='-198' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.635209934193504' lon='9.018326610645206' /> 
     559  <node id='-196' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.60703277142605' lon='9.013572577815157'> 
     560    <tag k='name' v='Overlapping from inside' /> 
     561  </node> 
     562  <node id='-194' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.60717742572599' lon='9.01872923792571' /> 
     563  <node id='-192' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.60423913401764' lon='9.018555164808395' /> 
     564  <node id='-190' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.60436654329301' lon='9.012866045750766' /> 
     565  <node id='-188' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.604301580971565' lon='9.015214706755497' /> 
     566  <node id='-186' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.60596690162032' lon='9.015634813876297' /> 
     567  <node id='-184' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.60585641082779' lon='9.018722672540653' /> 
     568  <node id='-182' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.601887119002555' lon='9.01203662014546' /> 
     569  <node id='-180' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.60326743500286' lon='9.016427358539831' /> 
     570  <node id='-178' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.60088902001335' lon='9.01940912864347' /> 
     571  <node id='-176' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.59842553932453' lon='9.015018390249102' /> 
     572  <node id='-174' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.6021631853287' lon='9.015903091268862' /> 
     573  <node id='-172' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.600761601650554' lon='9.01754142649064' /> 
     574  <node id='-170' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.60035810797174' lon='9.014756256613616' /> 
     575  <node id='-168' action='modify' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.5974232484995' lon='8.974946440523215' /> 
     576  <node id='-166' action='modify' timestamp='2010-09-01T07:08:32Z' visible='true' lat='49.59746171082487' lon='9.020319348694485' /> 
     577  <node id='-164' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.60881409905279' lon='9.013067052740885' /> 
     578  <node id='-162' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.6089119402238' lon='9.014610495586618' /> 
     579  <node id='-160' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.60899890998874' lon='9.01613716187968' /> 
     580  <node id='-158' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.60774870470155' lon='9.015499652878182' /> 
     581  <node id='-156' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.607737833210614' lon='9.014107199006487' /> 
     582  <node id='-154' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.60899890998874' lon='9.017529615751378' /> 
     583  <node id='-152' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true' lat='49.607803062119885' lon='9.016707564670496' /> 
     584  <node id='-150' action='modify' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59368056586976' lon='9.010546476113923' /> 
     585  <node id='-148' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.595944678569566' lon='9.016466252875812' /> 
     586  <node id='-146' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.593614378290034' lon='9.019401890338584' /> 
     587  <node id='-144' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59078753323923' lon='9.012849887885437' /> 
     588  <node id='-142' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59278702596504' lon='9.010956614449302' /> 
     589  <node id='-140' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59466233775474' lon='9.0160620709063' /> 
     590  <node id='-138' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59377984707092' lon='9.018061708018623' /> 
     591  <node id='-136' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.591697657332844' lon='9.013509342677802' /> 
     592  <node id='-134' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59262155381594' lon='9.012637160533064' /> 
     593  <node id='-132' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.594014260216206' lon='9.01595570723011' /> 
     594  <node id='-130' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59382121417842' lon='9.016359889199624' /> 
     595  <node id='-128' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59251123873798' lon='9.013445524472088' /> 
     596  <node id='-126' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.592290607833576' lon='9.013679524559699' /> 
     597  <node id='-124' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59377322833046' lon='9.016921489409894' /> 
     598  <node id='-122' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59432919939776' lon='9.015941241770149' /> 
     599  <node id='-120' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59266126718291' lon='9.01177518930124' /> 
     600  <node id='-118' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59127569281911' lon='9.013014113401471' /> 
     601  <node id='-116' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59367615336723' lon='9.018596079127787' /> 
     602  <node id='-114' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59537934967783' lon='9.01628160553395' /> 
     603  <node id='-112' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59286424610918' lon='9.009692163066786' /> 
     604  <node id='-110' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.58999598726625' lon='9.011557356492407' /> 
     605  <node id='-108' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59619121506835' lon='9.01267374963767' /> 
     606  <node id='-106' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59618239051721' lon='9.01791535160019' /> 
     607  <node id='-104' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.58923090588506' lon='9.015639168929775' /> 
     608  <node id='-102' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.589879046981274' lon='9.012107894880351' /> 
     609  <node id='-100' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59589117943322' lon='9.013426804465077' /> 
     610  <node id='-98' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59567056381802' lon='9.016596442015464' /> 
     611  <node id='-96' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.590182429216284' lon='9.0149158959317' /> 
     612  <node id='-94' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59045822961075' lon='9.013469349935553' /> 
     613  <node id='-92' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.595381004308535' lon='9.014426623021238' /> 
     614  <node id='-90' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59535342712273' lon='9.015724259870726' /> 
     615  <node id='-88' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.590789188025724' lon='9.014511713962188' /> 
     616  <node id='-86' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.5909408765488' lon='9.013979895581251' /> 
     617  <node id='-84' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59511902041382' lon='9.015086077813601' /> 
     618  <node id='-82' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59511902041382' lon='9.01476698678504' /> 
     619  <node id='-80' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59074781834665' lon='9.013788440964115' /> 
     620  <node id='-78' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59049959953543' lon='9.01466062310885' /> 
     621  <node id='-76' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.595463735772384' lon='9.016043350899286' /> 
     622  <node id='-74' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.595574044172544' lon='9.013852259169827' /> 
     623  <node id='-72' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.5902927495612' lon='9.012831167878428' /> 
     624  <node id='-70' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.5898376765303' lon='9.015298805165976' /> 
     625  <node id='-68' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59578087175036' lon='9.01721335133735' /> 
     626  <node id='-66' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.5960566404897' lon='9.013022622495564' /> 
     627  <node id='-64' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.58925848653267' lon='9.011682440175603' /> 
     628  <node id='-62' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.588596546686055' lon='9.016979351249736' /> 
     629  <node id='-60' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59073402844584' lon='9.017915351600188' /> 
     630  <node id='-58' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59207163067417' lon='9.008938257329968' /> 
     631  <node id='-56' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59583602562297' lon='9.00951262118138' /> 
     632  <node id='-54' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59539479289559' lon='9.019468261272523' /> 
     633  <node id='-52' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59274731270045' lon='9.018766261009686' /> 
     634  <node id='-50' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59367118930141' lon='9.010874076236579' /> 
     635  <node id='-48' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.594650203616105' lon='9.010959167177528' /> 
     636  <node id='-46' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59434684916912' lon='9.018213169893512' /> 
     637  <node id='-44' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.593464352776806' lon='9.017851533394474' /> 
     638  <node id='-42' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59383665788956' lon='9.012724804202241' /> 
     639  <node id='-40' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.5942227490788' lon='9.01280989514319' /> 
     640  <node id='-38' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59380907983053' lon='9.017596260571624' /> 
     641  <node id='-36' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59418138231186' lon='9.017596260571624' /> 
     642  <node id='-34' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.594402004663465' lon='9.011788803851791' /> 
     643  <node id='-32' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.593878024948886' lon='9.011661167440366' /> 
     644  <node id='-30' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59322993698855' lon='9.018064260746849' /> 
     645  <node id='-28' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59466399240977' lon='9.018808806480163' /> 
     646  <node id='-26' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59517417503492' lon='9.010384803326117' /> 
     647  <node id='-24' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.592774891359845' lon='9.010065712297555' /> 
     648  <node id='-22' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59236120983157' lon='9.018064260746849' /> 
     649  <node id='-20' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59193373523305' lon='9.018000442541137' /> 
     650  <node id='-18' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59247152524883' lon='9.010257166914691' /> 
     651  <node id='-16' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59219573623785' lon='9.01036353059088' /> 
     652  <node id='-14' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59154762592395' lon='9.017830260659236' /> 
     653  <node id='-12' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.591106354399614' lon='9.01755371510115' /> 
     654  <node id='-10' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.591106354399614' lon='9.019000261097299' /> 
     655  <node id='-8' action='modify' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.5955497763459' lon='9.019888610520818' /> 
     656  <node id='-6' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59619452427462' lon='9.009193530152816' /> 
     657  <node id='-4' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.591520046570636' lon='9.008427711684268' /> 
     658  <node id='-2' action='modify' timestamp='2010-09-01T08:01:00Z' visible='true' lat='49.59121281152023' lon='9.010296308747527' /> 
     659  <way id='-1398' action='modify' visible='true'> 
     660    <nd ref='-1396' /> 
     661    <nd ref='-1397' /> 
     662    <nd ref='-1399' /> 
     663    <nd ref='-1401' /> 
     664    <nd ref='-1396' /> 
     665  </way> 
     666  <way id='-1389' action='modify' visible='true'> 
     667    <nd ref='-1387' /> 
     668    <nd ref='-1388' /> 
     669    <nd ref='-1390' /> 
     670    <nd ref='-1392' /> 
     671    <nd ref='-1387' /> 
     672    <tag k='building' v='yes' /> 
     673  </way> 
     674  <way id='-1379' action='modify' visible='true'> 
     675    <nd ref='-1377' /> 
     676    <nd ref='-1378' /> 
     677    <nd ref='-1380' /> 
     678    <nd ref='-1382' /> 
     679    <nd ref='-1384' /> 
     680    <nd ref='-1377' /> 
     681  </way> 
     682  <way id='-1369' action='modify' visible='true'> 
     683    <nd ref='-1367' /> 
     684    <nd ref='-1368' /> 
     685    <nd ref='-1370' /> 
     686    <nd ref='-1372' /> 
     687    <nd ref='-1374' /> 
     688    <nd ref='-1367' /> 
     689    <tag k='building' v='yes' /> 
     690  </way> 
     691  <way id='-1348' action='modify' timestamp='2010-09-01T07:44:52Z' visible='true'> 
     692    <nd ref='-1164' /> 
     693    <nd ref='-1154' /> 
     694    <nd ref='-1156' /> 
     695    <nd ref='-1158' /> 
     696    <nd ref='-1160' /> 
     697    <nd ref='-1162' /> 
     698    <nd ref='-1164' /> 
     699    <nd ref='-1166' /> 
     700    <nd ref='-1168' /> 
     701    <nd ref='-1170' /> 
     702    <nd ref='-1164' /> 
     703    <tag k='building' v='yes' /> 
     704  </way> 
     705  <way id='-1346' action='modify' timestamp='2010-08-22T06:58:34Z' visible='true'> 
     706    <nd ref='-1130' /> 
     707    <nd ref='-1132' /> 
     708    <nd ref='-1150' /> 
     709    <nd ref='-1144' /> 
     710    <nd ref='-1134' /> 
     711    <nd ref='-1130' /> 
     712    <tag k='natural' v='water' /> 
     713  </way> 
     714  <way id='-1344' action='modify' timestamp='2010-09-01T07:34:34Z' visible='true'> 
     715    <nd ref='-1130' /> 
     716    <nd ref='-1146' /> 
     717    <nd ref='-1152' /> 
     718    <nd ref='-1138' /> 
     719    <nd ref='-1130' /> 
     720  </way> 
     721  <way id='-1342' action='modify' timestamp='2010-09-01T07:34:34Z' visible='true'> 
     722    <nd ref='-1138' /> 
     723    <nd ref='-1142' /> 
     724    <nd ref='-1136' /> 
     725    <nd ref='-1148' /> 
     726    <nd ref='-1138' /> 
     727  </way> 
     728  <way id='-1340' action='modify' timestamp='2010-09-01T07:44:52Z' visible='true'> 
     729    <nd ref='-1128' /> 
     730    <nd ref='-1116' /> 
     731    <nd ref='-1118' /> 
     732    <nd ref='-1120' /> 
     733    <nd ref='-1122' /> 
     734    <nd ref='-1124' /> 
     735    <nd ref='-1126' /> 
     736    <nd ref='-1128' /> 
     737    <tag k='building' v='yes' /> 
     738  </way> 
     739  <way id='-1338' action='modify' timestamp='2010-09-01T07:44:52Z' visible='true'> 
     740    <nd ref='-1100' /> 
     741    <nd ref='-1102' /> 
     742    <nd ref='-1104' /> 
     743    <nd ref='-1106' /> 
     744    <nd ref='-1108' /> 
     745    <nd ref='-1110' /> 
     746    <nd ref='-1112' /> 
     747    <nd ref='-1114' /> 
     748    <nd ref='-1100' /> 
     749    <tag k='building' v='yes' /> 
     750  </way> 
     751  <way id='-1336' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     752    <nd ref='-756' /> 
     753    <nd ref='-796' /> 
     754    <nd ref='-804' /> 
     755    <nd ref='-806' /> 
     756    <nd ref='-802' /> 
     757    <nd ref='-808' /> 
     758    <nd ref='-794' /> 
     759    <nd ref='-754' /> 
     760    <nd ref='-798' /> 
     761    <nd ref='-800' /> 
     762    <nd ref='-756' /> 
    306763    <tag k='name' v='Thing in the Middle' /> 
    307764  </way> 
    308   <way id='-640' visible='true'> 
    309     <nd ref='-200' /> 
    310     <nd ref='-202' /> 
    311     <nd ref='-196' /> 
    312     <nd ref='-198' /> 
    313     <nd ref='-200' /> 
     765  <way id='-1334' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     766    <nd ref='-770' /> 
     767    <nd ref='-772' /> 
     768    <nd ref='-766' /> 
     769    <nd ref='-768' /> 
     770    <nd ref='-770' /> 
    314771    <tag k='amenity' v='parking' /> 
    315772    <tag k='name' v='Outer blob' /> 
    316773    <tag k='parking' v='surface' /> 
    317774  </way> 
    318   <way id='-638' visible='true'> 
    319     <nd ref='-294' /> 
    320     <nd ref='-316' /> 
    321     <nd ref='-318' /> 
    322     <nd ref='-296' /> 
    323     <nd ref='-294' /> 
    324   </way> 
    325   <way id='-636' visible='true'> 
    326     <nd ref='-472' /> 
    327     <nd ref='-450' /> 
    328     <nd ref='-460' /> 
    329     <nd ref='-454' /> 
    330     <nd ref='-448' /> 
    331     <nd ref='-458' /> 
    332     <nd ref='-466' /> 
    333     <nd ref='-462' /> 
    334     <nd ref='-456' /> 
    335     <nd ref='-470' /> 
    336     <nd ref='-472' /> 
    337     <tag k='amenity' v='parking' /> 
    338     <tag k='parking' v='surface' /> 
    339   </way> 
    340   <way id='-634' visible='true'> 
    341     <nd ref='-212' /> 
    342     <nd ref='-218' /> 
    343     <nd ref='-208' /> 
    344     <nd ref='-256' /> 
    345     <nd ref='-212' /> 
    346     <tag k='amenity' v='parking' /> 
    347     <tag k='parking' v='surface' /> 
    348   </way> 
    349   <way id='-632' visible='true'> 
    350     <nd ref='-310' /> 
    351     <nd ref='-308' /> 
    352     <nd ref='-314' /> 
    353     <nd ref='-312' /> 
    354     <nd ref='-310' /> 
    355   </way> 
    356   <way id='-630' visible='true'> 
    357     <nd ref='-388' /> 
    358     <nd ref='-374' /> 
    359     <nd ref='-382' /> 
    360     <nd ref='-376' /> 
    361     <nd ref='-388' /> 
    362     <tag k='amenity' v='parking' /> 
    363     <tag k='parking' v='surface' /> 
    364   </way> 
    365   <way id='-628' visible='true'> 
     775  <way id='-1332' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     776    <nd ref='-864' /> 
     777    <nd ref='-886' /> 
     778    <nd ref='-888' /> 
     779    <nd ref='-866' /> 
     780    <nd ref='-864' /> 
     781  </way> 
     782  <way id='-1330' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     783    <nd ref='-1042' /> 
     784    <nd ref='-1020' /> 
     785    <nd ref='-1030' /> 
     786    <nd ref='-1024' /> 
     787    <nd ref='-1018' /> 
     788    <nd ref='-1028' /> 
     789    <nd ref='-1036' /> 
     790    <nd ref='-1032' /> 
     791    <nd ref='-1026' /> 
     792    <nd ref='-1040' /> 
     793    <nd ref='-1042' /> 
     794    <tag k='amenity' v='parking' /> 
     795    <tag k='parking' v='surface' /> 
     796  </way> 
     797  <way id='-1328' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     798    <nd ref='-782' /> 
     799    <nd ref='-788' /> 
     800    <nd ref='-778' /> 
     801    <nd ref='-826' /> 
     802    <nd ref='-782' /> 
     803    <tag k='amenity' v='parking' /> 
     804    <tag k='parking' v='surface' /> 
     805  </way> 
     806  <way id='-1326' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     807    <nd ref='-880' /> 
     808    <nd ref='-878' /> 
     809    <nd ref='-884' /> 
     810    <nd ref='-882' /> 
     811    <nd ref='-880' /> 
     812  </way> 
     813  <way id='-1324' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     814    <nd ref='-958' /> 
     815    <nd ref='-944' /> 
     816    <nd ref='-952' /> 
     817    <nd ref='-946' /> 
     818    <nd ref='-958' /> 
     819    <tag k='amenity' v='parking' /> 
     820    <tag k='parking' v='surface' /> 
     821  </way> 
     822  <way id='-1322' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     823    <nd ref='-1078' /> 
     824    <nd ref='-1076' /> 
     825    <nd ref='-1074' /> 
     826    <nd ref='-1072' /> 
     827    <nd ref='-1078' /> 
     828    <tag k='amenity' v='parking' /> 
     829    <tag k='parking' v='surface' /> 
     830  </way> 
     831  <way id='-1320' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     832    <nd ref='-900' /> 
     833    <nd ref='-894' /> 
     834    <nd ref='-896' /> 
     835    <nd ref='-876' /> 
     836    <nd ref='-900' /> 
     837    <tag k='amenity' v='parking' /> 
     838    <tag k='parking' v='surface' /> 
     839  </way> 
     840  <way id='-1318' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     841    <nd ref='-702' /> 
     842    <nd ref='-696' /> 
     843    <nd ref='-700' /> 
     844    <nd ref='-690' /> 
     845    <nd ref='-688' /> 
     846    <nd ref='-698' /> 
     847    <nd ref='-708' /> 
     848    <nd ref='-736' /> 
     849    <nd ref='-730' /> 
     850    <nd ref='-710' /> 
     851    <nd ref='-704' /> 
     852    <nd ref='-706' /> 
     853    <nd ref='-702' /> 
     854    <tag k='amenity' v='parking' /> 
     855    <tag k='parking' v='surface' /> 
     856  </way> 
     857  <way id='-1316' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     858    <nd ref='-976' /> 
     859    <nd ref='-974' /> 
     860    <nd ref='-968' /> 
     861    <nd ref='-962' /> 
     862    <nd ref='-972' /> 
     863    <nd ref='-970' /> 
     864    <nd ref='-976' /> 
     865    <tag k='amenity' v='parking' /> 
     866    <tag k='parking' v='surface' /> 
     867  </way> 
     868  <way id='-1314' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     869    <nd ref='-936' /> 
     870    <nd ref='-930' /> 
     871    <nd ref='-932' /> 
     872    <nd ref='-910' /> 
     873    <nd ref='-912' /> 
     874    <nd ref='-906' /> 
     875    <nd ref='-908' /> 
     876    <nd ref='-918' /> 
     877    <nd ref='-920' /> 
     878    <nd ref='-914' /> 
     879    <nd ref='-936' /> 
     880    <tag k='amenity' v='parking' /> 
     881    <tag k='parking' v='surface' /> 
     882  </way> 
     883  <way id='-1312' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     884    <nd ref='-1010' /> 
     885    <nd ref='-1006' /> 
     886    <nd ref='-1016' /> 
     887    <nd ref='-994' /> 
     888    <nd ref='-1022' /> 
     889    <nd ref='-1014' /> 
     890    <nd ref='-1002' /> 
     891    <nd ref='-1004' /> 
     892    <nd ref='-1008' /> 
     893    <nd ref='-1012' /> 
     894    <nd ref='-1010' /> 
     895    <tag k='amenity' v='parking' /> 
     896    <tag k='parking' v='surface' /> 
     897  </way> 
     898  <way id='-1310' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     899    <nd ref='-874' /> 
     900    <nd ref='-904' /> 
     901    <nd ref='-898' /> 
     902    <nd ref='-902' /> 
     903    <nd ref='-874' /> 
     904  </way> 
     905  <way id='-1308' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     906    <nd ref='-858' /> 
     907    <nd ref='-862' /> 
     908    <nd ref='-842' /> 
     909    <nd ref='-870' /> 
     910    <nd ref='-858' /> 
     911    <tag k='amenity' v='parking' /> 
     912    <tag k='parking' v='surface' /> 
     913  </way> 
     914  <way id='-1306' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     915    <nd ref='-942' /> 
     916    <nd ref='-940' /> 
     917    <tag k='highway' v='motorway' /> 
     918    <tag k='lanes' v='5' /> 
     919  </way> 
     920  <way id='-1304' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     921    <nd ref='-1048' /> 
     922    <nd ref='-1068' /> 
     923    <nd ref='-1044' /> 
     924    <tag k='highway' v='footway' /> 
     925  </way> 
     926  <way id='-1302' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     927    <nd ref='-848' /> 
     928    <nd ref='-846' /> 
     929    <tag k='highway' v='motorway' /> 
     930    <tag k='lanes' v='5' /> 
     931  </way> 
     932  <way id='-1300' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     933    <nd ref='-714' /> 
     934    <nd ref='-720' /> 
     935    <nd ref='-726' /> 
     936    <nd ref='-716' /> 
     937    <nd ref='-738' /> 
     938    <nd ref='-744' /> 
     939    <nd ref='-718' /> 
     940    <nd ref='-740' /> 
     941    <nd ref='-722' /> 
     942    <nd ref='-714' /> 
     943    <tag k='amenity' v='parking' /> 
     944  </way> 
     945  <way id='-1298' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     946    <nd ref='-978' /> 
     947    <nd ref='-980' /> 
     948    <nd ref='-982' /> 
     949    <nd ref='-984' /> 
     950    <nd ref='-978' /> 
     951    <tag k='amenity' v='parking' /> 
     952    <tag k='parking' v='surface' /> 
     953  </way> 
     954  <way id='-1296' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     955    <nd ref='-916' /> 
     956    <nd ref='-892' /> 
     957    <nd ref='-890' /> 
     958  </way> 
     959  <way id='-1294' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     960    <nd ref='-682' /> 
     961    <nd ref='-656' /> 
     962    <nd ref='-654' /> 
     963    <nd ref='-658' /> 
     964    <nd ref='-682' /> 
     965    <tag k='amenity' v='parking' /> 
     966    <tag k='parking' v='surface' /> 
     967  </way> 
     968  <way id='-1292' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     969    <nd ref='-1054' /> 
     970    <nd ref='-1056' /> 
     971    <nd ref='-1064' /> 
     972    <nd ref='-1058' /> 
     973    <nd ref='-1054' /> 
     974    <tag k='landuse' v='basin' /> 
     975  </way> 
     976  <way id='-1290' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     977    <nd ref='-728' /> 
     978    <nd ref='-720' /> 
     979    <nd ref='-726' /> 
     980    <nd ref='-716' /> 
     981    <nd ref='-738' /> 
     982    <nd ref='-744' /> 
     983    <nd ref='-718' /> 
     984    <nd ref='-740' /> 
     985    <nd ref='-724' /> 
     986    <nd ref='-728' /> 
     987    <tag k='amenity' v='parking' /> 
     988  </way> 
     989  <way id='-1288' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     990    <nd ref='-1088' /> 
     991    <nd ref='-1086' /> 
     992    <nd ref='-1084' /> 
     993    <nd ref='-1082' /> 
     994    <nd ref='-1080' /> 
     995    <nd ref='-1088' /> 
     996    <tag k='amenity' v='parking' /> 
     997    <tag k='parking' v='surface' /> 
     998  </way> 
     999  <way id='-1286' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     1000    <nd ref='-666' /> 
     1001    <nd ref='-678' /> 
     1002    <nd ref='-672' /> 
     1003    <nd ref='-674' /> 
     1004    <nd ref='-666' /> 
     1005    <tag k='building' v='yes' /> 
     1006  </way> 
     1007  <way id='-1284' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     1008    <nd ref='-742' /> 
     1009    <nd ref='-732' /> 
     1010    <nd ref='-730' /> 
     1011    <nd ref='-736' /> 
     1012    <nd ref='-734' /> 
     1013    <nd ref='-712' /> 
     1014    <nd ref='-692' /> 
     1015    <nd ref='-694' /> 
     1016    <nd ref='-688' /> 
     1017    <nd ref='-690' /> 
     1018    <nd ref='-700' /> 
     1019    <nd ref='-742' /> 
     1020    <tag k='amenity' v='parking' /> 
     1021    <tag k='parking' v='surface' /> 
     1022  </way> 
     1023  <way id='-1282' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     1024    <nd ref='-924' /> 
     1025    <nd ref='-934' /> 
     1026    <tag k='highway' v='motorway' /> 
     1027    <tag k='lanes' v='5' /> 
     1028  </way> 
     1029  <way id='-1280' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     1030    <nd ref='-792' /> 
     1031    <nd ref='-790' /> 
     1032    <nd ref='-832' /> 
     1033    <nd ref='-786' /> 
     1034    <nd ref='-792' /> 
     1035  </way> 
     1036  <way id='-1278' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     1037    <nd ref='-838' /> 
     1038    <nd ref='-840' /> 
     1039    <nd ref='-834' /> 
     1040    <nd ref='-836' /> 
     1041    <nd ref='-838' /> 
     1042  </way> 
     1043  <way id='-1276' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     1044    <nd ref='-868' /> 
     1045    <nd ref='-872' /> 
     1046    <nd ref='-844' /> 
     1047    <nd ref='-860' /> 
     1048    <nd ref='-868' /> 
     1049  </way> 
     1050  <way id='-1274' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     1051    <nd ref='-824' /> 
     1052    <nd ref='-810' /> 
     1053    <nd ref='-850' /> 
     1054    <nd ref='-820' /> 
     1055    <nd ref='-824' /> 
     1056  </way> 
     1057  <way id='-1272' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     1058    <nd ref='-1034' /> 
     1059    <nd ref='-1064' /> 
     1060    <nd ref='-1038' /> 
     1061    <tag k='highway' v='footway' /> 
     1062  </way> 
     1063  <way id='-1270' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     1064    <nd ref='-678' /> 
     1065    <nd ref='-664' /> 
     1066    <nd ref='-662' /> 
     1067    <nd ref='-668' /> 
     1068    <nd ref='-670' /> 
     1069    <nd ref='-672' /> 
     1070    <nd ref='-674' /> 
     1071    <nd ref='-680' /> 
     1072    <nd ref='-676' /> 
     1073    <nd ref='-660' /> 
     1074    <nd ref='-652' /> 
     1075    <nd ref='-666' /> 
     1076    <nd ref='-678' /> 
     1077    <tag k='building' v='yes' /> 
     1078  </way> 
     1079  <way id='-1268' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     1080    <nd ref='-776' /> 
     1081    <nd ref='-774' /> 
     1082    <nd ref='-764' /> 
     1083    <nd ref='-762' /> 
     1084    <nd ref='-776' /> 
     1085    <tag k='amenity' v='parking' /> 
     1086    <tag k='parking' v='surface' /> 
     1087  </way> 
     1088  <way id='-1266' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     1089    <nd ref='-686' /> 
     1090    <nd ref='-684' /> 
     1091    <nd ref='-682' /> 
     1092    <nd ref='-658' /> 
     1093    <nd ref='-686' /> 
     1094    <tag k='amenity' v='parking' /> 
     1095    <tag k='parking' v='surface' /> 
     1096  </way> 
     1097  <way id='-1264' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     1098    <nd ref='-760' /> 
     1099    <nd ref='-758' /> 
     1100    <nd ref='-752' /> 
     1101    <nd ref='-750' /> 
     1102    <nd ref='-760' /> 
     1103    <tag k='amenity' v='parking' /> 
     1104    <tag k='parking' v='surface' /> 
     1105  </way> 
     1106  <way id='-1262' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     1107    <nd ref='-780' /> 
     1108    <nd ref='-828' /> 
     1109    <nd ref='-830' /> 
     1110    <nd ref='-784' /> 
     1111    <nd ref='-780' /> 
     1112  </way> 
     1113  <way id='-1260' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     1114    <nd ref='-816' /> 
     1115    <nd ref='-812' /> 
     1116    <nd ref='-818' /> 
     1117    <nd ref='-856' /> 
     1118    <nd ref='-816' /> 
     1119  </way> 
     1120  <way id='-1258' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     1121    <nd ref='-1062' /> 
     1122    <nd ref='-998' /> 
     1123    <nd ref='-1000' /> 
     1124    <nd ref='-992' /> 
     1125    <nd ref='-990' /> 
     1126    <nd ref='-986' /> 
     1127    <nd ref='-988' /> 
     1128    <nd ref='-996' /> 
     1129    <nd ref='-1070' /> 
     1130    <nd ref='-1068' /> 
     1131    <nd ref='-1062' /> 
     1132    <tag k='amenity' v='parking' /> 
     1133    <tag k='parking' v='surface' /> 
     1134  </way> 
     1135  <way id='-1256' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     1136    <nd ref='-746' /> 
     1137    <nd ref='-748' /> 
     1138    <tag k='highway' v='motorway' /> 
     1139    <tag k='lanes' v='5' /> 
     1140  </way> 
     1141  <way id='-1254' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     1142    <nd ref='-1046' /> 
     1143    <nd ref='-1066' /> 
     1144    <nd ref='-1060' /> 
     1145    <nd ref='-1050' /> 
     1146    <nd ref='-1052' /> 
     1147    <nd ref='-1046' /> 
     1148    <tag k='landuse' v='retail' /> 
     1149  </way> 
     1150  <way id='-1252' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     1151    <nd ref='-956' /> 
     1152    <nd ref='-954' /> 
     1153    <nd ref='-944' /> 
     1154    <nd ref='-948' /> 
     1155    <nd ref='-950' /> 
     1156    <nd ref='-956' /> 
     1157    <tag k='amenity' v='parking' /> 
     1158    <tag k='parking' v='surface' /> 
     1159  </way> 
     1160  <way id='-1250' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     1161    <nd ref='-928' /> 
     1162    <nd ref='-922' /> 
     1163    <tag k='highway' v='motorway' /> 
     1164    <tag k='lanes' v='5' /> 
     1165  </way> 
     1166  <way id='-1248' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     1167    <nd ref='-938' /> 
     1168    <nd ref='-926' /> 
     1169    <tag k='highway' v='motorway' /> 
     1170    <tag k='lanes' v='5' /> 
     1171  </way> 
     1172  <way id='-1246' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     1173    <nd ref='-814' /> 
     1174    <nd ref='-852' /> 
     1175    <nd ref='-822' /> 
     1176    <nd ref='-854' /> 
     1177    <nd ref='-814' /> 
     1178    <tag k='amenity' v='parking' /> 
     1179    <tag k='parking' v='surface' /> 
     1180  </way> 
     1181  <way id='-1244' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     1182    <nd ref='-960' /> 
     1183    <nd ref='-968' /> 
     1184    <nd ref='-966' /> 
     1185    <nd ref='-964' /> 
     1186    <nd ref='-962' /> 
     1187    <nd ref='-960' /> 
     1188    <tag k='amenity' v='parking' /> 
     1189    <tag k='parking' v='surface' /> 
     1190  </way> 
     1191  <way id='-1242' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     1192    <nd ref='-1096' /> 
     1193    <nd ref='-1094' /> 
     1194    <nd ref='-1092' /> 
     1195    <nd ref='-1090' /> 
     1196    <nd ref='-1096' /> 
     1197    <tag k='amenity' v='parking' /> 
     1198    <tag k='parking' v='surface' /> 
     1199  </way> 
     1200  <way id='-1240' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     1201    <nd ref='-632' /> 
     1202    <nd ref='-622' /> 
     1203    <nd ref='-638' /> 
     1204    <nd ref='-626' /> 
     1205    <nd ref='-624' /> 
     1206    <nd ref='-644' /> 
     1207    <nd ref='-642' /> 
     1208    <nd ref='-630' /> 
     1209    <nd ref='-650' /> 
     1210    <nd ref='-640' /> 
     1211    <nd ref='-628' /> 
     1212    <nd ref='-648' /> 
     1213    <nd ref='-636' /> 
     1214    <nd ref='-632' /> 
     1215    <tag k='building' v='yes' /> 
     1216  </way> 
     1217  <way id='-1238' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     1218    <nd ref='-646' /> 
     1219    <nd ref='-634' /> 
     1220    <nd ref='-624' /> 
     1221    <nd ref='-644' /> 
     1222    <nd ref='-650' /> 
     1223    <nd ref='-640' /> 
     1224    <nd ref='-636' /> 
     1225    <nd ref='-632' /> 
     1226    <nd ref='-646' /> 
     1227    <tag k='building' v='yes' /> 
     1228  </way> 
     1229  <way id='-1236' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     1230    <nd ref='-620' /> 
     1231    <nd ref='-618' /> 
     1232    <tag k='highway' v='motorway' /> 
     1233    <tag k='lanes' v='5' /> 
     1234  </way> 
     1235  <way id='-1234' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     1236    <nd ref='-616' /> 
     1237    <nd ref='-614' /> 
     1238    <tag k='highway' v='motorway' /> 
     1239    <tag k='lanes' v='5' /> 
     1240  </way> 
     1241  <way id='-1232' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     1242    <nd ref='-602' /> 
     1243    <nd ref='-608' /> 
     1244    <nd ref='-606' /> 
     1245    <nd ref='-610' /> 
     1246    <nd ref='-604' /> 
     1247    <nd ref='-602' /> 
     1248    <tag k='building' v='yes' /> 
     1249    <tag k='name' v='A' /> 
     1250  </way> 
     1251  <way id='-1230' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     1252    <nd ref='-604' /> 
     1253    <nd ref='-612' /> 
     1254    <nd ref='-1098' /> 
     1255    <nd ref='-604' /> 
     1256    <tag k='building' v='yes' /> 
     1257    <tag k='name' v='A' /> 
     1258  </way> 
     1259  <way id='-1228' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     1260    <nd ref='-600' /> 
     1261    <nd ref='-576' /> 
     1262    <nd ref='-592' /> 
     1263    <nd ref='-584' /> 
     1264    <nd ref='-588' /> 
     1265    <nd ref='-600' /> 
     1266    <tag k='building' v='yes' /> 
     1267    <tag k='name' v='B' /> 
     1268  </way> 
     1269  <way id='-1226' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     1270    <nd ref='-588' /> 
     1271    <nd ref='-578' /> 
     1272    <nd ref='-594' /> 
     1273    <nd ref='-588' /> 
     1274    <tag k='building' v='yes' /> 
     1275    <tag k='name' v='B' /> 
     1276  </way> 
     1277  <way id='-1224' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     1278    <nd ref='-574' /> 
     1279    <nd ref='-590' /> 
     1280    <nd ref='-586' /> 
     1281    <nd ref='-596' /> 
     1282    <nd ref='-582' /> 
     1283    <nd ref='-574' /> 
     1284    <tag k='building' v='yes' /> 
     1285    <tag k='name' v='A' /> 
     1286  </way> 
     1287  <way id='-1222' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     1288    <nd ref='-582' /> 
     1289    <nd ref='-598' /> 
     1290    <nd ref='-580' /> 
     1291    <nd ref='-582' /> 
     1292    <tag k='building' v='yes' /> 
     1293    <tag k='name' v='A' /> 
     1294  </way> 
     1295  <way id='-1220' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true'> 
     1296    <nd ref='-570' /> 
     1297    <nd ref='-568' /> 
     1298    <nd ref='-566' /> 
     1299    <nd ref='-564' /> 
     1300    <nd ref='-562' /> 
     1301    <nd ref='-560' /> 
     1302    <nd ref='-558' /> 
     1303    <nd ref='-556' /> 
     1304    <nd ref='-570' /> 
     1305    <tag k='building' v='yes' /> 
     1306  </way> 
     1307  <way id='-1218' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true'> 
     1308    <nd ref='-554' /> 
     1309    <nd ref='-552' /> 
     1310    <nd ref='-550' /> 
     1311    <nd ref='-548' /> 
     1312    <nd ref='-554' /> 
     1313    <tag k='building' v='yes' /> 
     1314  </way> 
     1315  <way id='-1216' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true'> 
     1316    <nd ref='-548' /> 
     1317    <nd ref='-546' /> 
     1318    <nd ref='-544' /> 
     1319    <nd ref='-542' /> 
     1320    <nd ref='-548' /> 
     1321    <tag k='building' v='yes' /> 
     1322  </way> 
     1323  <way id='-1214' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true'> 
     1324    <nd ref='-540' /> 
     1325    <nd ref='-538' /> 
     1326    <nd ref='-536' /> 
     1327    <nd ref='-534' /> 
     1328    <nd ref='-532' /> 
     1329    <nd ref='-530' /> 
     1330    <nd ref='-528' /> 
     1331    <nd ref='-526' /> 
     1332    <nd ref='-540' /> 
     1333    <tag k='building' v='yes' /> 
     1334  </way> 
     1335  <way id='-1212' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true'> 
     1336    <nd ref='-538' /> 
     1337    <nd ref='-524' /> 
     1338    <nd ref='-522' /> 
     1339    <nd ref='-528' /> 
     1340    <nd ref='-530' /> 
     1341    <nd ref='-520' /> 
     1342    <nd ref='-534' /> 
     1343    <nd ref='-518' /> 
     1344    <nd ref='-538' /> 
     1345    <tag k='building' v='yes' /> 
     1346  </way> 
     1347  <way id='-1210' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     1348    <nd ref='-516' /> 
     1349    <nd ref='-514' /> 
     1350    <tag k='highway' v='motorway' /> 
     1351    <tag k='lanes' v='5' /> 
     1352  </way> 
     1353  <way id='-1208' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true'> 
     1354    <nd ref='-512' /> 
     1355    <nd ref='-510' /> 
    3661356    <nd ref='-508' /> 
    3671357    <nd ref='-506' /> 
    3681358    <nd ref='-504' /> 
    3691359    <nd ref='-502' /> 
     1360    <nd ref='-500' /> 
     1361    <nd ref='-498' /> 
     1362    <nd ref='-496' /> 
     1363    <nd ref='-512' /> 
     1364    <tag k='building' v='yes' /> 
     1365  </way> 
     1366  <way id='-1206' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true'> 
     1367    <nd ref='-510' /> 
     1368    <nd ref='-494' /> 
     1369    <nd ref='-492' /> 
     1370    <nd ref='-486' /> 
     1371    <nd ref='-488' /> 
     1372    <nd ref='-504' /> 
     1373    <nd ref='-490' /> 
    3701374    <nd ref='-508' /> 
    371     <tag k='amenity' v='parking' /> 
    372     <tag k='parking' v='surface' /> 
    373   </way> 
    374   <way id='-626' visible='true'> 
     1375    <nd ref='-510' /> 
     1376    <tag k='building' v='yes' /> 
     1377  </way> 
     1378  <way id='-1204' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true'> 
     1379    <nd ref='-486' /> 
     1380    <nd ref='-492' /> 
     1381    <nd ref='-484' /> 
     1382    <nd ref='-498' /> 
     1383    <nd ref='-500' /> 
     1384    <nd ref='-482' /> 
     1385    <nd ref='-504' /> 
     1386    <nd ref='-480' /> 
     1387    <nd ref='-486' /> 
     1388    <tag k='building' v='yes' /> 
     1389  </way> 
     1390  <way id='-1202' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     1391    <nd ref='-478' /> 
     1392    <nd ref='-476' /> 
     1393    <tag k='highway' v='motorway' /> 
     1394    <tag k='lanes' v='5' /> 
     1395  </way> 
     1396  <way id='-1200' action='modify' timestamp='2010-06-08T05:21:33Z' uid='213040' user='jf01' visible='true' version='7'> 
     1397    <nd ref='-416' /> 
     1398    <nd ref='-372' /> 
     1399    <nd ref='-332' /> 
     1400    <nd ref='-292' /> 
     1401    <nd ref='-446' /> 
     1402    <nd ref='-402' /> 
     1403    <nd ref='-442' /> 
     1404    <nd ref='-398' /> 
     1405    <nd ref='-356' /> 
     1406    <nd ref='-316' /> 
     1407    <nd ref='-468' /> 
     1408    <nd ref='-428' /> 
     1409    <nd ref='-384' /> 
     1410    <nd ref='-344' /> 
     1411    <nd ref='-380' /> 
     1412    <nd ref='-342' /> 
     1413    <nd ref='-302' /> 
     1414    <nd ref='-454' /> 
     1415    <nd ref='-412' /> 
     1416    <nd ref='-368' /> 
     1417    <nd ref='-328' /> 
     1418    <nd ref='-288' /> 
     1419    <nd ref='-324' /> 
     1420    <nd ref='-286' /> 
     1421    <nd ref='-438' /> 
     1422    <nd ref='-394' /> 
     1423    <nd ref='-352' /> 
     1424    <nd ref='-314' /> 
     1425    <nd ref='-466' /> 
     1426    <nd ref='-426' /> 
     1427    <nd ref='-462' /> 
     1428    <nd ref='-422' /> 
     1429    <nd ref='-376' /> 
     1430    <nd ref='-338' /> 
     1431    <nd ref='-342' /> 
     1432    <nd ref='-380' /> 
     1433    <nd ref='-344' /> 
     1434    <nd ref='-296' /> 
     1435    <nd ref='-452' /> 
     1436    <nd ref='-410' /> 
     1437    <nd ref='-366' /> 
     1438    <nd ref='-406' /> 
     1439    <nd ref='-362' /> 
     1440    <nd ref='-322' /> 
     1441    <nd ref='-474' /> 
     1442    <nd ref='-432' /> 
     1443    <nd ref='-390' /> 
     1444    <nd ref='-350' /> 
     1445    <nd ref='-310' /> 
     1446    <nd ref='-392' /> 
     1447    <nd ref='-354' /> 
     1448    <nd ref='-312' /> 
     1449    <nd ref='-464' /> 
     1450    <nd ref='-424' /> 
     1451    <nd ref='-382' /> 
     1452    <nd ref='-340' /> 
     1453    <nd ref='-474' /> 
     1454    <nd ref='-322' /> 
     1455    <nd ref='-300' /> 
     1456    <nd ref='-336' /> 
     1457    <nd ref='-298' /> 
     1458    <nd ref='-450' /> 
     1459    <nd ref='-408' /> 
     1460    <nd ref='-364' /> 
     1461    <nd ref='-326' /> 
     1462    <nd ref='-284' /> 
     1463    <nd ref='-436' /> 
     1464    <nd ref='-472' /> 
     1465    <nd ref='-434' /> 
     1466    <nd ref='-388' /> 
     1467    <nd ref='-348' /> 
     1468    <nd ref='-308' /> 
     1469    <nd ref='-460' /> 
     1470    <nd ref='-420' /> 
     1471    <nd ref='-378' /> 
     1472    <nd ref='-418' /> 
     1473    <nd ref='-374' /> 
     1474    <nd ref='-334' /> 
     1475    <nd ref='-294' /> 
     1476    <nd ref='-448' /> 
     1477    <nd ref='-404' /> 
     1478    <nd ref='-360' /> 
     1479    <nd ref='-320' /> 
     1480    <nd ref='-358' /> 
     1481    <nd ref='-318' /> 
     1482    <nd ref='-470' /> 
     1483    <nd ref='-430' /> 
     1484    <nd ref='-386' /> 
     1485    <nd ref='-346' /> 
     1486    <nd ref='-306' /> 
     1487    <nd ref='-458' /> 
     1488    <nd ref='-304' /> 
     1489    <nd ref='-456' /> 
     1490    <nd ref='-414' /> 
     1491    <nd ref='-370' /> 
    3751492    <nd ref='-330' /> 
    376     <nd ref='-324' /> 
    377     <nd ref='-326' /> 
    378     <nd ref='-306' /> 
    379     <nd ref='-330' /> 
    380     <tag k='amenity' v='parking' /> 
    381     <tag k='parking' v='surface' /> 
    382   </way> 
    383   <way id='-624' visible='true'> 
     1493    <nd ref='-290' /> 
     1494    <nd ref='-444' /> 
     1495    <nd ref='-400' /> 
     1496    <nd ref='-440' /> 
     1497    <nd ref='-396' /> 
     1498    <nd ref='-416' /> 
     1499    <tag k='area' v='yes' /> 
     1500    <tag k='highway' v='residential' /> 
     1501    <tag k='source' v='cuzk:km' /> 
     1502  </way> 
     1503  <way id='-1198' timestamp='2010-09-01T07:19:58Z' visible='true'> 
     1504    <nd ref='-278' /> 
     1505    <nd ref='-282' /> 
     1506    <nd ref='-272' /> 
     1507    <nd ref='-276' /> 
     1508    <nd ref='-278' /> 
     1509    <tag k='building' v='yes' /> 
     1510  </way> 
     1511  <way id='-1196' timestamp='2010-09-01T07:19:58Z' visible='true'> 
     1512    <nd ref='-270' /> 
     1513    <nd ref='-280' /> 
     1514    <nd ref='-268' /> 
     1515    <nd ref='-274' /> 
     1516    <nd ref='-270' /> 
     1517    <tag k='building' v='yes' /> 
     1518  </way> 
     1519  <way id='-1194' action='modify' timestamp='2010-09-01T07:22:22Z' visible='true'> 
     1520    <nd ref='-230' /> 
     1521    <nd ref='-238' /> 
     1522    <nd ref='-244' /> 
     1523    <nd ref='-250' /> 
     1524    <nd ref='-256' /> 
     1525    <nd ref='-266' /> 
     1526    <nd ref='-254' /> 
     1527    <nd ref='-260' /> 
     1528    <nd ref='-216' /> 
     1529    <nd ref='-222' /> 
     1530    <nd ref='-226' /> 
     1531    <nd ref='-234' /> 
     1532    <nd ref='-242' /> 
     1533    <nd ref='-248' /> 
     1534    <nd ref='-230' /> 
     1535    <tag k='building' v='yes' /> 
     1536    <tag k='source' v='cuzk:km' /> 
     1537  </way> 
     1538  <way id='-1192' action='modify' timestamp='2010-09-01T07:22:22Z' visible='true'> 
     1539    <nd ref='-262' /> 
     1540    <nd ref='-218' /> 
     1541    <nd ref='-228' /> 
     1542    <nd ref='-236' /> 
     1543    <nd ref='-222' /> 
     1544    <nd ref='-232' /> 
     1545    <nd ref='-240' /> 
     1546    <nd ref='-246' /> 
     1547    <nd ref='-252' /> 
     1548    <nd ref='-258' /> 
     1549    <nd ref='-214' /> 
     1550    <nd ref='-224' /> 
     1551    <nd ref='-264' /> 
     1552    <nd ref='-220' /> 
     1553    <nd ref='-262' /> 
     1554    <tag k='building' v='yes' /> 
     1555    <tag k='source' v='cuzk:km' /> 
     1556  </way> 
     1557  <way id='-1190' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true'> 
     1558    <nd ref='-212' /> 
     1559    <nd ref='-210' /> 
     1560    <nd ref='-208' /> 
     1561    <nd ref='-206' /> 
     1562    <nd ref='-204' /> 
     1563    <nd ref='-212' /> 
     1564    <tag k='building' v='yes' /> 
     1565  </way> 
     1566  <way id='-1188' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true'> 
     1567    <nd ref='-208' /> 
     1568    <nd ref='-202' /> 
     1569    <nd ref='-200' /> 
     1570    <nd ref='-198' /> 
     1571    <nd ref='-206' /> 
     1572    <nd ref='-208' /> 
     1573    <tag k='building' v='yes' /> 
     1574  </way> 
     1575  <way id='-1186' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true'> 
     1576    <nd ref='-196' /> 
     1577    <nd ref='-194' /> 
     1578    <nd ref='-184' /> 
     1579    <nd ref='-192' /> 
     1580    <nd ref='-188' /> 
     1581    <nd ref='-190' /> 
     1582    <nd ref='-196' /> 
     1583    <tag k='building' v='yes' /> 
     1584  </way> 
     1585  <way id='-1184' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true'> 
     1586    <nd ref='-192' /> 
     1587    <nd ref='-188' /> 
     1588    <nd ref='-186' /> 
     1589    <nd ref='-184' /> 
     1590    <nd ref='-192' /> 
     1591    <tag k='building' v='yes' /> 
     1592  </way> 
     1593  <way id='-1182' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true'> 
     1594    <nd ref='-182' /> 
     1595    <nd ref='-180' /> 
     1596    <nd ref='-178' /> 
     1597    <nd ref='-176' /> 
     1598    <nd ref='-182' /> 
     1599    <tag k='building' v='yes' /> 
     1600  </way> 
     1601  <way id='-1180' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true'> 
     1602    <nd ref='-182' /> 
     1603    <nd ref='-174' /> 
     1604    <nd ref='-172' /> 
     1605    <nd ref='-170' /> 
     1606    <nd ref='-182' /> 
     1607    <tag k='building' v='yes' /> 
     1608  </way> 
     1609  <way id='-1178' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     1610    <nd ref='-168' /> 
     1611    <nd ref='-166' /> 
     1612    <tag k='highway' v='motorway' /> 
     1613    <tag k='lanes' v='5' /> 
     1614  </way> 
     1615  <way id='-1176' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true'> 
     1616    <nd ref='-164' /> 
     1617    <nd ref='-162' /> 
     1618    <nd ref='-160' /> 
     1619    <nd ref='-158' /> 
     1620    <nd ref='-156' /> 
     1621    <nd ref='-164' /> 
     1622    <tag k='building' v='yes' /> 
     1623  </way> 
     1624  <way id='-1174' action='modify' timestamp='2010-09-01T07:31:33Z' visible='true'> 
     1625    <nd ref='-162' /> 
     1626    <nd ref='-160' /> 
     1627    <nd ref='-154' /> 
     1628    <nd ref='-152' /> 
     1629    <nd ref='-158' /> 
     1630    <nd ref='-162' /> 
     1631    <tag k='building' v='yes' /> 
     1632  </way> 
     1633  <way id='-1172' action='modify' timestamp='2010-09-01T08:01:00Z' visible='true'> 
     1634    <nd ref='-150' /> 
     1635    <nd ref='-148' /> 
     1636    <nd ref='-146' /> 
     1637    <nd ref='-144' /> 
     1638    <nd ref='-142' /> 
     1639    <nd ref='-140' /> 
     1640    <nd ref='-138' /> 
     1641    <nd ref='-136' /> 
     1642    <nd ref='-134' /> 
    3841643    <nd ref='-132' /> 
     1644    <nd ref='-130' /> 
     1645    <nd ref='-128' /> 
    3851646    <nd ref='-126' /> 
    386     <nd ref='-130' /> 
     1647    <nd ref='-124' /> 
     1648    <nd ref='-122' /> 
    3871649    <nd ref='-120' /> 
    3881650    <nd ref='-118' /> 
    389     <nd ref='-128' /> 
    390     <nd ref='-138' /> 
    391     <nd ref='-166' /> 
    392     <nd ref='-160' /> 
    393     <nd ref='-140' /> 
    394     <nd ref='-134' /> 
    395     <nd ref='-136' /> 
    396     <nd ref='-132' /> 
    397     <tag k='amenity' v='parking' /> 
    398     <tag k='parking' v='surface' /> 
    399   </way> 
    400   <way id='-622' visible='true'> 
    401     <nd ref='-406' /> 
    402     <nd ref='-404' /> 
    403     <nd ref='-398' /> 
    404     <nd ref='-392' /> 
    405     <nd ref='-402' /> 
    406     <nd ref='-400' /> 
    407     <nd ref='-406' /> 
    408     <tag k='amenity' v='parking' /> 
    409     <tag k='parking' v='surface' /> 
    410   </way> 
    411   <way id='-620' visible='true'> 
    412     <nd ref='-366' /> 
    413     <nd ref='-360' /> 
    414     <nd ref='-362' /> 
    415     <nd ref='-340' /> 
    416     <nd ref='-342' /> 
    417     <nd ref='-336' /> 
    418     <nd ref='-338' /> 
    419     <nd ref='-348' /> 
    420     <nd ref='-350' /> 
    421     <nd ref='-344' /> 
    422     <nd ref='-366' /> 
    423     <tag k='amenity' v='parking' /> 
    424     <tag k='parking' v='surface' /> 
    425   </way> 
    426   <way id='-618' visible='true'> 
    427     <nd ref='-440' /> 
    428     <nd ref='-436' /> 
    429     <nd ref='-446' /> 
    430     <nd ref='-424' /> 
    431     <nd ref='-452' /> 
    432     <nd ref='-444' /> 
    433     <nd ref='-432' /> 
    434     <nd ref='-434' /> 
    435     <nd ref='-438' /> 
    436     <nd ref='-442' /> 
    437     <nd ref='-440' /> 
    438     <tag k='amenity' v='parking' /> 
    439     <tag k='parking' v='surface' /> 
    440   </way> 
    441   <way id='-616' visible='true'> 
    442     <nd ref='-304' /> 
    443     <nd ref='-334' /> 
    444     <nd ref='-328' /> 
    445     <nd ref='-332' /> 
    446     <nd ref='-304' /> 
    447   </way> 
    448   <way id='-614' visible='true'> 
    449     <nd ref='-288' /> 
    450     <nd ref='-292' /> 
    451     <nd ref='-272' /> 
    452     <nd ref='-300' /> 
    453     <nd ref='-288' /> 
    454     <tag k='amenity' v='parking' /> 
    455     <tag k='parking' v='surface' /> 
    456   </way> 
    457   <way id='-612' visible='true'> 
    458     <nd ref='-372' /> 
    459     <nd ref='-370' /> 
    460     <tag k='highway' v='motorway' /> 
    461     <tag k='lanes' v='5' /> 
    462   </way> 
    463   <way id='-610' visible='true'> 
    464     <nd ref='-478' /> 
    465     <nd ref='-498' /> 
    466     <nd ref='-474' /> 
    467     <tag k='highway' v='footway' /> 
    468   </way> 
    469   <way id='-608' visible='true'> 
    470     <nd ref='-278' /> 
    471     <nd ref='-276' /> 
    472     <tag k='highway' v='motorway' /> 
    473     <tag k='lanes' v='5' /> 
    474   </way> 
    475   <way id='-606' visible='true'> 
    476     <nd ref='-144' /> 
    477     <nd ref='-150' /> 
    478     <nd ref='-156' /> 
    479     <nd ref='-146' /> 
    480     <nd ref='-168' /> 
    481     <nd ref='-174' /> 
    482     <nd ref='-148' /> 
    483     <nd ref='-170' /> 
    484     <nd ref='-152' /> 
    485     <nd ref='-144' /> 
    486     <tag k='amenity' v='parking' /> 
    487   </way> 
    488   <way id='-604' visible='true'> 
    489     <nd ref='-408' /> 
    490     <nd ref='-410' /> 
    491     <nd ref='-412' /> 
    492     <nd ref='-414' /> 
    493     <nd ref='-408' /> 
    494     <tag k='amenity' v='parking' /> 
    495     <tag k='parking' v='surface' /> 
    496   </way> 
    497   <way id='-602' visible='true'> 
    498     <nd ref='-346' /> 
    499     <nd ref='-322' /> 
    500     <nd ref='-320' /> 
    501   </way> 
    502   <way id='-600' visible='true'> 
    503     <nd ref='-112' /> 
    504     <nd ref='-86' /> 
    505     <nd ref='-84' /> 
    506     <nd ref='-88' /> 
    507     <nd ref='-112' /> 
    508     <tag k='amenity' v='parking' /> 
    509     <tag k='parking' v='surface' /> 
    510   </way> 
    511   <way id='-598' visible='true'> 
    512     <nd ref='-484' /> 
    513     <nd ref='-486' /> 
    514     <nd ref='-494' /> 
    515     <nd ref='-488' /> 
    516     <nd ref='-484' /> 
    517     <tag k='landuse' v='basin' /> 
    518   </way> 
    519   <way id='-596' visible='true'> 
    520     <nd ref='-158' /> 
    521     <nd ref='-150' /> 
    522     <nd ref='-156' /> 
    523     <nd ref='-146' /> 
    524     <nd ref='-168' /> 
    525     <nd ref='-174' /> 
    526     <nd ref='-148' /> 
    527     <nd ref='-170' /> 
    528     <nd ref='-154' /> 
    529     <nd ref='-158' /> 
    530     <tag k='amenity' v='parking' /> 
    531   </way> 
    532   <way id='-594' visible='true'> 
    533     <nd ref='-518' /> 
    534     <nd ref='-516' /> 
    535     <nd ref='-514' /> 
    536     <nd ref='-512' /> 
    537     <nd ref='-510' /> 
    538     <nd ref='-518' /> 
    539     <tag k='amenity' v='parking' /> 
    540     <tag k='parking' v='surface' /> 
    541   </way> 
    542   <way id='-592' visible='true'> 
    543     <nd ref='-96' /> 
    544     <nd ref='-108' /> 
    545     <nd ref='-102' /> 
    546     <nd ref='-104' /> 
    547     <nd ref='-96' /> 
    548     <tag k='building' v='yes' /> 
    549   </way> 
    550   <way id='-590' visible='true'> 
    551     <nd ref='-172' /> 
    552     <nd ref='-162' /> 
    553     <nd ref='-160' /> 
    554     <nd ref='-166' /> 
    555     <nd ref='-164' /> 
    556     <nd ref='-142' /> 
    557     <nd ref='-122' /> 
    558     <nd ref='-124' /> 
    559     <nd ref='-118' /> 
    560     <nd ref='-120' /> 
    561     <nd ref='-130' /> 
    562     <nd ref='-172' /> 
    563     <tag k='amenity' v='parking' /> 
    564     <tag k='parking' v='surface' /> 
    565   </way> 
    566   <way id='-588' visible='true'> 
    567     <nd ref='-354' /> 
    568     <nd ref='-364' /> 
    569     <tag k='highway' v='motorway' /> 
    570     <tag k='lanes' v='5' /> 
    571   </way> 
    572   <way id='-586' visible='true'> 
    573     <nd ref='-222' /> 
    574     <nd ref='-220' /> 
    575     <nd ref='-262' /> 
    576     <nd ref='-216' /> 
    577     <nd ref='-222' /> 
    578   </way> 
    579   <way id='-584' visible='true'> 
    580     <nd ref='-268' /> 
    581     <nd ref='-270' /> 
    582     <nd ref='-264' /> 
    583     <nd ref='-266' /> 
    584     <nd ref='-268' /> 
    585   </way> 
    586   <way id='-582' visible='true'> 
    587     <nd ref='-298' /> 
    588     <nd ref='-302' /> 
    589     <nd ref='-274' /> 
    590     <nd ref='-290' /> 
    591     <nd ref='-298' /> 
    592   </way> 
    593   <way id='-580' visible='true'> 
    594     <nd ref='-254' /> 
    595     <nd ref='-240' /> 
    596     <nd ref='-280' /> 
    597     <nd ref='-250' /> 
    598     <nd ref='-254' /> 
    599   </way> 
    600   <way id='-578' visible='true'> 
    601     <nd ref='-464' /> 
    602     <nd ref='-494' /> 
    603     <nd ref='-468' /> 
    604     <tag k='highway' v='footway' /> 
    605   </way> 
    606   <way id='-576' visible='true'> 
    607     <nd ref='-108' /> 
    608     <nd ref='-94' /> 
    609     <nd ref='-92' /> 
    610     <nd ref='-98' /> 
    611     <nd ref='-100' /> 
    612     <nd ref='-102' /> 
    613     <nd ref='-104' /> 
    614     <nd ref='-110' /> 
    615     <nd ref='-106' /> 
    616     <nd ref='-90' /> 
    617     <nd ref='-82' /> 
    618     <nd ref='-96' /> 
    619     <nd ref='-108' /> 
    620     <tag k='building' v='yes' /> 
    621   </way> 
    622   <way id='-574' visible='true'> 
    623     <nd ref='-206' /> 
    624     <nd ref='-204' /> 
    625     <nd ref='-194' /> 
    626     <nd ref='-192' /> 
    627     <nd ref='-206' /> 
    628     <tag k='amenity' v='parking' /> 
    629     <tag k='parking' v='surface' /> 
    630   </way> 
    631   <way id='-572' visible='true'> 
    6321651    <nd ref='-116' /> 
    6331652    <nd ref='-114' /> 
    6341653    <nd ref='-112' /> 
     1654    <nd ref='-110' /> 
     1655    <nd ref='-108' /> 
     1656    <nd ref='-106' /> 
     1657    <nd ref='-104' /> 
     1658    <nd ref='-102' /> 
     1659    <nd ref='-100' /> 
     1660    <nd ref='-98' /> 
     1661    <nd ref='-96' /> 
     1662    <nd ref='-94' /> 
     1663    <nd ref='-92' /> 
     1664    <nd ref='-90' /> 
    6351665    <nd ref='-88' /> 
    636     <nd ref='-116' /> 
    637     <tag k='amenity' v='parking' /> 
    638     <tag k='parking' v='surface' /> 
    639   </way> 
    640   <way id='-570' visible='true'> 
    641     <nd ref='-190' /> 
    642     <nd ref='-188' /> 
    643     <nd ref='-182' /> 
    644     <nd ref='-180' /> 
    645     <nd ref='-190' /> 
    646     <tag k='amenity' v='parking' /> 
    647     <tag k='parking' v='surface' /> 
    648   </way> 
    649   <way id='-568' visible='true'> 
    650     <nd ref='-210' /> 
    651     <nd ref='-258' /> 
    652     <nd ref='-260' /> 
    653     <nd ref='-214' /> 
    654     <nd ref='-210' /> 
    655   </way> 
    656   <way id='-566' visible='true'> 
    657     <nd ref='-246' /> 
    658     <nd ref='-242' /> 
    659     <nd ref='-248' /> 
    660     <nd ref='-286' /> 
    661     <nd ref='-246' /> 
    662   </way> 
    663   <way id='-564' visible='true'> 
    664     <nd ref='-492' /> 
    665     <nd ref='-428' /> 
    666     <nd ref='-430' /> 
    667     <nd ref='-422' /> 
    668     <nd ref='-420' /> 
    669     <nd ref='-416' /> 
    670     <nd ref='-418' /> 
    671     <nd ref='-426' /> 
    672     <nd ref='-500' /> 
    673     <nd ref='-498' /> 
    674     <nd ref='-492' /> 
    675     <tag k='amenity' v='parking' /> 
    676     <tag k='parking' v='surface' /> 
    677   </way> 
    678   <way id='-562' visible='true'> 
    679     <nd ref='-176' /> 
    680     <nd ref='-178' /> 
    681     <tag k='highway' v='motorway' /> 
    682     <tag k='lanes' v='5' /> 
    683   </way> 
    684   <way id='-560' visible='true'> 
    685     <nd ref='-476' /> 
    686     <nd ref='-496' /> 
    687     <nd ref='-490' /> 
    688     <nd ref='-480' /> 
    689     <nd ref='-482' /> 
    690     <nd ref='-476' /> 
    691     <tag k='landuse' v='retail' /> 
    692   </way> 
    693   <way id='-558' visible='true'> 
    694     <nd ref='-386' /> 
    695     <nd ref='-384' /> 
    696     <nd ref='-374' /> 
    697     <nd ref='-378' /> 
    698     <nd ref='-380' /> 
    699     <nd ref='-386' /> 
    700     <tag k='amenity' v='parking' /> 
    701     <tag k='parking' v='surface' /> 
    702   </way> 
    703   <way id='-556' visible='true'> 
    704     <nd ref='-358' /> 
    705     <nd ref='-352' /> 
    706     <tag k='highway' v='motorway' /> 
    707     <tag k='lanes' v='5' /> 
    708   </way> 
    709   <way id='-554' visible='true'> 
    710     <nd ref='-368' /> 
    711     <nd ref='-356' /> 
    712     <tag k='highway' v='motorway' /> 
    713     <tag k='lanes' v='5' /> 
    714   </way> 
    715   <way id='-552' visible='true'> 
    716     <nd ref='-244' /> 
    717     <nd ref='-282' /> 
    718     <nd ref='-252' /> 
    719     <nd ref='-284' /> 
    720     <nd ref='-244' /> 
    721     <tag k='amenity' v='parking' /> 
    722     <tag k='parking' v='surface' /> 
    723   </way> 
    724   <way id='-550' visible='true'> 
    725     <nd ref='-390' /> 
    726     <nd ref='-398' /> 
    727     <nd ref='-396' /> 
    728     <nd ref='-394' /> 
    729     <nd ref='-392' /> 
    730     <nd ref='-390' /> 
    731     <tag k='amenity' v='parking' /> 
    732     <tag k='parking' v='surface' /> 
    733   </way> 
    734   <way id='-548' visible='true'> 
    735     <nd ref='-526' /> 
    736     <nd ref='-524' /> 
    737     <nd ref='-522' /> 
    738     <nd ref='-520' /> 
    739     <nd ref='-526' /> 
    740     <tag k='amenity' v='parking' /> 
    741     <tag k='parking' v='surface' /> 
    742   </way> 
    743   <way id='-546' visible='true'> 
     1666    <nd ref='-86' /> 
     1667    <nd ref='-84' /> 
     1668    <nd ref='-82' /> 
     1669    <nd ref='-80' /> 
     1670    <nd ref='-78' /> 
     1671    <nd ref='-76' /> 
     1672    <nd ref='-74' /> 
     1673    <nd ref='-72' /> 
     1674    <nd ref='-70' /> 
     1675    <nd ref='-68' /> 
     1676    <nd ref='-66' /> 
     1677    <nd ref='-64' /> 
    7441678    <nd ref='-62' /> 
    745     <nd ref='-52' /> 
    746     <nd ref='-68' /> 
     1679    <nd ref='-60' /> 
     1680    <nd ref='-58' /> 
    7471681    <nd ref='-56' /> 
    7481682    <nd ref='-54' /> 
    749     <nd ref='-74' /> 
    750     <nd ref='-72' /> 
    751     <nd ref='-60' /> 
    752     <nd ref='-80' /> 
    753     <nd ref='-70' /> 
    754     <nd ref='-58' /> 
    755     <nd ref='-78' /> 
    756     <nd ref='-66' /> 
    757     <nd ref='-62' /> 
    758     <tag k='building' v='yes' /> 
    759   </way> 
    760   <way id='-544' visible='true'> 
    761     <nd ref='-76' /> 
    762     <nd ref='-64' /> 
    763     <nd ref='-54' /> 
    764     <nd ref='-74' /> 
    765     <nd ref='-80' /> 
    766     <nd ref='-70' /> 
    767     <nd ref='-66' /> 
    768     <nd ref='-62' /> 
    769     <nd ref='-76' /> 
    770     <tag k='building' v='yes' /> 
    771   </way> 
    772   <way id='-542' visible='true'> 
     1683    <nd ref='-52' /> 
    7731684    <nd ref='-50' /> 
    7741685    <nd ref='-48' /> 
    775     <tag k='highway' v='motorway' /> 
    776     <tag k='lanes' v='5' /> 
    777   </way> 
    778   <way id='-540' visible='true'> 
    7791686    <nd ref='-46' /> 
    7801687    <nd ref='-44' /> 
    781     <tag k='highway' v='motorway' /> 
    782     <tag k='lanes' v='5' /> 
    783   </way> 
    784   <way id='-538' visible='true'> 
    785     <nd ref='-32' /> 
     1688    <nd ref='-42' /> 
     1689    <nd ref='-40' /> 
    7861690    <nd ref='-38' /> 
    7871691    <nd ref='-36' /> 
    788     <nd ref='-40' /> 
    7891692    <nd ref='-34' /> 
    7901693    <nd ref='-32' /> 
    791     <tag k='building' v='yes' /> 
    792     <tag k='name' v='A' /> 
    793   </way> 
    794   <way id='-536' visible='true'> 
    795     <nd ref='-34' /> 
    796     <nd ref='-42' /> 
    797     <nd ref='-671' /> 
    798     <nd ref='-34' /> 
    799     <tag k='building' v='yes' /> 
    800     <tag k='name' v='A' /> 
    801   </way> 
    802   <way id='-534' visible='true'> 
    8031694    <nd ref='-30' /> 
     1695    <nd ref='-28' /> 
     1696    <nd ref='-26' /> 
     1697    <nd ref='-24' /> 
     1698    <nd ref='-22' /> 
     1699    <nd ref='-20' /> 
     1700    <nd ref='-18' /> 
     1701    <nd ref='-16' /> 
     1702    <nd ref='-14' /> 
     1703    <nd ref='-12' /> 
     1704    <nd ref='-10' /> 
     1705    <nd ref='-8' /> 
    8041706    <nd ref='-6' /> 
    805     <nd ref='-22' /> 
    806     <nd ref='-14' /> 
    807     <nd ref='-18' /> 
    808     <nd ref='-30' /> 
    809     <tag k='building' v='yes' /> 
    810     <tag k='name' v='B' /> 
    811   </way> 
    812   <way id='-532' visible='true'> 
    813     <nd ref='-18' /> 
    814     <nd ref='-8' /> 
    815     <nd ref='-24' /> 
    816     <nd ref='-18' /> 
    817     <tag k='building' v='yes' /> 
    818     <tag k='name' v='B' /> 
    819   </way> 
    820   <way id='-530' visible='true'> 
    8211707    <nd ref='-4' /> 
    822     <nd ref='-20' /> 
    823     <nd ref='-16' /> 
    824     <nd ref='-26' /> 
    825     <nd ref='-12' /> 
    826     <nd ref='-4' /> 
    827     <tag k='building' v='yes' /> 
    828     <tag k='name' v='A' /> 
    829   </way> 
    830   <way id='-528' visible='true'> 
    831     <nd ref='-12' /> 
    832     <nd ref='-28' /> 
    833     <nd ref='-10' /> 
    834     <nd ref='-12' /> 
    835     <tag k='building' v='yes' /> 
    836     <tag k='name' v='A' /> 
    837   </way> 
    838   <relation id='-658' visible='true'> 
    839     <member type='way' ref='-642' role='inner' /> 
    840     <member type='way' ref='-640' role='outer' /> 
     1708    <nd ref='-2' /> 
     1709    <nd ref='-150' /> 
     1710    <tag k='building' v='yes' /> 
     1711  </way> 
     1712  <relation id='-1415' visible='true'> 
     1713    <member type='way' ref='-1369' role='outer' /> 
     1714    <member type='way' ref='-1379' role='inner' /> 
     1715    <tag k='type' v='multipolygon' /> 
     1716  </relation> 
     1717  <relation id='-1408' action='modify' visible='true'> 
     1718    <member type='way' ref='-1398' role='inner' /> 
     1719    <member type='way' ref='-1389' role='outer' /> 
     1720    <tag k='type' v='multipolygon' /> 
     1721  </relation> 
     1722  <relation id='-1366' timestamp='2010-09-01T07:44:52Z' visible='true'> 
     1723    <member type='way' ref='-1346' role='outer' /> 
     1724    <member type='way' ref='-1344' role='inner' /> 
     1725    <member type='way' ref='-1342' role='inner' /> 
     1726    <tag k='natural' v='water' /> 
     1727    <tag k='type' v='multipolygon' /> 
     1728  </relation> 
     1729  <relation id='-1364' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     1730    <member type='way' ref='-1336' role='inner' /> 
     1731    <member type='way' ref='-1334' role='outer' /> 
    8411732    <tag k='name' v='6.' /> 
    8421733    <tag k='type' v='multipolygon' /> 
    8431734  </relation> 
    844   <relation id='-656' visible='true'> 
    845     <member type='way' ref='-586' role='inner' /> 
    846     <member type='way' ref='-568' role='inner' /> 
    847     <member type='way' ref='-634' role='outer' /> 
     1735  <relation id='-1362' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     1736    <member type='way' ref='-1280' role='inner' /> 
     1737    <member type='way' ref='-1262' role='inner' /> 
     1738    <member type='way' ref='-1328' role='outer' /> 
    8481739    <tag k='name' v='5.' /> 
    8491740    <tag k='type' v='multipolygon' /> 
    8501741  </relation> 
    851   <relation id='-654' visible='true'> 
    852     <member type='way' ref='-566' role='inner' /> 
    853     <member type='way' ref='-552' role='outer' /> 
     1742  <relation id='-1360' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     1743    <member type='way' ref='-1260' role='inner' /> 
     1744    <member type='way' ref='-1246' role='outer' /> 
    8541745    <tag k='name' v='4. a' /> 
    8551746    <tag k='type' v='multipolygon' /> 
    8561747  </relation> 
    857   <relation id='-652' visible='true'> 
    858     <member type='way' ref='-616' role='inner' /> 
    859     <member type='way' ref='-626' role='outer' /> 
     1748  <relation id='-1358' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     1749    <member type='way' ref='-1310' role='inner' /> 
     1750    <member type='way' ref='-1320' role='outer' /> 
    8601751    <tag k='name' v='2.' /> 
    8611752    <tag k='type' v='multipolygon' /> 
    8621753  </relation> 
    863   <relation id='-650' visible='true'> 
     1754  <relation id='-1356' timestamp='2010-09-01T07:08:32Z' visible='true'> 
    8641755  </relation> 
    865   <relation id='-648' visible='true'> 
    866     <member type='way' ref='-584' role='' /> 
    867     <member type='way' ref='-580' role='' /> 
     1756  <relation id='-1354' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     1757    <member type='way' ref='-1278' role='' /> 
     1758    <member type='way' ref='-1274' role='' /> 
    8681759    <tag k='name ' v='4. b' /> 
    8691760  </relation> 
    870   <relation id='-646' visible='true'> 
    871     <member type='way' ref='-582' role='inner' /> 
    872     <member type='way' ref='-614' role='outer' /> 
     1761  <relation id='-1352' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     1762    <member type='way' ref='-1276' role='inner' /> 
     1763    <member type='way' ref='-1308' role='outer' /> 
    8731764    <tag k='name' v='3.' /> 
    8741765    <tag k='type' v='multipolygon' /> 
    8751766  </relation> 
    876   <relation id='-644' visible='true'> 
    877     <member type='way' ref='-620' role='area' /> 
    878     <member type='node' ref='-342' role='node in area' /> 
    879     <member type='node' ref='-338' role='node in area' /> 
    880     <member type='way' ref='-602' role='some other way' /> 
    881     <member type='node' ref='-348' role='to be deleted node in area' /> 
     1767  <relation id='-1350' timestamp='2010-09-01T07:08:32Z' visible='true'> 
     1768    <member type='way' ref='-1314' role='area' /> 
     1769    <member type='node' ref='-912' role='node in area' /> 
     1770    <member type='node' ref='-908' role='node in area' /> 
     1771    <member type='way' ref='-1296' role='some other way' /> 
     1772    <member type='node' ref='-918' role='to be deleted node in area' /> 
    8821773    <tag k='name' v='1.' /> 
    8831774  </relation> 
  • trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java

    r3449 r3554  
    22package org.openstreetmap.josm.actions; 
    33 
     4import static org.openstreetmap.josm.gui.conflict.tags.TagConflictResolutionUtil.combineTigerTags; 
     5import static org.openstreetmap.josm.gui.conflict.tags.TagConflictResolutionUtil.completeTagCollectionForEditing; 
     6import static org.openstreetmap.josm.gui.conflict.tags.TagConflictResolutionUtil.normalizeTagCollectionBeforeEditing; 
    47import static org.openstreetmap.josm.tools.I18n.marktr; 
    58import static org.openstreetmap.josm.tools.I18n.tr; 
    69import static org.openstreetmap.josm.tools.I18n.trn; 
    710 
    8 import java.awt.GridBagLayout; 
    911import java.awt.event.ActionEvent; 
    1012import java.awt.event.KeyEvent; 
     
    1416import java.util.Collection; 
    1517import java.util.Collections; 
     18import java.util.Comparator; 
    1619import java.util.HashMap; 
    1720import java.util.HashSet; 
     21import java.util.LinkedHashSet; 
    1822import java.util.LinkedList; 
    1923import java.util.List; 
    2024import java.util.Map; 
    21 import java.util.Map.Entry; 
    2225import java.util.Set; 
    2326import java.util.TreeMap; 
    24 import java.util.TreeSet; 
    25  
    26 import javax.swing.Box; 
    27 import javax.swing.JComboBox; 
    28 import javax.swing.JLabel; 
     27 
    2928import javax.swing.JOptionPane; 
    30 import javax.swing.JPanel; 
    3129 
    3230import org.openstreetmap.josm.Main; 
     31import org.openstreetmap.josm.actions.ReverseWayAction.ReverseWayResult; 
    3332import org.openstreetmap.josm.actions.SplitWayAction.SplitWayResult; 
    3433import org.openstreetmap.josm.command.AddCommand; 
     
    3736import org.openstreetmap.josm.command.DeleteCommand; 
    3837import org.openstreetmap.josm.command.SequenceCommand; 
     38import org.openstreetmap.josm.corrector.UserCancelException; 
    3939import org.openstreetmap.josm.data.UndoRedoHandler; 
    4040import org.openstreetmap.josm.data.coor.EastNorth; 
     
    4545import org.openstreetmap.josm.data.osm.Relation; 
    4646import org.openstreetmap.josm.data.osm.RelationMember; 
    47 import org.openstreetmap.josm.data.osm.TigerUtils; 
     47import org.openstreetmap.josm.data.osm.TagCollection; 
    4848import org.openstreetmap.josm.data.osm.Way; 
    49 import org.openstreetmap.josm.gui.ExtendedDialog; 
    50 import org.openstreetmap.josm.tools.GBC; 
     49import org.openstreetmap.josm.gui.conflict.tags.CombinePrimitiveResolverDialog; 
     50import org.openstreetmap.josm.tools.Pair; 
    5151import org.openstreetmap.josm.tools.Shortcut; 
    5252 
     
    5656    private int cmdsCount = 0; 
    5757 
     58 
    5859    /** 
    5960     * This helper class describes join ares action result. 
     
    6364    public static class JoinAreasResult { 
    6465 
    65         public Way outerWay; 
    66         public List<Way> innerWays; 
    67  
    6866        public boolean mergeSuccessful; 
    6967        public boolean hasChanges; 
    7068        public boolean hasRelationProblems; 
    71     } 
    72  
    73     // HelperClass 
    74     // Saves a node and two positions where to insert the node into the ways 
    75     private static class NodeToSegs implements Comparable<NodeToSegs> { 
    76         public int pos; 
    77         public Node n; 
    78         public double dis; 
    79         public NodeToSegs(int pos, Node n, LatLon dis) { 
    80             this.pos = pos; 
    81             this.n = n; 
    82             this.dis = n.getCoor().greatCircleDistance(dis); 
    83         } 
    84  
    85         public int compareTo(NodeToSegs o) { 
    86             if(this.pos == o.pos) 
    87                 return (this.dis - o.dis) > 0 ? 1 : -1; 
    88                 return this.pos - o.pos; 
    89         } 
    90  
    91         @Override 
    92         public int hashCode() { 
    93             return pos; 
    94         } 
    95  
    96         @Override 
    97         public boolean equals(Object o) { 
    98             if (o instanceof NodeToSegs) 
    99                 return compareTo((NodeToSegs) o) == 0; 
    100             else 
    101                 return false; 
     69 
     70        public List<Multipolygon> polygons; 
     71    } 
     72 
     73    public static class Multipolygon { 
     74        public Way outerWay; 
     75        public List<Way> innerWays; 
     76 
     77        public Relation relation; 
     78 
     79        public Multipolygon(Way way) { 
     80            outerWay = way; 
     81            innerWays = new ArrayList<Way>(); 
    10282        } 
    10383    } 
     
    126106    } 
    127107 
    128     /** 
    129      * HelperClass 
    130      * saves a way and the "inside" side 
    131      * insideToTheLeft: if true left side is "in", false -right side is "in". 
    132      * Left and right are determined along the orientation of way. 
    133      */ 
    134     private static class WayInPath { 
     108 
     109    //HelperClass 
     110    //saves a way and the "inside" side 
     111    // insideToTheLeft: if true left side is "in", false -right side is "in". Left and right are determined along the orientation of way. 
     112    private static class WayInPolygon { 
    135113        public final Way way; 
    136         public boolean insideToTheLeft; 
    137  
    138         public WayInPath(Way way, boolean insideLeft) { 
    139             this.way = way; 
    140             this.insideToTheLeft = insideLeft; 
     114        public boolean insideToTheRight; 
     115 
     116        public WayInPolygon(Way _way, boolean _insideRight) { 
     117            this.way = _way; 
     118            this.insideToTheRight = _insideRight; 
    141119        } 
    142120 
     
    148126        @Override 
    149127        public boolean equals(Object other) { 
    150             if (!(other instanceof WayInPath)) 
    151                 return false; 
    152             WayInPath otherMember = (WayInPath) other; 
    153             return otherMember.way.equals(this.way) && otherMember.insideToTheLeft == this.insideToTheLeft; 
    154         } 
    155     } 
     128            if (!(other instanceof WayInPolygon)) return false; 
     129            WayInPolygon otherMember = (WayInPolygon) other; 
     130            return otherMember.way.equals(this.way) && otherMember.insideToTheRight == this.insideToTheRight; 
     131        } 
     132    } 
     133 
     134    /** 
     135     * This helper class describes a polygon, assembled from several ways. 
     136     * @author viesturs 
     137     * 
     138     */ 
     139    private static class AssembledPolygon { 
     140        public List<WayInPolygon> ways; 
     141 
     142        public AssembledPolygon(List<WayInPolygon> boundary) { 
     143            this.ways = boundary; 
     144        } 
     145 
     146        public List<Node> getNodes() { 
     147            List<Node> nodes = new ArrayList<Node>(); 
     148            for (WayInPolygon way : this.ways) { 
     149                //do not add the last node as it will be repeated in the next way 
     150                if (way.insideToTheRight) { 
     151                    for (int pos = 0; pos < way.way.getNodesCount() - 1; pos++) { 
     152                        nodes.add(way.way.getNode(pos)); 
     153                    } 
     154                } 
     155                else { 
     156                    for (int pos = way.way.getNodesCount() - 1; pos > 0; pos--) { 
     157                        nodes.add(way.way.getNode(pos)); 
     158                    } 
     159                } 
     160            } 
     161 
     162            return nodes; 
     163        } 
     164    } 
     165 
     166 
     167    public static class AssembledMultipolygon { 
     168        public AssembledPolygon outerWay; 
     169        public List<AssembledPolygon> innerWays; 
     170 
     171        public AssembledMultipolygon(AssembledPolygon way) { 
     172            outerWay = way; 
     173            innerWays = new ArrayList<AssembledPolygon>(); 
     174        } 
     175    } 
     176 
     177    /** 
     178     * This hepler class implements algorithm traversing trough connected ways. 
     179     * Assumes you are going in clockwise orientation. 
     180     * @author viesturs 
     181     * 
     182     */ 
     183    private static class WayTraverser { 
     184 
     185        private Set<WayInPolygon> availableWays; 
     186        private WayInPolygon lastWay; 
     187        private boolean lastWayReverse; 
     188 
     189        public WayTraverser(Collection<WayInPolygon> ways) { 
     190 
     191            availableWays = new HashSet<WayInPolygon>(ways); 
     192            lastWay = null; 
     193        } 
     194 
     195        public void removeWays(Collection<WayInPolygon> ways) { 
     196            availableWays.removeAll(ways); 
     197        } 
     198 
     199        public boolean hasWays() { 
     200            return availableWays.size() > 0; 
     201        } 
     202 
     203        public WayInPolygon startNewWay(WayInPolygon way) { 
     204            lastWay = way; 
     205            lastWayReverse = !lastWay.insideToTheRight; 
     206 
     207            return lastWay; 
     208        } 
     209 
     210        public WayInPolygon startNewWay() { 
     211            if (availableWays.size() == 0) { 
     212                lastWay = null; 
     213            } else { 
     214                lastWay = availableWays.iterator().next(); 
     215                lastWayReverse = !lastWay.insideToTheRight; 
     216            } 
     217 
     218            return lastWay; 
     219        } 
     220 
     221 
     222        public  WayInPolygon advanceNextLeftmostWay() { 
     223            return advanceNextWay(false); 
     224        } 
     225 
     226        public  WayInPolygon advanceNextRightmostWay() { 
     227            return advanceNextWay(true); 
     228        } 
     229 
     230        private WayInPolygon advanceNextWay(boolean rightmost) { 
     231 
     232            Node headNode = !lastWayReverse ? lastWay.way.lastNode() : lastWay.way.firstNode(); 
     233            Node prevNode = !lastWayReverse ? lastWay.way.getNode(lastWay.way.getNodesCount() - 2) : lastWay.way.getNode(1); 
     234 
     235            //find best next way 
     236            WayInPolygon bestWay = null; 
     237            Node bestWayNextNode = null; 
     238            boolean bestWayReverse = false; 
     239 
     240            for (WayInPolygon way : availableWays) { 
     241                if (way.way.firstNode().equals(headNode)) { 
     242                    //start adjacent to headNode 
     243                    Node nextNode = way.way.getNode(1); 
     244 
     245                    if (nextNode.equals(prevNode)) 
     246                    { 
     247                        //this is the path we came from - ignore it. 
     248                    } 
     249                    else if (bestWay == null || (isToTheRightSideOfLine(prevNode, headNode, bestWayNextNode, nextNode) == rightmost)) { 
     250                        //the new way is better 
     251                        bestWay = way; 
     252                        bestWayReverse = false; 
     253                        bestWayNextNode = nextNode; 
     254                    } 
     255                } 
     256 
     257                if (way.way.lastNode().equals(headNode)) { 
     258                    //end adjacent to headNode 
     259                    Node nextNode = way.way.getNode(way.way.getNodesCount() - 2); 
     260 
     261                    if (nextNode.equals(prevNode)) { 
     262                        //this is the path we came from - ignore it. 
     263                    } 
     264                    else if (bestWay == null || (isToTheRightSideOfLine(prevNode, headNode, bestWayNextNode, nextNode) == rightmost)) { 
     265                        //the new way is better 
     266                        bestWay = way; 
     267                        bestWayReverse = true; 
     268                        bestWayNextNode = nextNode; 
     269                    } 
     270                } 
     271            } 
     272 
     273            lastWay = bestWay; 
     274            lastWayReverse = bestWayReverse; 
     275 
     276            return lastWay; 
     277        } 
     278 
     279        public boolean isLastWayInsideToTheRight() { 
     280            return lastWayReverse != lastWay.insideToTheRight; 
     281        } 
     282 
     283        public Node getLastWayStartNode() { 
     284            return lastWayReverse ? lastWay.way.lastNode() : lastWay.way.firstNode(); 
     285        } 
     286 
     287        public Node getLastWayEndNode() { 
     288            return lastWayReverse ? lastWay.way.firstNode() : lastWay.way.lastNode(); 
     289        } 
     290    } 
     291 
     292    /** 
     293     * Provides some node order , based on coordinates, nodes with equal coordinates are equal. 
     294     * @author viesturs 
     295     * 
     296     */ 
     297    private class NodePositionComparator implements Comparator<Node> { 
     298 
     299        @Override 
     300        public int compare(Node n1, Node n2) { 
     301 
     302            double dLat = n1.getCoor().lat() - n2.getCoor().lat(); 
     303            double dLon = n1.getCoor().lon() - n2.getCoor().lon(); 
     304 
     305            if (dLat > 0) 
     306                return 1; 
     307            else if (dLat < 0) 
     308                return -1; 
     309            else if (dLon == 0) //dlat is 0 here 
     310                return 0; 
     311            else 
     312                return dLon > 0 ? 1 : -1; 
     313        } 
     314    } 
     315 
     316 
     317    /** 
     318     * Helper storage class for finding findOuterWays 
     319     * @author viesturs 
     320     */ 
     321    static class PolygonLevel { 
     322        public final int level; 
     323        public final AssembledMultipolygon pol; 
     324 
     325        public PolygonLevel(AssembledMultipolygon _pol, int _level) { 
     326            pol = _pol; 
     327            level = _level; 
     328        } 
     329    } 
     330 
    156331 
    157332    // Adds the menu entry, Shortcuts, etc. 
     
    173348        } 
    174349 
    175         // Too many ways 
    176         if(ways.size() > 2) { 
    177             JOptionPane.showMessageDialog(Main.parent, tr("Only up to two areas can be joined at the moment.")); 
    178             return; 
    179         } 
    180  
    181350        List<Node> allNodes = new ArrayList<Node>(); 
    182         for (Way way: ways) { 
    183             if(!way.isClosed()) { 
     351        for (Way way : ways) { 
     352            if (!way.isClosed()) { 
    184353                JOptionPane.showMessageDialog(Main.parent, tr("\"{0}\" is not closed and therefore cannot be joined.", way.getName())); 
    185354                return; 
     
    192361        Area dataSourceArea = Main.main.getCurrentDataSet().getDataSourceArea(); 
    193362        if (dataSourceArea != null) { 
    194             for (Node node: allNodes) { 
     363            for (Node node : allNodes) { 
    195364                if (!dataSourceArea.contains(node.getCoor())) { 
    196365                    int option = JOptionPane.showConfirmDialog(Main.parent, 
     
    209378        } 
    210379 
    211         if (checkForTagConflicts(ways.getFirst(), ways.getLast())) 
    212             //there was conflicts and user canceled abort the action. 
     380        //analyze multipolygon relations and collect all areas 
     381        List<Multipolygon> areas = collectMultipolygons(ways); 
     382 
     383        if (areas == null) 
     384            //too complex multipolygon relations found 
    213385            return; 
    214386 
    215  
    216         JoinAreasResult result = joinAreas(ways.getFirst(), ways.getLast()); 
    217  
    218         if (result.hasChanges) { 
    219             Main.map.mapView.repaint(); 
    220             DataSet ds = Main.main.getCurrentDataSet(); 
    221             ds.fireSelectionChanged(); 
    222         } else { 
     387        if (!testJoin(areas)) { 
    223388            JOptionPane.showMessageDialog(Main.parent, tr("No intersection found. Nothing was changed.")); 
    224         } 
    225     } 
    226  
    227     /** 
    228      * Will join two overlapping areas 
    229      * @param Way First way/area 
    230      * @param Way Second way/area 
    231      */ 
    232     private JoinAreasResult joinAreas(Way a, Way b) { 
     389            return; 
     390        } 
     391 
     392        if (!resolveTagConflicts(areas)) 
     393            return; 
     394        //user cancelled, do nothing. 
     395 
     396        try { 
     397            JoinAreasResult result = joinAreas(areas); 
     398 
     399            if (result.hasChanges) { 
     400 
     401                Main.map.mapView.repaint(); 
     402                DataSet ds = Main.main.getCurrentDataSet(); 
     403                ds.fireSelectionChanged(); 
     404            } else { 
     405                JOptionPane.showMessageDialog(Main.parent, tr("No intersection found. Nothing was changed.")); 
     406            } 
     407        } 
     408        catch (UserCancelException exception) { 
     409            //revert changes 
     410            //FIXME: this is dirty hack 
     411            makeCommitsOneAction(tr("Reverting changes")); 
     412            Main.main.undoRedo.undo(); 
     413            Main.main.undoRedo.redoCommands.clear(); 
     414        } 
     415    } 
     416 
     417 
     418    /** 
     419     * Tests if the areas have some intersections to join. 
     420     * @param areas 
     421     * @return 
     422     */ 
     423    private boolean testJoin(List<Multipolygon> areas) { 
     424        List<Way> allStartingWays = new ArrayList<Way>(); 
     425 
     426        for (Multipolygon area : areas) { 
     427            allStartingWays.add(area.outerWay); 
     428            allStartingWays.addAll(area.innerWays); 
     429        } 
     430 
     431        //find intersection points 
     432        ArrayList<Node> nodes = addIntersections(allStartingWays, true); 
     433        return nodes.size() > 0; 
     434    } 
     435 
     436    /** 
     437     * Will join two or more overlapping areas 
     438     * @param areas - list of areas to join 
     439     * @return new area formed. 
     440     */ 
     441    private JoinAreasResult joinAreas(List<Multipolygon> areas) throws UserCancelException { 
    233442 
    234443        JoinAreasResult result = new JoinAreasResult(); 
    235444        result.hasChanges = false; 
    236445 
    237         // Fix self-overlapping first or other errors 
    238         boolean same = a.equals(b); 
    239         if(!same) { 
    240             int i = 0; 
    241  
    242             //join each area with itself, fixing self-crossings. 
    243             JoinAreasResult resultA = joinAreas(a, a); 
    244             JoinAreasResult resultB = joinAreas(b, b); 
    245  
    246             if (resultA.mergeSuccessful) { 
    247                 a = resultA.outerWay; 
    248                 ++i; 
    249             } 
    250             if(resultB.mergeSuccessful) { 
    251                 b = resultB.outerWay; 
    252                 ++i; 
    253             } 
    254  
    255             result.hasChanges = i > 0; 
    256             cmdsCount = i; 
    257         } 
    258  
    259         ArrayList<Node> nodes = addIntersections(a, b); 
     446        List<Way> allStartingWays = new ArrayList<Way>(); 
     447        List<Way> innerStartingWays = new ArrayList<Way>(); 
     448        List<Way> outerStartingWays = new ArrayList<Way>(); 
     449 
     450        for (Multipolygon area : areas) { 
     451            outerStartingWays.add(area.outerWay); 
     452            innerStartingWays.addAll(area.innerWays); 
     453        } 
     454 
     455        allStartingWays.addAll(innerStartingWays); 
     456        allStartingWays.addAll(outerStartingWays); 
     457 
     458        //first remove nodes in the same coordinate 
     459        boolean removedDuplicates = false; 
     460        removedDuplicates |= removeDuplicateNodes(allStartingWays); 
     461 
     462        if (removedDuplicates) { 
     463            result.hasChanges = true; 
     464            commitCommands(marktr("Removed duplicate nodes")); 
     465        } 
     466 
     467        //find intersection points 
     468        ArrayList<Node> nodes = addIntersections(allStartingWays, false); 
    260469 
    261470        //no intersections, return. 
    262         if(nodes.size() == 0) return result; 
     471        if (nodes.size() == 0) return result; 
    263472        commitCommands(marktr("Added node on all intersections")); 
    264473 
     474        ArrayList<RelationRole> relations = new ArrayList<RelationRole>(); 
     475 
    265476        // Remove ways from all relations so ways can be combined/split quietly 
    266         ArrayList<RelationRole> relations = removeFromRelations(a); 
    267         if(!same) { 
    268             relations.addAll(removeFromRelations(b)); 
     477        for (Way way : allStartingWays) { 
     478            relations.addAll(removeFromAllRelations(way)); 
    269479        } 
    270480 
    271481        // Don't warn now, because it will really look corrupted 
    272         boolean warnAboutRelations = relations.size() > 0; 
    273  
    274         ArrayList<Way> allWays = splitWaysOnNodes(a, b, nodes); 
    275  
    276         // Find inner ways save them to a list 
    277         ArrayList<WayInPath> outerWays = findOuterWays(allWays); 
    278         ArrayList<Way> innerWays = findInnerWays(allWays, outerWays); 
    279  
    280         // Join outer ways 
    281         Way outerWay = joinOuterWays(outerWays); 
    282  
    283         // Fix Multipolygons if there are any 
    284         List<Way> newInnerWays = fixMultipolygons(innerWays, outerWay, same); 
    285  
    286         // Delete the remaining inner ways 
    287         if(innerWays != null && innerWays.size() > 0) { 
    288             cmds.add(DeleteCommand.delete(Main.map.mapView.getEditLayer(), innerWays, true)); 
     482        boolean warnAboutRelations = relations.size() > 0 && allStartingWays.size() > 1; 
     483 
     484        ArrayList<WayInPolygon> preparedWays = new ArrayList<WayInPolygon>(); 
     485 
     486        for (Way way : outerStartingWays) { 
     487            ArrayList<Way> splitWays = splitWayOnNodes(way, nodes); 
     488            preparedWays.addAll(markWayInsideSide(splitWays, false)); 
     489        } 
     490 
     491        for (Way way : innerStartingWays) { 
     492            ArrayList<Way> splitWays = splitWayOnNodes(way, nodes); 
     493            preparedWays.addAll(markWayInsideSide(splitWays, true)); 
     494        } 
     495 
     496        // Find boundary ways 
     497        ArrayList<Way> discardedWays = new ArrayList<Way>(); 
     498        List<AssembledPolygon> bounadries = findBoundaryPolygons(preparedWays, discardedWays); 
     499 
     500        //find polygons 
     501        List<AssembledMultipolygon> preparedPolygons = findPolygons(bounadries); 
     502 
     503        //assemble final ways 
     504        List<Multipolygon> polygons = new ArrayList<Multipolygon>(); 
     505        for (AssembledMultipolygon pol : preparedPolygons) { 
     506            polygons.add(joinPolygon(pol)); 
     507        } 
     508 
     509        // Delete the discarded inner ways 
     510        if (discardedWays.size() > 0) { 
     511            cmds.add(DeleteCommand.delete(Main.map.mapView.getEditLayer(), discardedWays, true)); 
    289512        } 
    290513        commitCommands(marktr("Delete Ways that are not part of an inner multipolygon")); 
    291514 
    292515        // We can attach our new multipolygon relation and pretend it has always been there 
    293         addOwnMultigonRelation(newInnerWays, outerWay, relations); 
    294         fixRelations(relations, outerWay); 
     516        for (Multipolygon pol : polygons) { 
     517            addOwnMultigonRelation(pol.innerWays, pol.outerWay, relations); 
     518            fixRelations(relations, pol.outerWay); 
     519        } 
     520 
    295521        commitCommands(marktr("Fix relations")); 
    296522 
    297         stripTags(newInnerWays); 
    298  
    299         makeCommitsOneAction( 
    300                 same 
    301                 ? marktr("Joined self-overlapping area") 
    302                         : marktr("Joined overlapping areas") 
    303         ); 
    304  
    305         if(warnAboutRelations) { 
     523        for (Multipolygon pol : polygons) { 
     524            stripTags(pol.innerWays); 
     525        } 
     526 
     527        makeCommitsOneAction(marktr("Joined overlapping areas")); 
     528 
     529        if (warnAboutRelations) { 
    306530            JOptionPane.showMessageDialog(Main.parent, tr("Some of the ways were part of relations that have been modified. Please verify no errors have been introduced.")); 
    307531        } 
     
    309533        result.hasChanges = true; 
    310534        result.mergeSuccessful = true; 
    311         result.outerWay = outerWay; 
    312         result.innerWays = newInnerWays; 
    313  
     535        result.polygons = polygons; 
    314536        return result; 
    315537    } 
     
    319541     * @param Way First way to check 
    320542     * @param Way Second Way to check 
    321      * @return boolean True if not all conflicts could be resolved, False if everything's fine 
    322      */ 
    323     private boolean checkForTagConflicts(Way a, Way b) { 
    324         ArrayList<Way> ways = new ArrayList<Way>(); 
    325         ways.add(a); 
    326         ways.add(b); 
    327  
    328         // FIXME: This is mostly copied and pasted from CombineWayAction.java and one day should be moved into tools 
    329         // We have TagCollection handling for that now - use it here as well 
    330         Map<String, Set<String>> props = new TreeMap<String, Set<String>>(); 
    331         for (Way w : ways) { 
    332             for (String key: w.keySet()) { 
    333                 if (!props.containsKey(key)) { 
    334                     props.put(key, new TreeSet<String>()); 
    335                 } 
    336                 props.get(key).add(w.get(key)); 
    337             } 
    338         } 
    339  
    340         Way ax = new Way(a); 
    341         Way bx = new Way(b); 
    342  
    343         Map<String, JComboBox> components = new HashMap<String, JComboBox>(); 
    344         JPanel p = new JPanel(new GridBagLayout()); 
    345         for (Entry<String, Set<String>> e : props.entrySet()) { 
    346             if (TigerUtils.isTigerTag(e.getKey())) { 
    347                 String combined = TigerUtils.combineTags(e.getKey(), e.getValue()); 
    348                 ax.put(e.getKey(), combined); 
    349                 bx.put(e.getKey(), combined); 
    350             } else if (e.getValue().size() > 1) { 
    351                 if("created_by".equals(e.getKey())) 
    352                 { 
    353                     ax.remove("created_by"); 
    354                     bx.remove("created_by"); 
     543     * @return boolean True if all conflicts are resolved, False if conflicts remain. 
     544     */ 
     545    private boolean resolveTagConflicts(List<Multipolygon> polygons) { 
     546 
     547        List<Way> ways = new ArrayList<Way>(); 
     548 
     549        for (Multipolygon pol : polygons) { 
     550            ways.add(pol.outerWay); 
     551            ways.addAll(pol.innerWays); 
     552        } 
     553 
     554        if (ways.size() < 2) 
     555            return true; 
     556 
     557        //mostly copied from CombineWayAction.java. 
     558        TagCollection wayTags = TagCollection.unionOfAllPrimitives(ways); 
     559        TagCollection completeWayTags = new TagCollection(wayTags); 
     560        combineTigerTags(completeWayTags); 
     561        normalizeTagCollectionBeforeEditing(completeWayTags, ways); 
     562        TagCollection tagsToEdit = new TagCollection(completeWayTags); 
     563        completeTagCollectionForEditing(tagsToEdit); 
     564 
     565        CombinePrimitiveResolverDialog dialog = CombinePrimitiveResolverDialog.getInstance(); 
     566        dialog.getTagConflictResolverModel().populate(tagsToEdit, completeWayTags.getKeysWithMultipleValues()); 
     567        dialog.setTargetPrimitive(ways.get(0)); 
     568        Collection<Relation> parentRelations = CombineWayAction.getParentRelations(ways); 
     569        parentRelations = filterOwnMultipolygonRelations(parentRelations, polygons); 
     570        dialog.getRelationMemberConflictResolverModel().populate( 
     571                parentRelations, 
     572                ways 
     573        ); 
     574        dialog.prepareDefaultDecisions(); 
     575 
     576        // resolve tag conflicts if necessary 
     577        // 
     578        if (!completeWayTags.isApplicableToPrimitive() || !parentRelations.isEmpty()) { 
     579            dialog.setVisible(true); 
     580            if (dialog.isCancelled()) 
     581                return false; 
     582        } 
     583 
     584        for (Way way : ways) { 
     585            dialog.setTargetPrimitive(way); 
     586            cmds.addAll(dialog.buildResolutionCommands()); 
     587        } 
     588 
     589        commitCommands(marktr("Fix tag conflicts")); 
     590        return true; 
     591    } 
     592 
     593 
     594    /** 
     595     * This method removes duplicate points (if any) from the input way. 
     596     * @param way the way to process 
     597     * @return true if any changes where made 
     598     */ 
     599    private boolean removeDuplicateNodes(List<Way> ways) { 
     600        //TODO: maybe join nodes with JoinNodesAction, rather than reconnect the ways. 
     601 
     602        Map<Node, Node> nodeMap = new TreeMap<Node, Node>(new NodePositionComparator()); 
     603        int totalNodesRemoved = 0; 
     604 
     605        for (Way way : ways) { 
     606            if (way.getNodes().size() < 2) { 
     607                continue; 
     608            } 
     609 
     610            int nodesRemoved = 0; 
     611            List<Node> newNodes = new ArrayList<Node>(); 
     612            Node prevNode = null; 
     613 
     614            for (Node node : way.getNodes()) { 
     615                if (!nodeMap.containsKey(node)) { 
     616                    //new node 
     617                    nodeMap.put(node, node); 
     618 
     619                    //avoid duplicate nodes 
     620                    if (prevNode != node) { 
     621                        newNodes.add(node); 
     622                    } else { 
     623                        nodesRemoved ++; 
     624                    } 
    355625                } else { 
    356                     JComboBox c = new JComboBox(e.getValue().toArray()); 
    357                     c.setEditable(true); 
    358                     p.add(new JLabel(e.getKey()), GBC.std()); 
    359                     p.add(Box.createHorizontalStrut(10), GBC.std()); 
    360                     p.add(c, GBC.eol()); 
    361                     components.put(e.getKey(), c); 
    362                 } 
    363             } else { 
    364                 String val = e.getValue().iterator().next(); 
    365                 ax.put(e.getKey(), val); 
    366                 bx.put(e.getKey(), val); 
    367             } 
    368         } 
    369  
    370         if (components.isEmpty()) 
    371             return false; // No conflicts found 
    372  
    373         ExtendedDialog ed = new ExtendedDialog(Main.parent, 
    374                 tr("Enter values for all conflicts."), 
    375                 new String[] {tr("Solve Conflicts"), tr("Cancel")}); 
    376         ed.setButtonIcons(new String[] {"dialogs/conflict.png", "cancel.png"}); 
    377         ed.setContent(p); 
    378         ed.showDialog(); 
    379  
    380         if (ed.getValue() != 1) return true; // user cancel, unresolvable conflicts 
    381  
    382         for (Entry<String, JComboBox> e : components.entrySet()) { 
    383             String val = e.getValue().getEditor().getItem().toString(); 
    384             ax.put(e.getKey(), val); 
    385             bx.put(e.getKey(), val); 
    386         } 
    387  
    388         cmds.add(new ChangeCommand(a, ax)); 
    389         cmds.add(new ChangeCommand(b, bx)); 
    390         commitCommands(marktr("Fix tag conflicts")); 
    391         return false; 
    392     } 
    393  
    394     /** 
    395      * Will find all intersection and add nodes there for two given ways 
    396      * @param Way First way 
    397      * @param Way Second way 
    398      * @return ArrayList<OsmPrimitive> List of new nodes 
    399      */ 
    400     private ArrayList<Node> addIntersections(Way a, Way b) { 
    401         boolean same = a.equals(b); 
    402         int nodesSizeA = a.getNodesCount(); 
    403         int nodesSizeB = b.getNodesCount(); 
    404  
    405         ArrayList<Node> nodes = new ArrayList<Node>(); 
    406         ArrayList<NodeToSegs> nodesA = new ArrayList<NodeToSegs>(); 
    407         ArrayList<NodeToSegs> nodesB = new ArrayList<NodeToSegs>(); 
    408  
    409         for (int i = (same ? 1 : 0); i < nodesSizeA - 1; i++) { 
    410             for (int j = (same ? i + 2 : 0); j < nodesSizeB - 1; j++) { 
    411                 // Avoid re-adding nodes that already exist on (some) intersections 
    412                 if(a.getNode(i).equals(b.getNode(j)) || a.getNode(i+1).equals(b.getNode(j)))   { 
    413                     nodes.add(b.getNode(j)); 
    414                     continue; 
    415                 } else 
    416                     if(a.getNode(i).equals(b.getNode(j+1)) || a.getNode(i+1).equals(b.getNode(j+1))) { 
    417                         nodes.add(b.getNode(j+1)); 
    418                         continue; 
     626                    //node with same coordinates already exists, substitute with existing node 
     627                    Node representator = nodeMap.get(node); 
     628 
     629                    if (representator != node) { 
     630                        nodesRemoved ++; 
    419631                    } 
    420                 LatLon intersection = getLineLineIntersection( 
    421                         a.getNode(i)  .getEastNorth().east(), a.getNode(i)  .getEastNorth().north(), 
    422                         a.getNode(i+1).getEastNorth().east(), a.getNode(i+1).getEastNorth().north(), 
    423                         b.getNode(j)  .getEastNorth().east(), b.getNode(j)  .getEastNorth().north(), 
    424                         b.getNode(j+1).getEastNorth().east(), b.getNode(j+1).getEastNorth().north()); 
    425                 if(intersection == null) { 
    426                     continue; 
    427                 } 
    428  
    429                 // Create the node. Adding them to the ways must be delayed because we still loop over them 
    430                 Node n = new Node(intersection); 
    431                 cmds.add(new AddCommand(n)); 
    432                 nodes.add(n); 
    433                 // The distance is needed to sort and add the nodes in direction of the way 
    434                 nodesA.add(new NodeToSegs(i,  n, a.getNode(i).getCoor())); 
    435                 if(same) { 
    436                     nodesA.add(new NodeToSegs(j,  n, a.getNode(j).getCoor())); 
    437                 } else { 
    438                     nodesB.add(new NodeToSegs(j,  n, b.getNode(j).getCoor())); 
    439                 } 
    440             } 
    441         } 
    442  
    443         addNodesToWay(a, nodesA); 
    444         if(!same) { 
    445             addNodesToWay(b, nodesB); 
    446         } 
    447  
    448         return nodes; 
     632 
     633                    //avoid duplicate node 
     634                    if (prevNode != representator) { 
     635                        newNodes.add(representator); 
     636                    } 
     637                } 
     638                prevNode = node; 
     639            } 
     640 
     641            if (nodesRemoved > 0) { 
     642 
     643                if (newNodes.size() == 1) { //all nodes in the same coordinate - add one more node, to have closed way. 
     644                    newNodes.add(newNodes.get(0)); 
     645                } 
     646 
     647                Way newWay=new Way(way); 
     648                newWay.setNodes(newNodes); 
     649                cmds.add(new ChangeCommand(way, newWay)); 
     650                totalNodesRemoved += nodesRemoved; 
     651            } 
     652        } 
     653 
     654        return totalNodesRemoved > 0; 
     655    } 
     656 
     657 
     658 
     659    /** 
     660     * Will find all intersection and add nodes there for list of given ways. Handles self-intersections too. 
     661     * And make commands to add the intersection points to ways. 
     662     * @param List<Way> - a list of ways to test 
     663     * @return ArrayList<Node> List of new nodes 
     664     * Prerequisite: no two nodes have the same coordinates. 
     665     */ 
     666    private ArrayList<Node> addIntersections(List<Way> ways, boolean test) { 
     667        //TODO: this is a bit slow - O( (number of nodes)^2 + numberOfIntersections * numberOfNodes ) 
     668 
     669        //stupid java, cannot instantiate array of generic classes.. 
     670        @SuppressWarnings("unchecked") 
     671        ArrayList<Node>[] newNodes = new ArrayList[ways.size()]; 
     672        boolean[] changedWays = new boolean[ways.size()]; 
     673 
     674        Set<Node> intersectionNodes = new LinkedHashSet<Node>(); 
     675 
     676        for (int pos = 0; pos < ways.size(); pos ++) { 
     677            newNodes[pos] = new ArrayList<Node>(ways.get(pos).getNodes()); 
     678            changedWays[pos] = false; 
     679        } 
     680 
     681        //iterate over all segment pairs and introduce the intersections 
     682 
     683        Comparator<Node> coordsComparator = new NodePositionComparator(); 
     684 
     685        int seg1Way = 0; 
     686        int seg1Pos = -1; 
     687 
     688        while (true) { 
     689            //advance to next segment 
     690            seg1Pos++; 
     691            if (seg1Pos > newNodes[seg1Way].size() - 2) { 
     692                seg1Way++; 
     693                seg1Pos = 0; 
     694 
     695                if (seg1Way == ways.size()) { //finished 
     696                    break; 
     697                } 
     698            } 
     699 
     700 
     701            //iterate over secondary segment 
     702 
     703            int seg2Way = seg1Way; 
     704            int seg2Pos = seg1Pos + 1;//skip the adjacent segment 
     705 
     706            while (true) { 
     707 
     708                //advance to next segment 
     709                seg2Pos++; 
     710                if (seg2Pos > newNodes[seg2Way].size() - 2) { 
     711                    seg2Way++; 
     712                    seg2Pos = 0; 
     713 
     714                    if (seg2Way == ways.size()) { //finished 
     715                        break; 
     716                    } 
     717                } 
     718 
     719                //need to get them again every time, because other segments may be changed 
     720                Node seg1Node1 = newNodes[seg1Way].get(seg1Pos); 
     721                Node seg1Node2 = newNodes[seg1Way].get(seg1Pos + 1); 
     722                Node seg2Node1 = newNodes[seg2Way].get(seg2Pos); 
     723                Node seg2Node2 = newNodes[seg2Way].get(seg2Pos + 1); 
     724 
     725                int commonCount = 0; 
     726                //test if we have common nodes to add. 
     727                if (seg1Node1 == seg2Node1 || seg1Node1 == seg2Node2) { 
     728                    commonCount ++; 
     729 
     730                    if (seg1Way == seg2Way && 
     731                            seg1Pos == 0 && 
     732                            seg2Pos == newNodes[seg2Way].size() -2) { 
     733                        //do not add - this is first and last segment of the same way. 
     734                    } else { 
     735                        intersectionNodes.add(seg1Node1); 
     736                    } 
     737                } 
     738 
     739                if (seg1Node2 == seg2Node1 || seg1Node2 == seg2Node2) { 
     740                    commonCount ++; 
     741 
     742                    intersectionNodes.add(seg1Node2); 
     743                } 
     744 
     745                //no common nodes - find intersection 
     746                if (commonCount == 0) { 
     747                    LatLon intersection = getLineLineIntersection( 
     748                            seg1Node1.getEastNorth().east(), seg1Node1.getEastNorth().north(), 
     749                            seg1Node2.getEastNorth().east(), seg1Node2.getEastNorth().north(), 
     750                            seg2Node1.getEastNorth().east(), seg2Node1.getEastNorth().north(), 
     751                            seg2Node2.getEastNorth().east(), seg2Node2.getEastNorth().north()); 
     752 
     753                    if (intersection != null) { 
     754                        if (test) { 
     755                            intersectionNodes.add(seg2Node1); 
     756                            return new ArrayList<Node>(intersectionNodes); 
     757                        } 
     758 
     759                        Node newNode = new Node(intersection); 
     760                        Node intNode = newNode; 
     761                        boolean insertInSeg1 = false; 
     762                        boolean insertInSeg2 = false; 
     763 
     764                        //find if the intersection point is at end point of one of the segments, if so use that point 
     765 
     766                        //segment 1 
     767                        if (coordsComparator.compare(newNode, seg1Node1) == 0) { 
     768                            intNode = seg1Node1; 
     769                        } else if (coordsComparator.compare(newNode, seg1Node2) == 0) { 
     770                            intNode = seg1Node2; 
     771                        } else { 
     772                            insertInSeg1 = true; 
     773                        } 
     774 
     775                        //segment 2 
     776                        if (coordsComparator.compare(newNode, seg2Node1) == 0) { 
     777                            intNode = seg2Node1; 
     778                        } else if (coordsComparator.compare(newNode, seg2Node2) == 0) { 
     779                            intNode = seg2Node2; 
     780                        } else { 
     781                            insertInSeg2 = true; 
     782                        } 
     783 
     784                        if (insertInSeg1) { 
     785                            newNodes[seg1Way].add(seg1Pos +1, intNode); 
     786                            changedWays[seg1Way] = true; 
     787 
     788                            //fix seg2 position, as indexes have changed, seg2Pos is always bigger than seg1Pos on the same segment. 
     789                            if (seg2Way == seg1Way) { 
     790                                seg2Pos ++; 
     791                            } 
     792                        } 
     793 
     794                        if (insertInSeg2) { 
     795                            newNodes[seg2Way].add(seg2Pos +1, intNode); 
     796                            changedWays[seg2Way] = true; 
     797 
     798                            //Do not need to compare again to already split segment 
     799                            seg2Pos ++; 
     800                        } 
     801 
     802                        intersectionNodes.add(intNode); 
     803 
     804                        if (intNode == newNode) { 
     805                            cmds.add(new AddCommand(intNode)); 
     806                        } 
     807                    } 
     808                } 
     809                else if (test && intersectionNodes.size() > 0) 
     810                    return new ArrayList<Node>(intersectionNodes); 
     811            } 
     812        } 
     813 
     814        for (int pos = 0; pos < ways.size(); pos ++) { 
     815            if (changedWays[pos] == false) { 
     816                continue; 
     817            } 
     818 
     819            Way way = ways.get(pos); 
     820            Way newWay = new Way(way); 
     821            newWay.setNodes(newNodes[pos]); 
     822 
     823            cmds.add(new ChangeCommand(way, newWay)); 
     824        } 
     825 
     826        return new ArrayList<Node>(intersectionNodes); 
    449827    } 
    450828 
     
    470848        // Solve the equations 
    471849        double det = a1*b2 - a2*b1; 
    472         if(det == 0) return null; // Lines are parallel 
     850        if (det == 0) return null; // Lines are parallel 
    473851 
    474852        return Main.proj.eastNorth2latlon(new EastNorth( 
     
    478856    } 
    479857 
    480     /** 
    481      * Inserts given nodes with positions into the given ways 
    482      * @param Way The way to insert the nodes into 
    483      * @param Collection<NodeToSegs> The list of nodes with positions to insert 
    484      */ 
    485     private void addNodesToWay(Way a, ArrayList<NodeToSegs> nodes) { 
    486         if(nodes.size() == 0) 
    487             return; 
    488         Way ax=new Way(a); 
    489         Collections.sort(nodes); 
    490  
    491         int numOfAdds = 1; 
    492         for(NodeToSegs n : nodes) { 
    493             ax.addNode(n.pos + numOfAdds, n.n); 
    494             numOfAdds++; 
    495         } 
    496  
    497         cmds.add(new ChangeCommand(a, ax)); 
    498     } 
     858 
    499859 
    500860    /** 
     
    519879    } 
    520880 
    521     /** 
    522      * Removes a given OsmPrimitive from all relations 
    523      * @param OsmPrimitive Element to remove from all relations 
    524      * @return ArrayList<RelationRole> List of relations with roles the primitives was part of 
    525      */ 
    526     private ArrayList<RelationRole> removeFromRelations(OsmPrimitive osm) { 
    527         ArrayList<RelationRole> result = new ArrayList<RelationRole>(); 
    528         for (Relation r : Main.main.getCurrentDataSet().getRelations()) { 
    529             if (r.isDeleted()) { 
    530                 continue; 
    531             } 
    532             for (RelationMember rm : r.getMembers()) { 
    533                 if (rm.getMember() != osm) { 
     881 
     882    /** 
     883     * This method analyzes the way and assigns each part what direction polygon "inside" is. 
     884     * @param parts the split parts of the way 
     885     * @param isInner - if true, reverts the direction (for multipolygon islands) 
     886     * @return list of parts, marked with the inside orientation. 
     887     */ 
     888    private ArrayList<WayInPolygon> markWayInsideSide(List<Way> parts, boolean isInner) { 
     889 
     890        ArrayList<WayInPolygon> result = new ArrayList<WayInPolygon>(); 
     891 
     892        //prepare prev and next maps 
     893        Map<Way, Way> nextWayMap = new HashMap<Way, Way>(); 
     894        Map<Way, Way> prevWayMap = new HashMap<Way, Way>(); 
     895 
     896        for (int pos = 0; pos < parts.size(); pos ++) { 
     897 
     898            if (!parts.get(pos).lastNode().equals(parts.get((pos + 1) % parts.size()).firstNode())) 
     899                throw new RuntimeException("Way not circular"); 
     900 
     901            nextWayMap.put(parts.get(pos), parts.get((pos + 1) % parts.size())); 
     902            prevWayMap.put(parts.get(pos), parts.get((pos + parts.size() - 1) % parts.size())); 
     903        } 
     904 
     905        //find the node with minimum y - it's guaranteed to be outer. (What about the south pole?) 
     906        Way topWay = null; 
     907        Node topNode = null; 
     908        int topIndex = 0; 
     909        double minY = Double.POSITIVE_INFINITY; 
     910 
     911        for (Way way : parts) { 
     912            for (int pos = 0; pos < way.getNodesCount(); pos ++) { 
     913                Node node = way.getNode(pos); 
     914 
     915                if (node.getEastNorth().getY() < minY) { 
     916                    minY = node.getEastNorth().getY(); 
     917                    topWay = way; 
     918                    topNode = node; 
     919                    topIndex = pos; 
     920                } 
     921            } 
     922        } 
     923 
     924        //get the upper way and it's orientation. 
     925 
     926        boolean wayClockwise; // orientation of the top way. 
     927 
     928        if (topNode.equals(topWay.firstNode()) || topNode.equals(topWay.lastNode())) { 
     929            Node headNode = null; // the node at junction 
     930            Node prevNode = null; // last node from previous path 
     931            wayClockwise = false; 
     932 
     933            //node is in split point - find the outermost way from this point 
     934 
     935            headNode = topNode; 
     936            //make a fake node that is downwards from head node (smaller Y). It will be a division point between paths. 
     937            prevNode = new Node(new EastNorth(headNode.getEastNorth().getX(), headNode.getEastNorth().getY() - 1e5)); 
     938 
     939            topWay = null; 
     940            wayClockwise = false; 
     941            Node bestWayNextNode = null; 
     942 
     943            for (Way way : parts) { 
     944                if (way.firstNode().equals(headNode)) { 
     945                    Node nextNode = way.getNode(1); 
     946 
     947                    if (topWay == null || !isToTheRightSideOfLine(prevNode, headNode, bestWayNextNode, nextNode)) { 
     948                        //the new way is better 
     949                        topWay = way; 
     950                        wayClockwise = true; 
     951                        bestWayNextNode = nextNode; 
     952                    } 
     953                } 
     954 
     955                if (way.lastNode().equals(headNode)) { 
     956                    //end adjacent to headNode 
     957                    Node nextNode = way.getNode(way.getNodesCount() - 2); 
     958 
     959                    if (topWay == null || !isToTheRightSideOfLine(prevNode, headNode, bestWayNextNode, nextNode)) { 
     960                        //the new way is better 
     961                        topWay = way; 
     962                        wayClockwise = false; 
     963                        bestWayNextNode = nextNode; 
     964                    } 
     965                } 
     966            } 
     967        } else { 
     968            //node is inside way - pick the clockwise going end. 
     969            Node prev = topWay.getNode(topIndex - 1); 
     970            Node next = topWay.getNode(topIndex + 1); 
     971 
     972            //there will be no parallel segments in the middle of way, so all fine. 
     973            wayClockwise = angleIsClockwise(prev, topNode, next); 
     974        } 
     975 
     976        Way curWay = topWay; 
     977        boolean curWayInsideToTheRight = wayClockwise ^ isInner; 
     978 
     979        //iterate till full circle is reached 
     980        while (true) { 
     981 
     982            //add cur way 
     983            WayInPolygon resultWay = new WayInPolygon(curWay, curWayInsideToTheRight); 
     984            result.add(resultWay); 
     985 
     986            //process next way 
     987            Way nextWay = nextWayMap.get(curWay); 
     988            Node prevNode = curWay.getNode(curWay.getNodesCount() - 2); 
     989            Node headNode = curWay.lastNode(); 
     990            Node nextNode = nextWay.getNode(1); 
     991 
     992            if (nextWay == topWay) { 
     993                //full loop traversed - all done. 
     994                break; 
     995            } 
     996 
     997 
     998            //find intersecting segments 
     999            // the intersections will look like this: 
     1000            // 
     1001            //                       ^ 
     1002            //                       | 
     1003            //                       X wayBNode 
     1004            //                       | 
     1005            //                  wayB | 
     1006            //                       | 
     1007            //             curWay    |       nextWay 
     1008            //----X----------------->X----------------------X----> 
     1009            //    prevNode           ^headNode              nextNode 
     1010            //                       | 
     1011            //                       | 
     1012            //                  wayA | 
     1013            //                       | 
     1014            //                       X wayANode 
     1015            //                       | 
     1016 
     1017            int intersectionCount = 0; 
     1018 
     1019            for (Way wayA : parts) { 
     1020 
     1021                if (wayA == curWay) { 
    5341022                    continue; 
    5351023                } 
    5361024 
    537                 Relation newRel = new Relation(r); 
    538                 List<RelationMember> members = newRel.getMembers(); 
    539                 members.remove(rm); 
    540                 newRel.setMembers(members); 
    541  
    542                 cmds.add(new ChangeCommand(r, newRel)); 
    543                 RelationRole saverel =  new RelationRole(r, rm.getRole()); 
    544                 if(!result.contains(saverel)) { 
    545                     result.add(saverel); 
    546                 } 
    547                 break; 
    548             } 
    549         } 
    550  
    551         commitCommands(marktr("Removed Element from Relations")); 
     1025                if (wayA.lastNode().equals(headNode)) { 
     1026 
     1027                    Way wayB = nextWayMap.get(wayA); 
     1028 
     1029                    //test if wayA is opposite wayB relative to curWay and nextWay 
     1030 
     1031                    Node wayANode = wayA.getNode(wayA.getNodesCount() - 2); 
     1032                    Node wayBNode = wayB.getNode(1); 
     1033 
     1034                    boolean wayAToTheRight = isToTheRightSideOfLine(prevNode, headNode, nextNode, wayANode); 
     1035                    boolean wayBToTheRight = isToTheRightSideOfLine(prevNode, headNode, nextNode, wayBNode); 
     1036 
     1037                    if (wayAToTheRight != wayBToTheRight) { 
     1038                        intersectionCount ++; 
     1039                    } 
     1040                } 
     1041            } 
     1042 
     1043            //if odd number of crossings, invert orientation 
     1044            if (intersectionCount % 2 == 1) { 
     1045                curWayInsideToTheRight = !curWayInsideToTheRight; 
     1046            } 
     1047 
     1048            curWay = nextWay; 
     1049        } 
     1050 
    5521051        return result; 
    5531052    } 
    5541053 
    5551054    /** 
    556      * This method splits ways into smaller parts, using the prepared nodes list as split points. 
    557      * Uses SplitWayAction.splitWay for the heavy lifting. 
     1055     * This is a method splits way into smaller parts, using the prepared nodes list as split points. 
     1056     * Uses  SplitWayAction.splitWay for the heavy lifting. 
    5581057     * @return list of split ways (or original ways if no splitting is done). 
    5591058     */ 
    560     private ArrayList<Way> splitWaysOnNodes(Way a, Way b, Collection<Node> nodes) { 
     1059    private ArrayList<Way> splitWayOnNodes(Way way, Collection<Node> nodes) { 
    5611060 
    5621061        ArrayList<Way> result = new ArrayList<Way>(); 
    563         List<Way> ways = new ArrayList<Way>(); 
    564         ways.add(a); 
    565         ways.add(b); 
    566  
    567         for (Way way: ways) { 
    568             List<List<Node>> chunks = buildNodeChunks(way, nodes); 
     1062        List<List<Node>> chunks = buildNodeChunks(way, nodes); 
     1063 
     1064        if (chunks.size() > 1) { 
    5691065            SplitWayResult split = SplitWayAction.splitWay(Main.map.mapView.getEditLayer(), way, chunks, Collections.<OsmPrimitive>emptyList()); 
    5701066 
    5711067            //execute the command, we need the results 
    572             Main.main.undoRedo.add(split.getCommand()); 
    573             cmdsCount ++; 
     1068            cmds.add(split.getCommand()); 
     1069            commitCommands(marktr("Split ways into fragments")); 
    5741070 
    5751071            result.add(split.getOriginalWay()); 
    5761072            result.addAll(split.getNewWays()); 
     1073        } else { 
     1074            //nothing to split 
     1075            result.add(way); 
    5771076        } 
    5781077 
    5791078        return result; 
    5801079    } 
     1080 
    5811081 
    5821082    /** 
     
    5841084     * @param way the way to chunk 
    5851085     * @param splitNodes the places where to cut. 
    586      * @return list of node segments to produce. 
    587      */ 
    588     private List<List<Node>> buildNodeChunks(Way way, Collection<Node> splitNodes) 
    589     { 
     1086     * @return list of node paths to produce. 
     1087     */ 
     1088    private List<List<Node>> buildNodeChunks(Way way, Collection<Node> splitNodes) { 
    5901089        List<List<Node>> result = new ArrayList<List<Node>>(); 
    5911090        List<Node> curList = new ArrayList<Node>(); 
    5921091 
    593         for(Node node: way.getNodes()){ 
     1092        for (Node node : way.getNodes()) { 
    5941093            curList.add(node); 
    595             if (curList.size() > 1 && splitNodes.contains(node)){ 
     1094            if (curList.size() > 1 && splitNodes.contains(node)) { 
    5961095                result.add(curList); 
    5971096                curList = new ArrayList<Node>(); 
     
    6001099        } 
    6011100 
    602         if (curList.size() > 1) 
    603         { 
     1101        if (curList.size() > 1) { 
    6041102            result.add(curList); 
    6051103        } 
     
    6081106    } 
    6091107 
    610     /** 
    611      * Returns all nodes for given ways 
    612      * @param Collection<Way> The list of ways which nodes are to be returned 
    613      * @return Collection<Node> The list of nodes the ways contain 
    614      */ 
    615     private Collection<Node> getNodesFromWays(Collection<Way> ways) { 
    616         Collection<Node> allNodes = new ArrayList<Node>(); 
    617         for(Way w: ways) { 
    618             allNodes.addAll(w.getNodes()); 
    619         } 
    620         return allNodes; 
    621     } 
    622  
    623     /** 
    624      * Gets all inner ways given all ways and outer ways. 
    625      * @param multigonWays 
    626      * @param outerWays 
    627      * @return list of inner ways. 
    628      */ 
    629     private ArrayList<Way> findInnerWays(Collection<Way> multigonWays, Collection<WayInPath> outerWays) { 
    630         ArrayList<Way> innerWays = new ArrayList<Way>(); 
    631         Set<Way> outerSet = new HashSet<Way>(); 
    632  
    633         for(WayInPath w: outerWays) { 
    634             outerSet.add(w.way); 
    635         } 
    636  
    637         for(Way way: multigonWays) { 
    638             if (!outerSet.contains(way)) { 
    639                 innerWays.add(way); 
    640             } 
    641         } 
    642  
    643         return innerWays; 
    644     } 
    645  
    646  
    647     /** 
    648      * Finds all ways for a given list of Ways that form the outer hull. 
    649      * This works by starting with one node and traversing the multigon clockwise, always picking the leftmost path. 
    650      * Prerequisites - the ways must not intersect and have common end nodes where they meet. 
    651      * @param Collection<Way> A list of (splitted) ways that form a multigon 
    652      * @return Collection<Way> A list of ways that form the outer boundary of the multigon. 
    653      */ 
    654     private static ArrayList<WayInPath> findOuterWays(Collection<Way> multigonWays) { 
    655  
    656         //find the node with minimum lat - it's guaranteed to be outer. (What about the south pole?) 
    657         Way bestWay = null; 
    658         Node topNode = null; 
    659         int topIndex = 0; 
    660         double minLat = Double.POSITIVE_INFINITY; 
    661  
    662         for(Way way: multigonWays) { 
    663             for (int pos = 0; pos < way.getNodesCount(); pos ++) { 
    664                 Node node = way.getNode(pos); 
    665  
    666                 if (node.getCoor().lat() < minLat) { 
    667                     minLat = node.getCoor().lat(); 
    668                     bestWay = way; 
    669                     topNode = node; 
    670                     topIndex = pos; 
    671                 } 
    672             } 
    673         } 
    674  
    675         //get two final nodes from best way to mark as starting point and orientation. 
    676         Node headNode = null; 
    677         Node prevNode = null; 
    678  
    679         if (topNode.equals(bestWay.firstNode()) || topNode.equals(bestWay.lastNode())) { 
    680             //node is in split point 
    681             headNode = topNode; 
    682             //make a fake node that is downwards from head node (smaller latitude). It will be a division point between paths. 
    683             prevNode = new Node(new LatLon(headNode.getCoor().lat() - 1000, headNode.getCoor().lon())); 
    684         } else { 
    685             //node is inside way - pick the clockwise going end. 
    686             Node prev = bestWay.getNode(topIndex - 1); 
    687             Node next = bestWay.getNode(topIndex + 1); 
    688  
    689             if (angleIsClockwise(prev, topNode, next)) { 
    690                 headNode = bestWay.lastNode(); 
    691                 prevNode = bestWay.getNode(bestWay.getNodesCount() - 2); 
    692             } 
    693             else { 
    694                 headNode = bestWay.firstNode(); 
    695                 prevNode = bestWay.getNode(1); 
    696             } 
    697         } 
    698  
    699         Set<Way> outerWays = new HashSet<Way>(); 
    700         ArrayList<WayInPath> result = new ArrayList<WayInPath>(); 
    701  
    702         //iterate till full circle is reached 
    703         while (true) { 
    704  
    705             bestWay = null; 
    706             Node bestWayNextNode = null; 
    707             boolean bestWayReverse = false; 
    708  
    709             for (Way way: multigonWays) { 
    710                 boolean wayReverse; 
    711                 Node nextNode; 
    712  
    713                 if (way.firstNode().equals(headNode)) { 
    714                     //start adjacent to headNode 
    715                     nextNode = way.getNode(1); 
    716                     wayReverse = false; 
    717  
    718                     if (nextNode.equals(prevNode)) { 
    719                         //this is the path we came from - ignore it. 
    720                     } else if (bestWay == null || !isToTheRightSideOfLine(prevNode, headNode, bestWayNextNode, nextNode)) { 
    721                         //the new way is better 
    722                         bestWay = way; 
    723                         bestWayReverse = wayReverse; 
    724                         bestWayNextNode = nextNode; 
     1108 
     1109    /** 
     1110     * This method finds witch ways are outer and witch are inner. 
     1111     * @param boundaryWays 
     1112     * @return 
     1113     */ 
     1114    private List<AssembledMultipolygon> findPolygons(Collection<AssembledPolygon> boundaries) { 
     1115 
     1116        List<PolygonLevel> list = findOuterWaysImpl(0, boundaries); 
     1117        List<AssembledMultipolygon> result = new ArrayList<AssembledMultipolygon>(); 
     1118 
     1119        //take every other level 
     1120        for (PolygonLevel pol : list) { 
     1121            if (pol.level % 2 == 0) { 
     1122                result.add(pol.pol); 
     1123            } 
     1124        } 
     1125 
     1126        return result; 
     1127    } 
     1128 
     1129    /** 
     1130     * Collects outer way and corresponding inner ways from all boundaries. 
     1131     * @param boundaryWays 
     1132     * @return the outermostWay. 
     1133     */ 
     1134    private List<PolygonLevel> findOuterWaysImpl(int level, Collection<AssembledPolygon> boundaryWays) { 
     1135 
     1136        //TODO: bad performance for deep nestings... 
     1137        List<PolygonLevel> result = new ArrayList<PolygonLevel>(); 
     1138 
     1139        for (AssembledPolygon outerWay : boundaryWays) { 
     1140 
     1141            boolean outerGood = true; 
     1142            List<AssembledPolygon> innerCandidates = new ArrayList<AssembledPolygon>(); 
     1143 
     1144            for (AssembledPolygon innerWay : boundaryWays) { 
     1145                if (innerWay == outerWay) { 
     1146                    continue; 
     1147                } 
     1148 
     1149                if (wayInsideWay(outerWay, innerWay)) { 
     1150                    outerGood = false; 
     1151                    break; 
     1152                } else if (wayInsideWay(innerWay, outerWay)) { 
     1153                    innerCandidates.add(innerWay); 
     1154                } 
     1155            } 
     1156 
     1157            if (!outerGood) { 
     1158                continue; 
     1159            } 
     1160 
     1161            //add new outer polygon 
     1162            AssembledMultipolygon pol = new AssembledMultipolygon(outerWay); 
     1163            PolygonLevel polLev = new PolygonLevel(pol, level); 
     1164 
     1165            //process inner ways 
     1166            if (innerCandidates.size() > 0) { 
     1167                List<PolygonLevel> innerList = findOuterWaysImpl(level + 1, innerCandidates); 
     1168                result.addAll(innerList); 
     1169 
     1170                for (PolygonLevel pl : innerList) { 
     1171                    if (pl.level == level + 1) { 
     1172                        pol.innerWays.add(pl.pol.outerWay); 
    7251173                    } 
    7261174                } 
    727  
    728                 if (way.lastNode().equals(headNode)) { 
    729                     //end adjacent to headNode 
    730                     nextNode = way.getNode(way.getNodesCount() - 2); 
    731                     wayReverse = true; 
    732  
    733                     if (nextNode.equals(prevNode)) { 
    734                         //this is the path we came from - ignore it. 
    735                     } else if (bestWay == null || !isToTheRightSideOfLine(prevNode, headNode, bestWayNextNode, nextNode)) { 
    736                         //the new way is better 
    737                         bestWay = way; 
    738                         bestWayReverse = wayReverse; 
    739                         bestWayNextNode = nextNode; 
    740                     } 
    741                 } 
    742             } 
    743  
    744             if (bestWay == null) 
    745                 throw new RuntimeException(); 
    746             else if (outerWays.contains(bestWay)) { 
    747                 break; //full circle reached, terminate. 
     1175            } 
     1176 
     1177            result.add(polLev); 
     1178        } 
     1179 
     1180        return result; 
     1181    } 
     1182 
     1183 
     1184 
     1185    /** 
     1186     * Finds all ways that form inner or outer boundaries. 
     1187     * @param Collection<Way> A list of (splitted) ways that form a multigon and share common end nodes on intersections. 
     1188     * @param Collection<Way> this list is filled with ways that are to be discarded 
     1189     * @return Collection<Collection<Way>> A list of ways that form the outer and inner boundaries of the multigon. 
     1190     */ 
     1191    public static List<AssembledPolygon> findBoundaryPolygons(Collection<WayInPolygon> multigonWays, List<Way> discardedResult) { 
     1192        //first find all discardable ways, by getting outer shells. 
     1193        //this will produce incorrect boundaries in some cases, but second pass will fix it. 
     1194 
     1195        List<WayInPolygon> discardedWays = new ArrayList<WayInPolygon>(); 
     1196        Set<WayInPolygon> processedWays = new HashSet<WayInPolygon>(); 
     1197        WayTraverser traverser = new WayTraverser(multigonWays); 
     1198 
     1199        for (WayInPolygon startWay : multigonWays) { 
     1200            if (processedWays.contains(startWay)) { 
     1201                continue; 
     1202            } 
     1203 
     1204            traverser.startNewWay(startWay); 
     1205 
     1206            List<WayInPolygon> boundary = new ArrayList<WayInPolygon>(); 
     1207            WayInPolygon lastWay = startWay; 
     1208 
     1209            while (true) { 
     1210                boundary.add(lastWay); 
     1211 
     1212                WayInPolygon bestWay = traverser.advanceNextLeftmostWay(); 
     1213                boolean wayInsideToTheRight = bestWay == null ? false : traverser.isLastWayInsideToTheRight(); 
     1214 
     1215                if (bestWay == null || processedWays.contains(bestWay) || !wayInsideToTheRight) { 
     1216                    //bad segment chain - proceed to discard it 
     1217                    lastWay = null; 
     1218                    break; 
     1219                } else if (boundary.contains(bestWay)) { 
     1220                    //traversed way found - close the way 
     1221                    lastWay = bestWay; 
     1222                    break; 
     1223                } else { 
     1224                    //proceed to next segment 
     1225                    lastWay = bestWay; 
     1226                } 
     1227            } 
     1228 
     1229            if (lastWay != null) { 
     1230                //way good 
     1231                processedWays.addAll(boundary); 
     1232 
     1233                //remove junk segments at the start 
     1234                while (boundary.get(0) != lastWay) { 
     1235                    discardedWays.add(boundary.get(0)); 
     1236                    boundary.remove(0); 
     1237                } 
    7481238            } else { 
    749                 //add to outer ways, repeat. 
    750                 outerWays.add(bestWay); 
    751                 result.add(new WayInPath(bestWay, bestWayReverse)); 
    752                 headNode = bestWayReverse ? bestWay.firstNode() : bestWay.lastNode(); 
    753                 prevNode = bestWayReverse ? bestWay.getNode(1) : bestWay.getNode(bestWay.getNodesCount() - 2); 
    754             } 
    755         } 
     1239                //way bad 
     1240                discardedWays.addAll(boundary); 
     1241                processedWays.addAll(boundary); 
     1242            } 
     1243        } 
     1244 
     1245        //now we have removed junk segments, collect the real result ways 
     1246 
     1247        traverser.removeWays(discardedWays); 
     1248 
     1249        List<AssembledPolygon> result = new ArrayList<AssembledPolygon>(); 
     1250 
     1251        while (traverser.hasWays()) { 
     1252 
     1253            WayInPolygon startWay = traverser.startNewWay(); 
     1254            List<WayInPolygon> boundary = new ArrayList<WayInPolygon>(); 
     1255            WayInPolygon curWay = startWay; 
     1256 
     1257            do { 
     1258                boundary.add(curWay); 
     1259                curWay = traverser.advanceNextRightmostWay(); 
     1260 
     1261                //should not happen 
     1262                if (curWay == null || !traverser.isLastWayInsideToTheRight()) 
     1263                    throw new RuntimeException("Join areas internal error."); 
     1264 
     1265            } while (curWay != startWay); 
     1266 
     1267            //build result 
     1268            traverser.removeWays(boundary); 
     1269            result.add(new AssembledPolygon(boundary)); 
     1270        } 
     1271 
     1272        for (WayInPolygon way : discardedWays) { 
     1273            discardedResult.add(way.way); 
     1274        } 
     1275 
     1276        //split inner polygons that have several touching parts. 
     1277        result = fixTouchingPolygons(result); 
    7561278 
    7571279        return result; 
    7581280    } 
     1281 
     1282 
     1283    /** 
     1284     * This method checks if polygons have several touching parts and splits them in several polygons. 
     1285     * @param polygon the polygon to process. 
     1286     */ 
     1287    public static List<AssembledPolygon> fixTouchingPolygons(List<AssembledPolygon> polygons) 
     1288    { 
     1289        List<AssembledPolygon> newPolygons = new ArrayList<AssembledPolygon>(); 
     1290 
     1291        for (AssembledPolygon innerPart : polygons) { 
     1292            WayTraverser traverser = new WayTraverser(innerPart.ways); 
     1293 
     1294            while (traverser.hasWays()) { 
     1295 
     1296                WayInPolygon startWay = traverser.startNewWay(); 
     1297                List<WayInPolygon> boundary = new ArrayList<WayInPolygon>(); 
     1298                WayInPolygon curWay = startWay; 
     1299 
     1300                Node startNode = traverser.getLastWayStartNode(); 
     1301                boundary.add(curWay); 
     1302 
     1303                while (startNode != traverser.getLastWayEndNode()) { 
     1304                    curWay = traverser.advanceNextLeftmostWay(); 
     1305                    boundary.add(curWay); 
     1306 
     1307                    //should not happen 
     1308                    if (curWay == null || !traverser.isLastWayInsideToTheRight()) 
     1309                        throw new RuntimeException("Join areas internal error."); 
     1310                } 
     1311 
     1312                //build result 
     1313                traverser.removeWays(boundary); 
     1314                newPolygons.add(new AssembledPolygon(boundary)); 
     1315            } 
     1316        } 
     1317 
     1318        return newPolygons; 
     1319    } 
     1320 
    7591321 
    7601322    /** 
     
    7661328     * @return true if to the right side, false otherwise 
    7671329     */ 
    768     public static boolean isToTheRightSideOfLine(Node lineP1, Node lineP2, Node lineP3, Node testPoint) 
    769     { 
     1330    public static boolean isToTheRightSideOfLine(Node lineP1, Node lineP2, Node lineP3, Node testPoint) { 
    7701331        boolean pathBendToRight = angleIsClockwise(lineP1, lineP2, lineP3); 
    7711332        boolean rightOfSeg1 = angleIsClockwise(lineP1, lineP2, testPoint); 
     
    7851346     * @return true if first vector is clockwise before second vector. 
    7861347     */ 
    787     public static boolean angleIsClockwise(Node commonNode, Node firstNode, Node secondNode) 
    788     { 
    789         double dla1 = (firstNode.getCoor().lat() - commonNode.getCoor().lat()); 
    790         double dla2 = (secondNode.getCoor().lat() - commonNode.getCoor().lat()); 
    791         double dlo1 = (firstNode.getCoor().lon() - commonNode.getCoor().lon()); 
    792         double dlo2 = (secondNode.getCoor().lon() - commonNode.getCoor().lon()); 
    793  
    794         return dla1 * dlo2 - dlo1 * dla2 > 0; 
     1348 
     1349    public static boolean angleIsClockwise(Node commonNode, Node firstNode, Node secondNode) { 
     1350        double dy1 = (firstNode.getEastNorth().getY() - commonNode.getEastNorth().getY()); 
     1351        double dy2 = (secondNode.getEastNorth().getY() - commonNode.getEastNorth().getY()); 
     1352        double dx1 = (firstNode.getEastNorth().getX() - commonNode.getEastNorth().getX()); 
     1353        double dx2 = (secondNode.getEastNorth().getX() - commonNode.getEastNorth().getX()); 
     1354 
     1355        return dy1 * dx2 - dx1 * dy2 > 0; 
     1356    } 
     1357 
     1358 
     1359    /** 
     1360     * Tests if way is inside other way 
     1361     * @param outside 
     1362     * @param inside 
     1363     * @return 
     1364     */ 
     1365    public static boolean wayInsideWay(AssembledPolygon inside, AssembledPolygon outside) { 
     1366        Set<Node> outsideNodes = new HashSet<Node>(outside.getNodes()); 
     1367 
     1368        for (Node insideNode : inside.getNodes()) { 
     1369 
     1370            if (!outsideNodes.contains(insideNode)) 
     1371                //simply test the one node 
     1372                return nodeInsidePolygon(insideNode, outside.getNodes()); 
     1373        } 
     1374 
     1375        //all nodes shared. 
     1376        return false; 
    7951377    } 
    7961378 
     
    8021384     * FIXME: this should probably be moved to tools.. 
    8031385     */ 
    804     public static boolean nodeInsidePolygon(ArrayList<Node> polygonNodes, Node point) 
    805     { 
     1386    public static boolean nodeInsidePolygon(Node point, List<Node> polygonNodes) { 
    8061387        if (polygonNodes.size() < 3) 
    8071388            return false; 
     
    8131394        Node oldPoint = polygonNodes.get(polygonNodes.size() - 1); 
    8141395 
    815         for(Node newPoint: polygonNodes) 
    816         { 
     1396        for (Node newPoint : polygonNodes) { 
    8171397            //skip duplicate points 
    8181398            if (newPoint.equals(oldPoint)) { 
     
    8211401 
    8221402            //order points so p1.lat <= p2.lat; 
    823             if (newPoint.getCoor().lat() > oldPoint.getCoor().lat()) 
    824             { 
     1403            if (newPoint.getEastNorth().getY() > oldPoint.getEastNorth().getY()) { 
    8251404                p1 = oldPoint; 
    8261405                p2 = newPoint; 
    827             } 
    828             else 
    829             { 
     1406            } else { 
    8301407                p1 = newPoint; 
    8311408                p2 = oldPoint; 
     
    8331410 
    8341411            //test if the line is crossed and if so invert the inside flag. 
    835             if ((newPoint.getCoor().lat() < point.getCoor().lat()) == (point.getCoor().lat() <= oldPoint.getCoor().lat()) 
    836                     && (point.getCoor().lon() - p1.getCoor().lon()) * (p2.getCoor().lat() - p1.getCoor().lat()) 
    837                     < (p2.getCoor().lon() - p1.getCoor().lon()) * (point.getCoor().lat() - p1.getCoor().lat())) 
     1412            if ((newPoint.getEastNorth().getY() < point.getEastNorth().getY()) == (point.getEastNorth().getY() <= oldPoint.getEastNorth().getY()) 
     1413                    && (point.getEastNorth().getX() - p1.getEastNorth().getX()) * (p2.getEastNorth().getY() - p1.getEastNorth().getY()) 
     1414                    < (p2.getEastNorth().getX() - p1.getEastNorth().getX()) * (point.getEastNorth().getY() - p1.getEastNorth().getY())) 
    8381415            { 
    8391416                inside = !inside; 
     
    8451422        return inside; 
    8461423    } 
     1424 
     1425 
     1426    /** 
     1427     * Joins the lists of ways. 
     1428     * @param Collection<Way> The list of outer ways that belong to that multigon. 
     1429     * @return Way The newly created outer way 
     1430     */ 
     1431    private Multipolygon  joinPolygon(AssembledMultipolygon polygon) throws UserCancelException { 
     1432        Multipolygon result = new Multipolygon(joinWays(polygon.outerWay.ways)); 
     1433 
     1434        for (AssembledPolygon pol : polygon.innerWays) { 
     1435            result.innerWays.add(joinWays(pol.ways)); 
     1436        } 
     1437 
     1438        return result; 
     1439    } 
     1440 
    8471441 
    8481442    /** 
     
    8511445     * @return Way The newly created outer way 
    8521446     */ 
    853     private Way joinOuterWays(ArrayList<WayInPath> outerWays) { 
     1447    private Way joinWays(List<WayInPolygon> ways) throws UserCancelException { 
    8541448 
    8551449        //leave original orientation, if all paths are reverse. 
    8561450        boolean allReverse = true; 
    857         for(WayInPath way: outerWays) { 
    858             allReverse &= way.insideToTheLeft; 
     1451        for (WayInPolygon way : ways) { 
     1452            allReverse &= !way.insideToTheRight; 
    8591453        } 
    8601454 
    8611455        if (allReverse) { 
    862             for(WayInPath way: outerWays){ 
    863                 way.insideToTheLeft = !way.insideToTheLeft; 
    864             } 
    865         } 
    866  
    867         commitCommands(marktr("Join Areas: Remove Short Ways")); 
    868         Way joinedWay = joinOrientedWays(outerWays); 
    869         if (joinedWay != null) 
    870             return closeWay(joinedWay); 
    871         else 
    872             return null; 
    873     } 
    874  
    875     /** 
    876      * Ensures a way is closed. If it isn't, last and first node are connected. 
    877      * @param Way the way to ensure it's closed 
    878      * @return Way The joined way. 
    879      */ 
    880     private Way closeWay(Way w) { 
    881         if(w.isClosed()) 
    882             return w; 
    883         Main.main.getCurrentDataSet().setSelected(w); 
    884         Way wnew = new Way(w); 
    885         wnew.addNode(wnew.firstNode()); 
    886         cmds.add(new ChangeCommand(w, wnew)); 
    887         commitCommands(marktr("Closed Way")); 
    888         return (Way)(Main.main.getCurrentDataSet().getSelectedWays().toArray())[0]; 
    889     } 
     1456            for (WayInPolygon way : ways) { 
     1457                way.insideToTheRight = !way.insideToTheRight; 
     1458            } 
     1459        } 
     1460 
     1461        Way joinedWay = joinOrientedWays(ways); 
     1462 
     1463        //should not happen 
     1464        if (joinedWay == null || !joinedWay.isClosed()) 
     1465            throw new RuntimeException("Join areas internal error."); 
     1466 
     1467        return joinedWay; 
     1468    } 
     1469 
    8901470 
    8911471    /** 
     
    8941474     * @return Way The newly created way 
    8951475     */ 
    896     private Way joinOrientedWays(ArrayList<WayInPath> ways) { 
    897         if(ways.size() < 2) 
     1476    private Way joinOrientedWays(List<WayInPolygon> ways) throws UserCancelException{ 
     1477        if (ways.size() < 2) 
    8981478            return ways.get(0).way; 
    8991479 
     
    9011481        // the user about this. 
    9021482 
     1483        //TODO: ReverseWay and Combine way are really slow and we use them a lot here. This slows down large joins. 
    9031484        List<Way> actionWays = new ArrayList<Way>(ways.size()); 
    9041485 
    905         for(WayInPath way : ways) { 
     1486        for (WayInPolygon way : ways) { 
    9061487            actionWays.add(way.way); 
    9071488 
    908             if (way.insideToTheLeft) { 
    909                 Main.main.getCurrentDataSet().setSelected(way.way); 
    910                 new ReverseWayAction().actionPerformed(null); 
     1489            if (!way.insideToTheRight) { 
     1490                ReverseWayResult res = ReverseWayAction.reverseWay(way.way); 
     1491                Main.main.undoRedo.add(res.getReverseCommand()); 
    9111492                cmdsCount++; 
    9121493            } 
    9131494        } 
    9141495 
    915         Way result = new CombineWayAction().combineWays(actionWays); 
    916  
    917         if(result != null) { 
    918             cmdsCount++; 
    919         } 
     1496        Pair<Way, Command> result = CombineWayAction.combineWaysWorker(actionWays); 
     1497 
     1498        Main.main.undoRedo.add(result.b); 
     1499        cmdsCount ++; 
     1500 
     1501        return result.a; 
     1502    } 
     1503 
     1504 
     1505    /** 
     1506     * This method analyzes multipolygon relationships of given ways and collects addition inner ways to consider. 
     1507     * @param selectedWays the selected ways 
     1508     * @return list of polygons, or null if too complex relation encountered. 
     1509     */ 
     1510    private List<Multipolygon> collectMultipolygons(List<Way> selectedWays) { 
     1511 
     1512        List<Multipolygon> result = new ArrayList<Multipolygon>(); 
     1513 
     1514        //prepare the lists, to minimize memory allocation. 
     1515        List<Way> outerWays = new ArrayList<Way>(); 
     1516        List<Way> innerWays = new ArrayList<Way>(); 
     1517 
     1518        Set<Way> processedOuterWays = new LinkedHashSet<Way>(); 
     1519        Set<Way> processedInnerWays = new LinkedHashSet<Way>(); 
     1520 
     1521        for (Relation r : CombineWayAction.getParentRelations(selectedWays)) { 
     1522            if (r.isDeleted() || 
     1523                    r.get("type") == null || 
     1524                    !r.get("type").equalsIgnoreCase("multipolygon")) { 
     1525                continue; 
     1526            } 
     1527 
     1528            boolean hasKnownOuter = false; 
     1529            outerWays.clear(); 
     1530            innerWays.clear(); 
     1531 
     1532            for (RelationMember rm : r.getMembers()) { 
     1533                if (rm.getRole().equalsIgnoreCase("outer")) { 
     1534                    outerWays.add(rm.getWay()); 
     1535                    hasKnownOuter |= selectedWays.contains(rm.getWay()); 
     1536                } 
     1537                else if (rm.getRole().equalsIgnoreCase("inner")) { 
     1538                    innerWays.add(rm.getWay()); 
     1539                } 
     1540            } 
     1541 
     1542            if (!hasKnownOuter) { 
     1543                continue; 
     1544            } 
     1545 
     1546            if (outerWays.size() > 1) { 
     1547                JOptionPane.showMessageDialog(Main.parent, tr("Sorry. Cannot handle multipolygon relations with multiple outer ways.")); 
     1548                return null; 
     1549            } 
     1550 
     1551            Way outerWay = outerWays.get(0); 
     1552 
     1553            //retain only selected inner ways 
     1554            innerWays.retainAll(selectedWays); 
     1555 
     1556            if (processedOuterWays.contains(outerWay)) { 
     1557                JOptionPane.showMessageDialog(Main.parent, tr("Sorry. Cannot handle way that is outer in multiple multipolygon relations.")); 
     1558                return null; 
     1559            } 
     1560 
     1561            if (processedInnerWays.contains(outerWay)) { 
     1562                JOptionPane.showMessageDialog(Main.parent, tr("Sorry. Cannot handle way that is both inner and outer in multipolygon relations.")); 
     1563                return null; 
     1564            } 
     1565 
     1566            for (Way way :innerWays) 
     1567            { 
     1568                if (processedOuterWays.contains(way)) { 
     1569                    JOptionPane.showMessageDialog(Main.parent, tr("Sorry. Cannot handle way that is both inner and outer in multipolygon relations.")); 
     1570                    return null; 
     1571                } 
     1572 
     1573                if (processedInnerWays.contains(way)) { 
     1574                    JOptionPane.showMessageDialog(Main.parent, tr("Sorry. Cannot handle way that is inner in multiple multipolygon relations.")); 
     1575                    return null; 
     1576                } 
     1577            } 
     1578 
     1579            processedOuterWays.add(outerWay); 
     1580            processedInnerWays.addAll(innerWays); 
     1581 
     1582            Multipolygon pol = new Multipolygon(outerWay); 
     1583            pol.innerWays.addAll(innerWays); 
     1584            pol.relation = r; 
     1585 
     1586            result.add(pol); 
     1587        } 
     1588 
     1589        //add remaining ways, not in relations 
     1590        for (Way way : selectedWays) { 
     1591            if (processedOuterWays.contains(way) || processedInnerWays.contains(way)) { 
     1592                continue; 
     1593            } 
     1594 
     1595            result.add(new Multipolygon(way)); 
     1596        } 
     1597 
    9201598        return result; 
    9211599    } 
    9221600 
    923     /** 
    924      * Joins a list of ways (using CombineWayAction and ReverseWayAction if necessary to quiet the former) 
    925      * @param ArrayList<Way> The list of ways to join 
    926      * @return Way The newly created way 
    927      */ 
    928     private Way joinWays(ArrayList<Way> ways) { 
    929         if(ways.size() < 2) 
    930             return ways.get(0); 
    931  
    932         // This will turn ways so all of them point in the same direction and CombineAction won't bug 
    933         // the user about this. 
    934         Way a = null; 
    935         for (Way b : ways) { 
    936             if(a == null) { 
    937                 a = b; 
    938                 continue; 
    939             } 
    940             if(a.getNode(0).equals(b.getNode(0)) || 
    941                     a.getNode(a.getNodesCount()-1).equals(b.getNode(b.getNodesCount()-1))) { 
    942                 Main.main.getCurrentDataSet().setSelected(b); 
    943                 new ReverseWayAction().actionPerformed(null); 
    944                 cmdsCount++; 
    945             } 
    946             a = b; 
    947         } 
    948         if ((a = new CombineWayAction().combineWays(ways)) != null) { 
    949             cmdsCount++; 
    950         } 
    951         return a; 
    952     } 
    953  
    954     /** 
    955      * Finds all ways that may be part of a multipolygon relation and removes them from the given list. 
    956      * It will automatically combine "good" ways 
    957      * @param Collection<Way> The list of inner ways to check 
    958      * @param Way The newly created outer way 
    959      * @return ArrayList<Way> The List of newly created inner ways 
    960      */ 
    961     private ArrayList<Way> fixMultipolygons(Collection<Way> uninterestingWays, Way outerWay, boolean selfintersect) { 
    962         Collection<Node> innerNodes = getNodesFromWays(uninterestingWays); 
    963         Collection<Node> outerNodes = outerWay.getNodes(); 
    964  
    965         // The newly created inner ways. uninterestingWays is passed by reference and therefore modified in-place 
    966         ArrayList<Way> newInnerWays = new ArrayList<Way>(); 
    967  
    968         // Now we need to find all inner ways that contain a remaining node, but no outer nodes 
    969         // Remaining nodes are those that contain to more than one way. All nodes that belong to an 
    970         // inner multigon part will have at least two ways, so we can use this to find which ways do 
    971         // belong to the multigon. 
    972         ArrayList<Way> possibleWays = new ArrayList<Way>(); 
    973         wayIterator: for(Way w : uninterestingWays) { 
    974             boolean hasInnerNodes = false; 
    975             for(Node n : w.getNodes()) { 
    976                 if(outerNodes.contains(n)) { 
    977                     if(!selfintersect) { // allow outer point for self intersection 
    978                         continue wayIterator; 
    979                     } 
    980                 } 
    981                 else if(!hasInnerNodes && innerNodes.contains(n)) { 
    982                     hasInnerNodes = true; 
    983                 } 
    984             } 
    985             if(!hasInnerNodes || w.getNodesCount() < 2) { 
    986                 continue; 
    987             } 
    988             possibleWays.add(w); 
    989         } 
    990  
    991         // This removes unnecessary ways that might have been added. 
    992         removeAlmostAlikeWays(possibleWays); 
    993  
    994         // loop twice 
    995         // in k == 0 prefer ways which allow no Y-joining (i.e. which have only 1 solution) 
    996         for(int k = 0; k < 2; ++k) 
    997         { 
    998             // Join all ways that have one start/ending node in common 
    999             Way joined = null; 
    1000             outerIterator: do { 
    1001                 removePartlyUnconnectedWays(possibleWays); 
    1002                 joined = null; 
    1003                 for(Way w1 : possibleWays) { 
    1004                     if(w1.isClosed()) { 
    1005                         if(!wayIsCollapsed(w1)) { 
    1006                             uninterestingWays.remove(w1); 
    1007                             newInnerWays.add(w1); 
    1008                         } 
    1009                         joined = w1; 
    1010                         possibleWays.remove(w1); 
    1011                         continue outerIterator; 
    1012                     } 
    1013                     ArrayList<Way> secondary = new ArrayList<Way>(); 
    1014                     for(Way w2 : possibleWays) { 
    1015                         int i = 0; 
    1016                         // w2 cannot be closed, otherwise it would have been removed above 
    1017                         if(w1.equals(w2)) { 
    1018                             continue; 
    1019                         } 
    1020                         if(w2.isFirstLastNode(w1.firstNode())) { 
    1021                             ++i; 
    1022                         } 
    1023                         if(w2.isFirstLastNode(w1.lastNode())) { 
    1024                             ++i; 
    1025                         } 
    1026                         if(i == 2) // this way closes w1 - take it! 
    1027                         { 
    1028                             if(secondary.size() > 0) { 
    1029                                 secondary.clear(); 
    1030                             } 
    1031                             secondary.add(w2); 
    1032                             break; 
    1033                         } 
    1034                         else if(i > 0) { 
    1035                             secondary.add(w2); 
    1036                         } 
    1037                     } 
    1038                     if(k == 0 ? secondary.size() == 1 : secondary.size() > 0) 
    1039                     { 
    1040                         ArrayList<Way> joinThem = new ArrayList<Way>(); 
    1041                         joinThem.add(w1); 
    1042                         joinThem.add(secondary.get(0)); 
    1043                         // Although we joined the ways, we cannot simply assume that they are closed 
    1044                         if((joined = joinWays(joinThem)) != null) 
    1045                         { 
    1046                             uninterestingWays.removeAll(joinThem); 
    1047                             possibleWays.removeAll(joinThem); 
    1048  
    1049                             //List<Node> nodes = joined.getNodes(); 
    1050                             // check if we added too much 
    1051                             /*for(int i = 1; i < nodes.size()-2; ++i) 
    1052                             { 
    1053                                 if(nodes.get(i) == nodes.get(nodes.size()-1)) 
    1054                                     System.out.println("Joining of ways produced unexpecteded result\n"); 
    1055                             }*/ 
    1056                             uninterestingWays.add(joined); 
    1057                             possibleWays.add(joined); 
    1058                             continue outerIterator; 
    1059                         } 
    1060                     } 
    1061                 } 
    1062             } while(joined != null); 
    1063         } 
    1064         return newInnerWays; 
    1065     } 
    1066  
    1067     /** 
    1068      * Removes almost alike ways (= ways that are on top of each other for all nodes) 
    1069      * @param ArrayList<Way> the ways to remove almost-duplicates from 
    1070      */ 
    1071     private void removeAlmostAlikeWays(ArrayList<Way> ways) { 
    1072         Collection<Way> removables = new ArrayList<Way>(); 
    1073         outer: for(int i=0; i < ways.size(); i++) { 
    1074             Way a = ways.get(i); 
    1075             for(int j=i+1; j < ways.size(); j++) { 
    1076                 Way b = ways.get(j); 
    1077                 List<Node> revNodes = new ArrayList<Node>(b.getNodes()); 
    1078                 Collections.reverse(revNodes); 
    1079                 if(a.getNodes().equals(b.getNodes()) || a.getNodes().equals(revNodes)) { 
    1080                     removables.add(a); 
    1081                     continue outer; 
    1082                 } 
    1083             } 
    1084         } 
    1085         ways.removeAll(removables); 
    1086     } 
    1087  
    1088     /** 
    1089      * Removes ways from the given list whose starting or ending node doesn't 
    1090      * connect to other ways from the same list (it's like removing spikes). 
    1091      * @param ArrayList<Way> The list of ways to remove "spikes" from 
    1092      */ 
    1093     private void removePartlyUnconnectedWays(ArrayList<Way> ways) { 
    1094         List<Way> removables = new ArrayList<Way>(); 
    1095         for(Way a : ways) { 
    1096             if(a.isClosed()) { 
    1097                 continue; 
    1098             } 
    1099             boolean connectedStart = false; 
    1100             boolean connectedEnd = false; 
    1101             for(Way b : ways) { 
    1102                 if(a.equals(b)) { 
    1103                     continue; 
    1104                 } 
    1105                 if(b.isFirstLastNode(a.firstNode())) { 
    1106                     connectedStart = true; 
    1107                 } 
    1108                 if(b.isFirstLastNode(a.lastNode())) { 
    1109                     connectedEnd = true; 
    1110                 } 
    1111             } 
    1112             if(!connectedStart || !connectedEnd) { 
    1113                 removables.add(a); 
    1114             } 
    1115         } 
    1116         ways.removeAll(removables); 
    1117     } 
    1118  
    1119     /** 
    1120      * Checks if a way is collapsed (i.e. looks like <---->) 
    1121      * @param Way A *closed* way to check if it is collapsed 
    1122      * @return boolean If the closed way is collapsed or not 
    1123      */ 
    1124     private boolean wayIsCollapsed(Way w) { 
    1125         if(w.getNodesCount() <= 3) return true; 
    1126  
    1127         // If a way contains more than one node twice, it must be collapsed (only start/end node may be the same) 
    1128         Way x = new Way(w); 
    1129         int count = 0; 
    1130         for(Node n : w.getNodes()) { 
    1131             x.removeNode(n); 
    1132             if(x.containsNode(n)) { 
    1133                 count++; 
    1134             } 
    1135             if(count == 2) return true; 
    1136         } 
    1137         return false; 
    1138     } 
     1601 
     1602    /** 
     1603     * This method filters the list of relations that form the multipolygons. 
     1604     * @param relations 
     1605     * @param polygons 
     1606     * @return 
     1607     */ 
     1608    private List<Relation> filterOwnMultipolygonRelations(Collection<Relation> relations, List<Multipolygon> polygons) { 
     1609 
     1610        List<Relation> relationsToRemove = new ArrayList<Relation>(); 
     1611 
     1612        for (Multipolygon m : polygons) { 
     1613            if (m.relation != null) { 
     1614                relationsToRemove.add(m.relation); 
     1615            } 
     1616        } 
     1617 
     1618        List<Relation> result = new ArrayList<Relation>(); 
     1619 
     1620        result.addAll(relations); 
     1621        result.removeAll(relationsToRemove); 
     1622        return result; 
     1623    } 
     1624 
    11391625 
    11401626    /** 
     
    11451631     */ 
    11461632    private void addOwnMultigonRelation(Collection<Way> inner, Way outer, ArrayList<RelationRole> rels) { 
    1147         if(inner.size() == 0) return; 
     1633        if (inner.size() == 0) return; 
    11481634        // Create new multipolygon relation and add all inner ways to it 
    11491635        Relation newRel = new Relation(); 
    11501636        newRel.put("type", "multipolygon"); 
    1151         for(Way w : inner) { 
     1637        for (Way w : inner) { 
    11521638            newRel.addMember(new RelationMember("inner", w)); 
    11531639        } 
     
    11611647    } 
    11621648 
     1649 
     1650    /** 
     1651     * Removes a given OsmPrimitive from all relations 
     1652     * @param OsmPrimitive Element to remove from all relations 
     1653     * @return ArrayList<RelationRole> List of relations with roles the primitives was part of 
     1654     */ 
     1655    private ArrayList<RelationRole> removeFromAllRelations(OsmPrimitive osm) { 
     1656        ArrayList<RelationRole> result = new ArrayList<RelationRole>(); 
     1657 
     1658        for (Relation r : Main.main.getCurrentDataSet().getRelations()) { 
     1659            if (r.isDeleted()) { 
     1660                continue; 
     1661            } 
     1662            for (RelationMember rm : r.getMembers()) { 
     1663                if (rm.getMember() != osm) { 
     1664                    continue; 
     1665                } 
     1666 
     1667                Relation newRel = new Relation(r); 
     1668                List<RelationMember> members = newRel.getMembers(); 
     1669                members.remove(rm); 
     1670                newRel.setMembers(members); 
     1671 
     1672                cmds.add(new ChangeCommand(r, newRel)); 
     1673                RelationRole saverel =  new RelationRole(r, rm.getRole()); 
     1674                if (!result.contains(saverel)) { 
     1675                    result.add(saverel); 
     1676                } 
     1677                break; 
     1678            } 
     1679        } 
     1680 
     1681        commitCommands(marktr("Removed Element from Relations")); 
     1682        return result; 
     1683    } 
     1684 
     1685 
    11631686    /** 
    11641687     * Adds the previously removed relations again to the outer way. If there are multiple multipolygon 
     
    11701693    private void fixRelations(ArrayList<RelationRole> rels, Way outer) { 
    11711694        ArrayList<RelationRole> multiouters = new ArrayList<RelationRole>(); 
    1172         for(RelationRole r : rels) { 
    1173             if( r.rel.get("type") != null && 
     1695        for (RelationRole r : rels) { 
     1696            if (r.rel.get("type") != null && 
    11741697                    r.rel.get("type").equalsIgnoreCase("multipolygon") && 
    11751698                    r.role.equalsIgnoreCase("outer") 
     
    11851708 
    11861709        Relation newRel = null; 
    1187         switch(multiouters.size()) { 
     1710        switch (multiouters.size()) { 
    11881711        case 0: 
    11891712            return; 
     
    11971720            // Create a new relation with all previous members and (Way)outer as outer. 
    11981721            newRel = new Relation(); 
    1199             for(RelationRole r : multiouters) { 
     1722            for (RelationRole r : multiouters) { 
    12001723                // Add members 
    1201                 for(RelationMember rm : r.rel.getMembers()) 
    1202                     if(!newRel.getMembers().contains(rm)) { 
     1724                for (RelationMember rm : r.rel.getMembers()) 
     1725                    if (!newRel.getMembers().contains(rm)) { 
    12031726                        newRel.addMember(rm); 
    12041727                    } 
     
    12191742     */ 
    12201743    private void stripTags(Collection<Way> ways) { 
    1221         for(Way w: ways) { 
     1744        for (Way w : ways) { 
    12221745            stripTags(w); 
    12231746        } 
     
    12291752     */ 
    12301753    private void stripTags(Way x) { 
    1231         if(x.getKeys() == null) return; 
     1754        if (x.getKeys() == null) 
     1755            return; 
    12321756        Way y = new Way(x); 
    12331757        for (String key : x.keySet()) { 
     
    12461770        cmds.clear(); 
    12471771        int i = Math.max(ur.commands.size() - cmdsCount, 0); 
    1248         for(; i < ur.commands.size(); i++) { 
     1772        for (; i < ur.commands.size(); i++) { 
    12491773            cmds.add(ur.commands.get(i)); 
    12501774        } 
    12511775 
    1252         for(i = 0; i < cmds.size(); i++) { 
     1776        for (i = 0; i < cmds.size(); i++) { 
    12531777            ur.undo(); 
    12541778        } 
Note: See TracChangeset for help on using the changeset viewer.