Changeset 11411 in josm for trunk


Ignore:
Timestamp:
2016-12-22T09:13:02+01:00 (7 years ago)
Author:
stoecker
Message:

see #12706 - improve shape difference display, ignore shapes equivalent to bounds

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/scripts/SyncEditorImageryIndex.groovy

    r11410 r11411  
    350350            }
    351351            def j = josmUrls.get(url)
    352             if(!s.equals(getShapes(j))) {
    353                 myprintln " Different shapes: ${getDescription(j)}"
     352            def js = getShapes(j)
     353            if(!s.equals(js)) {
     354                if(!s.size()) {
     355                    myprintln " No EII shape: ${getDescription(j)}"
     356                } else if(!js.size()) {
     357                    myprintln " No JOSM shape: ${getDescription(j)}"
     358                } else {
     359                    myprintln " Different shapes: ${getDescription(j)}"
     360                }
    354361            }
    355362        }
     
    369376    static List<Shape> getShapes(Object e) {
    370377        if (e instanceof ImageryInfo) {
    371           def bounds = e.getBounds();
    372           if(bounds != null) {
    373             return bounds.getShapes();
    374           }
    375           return []
     378            def bounds = e.getBounds();
     379            if(bounds != null) {
     380                return bounds.getShapes();
     381            }
     382            return []
    376383        }
    377384        def ex = e.get("extent")
     
    389396                    l.add(s)
    390397                }
     398                if (l.size() == 1 && l[0].getPoints().size() == 5) {
     399                    return [] // ignore a bounds equivalent shape
     400                }
    391401                return l
    392402            }
Note: See TracChangeset for help on using the changeset viewer.