Index: /trunk/scripts/SyncEditorImageryIndex.groovy
===================================================================
--- /trunk/scripts/SyncEditorImageryIndex.groovy	(revision 11409)
+++ /trunk/scripts/SyncEditorImageryIndex.groovy	(revision 11410)
@@ -23,4 +23,5 @@
 
 import org.openstreetmap.josm.data.imagery.ImageryInfo
+import org.openstreetmap.josm.data.imagery.Shape
 import org.openstreetmap.josm.io.imagery.ImageryReader
 
@@ -322,4 +323,35 @@
             }
         }*/
+        myprintln "*** Mismatching shapes: ***"
+        for (def url : josmUrls.keySet()) {
+            def j = josmUrls.get(url)
+            def num = 1
+            for (def shape : getShapes(j)) {
+                def p = shape.getPoints()
+                if(!p[0].equals(p[p.size()-1])) {
+                    myprintln "+++ JOSM shape $num unclosed: ${getDescription(j)}"
+                }
+                ++num
+            }
+        }
+        for (def url : eiiUrls.keySet()) {
+            def e = eiiUrls.get(url)
+            def num = 1
+            def s = getShapes(e)
+            for (def shape : s) {
+                def p = shape.getPoints()
+                if(!p[0].equals(p[p.size()-1])) {
+                    myprintln "+++ EII shape $num unclosed: ${getDescription(e)}"
+                }
+                ++num
+            }
+            if (!josmUrls.containsKey(url)) {
+                continue
+            }
+            def j = josmUrls.get(url)
+            if(!s.equals(getShapes(j))) {
+                myprintln " Different shapes: ${getDescription(j)}"
+            }
+        }
     }
 
@@ -334,4 +366,31 @@
         if (e instanceof ImageryInfo) return e.getOriginalName()
         return e.getString("name")
+    }
+    static List<Shape> getShapes(Object e) {
+        if (e instanceof ImageryInfo) {
+          def bounds = e.getBounds();
+          if(bounds != null) {
+            return bounds.getShapes();
+          }
+          return []
+        }
+        def ex = e.get("extent")
+        if(ex != null) {
+            def poly = ex.get("polygon")
+            if(poly != null) {
+                List<Shape> l = []
+                for(def shapes: poly) {
+                    def s = new Shape()
+                    for(def point: shapes) {
+                        def lon = point[0].toString()
+                        def lat = point[1].toString()
+                        s.addPoint(lat, lon)
+                    }
+                    l.add(s)
+                }
+                return l
+            }
+        }
+        return []
     }
     static String getType(Object e) {
