Changeset 11422 in josm for trunk/scripts
- Timestamp:
- 2016-12-31T12:24:02+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/scripts/SyncEditorImageryIndex.groovy
r11420 r11422 421 421 josmIds.put(id, j); 422 422 } 423 def js = getShapes(j) 424 if(js.size()) { 425 def minlat = 1000; 426 def minlon = 1000; 427 def maxlat = -1000; 428 def maxlon = -1000; 429 for(def s: js) { 430 for(def p: s.getPoints()) { 431 def lat = p.getLat(); 432 def lon = p.getLon(); 433 if(lat > maxlat) maxlat = lat; 434 if(lon > maxlon) maxlon = lon; 435 if(lat < minlat) minlat = lat; 436 if(lon < minlon) minlon = lon; 437 } 438 } 439 def b = j.getBounds(); 440 if(b.getMinLat() != minlat || b.getMinLon() != minlon || b.getMaxLat() != maxlat || b.getMaxLon() != maxlon) { 441 myprintln "* Bounds do not match shape (is ${b.getMinLat()},${b.getMinLon()},${b.getMaxLat()},${b.getMaxLon()}, calculated <bounds min-lat=\"${minlat}\" min-lon=\"${minlon}\" max-lat=\"${maxlat}\" max-lon=\"${maxlon}\">): ${getDescription(j)}" 442 } 443 } 423 444 } 424 445 }
Note:
See TracChangeset
for help on using the changeset viewer.