Index: trunk/build.xml
===================================================================
--- trunk/build.xml	(revision 11411)
+++ trunk/build.xml	(revision 11412)
@@ -689,5 +689,5 @@
         <echo message="Checking editor imagery difference"/>
         <groovy src="scripts/SyncEditorImageryIndex.groovy" classpath="${dist.dir}/josm-custom.jar">
-            <arg value="-nomissingeii"/>
+                <!--<arg value="-nomissingeii"/>-->
         </groovy>
     </target>
@@ -707,7 +707,7 @@
         </exec>
         <exec append="false" executable="wget" failifexecutionfails="true">
-            <arg value="https://raw.githubusercontent.com/osmlab/editor-imagery-index/gh-pages/imagery.json"/>
+            <arg value="https://raw.githubusercontent.com/osmlab/editor-imagery-index/gh-pages/imagery.geojson"/>
             <arg value="-O"/>
-            <arg value="imagery.json"/>
+            <arg value="imagery.geojson"/>
             <arg value="--unlink"/>
         </exec>
Index: trunk/scripts/SyncEditorImageryIndex.groovy
===================================================================
--- trunk/scripts/SyncEditorImageryIndex.groovy	(revision 11411)
+++ trunk/scripts/SyncEditorImageryIndex.groovy	(revision 11412)
@@ -21,4 +21,5 @@
 import javax.json.JsonObject
 import javax.json.JsonReader
+import javax.json.JsonValue
 
 import org.openstreetmap.josm.data.imagery.ImageryInfo
@@ -34,5 +35,5 @@
     def josmUrls = new HashMap<String, ImageryInfo>()
 
-    static String eiiInputFile = 'imagery.json'
+    static String eiiInputFile = 'imagery.geojson'
     static String josmInputFile = 'maps.xml'
     static String ignoreInputFile = 'maps_ignores.txt'
@@ -174,5 +175,5 @@
         FileReader fr = new FileReader(eiiInputFile)
         JsonReader jr = Json.createReader(fr)
-        eiiEntries = jr.readArray()
+        eiiEntries = jr.readObject().get("features")
         jr.close()
 
@@ -234,6 +235,7 @@
         myprintln "*** URLs found in EII but not in JOSM (${l1.size()}): ***"
         if (!l1.isEmpty()) {
-            for (def l : l1)
-                myprintln "-"+l
+            for (def l : l1) {
+                myprintln "-" + l
+            }
         }
 
@@ -243,6 +245,7 @@
         myprintln "*** URLs found in JOSM but not in EII (${l2.size()}): ***"
         if (!l2.isEmpty()) {
-            for (def l : l2)
+            for (def l : l2) {
                 myprintln "+" + l
+            }
         }
     }
@@ -368,9 +371,9 @@
     static String getUrl(Object e) {
         if (e instanceof ImageryInfo) return e.url
-        return e.getString("url")
+        return e.get("properties").getString("url")
     }
     static String getName(Object e) {
         if (e instanceof ImageryInfo) return e.getOriginalName()
-        return e.getString("name")
+        return e.get("properties").getString("name")
     }
     static List<Shape> getShapes(Object e) {
@@ -382,8 +385,8 @@
             return []
         }
-        def ex = e.get("extent")
-        if(ex != null) {
-            def poly = ex.get("polygon")
-            if(poly != null) {
+        if(!e.isNull("geometry")) {
+            def ex = e.get("geometry")
+            if(ex != null && !ex.isNull("coordinates")) {
+                def poly = ex.get("coordinates")
                 List<Shape> l = []
                 for(def shapes: poly) {
@@ -406,5 +409,5 @@
     static String getType(Object e) {
         if (e instanceof ImageryInfo) return e.getImageryType().getTypeString()
-        return e.getString("type")
+        return e.get("properties").getString("type")
     }
     static Integer getMinZoom(Object e) {
@@ -413,7 +416,5 @@
             return mz == 0 ? null : mz
         } else {
-            def ext = e.getJsonObject("extent")
-            if (ext == null) return null
-            def num = ext.getJsonNumber("min_zoom")
+            def num = e.get("properties").getJsonNumber("min_zoom")
             if (num == null) return null
             return num.intValue()
@@ -425,7 +426,5 @@
             return mz == 0 ? null : mz
         } else {
-            def ext = e.getJsonObject("extent")
-            if (ext == null) return null
-            def num = ext.getJsonNumber("max_zoom")
+            def num = e.get("properties").getJsonNumber("max_zoom")
             if (num == null) return null
             return num.intValue()
@@ -434,10 +433,10 @@
     static String getCountryCode(Object e) {
         if (e instanceof ImageryInfo) return "".equals(e.getCountryCode()) ? null : e.getCountryCode()
-        return e.getString("country_code", null)
+        return e.get("properties").getString("country_code", null)
     }
     static String getQuality(Object e) {
         //if (e instanceof ImageryInfo) return "".equals(e.getQuality()) ? null : e.getQuality()
         if (e instanceof ImageryInfo) return null
-        return e.get("best") ? "best" : null
+        return e.get("properties").get("best") ? "best" : null
     }
     String getDescription(Object o) {
