Changeset 11413 in josm for trunk/scripts/SyncEditorImageryIndex.groovy
- Timestamp:
- 2016-12-22T20:22:59+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/scripts/SyncEditorImageryIndex.groovy
r11412 r11413 150 150 } 151 151 } else if(options.xhtmlbody || options.xhtml) { 152 String color = s.startsWith("***") ? "black" : ( s.startsWith("+ ") ? "blue" : "red")152 String color = s.startsWith("***") ? "black" : ((s.startsWith("+ ") || s.startsWith("+++ EII")) ? "blue" : "red") 153 153 s = "<pre style=\"margin:3px;color:"+color+"\">"+s.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">")+"</pre>" 154 154 } … … 344 344 for (def shape : s) { 345 345 def p = shape.getPoints() 346 if(!p[0].equals(p[p.size()-1]) ) {346 if(!p[0].equals(p[p.size()-1]) && !options.nomissingeii) { 347 347 myprintln "+++ EII shape $num unclosed: ${getDescription(e)}" 348 348 } … … 354 354 def j = josmUrls.get(url) 355 355 def js = getShapes(j) 356 if(!s.equals(js)) { 357 if(!s.size()) { 358 myprintln " No EII shape: ${getDescription(j)}" 359 } else if(!js.size()) { 360 myprintln " No JOSM shape: ${getDescription(j)}" 356 if(!s.size() && js.size() && !options.nomissingeii) { 357 myprintln "+ No EII shape: ${getDescription(j)}" 358 } else if(!js.size() && s.size()) { 359 myprintln "- No JOSM shape: ${getDescription(j)}" 360 } else { 361 if(s.size() != js.size()) { 362 myprintln "* Different number of shapes (${s.size()} != ${js.size()}): ${getDescription(j)}" 361 363 } else { 362 myprintln " Different shapes: ${getDescription(j)}" 364 for(def nums = 0; nums < s.size(); ++nums) { 365 def ep = s[nums].getPoints() 366 def jp = js[nums].getPoints() 367 if(ep.size() != jp.size()) { 368 myprintln "* Different number of points for shape ${nums+1} (${ep.size()} ! = ${jp.size()})): ${getDescription(j)}" 369 } else { 370 for(def nump = 0; nump < ep.size(); ++nump) { 371 def ept = ep[nump] 372 def jpt = jp[nump] 373 if(Math.abs(ept.getLat()-jpt.getLat()) > 0.000001 || Math.abs(ept.getLon()-jpt.getLon()) > 0.000001) { 374 myprintln "* Different coordinate for point ${nump+1} of shape ${nums+1}: ${getDescription(j)}" 375 nump = ep.size() 376 num = s.size() 377 } 378 } 379 } 380 } 363 381 } 364 382 }
Note:
See TracChangeset
for help on using the changeset viewer.