Changeset 13527 in josm


Ignore:
Timestamp:
2018-03-14T18:55:03+01:00 (6 years ago)
Author:
stoecker
Message:

cleanup new WMS checks a bit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/scripts/SyncEditorLayerIndex.groovy

    r13526 r13527  
    663663        myprintln "*** Miscellaneous checks: ***"
    664664        def josmIds = new HashMap<String, ImageryInfo>()
     665        def all = Projections.getAllProjectionCodes()
     666        def oldproj = new HashMap<String, String>()
     667        oldproj.put("EPSG:3785", "EPSG:3857")
     668        oldproj.put("EPSG:102100", "EPSG:3857")
     669        oldproj.put("EPSG:102113", "EPSG:3857")
     670        oldproj.put("EPSG:900913", "EPGS:3857")
    665671        for (def url : josmUrls.keySet()) {
    666672            def j = josmUrls.get(url)
     
    670676                    myprintln "* WMS without projections: ${getDescription(j)}"
    671677                } else {
    672                     def all = Projections.getAllProjectionCodes();
    673                     def unsupported = new LinkedList<String>();
     678                    def unsupported = new LinkedList<String>()
     679                    def old = new LinkedList<String>()
    674680                    for (def p : getProjections(j)) {
    675681                        if("CRS:84".equals(p)) {
     
    677683                                myprintln "! CRS:84 without WMS 1.3: ${getDescription(j)}"
    678684                            }
     685                        } else if(oldproj.containsKey(p)) {
     686                            old.add(p)
    679687                        } else if(!all.contains(p)) {
    680688                            unsupported.add(p)
     
    682690                    }
    683691                    if (unsupported) {
    684                         def s = String.join(" ", unsupported)
    685                         myprintln "! Projections ${s} not supported by JOSM (maybe Obsolete code): ${getDescription(j)}"
     692                        def s = String.join(", ", unsupported)
     693                        myprintln "! Projections ${s} not supported by JOSM: ${getDescription(j)}"
     694                    }
     695                    for (def o : old) {
     696                        myprintln "! Projections ${o} is an old unsupported code and has been replaced by ${oldproj.get(o)}: ${getDescription(j)}"
    686697                    }
    687698                }
Note: See TracChangeset for help on using the changeset viewer.