Index: trunk/scripts/BuildProjectionDefinitions.java
===================================================================
--- trunk/scripts/BuildProjectionDefinitions.java	(revision 11324)
+++ trunk/scripts/BuildProjectionDefinitions.java	(revision 13395)
@@ -9,5 +9,4 @@
 import java.util.HashMap;
 import java.util.LinkedHashMap;
-import java.util.List;
 import java.util.Map;
 
@@ -26,7 +25,9 @@
     private static final String JOSM_EPSG_FILE = "data_nodist/projection/josm-epsg";
     private static final String PROJ4_EPSG_FILE = "data_nodist/projection/epsg";
+    private static final String PROJ4_ESRI_FILE = "data_nodist/projection/esri";
     private static final String OUTPUT_EPSG_FILE = "data/projection/custom-epsg";
 
     private static final Map<String, ProjectionDefinition> epsgProj4 = new LinkedHashMap<>();
+    private static final Map<String, ProjectionDefinition> esriProj4 = new LinkedHashMap<>();
     private static final Map<String, ProjectionDefinition> epsgJosm = new LinkedHashMap<>();
 
@@ -35,4 +36,5 @@
     // statistics:
     private static int noInJosm = 0;
+    private static int noInProj4 = 0;
     private static int noDeprecated = 0;
     private static int noGeocent = 0;
@@ -42,4 +44,5 @@
     private static int noJosm = 0;
     private static int noProj4 = 0;
+    private static int noEsri = 0;
     private static int noOmercNoBounds = 0;
 
@@ -53,13 +56,14 @@
     }
 
+    static void initMap(String baseDir, String file, Map<String, ProjectionDefinition> map) throws IOException {
+        for (ProjectionDefinition pd : Projections.loadProjectionDefinitions(baseDir + File.separator + file)) {
+            map.put(pd.code, pd);
+        }
+    }
+
     static void buildList(String baseDir) throws IOException {
-        List<ProjectionDefinition> pdJosm = Projections.loadProjectionDefinitions(baseDir + File.separator + JOSM_EPSG_FILE);
-        for (ProjectionDefinition pd : pdJosm) {
-            epsgJosm.put(pd.code, pd);
-        }
-        List<ProjectionDefinition> pdProj4 = Projections.loadProjectionDefinitions(baseDir + File.separator + PROJ4_EPSG_FILE);
-        for (ProjectionDefinition pd : pdProj4) {
-            epsgProj4.put(pd.code, pd);
-        }
+        initMap(baseDir, JOSM_EPSG_FILE, epsgJosm);
+        initMap(baseDir, PROJ4_EPSG_FILE, epsgProj4);
+        initMap(baseDir, PROJ4_ESRI_FILE, esriProj4);
 
         try (FileOutputStream output = new FileOutputStream(baseDir + File.separator + OUTPUT_EPSG_FILE);
@@ -67,6 +71,6 @@
             out.write("## This file is autogenerated, do not edit!\n");
             out.write("## Run ant task \"epsg\" to rebuild.\n");
-            out.write(String.format("## Source files are %s (can be changed) and %s (copied from the proj.4 project).%n",
-                    JOSM_EPSG_FILE, PROJ4_EPSG_FILE));
+            out.write(String.format("## Source files are %s (can be changed), %s and %s (copied from the proj.4 project).%n",
+                    JOSM_EPSG_FILE, PROJ4_EPSG_FILE, PROJ4_ESRI_FILE));
             out.write("##\n");
             out.write("## Entries checked and maintained by the JOSM team:\n");
@@ -77,7 +81,14 @@
             out.write("## Other supported projections (source: proj.4):\n");
             for (ProjectionDefinition pd : epsgProj4.values()) {
-                if (doInclude(pd, true)) {
+                if (doInclude(pd, true, false)) {
                     write(out, pd);
                     noProj4++;
+                }
+            }
+            out.write("## ESRI-specific projections (source: proj.4):\n");
+            for (ProjectionDefinition pd : esriProj4.values()) {
+                if (doInclude(pd, true, true)) {
+                    write(out, pd);
+                    noEsri++;
                 }
             }
@@ -87,7 +98,9 @@
             System.out.println(String.format("loaded %d entries from %s", epsgJosm.size(), JOSM_EPSG_FILE));
             System.out.println(String.format("loaded %d entries from %s", epsgProj4.size(), PROJ4_EPSG_FILE));
+            System.out.println(String.format("loaded %d entries from %s", esriProj4.size(), PROJ4_ESRI_FILE));
             System.out.println();
             System.out.println("some entries from proj.4 have not been included:");
             System.out.println(String.format(" * already in the maintained JOSM list: %d entries", noInJosm));
+            System.out.println(String.format(" * ESRI already in the standard EPSG list: %d entries", noInProj4));
             System.out.println(String.format(" * deprecated: %d entries", noDeprecated));
             System.out.println(String.format(" * using +proj=geocent, which is 3D (X,Y,Z) and not useful in JOSM: %d entries", noGeocent));
@@ -101,6 +114,6 @@
             System.out.println(String.format("written %d entries from %s", noJosm, JOSM_EPSG_FILE));
             System.out.println(String.format("written %d entries from %s", noProj4, PROJ4_EPSG_FILE));
+            System.out.println(String.format("written %d entries from %s", noEsri, PROJ4_ESRI_FILE));
         }
-
     }
 
@@ -110,5 +123,5 @@
     }
 
-    static boolean doInclude(ProjectionDefinition pd, boolean noIncludeJosm) {
+    static boolean doInclude(ProjectionDefinition pd, boolean noIncludeJosm, boolean noIncludeProj4) {
 
         boolean result = true;
@@ -119,4 +132,11 @@
                 result = false;
                 noInJosm++;
+            }
+        }
+        if (noIncludeProj4) {
+            // we already have this projection
+            if (epsgProj4.containsKey(pd.code)) {
+                result = false;
+                noInProj4++;
             }
         }
