Changeset 3358 in josm
- Timestamp:
- 2010-06-29T20:51:40+02:00 (13 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/data_nodist/filterTests.osm
r3356 r3358 1 1 <?xml version='1.0' encoding='UTF-8'?> 2 2 <osm version='0.6' generator='JOSM'> 3 <node id='-1782' action='modify' visible='true' lat='51.29770551640994' lon='11.433165989186241'> 4 <tag k='highway' v='bus_stop' /> 5 <tag k='source:RESULT2' v='v' /> 6 <tag k='source:RESULT3' v='h' /> 7 </node> 8 <node id='3738203' action='modify' timestamp='2009-07-01T02:47:18Z' uid='60345' user='Mirko Küster' visible='true' version='1' changeset='4886' lat='51.298034488388204' lon='11.433050190818848'> 3 <node id='3738203' timestamp='2009-07-01T02:47:18Z' uid='60345' user='Mirko Küster' visible='true' version='2' changeset='4888' lat='51.298034488388204' lon='11.433050190818848'> 9 4 <tag k='operator' v='enviaM' /> 10 5 <tag k='power' v='cable_distribution_cabinet' /> … … 14 9 <tag k='source:RESULT3' v='v' /> 15 10 </node> 16 <node id='3738204' action='modify' timestamp='2009-07-03T02:19:19Z' uid='60345' user='Mirko Küster' visible='true' version='1' changeset='4886' lat='51.297681393255424' lon='11.431771777709612'>17 <tag k='source:RESULT1' v='v' /> 18 <tag k='source:RESULT2' v='v' /> 19 <tag k='source:RESULT3' v='h' /> 20 </node> 21 <node id='3738205' action='modify' timestamp='2009-07-01T02:47:19Z' uid='60345' user='Mirko Küster' visible='true' version='1' changeset='4886' lat='51.29777160009883' lon='11.433037897753023'>22 <tag k='source:RESULT1' v='h' /> 23 <tag k='source:RESULT2' v='d' /> 24 <tag k='source:RESULT3' v='v' /> 25 </node> 26 <node id='3738206' action='modify' timestamp='2009-07-01T02:47:19Z' uid='60345' user='Mirko Küster' visible='true' version='1' changeset='4886' lat='51.297852759255456' lon='11.433075645388865'>27 <tag k='source:RESULT1' v='v' /> 28 <tag k='source:RESULT2' v='v' /> 29 <tag k='source:RESULT3' v='v' /> 30 </node> 31 <node id='3738207' action='modify' timestamp='2009-12-29T21:13:35Z' uid='60345' user='Mirko Küster' visible='true' version='1' changeset='4886' lat='51.29788162453165' lon='11.432579272876024'>11 <node id='3738204' timestamp='2009-07-03T02:19:19Z' uid='60345' user='Mirko Küster' visible='true' version='2' changeset='4888' lat='51.297681393255424' lon='11.431771777709612'> 12 <tag k='source:RESULT1' v='v' /> 13 <tag k='source:RESULT2' v='v' /> 14 <tag k='source:RESULT3' v='h' /> 15 </node> 16 <node id='3738205' timestamp='2009-07-01T02:47:19Z' uid='60345' user='Mirko Küster' visible='true' version='2' changeset='4888' lat='51.29777160009883' lon='11.433037897753023'> 17 <tag k='source:RESULT1' v='h' /> 18 <tag k='source:RESULT2' v='d' /> 19 <tag k='source:RESULT3' v='v' /> 20 </node> 21 <node id='3738206' timestamp='2009-07-01T02:47:19Z' uid='60345' user='Mirko Küster' visible='true' version='2' changeset='4888' lat='51.297852759255456' lon='11.433075645388865'> 22 <tag k='source:RESULT1' v='v' /> 23 <tag k='source:RESULT2' v='v' /> 24 <tag k='source:RESULT3' v='v' /> 25 </node> 26 <node id='3738207' timestamp='2009-12-29T21:13:35Z' uid='60345' user='Mirko Küster' visible='true' version='2' changeset='4888' lat='51.29788162453165' lon='11.432579272876024'> 32 27 <tag k='natural' v='tree' /> 33 28 <tag k='source:RESULT1' v='v' /> … … 35 30 <tag k='source:RESULT3' v='h' /> 36 31 </node> 37 <node id='3738208' action='modify' timestamp='2008-12-05T19:31:02Z' uid='60345' user='Mirko Küster' visible='true' version='1' changeset='4886' lat='51.29800309852317' lon='11.433896841792528'>38 <tag k='source:RESULT1' v='v' /> 39 <tag k='source:RESULT2' v='v' /> 40 <tag k='source:RESULT3' v='h' /> 41 </node> 42 <node id='3738209' action='modify' timestamp='2009-07-01T02:47:20Z' uid='60345' user='Mirko Küster' visible='true' version='1' changeset='4886' lat='51.297687546215265' lon='11.433031050752408'>32 <node id='3738208' timestamp='2008-12-05T19:31:02Z' uid='60345' user='Mirko Küster' visible='true' version='2' changeset='4888' lat='51.29800309852317' lon='11.433896841792528'> 33 <tag k='source:RESULT1' v='v' /> 34 <tag k='source:RESULT2' v='v' /> 35 <tag k='source:RESULT3' v='h' /> 36 </node> 37 <node id='3738209' timestamp='2009-07-01T02:47:20Z' uid='60345' user='Mirko Küster' visible='true' version='2' changeset='4888' lat='51.297687546215265' lon='11.433031050752408'> 43 38 <tag k='highway' v='turning_circle' /> 44 39 <tag k='source:RESULT1' v='h' /> … … 46 41 <tag k='source:RESULT3' v='d' /> 47 42 </node> 48 <node id='3738210' action='modify' timestamp='2009-12-29T21:13:35Z' uid='60345' user='Mirko Küster' visible='true' version='1' changeset='4886' lat='51.29779804076176' lon='11.432409758274341'>43 <node id='3738210' timestamp='2009-12-29T21:13:35Z' uid='60345' user='Mirko Küster' visible='true' version='2' changeset='4888' lat='51.29779804076176' lon='11.432409758274341'> 49 44 <tag k='natural' v='tree' /> 50 45 <tag k='source:RESULT1' v='v' /> … … 52 47 <tag k='source:RESULT3' v='h' /> 53 48 </node> 54 <node id='3738211' action='modify' timestamp='2009-07-03T02:19:19Z' uid='60345' user='Mirko Küster' visible='true' version='1' changeset='4886' lat='51.29801439844809' lon='11.433988341792528'>55 <tag k='source:RESULT1' v='v' /> 56 <tag k='source:RESULT2' v='v' /> 57 <tag k='source:RESULT3' v='h' /> 58 </node> 59 <node id='3738212' action='modify' timestamp='2010-06-29T13:42:17Z' visible='true' version='1' changeset='4886' lat='51.29794829265898' lon='11.433062264158298'>49 <node id='3738211' timestamp='2009-07-03T02:19:19Z' uid='60345' user='Mirko Küster' visible='true' version='2' changeset='4888' lat='51.29801439844809' lon='11.433988341792528'> 50 <tag k='source:RESULT1' v='v' /> 51 <tag k='source:RESULT2' v='v' /> 52 <tag k='source:RESULT3' v='h' /> 53 </node> 54 <node id='3738212' timestamp='2010-06-29T13:42:17Z' visible='true' version='2' changeset='4888' lat='51.29794829265898' lon='11.433062264158298'> 60 55 <tag k='natural' v='tree' /> 61 56 <tag k='source:RESULT1' v='v' /> … … 63 58 <tag k='source:RESULT3' v='v' /> 64 59 </node> 65 <way id='101639' action='modify' timestamp='2009-12-03T01:32:37Z' uid='60345' user='Mirko Küster' visible='true' version='1' changeset='4886'> 60 <node id='3738213' visible='true' version='2' changeset='4889' lat='51.296979868329316' lon='11.43367415544202'> 61 <tag k='name' v='Great Lake' /> 62 <tag k='natural' v='water' /> 63 <tag k='source:RESULT11' v='h' /> 64 <tag k='source:RESULT12' v='v' /> 65 <tag k='source:RESULT13' v='d' /> 66 <tag k='source:RESULT14' v='v' /> 67 </node> 68 <node id='3738214' visible='true' version='2' changeset='4889' lat='51.29733323879322' lon='11.433716158964817'> 69 <tag k='source:RESULT11' v='h' /> 70 <tag k='source:RESULT12' v='v' /> 71 <tag k='source:RESULT13' v='v' /> 72 <tag k='source:RESULT14' v='v' /> 73 </node> 74 <node id='3738215' visible='true' version='2' changeset='4889' lat='51.297197143733946' lon='11.43362833341716'> 75 <tag k='highway' v='turning_circle' /> 76 <tag k='source:RESULT11' v='v' /> 77 <tag k='source:RESULT12' v='v' /> 78 <tag k='source:RESULT13' v='v' /> 79 <tag k='source:RESULT14' v='v' /> 80 </node> 81 <node id='3738216' visible='true' version='2' changeset='4889' lat='51.29713028987274' lon='11.4320245625468'> 82 <tag k='natural' v='water' /> 83 <tag k='source:RESULT11' v='v' /> 84 <tag k='source:RESULT12' v='v' /> 85 <tag k='source:RESULT13' v='d' /> 86 <tag k='source:RESULT14' v='d' /> 87 </node> 88 <node id='3738217' visible='true' version='2' changeset='4889' lat='51.29696793009042' lon='11.432039836555083'> 89 <tag k='source:RESULT11' v='h' /> 90 <tag k='source:RESULT12' v='v' /> 91 <tag k='source:RESULT13' v='v' /> 92 <tag k='source:RESULT14' v='v' /> 93 </node> 94 <node id='3738218' visible='true' version='2' changeset='4889' lat='51.297180430277756' lon='11.432158210119328'> 95 <tag k='highway' v='turning_circle' /> 96 <tag k='source:RESULT11' v='v' /> 97 <tag k='source:RESULT12' v='v' /> 98 <tag k='source:RESULT13' v='v' /> 99 <tag k='source:RESULT14' v='v' /> 100 </node> 101 <node id='3738219' visible='true' version='2' changeset='4889' lat='51.29715177862449' lon='11.431730537887237'> 102 <tag k='source:RESULT11' v='v' /> 103 <tag k='source:RESULT12' v='v' /> 104 <tag k='source:RESULT13' v='v' /> 105 <tag k='source:RESULT14' v='v' /> 106 </node> 107 <node id='3738220' visible='true' version='2' changeset='4889' lat='51.297299811973936' lon='11.432941003044146'> 108 <tag k='natural' v='water' /> 109 <tag k='source:RESULT11' v='h' /> 110 <tag k='source:RESULT12' v='v' /> 111 <tag k='source:RESULT13' v='d' /> 112 <tag k='source:RESULT14' v='d' /> 113 </node> 114 <node id='3738221' timestamp='2010-06-29T18:09:35Z' visible='true' version='1' changeset='4888' lat='51.29770551640994' lon='11.433165989186241'> 115 <tag k='highway' v='bus_stop' /> 116 <tag k='source:RESULT2' v='v' /> 117 <tag k='source:RESULT3' v='h' /> 118 </node> 119 <node id='3738222' visible='true' version='2' changeset='4889' lat='51.2973881542292' lon='11.431974922019855'> 120 <tag k='source:RESULT11' v='h' /> 121 <tag k='source:RESULT12' v='h' /> 122 <tag k='source:RESULT13' v='h' /> 123 <tag k='source:RESULT14' v='h' /> 124 </node> 125 <node id='3738223' visible='true' version='2' changeset='4889' lat='51.297180430277706' lon='11.432318587206364'> 126 <tag k='source:RESULT11' v='v' /> 127 <tag k='source:RESULT12' v='v' /> 128 <tag k='source:RESULT13' v='v' /> 129 <tag k='source:RESULT14' v='v' /> 130 </node> 131 <node id='3738224' visible='true' version='2' changeset='4889' lat='51.29708731233921' lon='11.43379634750834'> 132 <tag k='highway' v='turning_circle' /> 133 <tag k='source:RESULT11' v='v' /> 134 <tag k='source:RESULT12' v='v' /> 135 <tag k='source:RESULT13' v='v' /> 136 <tag k='source:RESULT14' v='v' /> 137 </node> 138 <node id='3738225' visible='true' version='2' changeset='4889' lat='51.29725444696593' lon='11.43226512817735'> 139 <tag k='source:RESULT11' v='h' /> 140 <tag k='source:RESULT12' v='h' /> 141 <tag k='source:RESULT13' v='h' /> 142 <tag k='source:RESULT14' v='h' /> 143 </node> 144 <node id='3738226' visible='true' version='2' changeset='4889' lat='51.297285486186695' lon='11.433284668230646'> 145 <tag k='highway' v='turning_circle' /> 146 <tag k='source:RESULT11' v='v' /> 147 <tag k='source:RESULT12' v='v' /> 148 <tag k='source:RESULT13' v='v' /> 149 <tag k='source:RESULT14' v='v' /> 150 </node> 151 <node id='3738227' visible='true' version='2' changeset='4889' lat='51.29677214253027' lon='11.433555781877784'> 152 <tag k='source:RESULT11' v='v' /> 153 <tag k='source:RESULT12' v='v' /> 154 <tag k='source:RESULT13' v='v' /> 155 <tag k='source:RESULT14' v='v' /> 156 </node> 157 <node id='3738228' visible='true' version='2' changeset='4889' lat='51.29709686290569' lon='11.433433589811468'> 158 <tag k='natural' v='water' /> 159 <tag k='source:RESULT11' v='h' /> 160 <tag k='source:RESULT12' v='v' /> 161 <tag k='source:RESULT13' v='d' /> 162 <tag k='source:RESULT14' v='d' /> 163 </node> 164 <node id='3738229' visible='true' version='2' changeset='4889' lat='51.297263997497694' lon='11.433868899047706'> 165 <tag k='source:RESULT11' v='h' /> 166 <tag k='source:RESULT12' v='v' /> 167 <tag k='source:RESULT13' v='v' /> 168 <tag k='source:RESULT14' v='v' /> 169 </node> 170 <node id='3738230' visible='true' version='2' changeset='4889' lat='51.29747410869284' lon='11.433781073500048'> 171 <tag k='source:RESULT11' v='h' /> 172 <tag k='source:RESULT12' v='h' /> 173 <tag k='source:RESULT13' v='h' /> 174 <tag k='source:RESULT14' v='h' /> 175 </node> 176 <node id='3738231' visible='true' version='2' changeset='4889' lat='51.297001357151395' lon='11.433212116691283'> 177 <tag k='source:RESULT11' v='v' /> 178 <tag k='source:RESULT12' v='v' /> 179 <tag k='source:RESULT13' v='v' /> 180 <tag k='source:RESULT14' v='v' /> 181 </node> 182 <node id='3738232' visible='true' version='2' changeset='4889' lat='51.29720430664181' lon='11.432501875305828'> 183 <tag k='source:RESULT11' v='h' /> 184 <tag k='source:RESULT12' v='v' /> 185 <tag k='source:RESULT13' v='v' /> 186 <tag k='source:RESULT14' v='v' /> 187 </node> 188 <node id='3738233' visible='true' version='1' changeset='4889' lat='51.2979658606353' lon='11.431133018682964'> 189 <tag k='name' v='Test 1-3' /> 190 </node> 191 <node id='3738234' visible='true' version='1' changeset='4889' lat='51.29723286275695' lon='11.431190296214046'> 192 <tag k='name' v='Test 11-14' /> 193 </node> 194 <node id='3738235' visible='true' version='1' changeset='4889' lat='51.29686516560205' lon='11.433363023893177'> 195 <tag k='source:RESULT11' v='v' /> 196 <tag k='source:RESULT12' v='v' /> 197 <tag k='source:RESULT13' v='v' /> 198 <tag k='source:RESULT14' v='v' /> 199 <tag k='tourism' v='viewpoint' /> 200 </node> 201 <way id='101639' timestamp='2009-12-03T01:32:37Z' uid='60345' user='Mirko Küster' visible='true' version='2' changeset='4888'> 66 202 <nd ref='3738204' /> 67 203 <nd ref='3738210' /> … … 80 216 <tag k='width' v='6' /> 81 217 </way> 82 <way id='101640' action='modify' timestamp='2009-07-01T02:47:55Z' uid='60345' user='Mirko Küster' visible='true' version='1' changeset='4886'>218 <way id='101640' timestamp='2009-07-01T02:47:55Z' uid='60345' user='Mirko Küster' visible='true' version='2' changeset='4888'> 83 219 <nd ref='3738203' /> 84 220 <nd ref='3738212' /> … … 94 230 <tag k='source:RESULT3' v='v' /> 95 231 </way> 232 <way id='101641' visible='true' version='3' changeset='4889'> 233 <nd ref='3738219' /> 234 <nd ref='3738216' /> 235 <nd ref='3738218' /> 236 <nd ref='3738223' /> 237 <nd ref='3738231' /> 238 <nd ref='3738235' /> 239 <nd ref='3738227' /> 240 <tag k='highway' v='residential' /> 241 <tag k='source:RESULT11' v='v' /> 242 <tag k='source:RESULT12' v='v' /> 243 <tag k='source:RESULT13' v='v' /> 244 <tag k='source:RESULT14' v='v' /> 245 </way> 246 <way id='101642' visible='true' version='2' changeset='4889'> 247 <nd ref='3738222' /> 248 <nd ref='3738225' /> 249 <nd ref='3738223' /> 250 <nd ref='3738231' /> 251 <nd ref='3738228' /> 252 <nd ref='3738215' /> 253 <nd ref='3738214' /> 254 <nd ref='3738230' /> 255 <tag k='landuse' v='meadow' /> 256 <tag k='source:RESULT11' v='h' /> 257 <tag k='source:RESULT12' v='h' /> 258 <tag k='source:RESULT13' v='h' /> 259 <tag k='source:RESULT14' v='h' /> 260 </way> 261 <way id='101643' visible='true' version='2' changeset='4889'> 262 <nd ref='3738217' /> 263 <nd ref='3738223' /> 264 <nd ref='3738232' /> 265 <nd ref='3738220' /> 266 <nd ref='3738226' /> 267 <nd ref='3738214' /> 268 <nd ref='3738229' /> 269 <tag k='name' v='Great Canal' /> 270 <tag k='source:RESULT11' v='h' /> 271 <tag k='source:RESULT12' v='v' /> 272 <tag k='source:RESULT13' v='v' /> 273 <tag k='source:RESULT14' v='v' /> 274 <tag k='waterway' v='canal' /> 275 </way> 96 276 </osm> -
trunk/test/unit/org/openstreetmap/josm/data/osm/FilterTest.java
r3356 r3358 18 18 19 19 import org.openstreetmap.josm.Main; 20 import org.openstreetmap.josm.actions.search.SearchAction.SearchMode; 20 21 import org.openstreetmap.josm.actions.search.SearchCompiler.ParseError; 21 22 import org.openstreetmap.josm.data.projection.Mercator; … … 62 63 @Test 63 64 public void filter_test() throws ParseError, IllegalDataException, FileNotFoundException { 64 for (int i = 1; i<=3; ++i) {65 for (int i : new int [] {1,2,3, 11,12,13,14}) { 65 66 DataSet ds = OsmReader.parseDataSet(new FileInputStream("data_nodist/filterTests.osm"), NullProgressMonitor.INSTANCE); 66 67 … … 89 90 f2.text = "highway"; 90 91 filters.addAll(Arrays.asList(new Filter[] {f1, f2})); 92 break; 93 } 94 case 11: { 95 Filter f1 = new Filter(); 96 f1.text = "highway"; 97 f1.inverted = true; 98 f1.hiding = true; 99 filters.add(f1); 100 break; 101 } 102 case 12: { 103 Filter f1 = new Filter(); 104 f1.text = "highway"; 105 f1.inverted = true; 106 f1.hiding = true; 107 Filter f2 = new Filter(); 108 f2.text = "water"; 109 f2.mode = SearchMode.remove; 110 filters.addAll(Arrays.asList(new Filter[] {f1, f2})); 111 break; 112 } 113 case 13: { 114 Filter f1 = new Filter(); 115 f1.text = "highway"; 116 f1.inverted = true; 117 f1.hiding = true; 118 Filter f2 = new Filter(); 119 f2.text = "water"; 120 f2.mode = SearchMode.remove; 121 Filter f3 = new Filter(); 122 f3.text = "natural"; 123 filters.addAll(Arrays.asList(new Filter[] {f1, f2, f3})); 124 break; 125 } 126 case 14: { 127 /* show all highways and all water features, but not lakes 128 * except those that have a name */ 129 Filter f1 = new Filter(); 130 f1.text = "highway"; 131 f1.inverted = true; 132 f1.hiding = true; 133 Filter f2 = new Filter(); 134 f2.text = "water"; 135 f2.mode = SearchMode.remove; 136 Filter f3 = new Filter(); 137 f3.text = "natural"; 138 Filter f4 = new Filter(); 139 f4.text = "name"; 140 f4.mode = SearchMode.remove; 141 filters.addAll(Arrays.asList(new Filter[] {f1, f2, f3, f4})); 91 142 break; 92 143 }
Note: See TracChangeset
for help on using the changeset viewer.