Changeset 13526 in josm for trunk/scripts
- Timestamp:
- 2018-03-14T18:39:12+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/scripts/SyncEditorLayerIndex.groovy
r13518 r13526 25 25 import org.openstreetmap.josm.data.imagery.ImageryInfo 26 26 import org.openstreetmap.josm.data.imagery.Shape 27 import org.openstreetmap.josm.data.projection.Projections; 27 28 import org.openstreetmap.josm.io.imagery.ImageryReader 28 29 … … 155 156 } 156 157 } else if(options.xhtmlbody || options.xhtml) { 157 String color = s.startsWith("***") ? "black" : ((s.startsWith("+ ") || s.startsWith("+++ ELI")) ? "blue" : (s.startsWith("#") ? "indigo" : "red")) 158 String color = s.startsWith("***") ? "black" : ((s.startsWith("+ ") || s.startsWith("+++ ELI")) ? "blue" : 159 (s.startsWith("#") ? "indigo" : (s.startsWith("!") ? "orange" : "red"))) 158 160 s = "<pre style=\"margin:3px;color:"+color+"\">"+s.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">")+"</pre>" 159 161 } … … 664 666 def j = josmUrls.get(url) 665 667 def id = getId(j) 666 if("wms".equals(getType(j)) && !getProjections(j)) { 667 myprintln "* WMS without projections: ${getDescription(j)}" 668 if("wms".equals(getType(j))) { 669 if(!getProjections(j)) { 670 myprintln "* WMS without projections: ${getDescription(j)}" 671 } else { 672 def all = Projections.getAllProjectionCodes(); 673 def unsupported = new LinkedList<String>(); 674 for (def p : getProjections(j)) { 675 if("CRS:84".equals(p)) { 676 if(!(url =~ /(?i)version=1\.3/)) { 677 myprintln "! CRS:84 without WMS 1.3: ${getDescription(j)}" 678 } 679 } else if(!all.contains(p)) { 680 unsupported.add(p) 681 } 682 } 683 if (unsupported) { 684 def s = String.join(" ", unsupported) 685 myprintln "! Projections ${s} not supported by JOSM (maybe Obsolete code): ${getDescription(j)}" 686 } 687 } 688 if((url =~ /(?i)version=1\.3/) && !(url =~ /[Cc][Rr][Ss]=\{proj\}/)) { 689 myprintln "* WMS 1.3 with strange CRS specification: ${getDescription(j)}" 690 } 691 if((url =~ /(?i)version=1\.1/) && !(url =~ /[Ss][Rr][Ss]=\{proj\}/)) { 692 myprintln "* WMS 1.1 with strange SRS specification: ${getDescription(j)}" 693 } 668 694 } 669 695 if(josmMirrors.containsKey(url)) {
Note:
See TracChangeset
for help on using the changeset viewer.