Index: trunk/src/org/openstreetmap/josm/data/projection/BelgianLambert1972.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/projection/BelgianLambert1972.java	(revision 5063)
+++ trunk/src/org/openstreetmap/josm/data/projection/BelgianLambert1972.java	(revision 5066)
@@ -7,9 +7,10 @@
 import org.openstreetmap.josm.data.projection.datum.SevenParameterDatum;
 import org.openstreetmap.josm.data.projection.proj.LambertConformalConic;
+import org.openstreetmap.josm.data.projection.proj.ProjParameters;
 
 /**
  * Belgian Lambert 72 projection as specified by the Belgian IGN
  * in this document: http://www.ngi.be/Common/Lambert2008/Transformation_Geographic_Lambert_FR.pdf
- * @author Don-vip 
+ * @author Don-vip
  *
  */
@@ -19,15 +20,21 @@
         ellps = Ellipsoid.hayford;
         // 7 parameters transformation: http://www.eye4software.com/resources/datum/4313/
-        datum = new SevenParameterDatum("Belgium Datum 72", null, Ellipsoid.hayford, -99.06, 53.32, -112.49, 0.419, -0.830, 1.885, -1);
+        datum = new SevenParameterDatum("Belgium Datum 72", null, ellps, -99.06, 53.32, -112.49, 0.419, -0.830, 1.885, -1);
         x_0 =  150000.013;
         y_0 = 5400088.438;
         lon_0 = convertDegreeMinuteSecond(4, 22, 2.952);
-        double lat_0 = 90.0;
-        double lat_1 = 49 + convertMinuteSecond(50, 0.00204);
-        double lat_2 = 51 + convertMinuteSecond(10, 0.00204);
         proj = new LambertConformalConic();
-        ((LambertConformalConic)proj).updateParameters2SP(ellps, lat_0, lat_1, lat_2);
+        try {
+            proj.initialize(new ProjParameters() {{
+                ellps = BelgianLambert1972.this.ellps;
+                lat_0 = 90.0;
+                lat_1 = 49 + convertMinuteSecond(50, 0.00204);
+                lat_2 = 51 + convertMinuteSecond(10, 0.00204);
+            }});
+        } catch (ProjectionConfigurationException e) {
+            throw new RuntimeException(e);
+        }
     }
-    
+
     @Override
     public String getCacheDirectoryName() {
@@ -46,5 +53,5 @@
         return 31370;
     }
-    
+
     @Override
     public String toString() {
Index: trunk/src/org/openstreetmap/josm/data/projection/BelgianLambert2008.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/projection/BelgianLambert2008.java	(revision 5063)
+++ trunk/src/org/openstreetmap/josm/data/projection/BelgianLambert2008.java	(revision 5066)
@@ -7,9 +7,10 @@
 import org.openstreetmap.josm.data.projection.datum.GRS80Datum;
 import org.openstreetmap.josm.data.projection.proj.LambertConformalConic;
+import org.openstreetmap.josm.data.projection.proj.ProjParameters;
 
 /**
  * Belgian Lambert 2008 projection as specified by the Belgian IGN
  * in this document: http://www.ngi.be/Common/Lambert2008/Transformation_Geographic_Lambert_FR.pdf
- * @author Don-vip 
+ * @author Don-vip
  *
  */
@@ -22,11 +23,17 @@
         y_0 = 665262.0;
         lon_0 = convertDegreeMinuteSecond(4, 21, 33.177);
-        double lat_0 = convertDegreeMinuteSecond(50, 47, 52.134);
-        double lat_1 = convertDegreeMinuteSecond(49, 50,  0);
-        double lat_2 = convertDegreeMinuteSecond(51, 10,  0);
         proj = new LambertConformalConic();
-        ((LambertConformalConic)proj).updateParameters2SP(ellps, lat_0, lat_1, lat_2);
+        try {
+            proj.initialize(new ProjParameters() {{
+                ellps = BelgianLambert2008.this.ellps;
+                lat_0 = convertDegreeMinuteSecond(50, 47, 52.134);
+                lat_1 = convertDegreeMinuteSecond(49, 50,  0);
+                lat_2 = convertDegreeMinuteSecond(51, 10,  0);
+            }});
+        } catch (ProjectionConfigurationException e) {
+            throw new RuntimeException(e);
+        }
     }
-    
+
     @Override
     public String getCacheDirectoryName() {
@@ -45,5 +52,5 @@
         return 3812;
     }
-    
+
     @Override
     public String toString() {
Index: trunk/src/org/openstreetmap/josm/data/projection/Epsg3008.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/projection/Epsg3008.java	(revision 5063)
+++ trunk/src/org/openstreetmap/josm/data/projection/Epsg3008.java	(revision 5066)
@@ -7,4 +7,5 @@
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.projection.datum.GRS80Datum;
+import org.openstreetmap.josm.data.projection.proj.ProjParameters;
 import org.openstreetmap.josm.data.projection.proj.TransverseMercator;
 
@@ -19,10 +20,15 @@
     public Epsg3008() {
         ellps = Ellipsoid.GRS80;
-        proj = new TransverseMercator(ellps);
+        proj = new org.openstreetmap.josm.data.projection.proj.TransverseMercator();
+        try {
+            proj.initialize(new ProjParameters() {{ ellps = Epsg3008.this.ellps; }});
+        } catch (ProjectionConfigurationException e) {
+            throw new RuntimeException(e);
+        }
         datum = GRS80Datum.INSTANCE;
         lon_0 = 13.5;
         x_0 = 150000;
     }
-    
+
     @Override
     public String toString() {
Index: trunk/src/org/openstreetmap/josm/data/projection/GaussKrueger.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/projection/GaussKrueger.java	(revision 5063)
+++ trunk/src/org/openstreetmap/josm/data/projection/GaussKrueger.java	(revision 5066)
@@ -17,4 +17,5 @@
 import org.openstreetmap.josm.data.Bounds;
 import org.openstreetmap.josm.data.coor.LatLon;
+import org.openstreetmap.josm.data.projection.proj.ProjParameters;
 import org.openstreetmap.josm.data.projection.proj.TransverseMercator;
 import org.openstreetmap.josm.tools.GBC;
@@ -64,5 +65,10 @@
         //        tr("Deutsches Hauptdreiecksnetz"), null, ellps,
         //        598.1, 73.7, 418.2, 0.202, 0.045, -2.455, 6.70);
-        proj = new TransverseMercator(ellps);
+        proj = new TransverseMercator();
+        try {
+            proj.initialize(new ProjParameters() {{ ellps = GaussKrueger.this.ellps; }});
+        } catch (ProjectionConfigurationException e) {
+            throw new RuntimeException(e);
+        }
         x_0 = 1000000 * zone + 500000;
         lon_0 = 3 * zone;
Index: trunk/src/org/openstreetmap/josm/data/projection/Lambert.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/projection/Lambert.java	(revision 5063)
+++ trunk/src/org/openstreetmap/josm/data/projection/Lambert.java	(revision 5066)
@@ -18,4 +18,5 @@
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.projection.proj.LambertConformalConic;
+import org.openstreetmap.josm.data.projection.proj.ProjParameters;
 import org.openstreetmap.josm.tools.GBC;
 import org.openstreetmap.josm.tools.ImageProvider;
@@ -96,6 +97,6 @@
         updateParameters(DEFAULT_ZONE);
     }
-    
-    private void updateParameters(int layoutZone) {
+
+    private void updateParameters(final int layoutZone) {
         this.layoutZone = layoutZone;
         ellps = Ellipsoid.clarke;
@@ -107,9 +108,18 @@
             proj = new LambertConformalConic();
         }
-        ((LambertConformalConic)proj).updateParametersDirect(
-                Ellipsoid.clarke, n[layoutZone], c[layoutZone] / ellps.a, y_fs[layoutZone] / ellps.a);
-    }
-
-    @Override 
+        proj = new LambertConformalConic();
+        try {
+            proj.initialize(new ProjParameters() {{
+                ellps = Lambert.this.ellps;
+                lcc_n = n[layoutZone];
+                lcc_F = c[layoutZone] / ellps.a;
+                lcc_r0 = y_fs[layoutZone] / ellps.a;
+            }});
+        } catch (ProjectionConfigurationException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    @Override
     public String toString() {
         return tr("Lambert 4 Zones (France)");
Index: trunk/src/org/openstreetmap/josm/data/projection/Lambert93.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/projection/Lambert93.java	(revision 5063)
+++ trunk/src/org/openstreetmap/josm/data/projection/Lambert93.java	(revision 5066)
@@ -7,9 +7,10 @@
 import org.openstreetmap.josm.data.projection.datum.GRS80Datum;
 import org.openstreetmap.josm.data.projection.proj.LambertConformalConic;
+import org.openstreetmap.josm.data.projection.proj.ProjParameters;
 
 /**
  * Lambert 93 projection as specified by the IGN
  * in this document http://professionnels.ign.fr/DISPLAY/000/526/702/5267026/NTG_87.pdf
- * @author Don-vip 
+ * @author Don-vip
  *
  */
@@ -22,11 +23,17 @@
         y_0 = 6600000;
         lon_0 = 3;
-        double lat_0 = 46.50;
-        double lat_1 = 44.00;
-        double lat_2 = 49.00;
         proj = new LambertConformalConic();
-        ((LambertConformalConic)proj).updateParameters2SP(ellps, lat_0, lat_1, lat_2);
+        try {
+            proj.initialize(new ProjParameters() {{
+                ellps = Lambert93.this.ellps;
+                lat_0 = 46.50;
+                lat_1 = 44.00;
+                lat_2 = 49.00;
+            }});
+        } catch (ProjectionConfigurationException e) {
+            throw new RuntimeException(e);
+        }
     }
-    
+
     @Override
     public String getCacheDirectoryName() {
@@ -45,5 +52,5 @@
         return 2154;
     }
-    
+
     @Override
     public String toString() {
Index: trunk/src/org/openstreetmap/josm/data/projection/LambertCC9Zones.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/projection/LambertCC9Zones.java	(revision 5063)
+++ trunk/src/org/openstreetmap/josm/data/projection/LambertCC9Zones.java	(revision 5066)
@@ -17,4 +17,5 @@
 import org.openstreetmap.josm.data.projection.datum.GRS80Datum;
 import org.openstreetmap.josm.data.projection.proj.LambertConformalConic;
+import org.openstreetmap.josm.data.projection.proj.ProjParameters;
 import org.openstreetmap.josm.tools.GBC;
 import org.openstreetmap.josm.tools.ImageProvider;
@@ -49,5 +50,5 @@
     }
 
-    public void updateParameters(int layoutZone) {
+    public void updateParameters(final int layoutZone) {
         ellps = Ellipsoid.GRS80;
         datum = GRS80Datum.INSTANCE;
@@ -56,11 +57,17 @@
         y_0 = (layoutZone+1) * 1000000 + 200000;
         lon_0 = 3;
-        double lat_0 = 42 + layoutZone;
-        double lat_1 = 41.25 + layoutZone;
-        double lat_2 = 42.75 + layoutZone;
         if (proj == null) {
             proj = new LambertConformalConic();
         }
-        ((LambertConformalConic)proj).updateParameters2SP(ellps, lat_0, lat_1, lat_2);
+        try {
+            proj.initialize(new ProjParameters() {{
+                ellps = LambertCC9Zones.this.ellps;
+                lat_0 = 42.0 + layoutZone;
+                lat_1 = 41.25 + layoutZone;
+                lat_2 = 42.75 + layoutZone;
+            }});
+        } catch (ProjectionConfigurationException e) {
+            throw new RuntimeException(e);
+        }
     }
 
Index: trunk/src/org/openstreetmap/josm/data/projection/LambertEST.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/projection/LambertEST.java	(revision 5063)
+++ trunk/src/org/openstreetmap/josm/data/projection/LambertEST.java	(revision 5066)
@@ -8,8 +8,9 @@
 import org.openstreetmap.josm.data.projection.datum.GRS80Datum;
 import org.openstreetmap.josm.data.projection.proj.LambertConformalConic;
+import org.openstreetmap.josm.data.projection.proj.ProjParameters;
 
 /**
  * Estonian Coordinate System of 1997.
- * 
+ *
  * Thanks to Johan Montagnat and its geoconv java converter application
  * (http://www.i3s.unice.fr/~johan/gps/ , published under GPL license)
@@ -22,11 +23,17 @@
         datum = GRS80Datum.INSTANCE;
         lon_0 = 24;
-        double lat_0 = 57.517553930555555555555555555556;
-        double lat_1 = 59 + 1.0/3.0;
-        double lat_2 = 58;
         x_0 = 500000;
         y_0 = 6375000;
         proj = new LambertConformalConic();
-        ((LambertConformalConic) proj).updateParameters2SP(ellps, lat_0, lat_1, lat_2);
+        try {
+            proj.initialize(new ProjParameters() {{
+                ellps = LambertEST.this.ellps;
+                lat_0 = 57.517553930555555555555555555556;
+                lat_1 = 59.0 + 1.0/3.0;
+                lat_2 = 58.0;
+            }});
+        } catch (ProjectionConfigurationException e) {
+            throw new RuntimeException(e);
+        }
     }
 
Index: trunk/src/org/openstreetmap/josm/data/projection/Mercator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/projection/Mercator.java	(revision 5063)
+++ trunk/src/org/openstreetmap/josm/data/projection/Mercator.java	(revision 5066)
@@ -7,4 +7,5 @@
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.projection.datum.WGS84Datum;
+import org.openstreetmap.josm.data.projection.proj.ProjParameters;
 
 /**
@@ -25,7 +26,12 @@
         datum = WGS84Datum.INSTANCE;
         proj = new org.openstreetmap.josm.data.projection.proj.Mercator();
+        try {
+            proj.initialize(new ProjParameters());
+        } catch (ProjectionConfigurationException e) {
+            throw new RuntimeException(e);
+        }
     }
 
-    @Override 
+    @Override
     public String toString() {
         return tr("Mercator");
@@ -34,5 +40,5 @@
     @Override
     public Integer getEpsgCode() {
-        /* initially they used 3785 but that has been superseded, 
+        /* initially they used 3785 but that has been superseded,
          * see http://www.epsg-registry.org/ */
         return 3857;
Index: trunk/src/org/openstreetmap/josm/data/projection/ProjectionConfigurationException.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/projection/ProjectionConfigurationException.java	(revision 5066)
+++ trunk/src/org/openstreetmap/josm/data/projection/ProjectionConfigurationException.java	(revision 5066)
@@ -0,0 +1,22 @@
+//License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.data.projection;
+
+public class ProjectionConfigurationException extends Exception {
+
+    public ProjectionConfigurationException() {
+        super();
+    }
+
+    public ProjectionConfigurationException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public ProjectionConfigurationException(String message) {
+        super(message);
+    }
+
+    public ProjectionConfigurationException(Throwable cause) {
+        super(cause);
+    }
+
+}
Index: trunk/src/org/openstreetmap/josm/data/projection/Puwg.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/projection/Puwg.java	(revision 5063)
+++ trunk/src/org/openstreetmap/josm/data/projection/Puwg.java	(revision 5066)
@@ -17,4 +17,5 @@
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.projection.datum.GRS80Datum;
+import org.openstreetmap.josm.data.projection.proj.ProjParameters;
 import org.openstreetmap.josm.tools.GBC;
 
@@ -26,7 +27,7 @@
  */
 public class Puwg extends AbstractProjection implements ProjectionSubPrefs {
-    
+
     public static final int DEFAULT_ZONE = 0;
-    
+
     private int zone;
 
@@ -45,9 +46,14 @@
     public Puwg(int zone) {
         ellps = Ellipsoid.GRS80;
-        proj = new org.openstreetmap.josm.data.projection.proj.TransverseMercator(ellps);
+        proj = new org.openstreetmap.josm.data.projection.proj.TransverseMercator();
+        try {
+            proj.initialize(new ProjParameters() {{ ellps = Puwg.this.ellps; }});
+        } catch (ProjectionConfigurationException e) {
+            throw new RuntimeException(e);
+        }
         datum = GRS80Datum.INSTANCE;
         updateParameters(zone);
     }
-    
+
     public void updateParameters(int zone) {
         this.zone = zone;
@@ -59,5 +65,5 @@
     }
 
-    @Override 
+    @Override
     public String toString() {
         return tr("PUWG (Poland)");
@@ -176,5 +182,5 @@
         return 2180;
     }
-    
+
     @Override
     public String toCode() {
Index: trunk/src/org/openstreetmap/josm/data/projection/SwissGrid.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/projection/SwissGrid.java	(revision 5063)
+++ trunk/src/org/openstreetmap/josm/data/projection/SwissGrid.java	(revision 5066)
@@ -14,4 +14,5 @@
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.projection.datum.ThreeParameterDatum;
+import org.openstreetmap.josm.data.projection.proj.ProjParameters;
 import org.openstreetmap.josm.data.projection.proj.SwissObliqueMercator;
 import org.openstreetmap.josm.gui.widgets.HtmlPanel;
@@ -20,5 +21,5 @@
 /**
  * SwissGrid CH1903 / L03, see http://de.wikipedia.org/wiki/Swiss_Grid.
- * 
+ *
  * Actually, what we have here, is CH1903+ (EPSG:2056), but without
  * the additional false easting of 2000km and false northing 1000 km.
@@ -26,5 +27,5 @@
  * To get to CH1903, a shift file is required. So currently, there are errors
  * up to 1.6m (depending on the location).
- * 
+ *
  * This projection does not have any parameters, it only implements
  * ProjectionSubPrefs to show a warning that the grid file correction is not done.
@@ -38,6 +39,13 @@
         y_0 = 200000;
         lon_0 = 7.0 + 26.0/60 + 22.50/3600;
-        double lat_0 = 46.0 + 57.0/60 + 8.66/3600;
-        proj = new SwissObliqueMercator(ellps, lat_0);
+        proj = new SwissObliqueMercator();
+        try {
+            proj.initialize(new ProjParameters() {{
+                ellps = SwissGrid.this.ellps;
+                lat_0 = 46.0 + 57.0/60 + 8.66/3600;
+            }});
+        } catch (ProjectionConfigurationException e) {
+            throw new RuntimeException(e);
+        }
     }
 
Index: trunk/src/org/openstreetmap/josm/data/projection/TransverseMercatorLV.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/projection/TransverseMercatorLV.java	(revision 5063)
+++ trunk/src/org/openstreetmap/josm/data/projection/TransverseMercatorLV.java	(revision 5066)
@@ -7,4 +7,5 @@
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.projection.datum.GRS80Datum;
+import org.openstreetmap.josm.data.projection.proj.ProjParameters;
 
 /**
@@ -18,5 +19,10 @@
     public TransverseMercatorLV() {
         ellps = Ellipsoid.GRS80;
-        proj = new org.openstreetmap.josm.data.projection.proj.TransverseMercator(ellps);
+        proj = new org.openstreetmap.josm.data.projection.proj.TransverseMercator();
+        try {
+            proj.initialize(new ProjParameters() {{ ellps = TransverseMercatorLV.this.ellps; }});
+        } catch (ProjectionConfigurationException e) {
+            throw new RuntimeException(e);
+        }
         datum = GRS80Datum.INSTANCE;
         lon_0 = 24;
@@ -25,6 +31,6 @@
         k_0 = 0.9996;
     }
-    
-    @Override 
+
+    @Override
     public String toString() {
         return tr("LKS-92 (Latvia TM)");
Index: trunk/src/org/openstreetmap/josm/data/projection/UTM.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/projection/UTM.java	(revision 5063)
+++ trunk/src/org/openstreetmap/josm/data/projection/UTM.java	(revision 5066)
@@ -20,4 +20,5 @@
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.projection.datum.GRS80Datum;
+import org.openstreetmap.josm.data.projection.proj.ProjParameters;
 import org.openstreetmap.josm.tools.GBC;
 
@@ -48,5 +49,10 @@
     public UTM(int zone, Hemisphere hemisphere, boolean offset) {
         ellps = Ellipsoid.GRS80;
-        proj = new org.openstreetmap.josm.data.projection.proj.TransverseMercator(ellps);
+        proj = new org.openstreetmap.josm.data.projection.proj.TransverseMercator();
+        try {
+            proj.initialize(new ProjParameters() {{ ellps = UTM.this.ellps; }});
+        } catch (ProjectionConfigurationException e) {
+            throw new RuntimeException(e);
+        }
         datum = GRS80Datum.INSTANCE;
         updateParameters(zone, hemisphere, offset);
Index: trunk/src/org/openstreetmap/josm/data/projection/UTM_France_DOM.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/projection/UTM_France_DOM.java	(revision 5063)
+++ trunk/src/org/openstreetmap/josm/data/projection/UTM_France_DOM.java	(revision 5066)
@@ -19,4 +19,5 @@
 import org.openstreetmap.josm.data.projection.datum.SevenParameterDatum;
 import org.openstreetmap.josm.data.projection.datum.ThreeParameterDatum;
+import org.openstreetmap.josm.data.projection.proj.ProjParameters;
 import org.openstreetmap.josm.tools.GBC;
 
@@ -24,5 +25,5 @@
  * This class implements all projections for French departements in the Caribbean Sea and
  * Indian Ocean using the UTM transvers Mercator projection and specific geodesic settings (7 parameters transformation algorithm).
- * 
+ *
  */
 public class UTM_France_DOM extends AbstractProjection implements ProjectionSubPrefs {
@@ -75,10 +76,15 @@
         updateParameters(DEFAULT_GEODESIC);
     }
-    
+
     public void updateParameters(int currentGeodesic) {
         this.currentGeodesic = currentGeodesic;
         datum = utmDatums[currentGeodesic];
         ellps = datum.getEllipsoid();
-        proj = new org.openstreetmap.josm.data.projection.proj.TransverseMercator(ellps);
+        proj = new org.openstreetmap.josm.data.projection.proj.TransverseMercator();
+        try {
+            proj.initialize(new ProjParameters() {{ ellps = UTM_France_DOM.this.ellps; }});
+        } catch (ProjectionConfigurationException e) {
+            throw new RuntimeException(e);
+        }
         isNorth = currentGeodesic != 3;
         zone = utmZones[currentGeodesic];
@@ -88,10 +94,10 @@
         k_0 = 0.9996;
     }
-    
+
     public int getCurrentGeodesic() {
         return currentGeodesic;
     }
 
-    @Override 
+    @Override
     public String toString() {
         return tr("UTM France (DOM)");
Index: trunk/src/org/openstreetmap/josm/data/projection/proj/LambertConformalConic.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/projection/proj/LambertConformalConic.java	(revision 5063)
+++ trunk/src/org/openstreetmap/josm/data/projection/proj/LambertConformalConic.java	(revision 5066)
@@ -7,4 +7,5 @@
 
 import org.openstreetmap.josm.data.projection.Ellipsoid;
+import org.openstreetmap.josm.data.projection.ProjectionConfigurationException;
 
 /**
@@ -14,8 +15,8 @@
  */
 public class LambertConformalConic implements Proj {
-    
+
     protected Ellipsoid ellps;
     protected double e;
-    
+
     public static abstract class Parameters {
         public final double latitudeOrigin;
@@ -24,5 +25,5 @@
         }
     };
-    
+
     public static class Parameters1SP extends Parameters {
         public Parameters1SP(double latitudeOrigin) {
@@ -42,5 +43,5 @@
 
     private Parameters params;
-    
+
     /**
      * projection exponent
@@ -52,9 +53,9 @@
     protected double F;
     /**
-     * radius of the parallel of latitude of the false origin (2SP) or at 
+     * radius of the parallel of latitude of the false origin (2SP) or at
      * natural origin (1SP)
      */
-    protected double r0; 
-    
+    protected double r0;
+
     /**
      * precision in iterative schema
@@ -62,51 +63,55 @@
     protected static final double epsilon = 1e-12;
 
-    /**
-     * Constructor.
-     * Call one of the updateParameters... methods for initialization.
-     */
-    public LambertConformalConic() {
+    @Override
+    public void initialize(ProjParameters params) throws ProjectionConfigurationException {
+        ellps = params.ellps;
+        e = ellps.e;
+        if (params.lcc_n != null && params.lcc_F != null && params.lcc_r0 != null) {
+            initializeDirect(params.lcc_n, params.lcc_F, params.lcc_r0);
+        } else {
+            if (params.lat_0 == null)
+                throw new ProjectionConfigurationException(tr("Parameter ''{0}'' required.", "lat_0"));
+            if (params.lat_1 != null && params.lat_2 != null) {
+                initialize2SP(params.lat_0, params.lat_1, params.lat_2);
+            } else {
+                initialize1SP(params.lat_0);
+            }
+        }
     }
 
     /**
      * Initialize for LCC with 2 standard parallels.
-     * 
-     * @param ellps the ellipsoid
+     *
      * @param lat_0 latitude of false origin (in degrees)
      * @param lat_1 latitude of first standard parallel (in degrees)
      * @param lat_2 latitude of second standard parallel (in degrees)
      */
-    public void updateParameters2SP(Ellipsoid ellps, double lat_0, double lat_1, double lat_2) {
+    private void initialize2SP(double lat_0, double lat_1, double lat_2) {
         this.params = new Parameters2SP(lat_0, lat_1, lat_2);
-        this.ellps = ellps;
-        this.e = ellps.e;
-        
+
         final double m1 = m(toRadians(lat_1));
         final double m2 = m(toRadians(lat_2));
-        
+
         final double t1 = t(toRadians(lat_1));
         final double t2 = t(toRadians(lat_2));
         final double tf = t(toRadians(lat_0));
-        
+
         n  = (log(m1) - log(m2)) / (log(t1) - log(t2));
         F  = m1 / (n * pow(t1, n));
         r0 = F * pow(tf, n);
     }
-    
+
     /**
      * Initialize for LCC with 1 standard parallel.
-     * 
-     * @param ellps the ellipsoid
+     *
      * @param lat_0 latitude of natural origin (in degrees)
      */
-    public void updateParameters1SP(Ellipsoid ellps, double lat_0) {
+    private void initialize1SP(double lat_0) {
         this.params = new Parameters1SP(lat_0);
-        this.ellps = ellps;
-        this.e = ellps.e;
         final double lat_0_rad = toRadians(lat_0);
-        
+
         final double m0 = m(lat_0_rad);
         final double t0 = t(lat_0_rad);
-        
+
         n = sin(lat_0_rad);
         F  = m0 / (n * pow(t0, n));
@@ -116,14 +121,11 @@
     /**
      * Initialize LCC by providing the projection parameters directly.
-     * 
-     * @param ellps the ellipsoid
+     *
      * @param n see field n
      * @param F see field F
      * @param r0 see field r0
      */
-    public void updateParametersDirect(Ellipsoid ellps, double n, double F, double r0) {
+    private void initializeDirect(double n, double F, double r0) {
         this.params = null;
-        this.ellps = ellps;
-        this.e = ellps.e;
         this.n = n;
         this.F = F;
@@ -145,5 +147,5 @@
         return cos(lat_rad) / (sqrt(1 - e * e * pow(sin(lat_rad), 2)));
     }
-    
+
     @Override
     public String getName() {
@@ -166,5 +168,5 @@
         return new double[] { X, Y };
     }
-    
+
     @Override
     public double[] invproject(double east, double north) {
@@ -176,5 +178,5 @@
         return new double[] { phi, lambda };
     }
-    
+
     public final Parameters getParameters() {
         return params;
Index: trunk/src/org/openstreetmap/josm/data/projection/proj/Mercator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/projection/proj/Mercator.java	(revision 5063)
+++ trunk/src/org/openstreetmap/josm/data/projection/proj/Mercator.java	(revision 5066)
@@ -6,9 +6,11 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
+import org.openstreetmap.josm.data.projection.ProjectionConfigurationException;
+
 /**
  * Mercator Projection.
  */
 public class Mercator implements Proj {
-    
+
     @Override
     public String getName() {
@@ -19,4 +21,8 @@
     public String getProj4Id() {
         return "merc";
+    }
+
+    @Override
+    public void initialize(ProjParameters params) throws ProjectionConfigurationException {
     }
 
Index: trunk/src/org/openstreetmap/josm/data/projection/proj/Proj.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/projection/proj/Proj.java	(revision 5063)
+++ trunk/src/org/openstreetmap/josm/data/projection/proj/Proj.java	(revision 5066)
@@ -2,19 +2,21 @@
 package org.openstreetmap.josm.data.projection.proj;
 
+import org.openstreetmap.josm.data.projection.ProjectionConfigurationException;
+
 /**
  * A projection (in the narrow sense).
- * 
+ *
  * Converts lat/lon the east/north and the other way around.
- * 
- * Datum conversion, false easting / northing, origin of longitude 
+ *
+ * Datum conversion, false easting / northing, origin of longitude
  * and general scale factor is already applied when the projection is invoked.
- * 
+ *
  * Lat/lon is not in degrees, but in radians (unlike other parts of JOSM).
- * Additional parameters in the constructor arguments are usually still in 
- * degrees. So to avoid confusion, you can follow the convention, that 
+ * Additional parameters in the constructor arguments are usually still in
+ * degrees. So to avoid confusion, you can follow the convention, that
  * coordinates in radians are called lat_rad/lon_rad or phi/lambda.
- * 
- * East/north values are not in meters, but in meters divided by the semi major 
- * axis of the ellipsoid (earth radius). (Usually this is what you get anyway, 
+ *
+ * East/north values are not in meters, but in meters divided by the semi major
+ * axis of the ellipsoid (earth radius). (Usually this is what you get anyway,
  * unless you multiply by 'a' somehow implicitly or explicitly.)
  *
@@ -28,13 +30,20 @@
     /**
      * The Proj.4 identifier.
-     * 
+     *
      * (as reported by cs2cs -lp)
      * If no id exists, return null.
      */
     String getProj4Id();
-    
+
+    /**
+     * Initialize the projection using the provided parameters.
+     *
+     * @throws ProjectionConfigurationException in case parameters are not suitable
+     */
+    void initialize(ProjParameters params) throws ProjectionConfigurationException;
+
     /**
      * Convert lat/lon to east/north.
-     * 
+     *
      * @param lat_rad the latitude in radians
      * @param lon_rad the longitude in radians
@@ -43,8 +52,8 @@
      */
     double[] project(double lat_rad, double lon_rad);
-    
+
     /**
      * Convert east/north to lat/lon.
-     * 
+     *
      * @param east east value in meters, divided by the semi major axis of the ellipsoid
      * @param north north value in meters, divided by the semi major axis of the ellipsoid
@@ -52,3 +61,4 @@
      */
     double[] invproject(double east, double north);
+
 }
Index: trunk/src/org/openstreetmap/josm/data/projection/proj/ProjParameters.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/projection/proj/ProjParameters.java	(revision 5066)
+++ trunk/src/org/openstreetmap/josm/data/projection/proj/ProjParameters.java	(revision 5066)
@@ -0,0 +1,22 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.data.projection.proj;
+
+import org.openstreetmap.josm.data.projection.Ellipsoid;
+
+/**
+ * Parameters to initialize a Proj object.
+ */
+public class ProjParameters {
+
+    public Ellipsoid ellps;
+
+    public Double lat_0;
+    public Double lat_1;
+    public Double lat_2;
+
+    /* for LambertConformalConic */
+    public Double lcc_n;
+    public Double lcc_F;
+    public Double lcc_r0;
+
+}
Index: trunk/src/org/openstreetmap/josm/data/projection/proj/SwissObliqueMercator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/projection/proj/SwissObliqueMercator.java	(revision 5063)
+++ trunk/src/org/openstreetmap/josm/data/projection/proj/SwissObliqueMercator.java	(revision 5066)
@@ -7,4 +7,5 @@
 
 import org.openstreetmap.josm.data.projection.Ellipsoid;
+import org.openstreetmap.josm.data.projection.ProjectionConfigurationException;
 
 /**
@@ -19,18 +20,21 @@
 public class SwissObliqueMercator implements Proj {
 
-    private final Ellipsoid ellps;
+    private Ellipsoid ellps;
     private double kR;
     private double alpha;
     private double b0;
     private double K;
-    
+
     private static final double EPSILON = 1e-11;
-    
-    public SwissObliqueMercator(Ellipsoid ellps, double lat_0) {
-        this.ellps = ellps;
-        updateParameters(lat_0);
+
+    @Override
+    public void initialize(ProjParameters params) throws ProjectionConfigurationException {
+        if (params.lat_0 == null)
+            throw new ProjectionConfigurationException(tr("Parameter ''{0}'' required.", "lat_0"));
+        ellps = params.ellps;
+        initialize(params.lat_0);
     }
 
-    public void updateParameters(double lat_0) {
+    private void initialize(double lat_0) {
         double phi0 = toRadians(lat_0);
         kR = sqrt(1 - ellps.e2) / (1 - (ellps.e2 * pow(sin(phi0), 2)));
@@ -41,5 +45,5 @@
             * log((1 + ellps.e * sin(phi0)) / (1 - ellps.e * sin(phi0)));
     }
-    
+
     @Override
     public String getName() {
@@ -94,4 +98,4 @@
         return new double[] { phi, lambda };
     }
-    
+
 }
Index: trunk/src/org/openstreetmap/josm/data/projection/proj/TransverseMercator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/projection/proj/TransverseMercator.java	(revision 5063)
+++ trunk/src/org/openstreetmap/josm/data/projection/proj/TransverseMercator.java	(revision 5066)
@@ -7,4 +7,5 @@
 
 import org.openstreetmap.josm.data.projection.Ellipsoid;
+import org.openstreetmap.josm.data.projection.ProjectionConfigurationException;
 
 /**
@@ -13,5 +14,5 @@
  * @author Dirk Stöcker
  * code based on JavaScript from Chuck Taylor
- * 
+ *
  */
 public class TransverseMercator implements Proj {
@@ -19,9 +20,4 @@
     protected double a, b;
 
-    public TransverseMercator(Ellipsoid ellps) {
-        this.a = ellps.a;
-        this.b = ellps.b;
-    }
-    
     @Override
     public String getName() {
@@ -32,4 +28,10 @@
     public String getProj4Id() {
         return "tmerc";
+    }
+
+    @Override
+    public void initialize(ProjParameters params) throws ProjectionConfigurationException {
+        this.a = params.ellps.a;
+        this.b = params.ellps.b;
     }
 
@@ -41,5 +43,5 @@
      * Reference: Hoffmann-Wellenhof, B., Lichtenegger, H., and Collins, J.,
      * GPS: Theory and Practice, 3rd ed.  New York: Springer-Verlag Wien, 1994.
-     * 
+     *
      * @param phi Latitude of the point, in radians
      * @param lambda Longitude of the point, in radians
@@ -49,5 +51,5 @@
     @Override
     public double[] project(double phi, double lambda) {
-        
+
         /* Precalculate ep2 */
         double ep2 = (pow(a, 2.0) - pow(b, 2.0)) / pow(b, 2.0);
@@ -105,5 +107,5 @@
      * Reference: Hoffmann-Wellenhof, B., Lichtenegger, H., and Collins, J.,
      *   GPS: Theory and Practice, 3rd ed.  New York: Springer-Verlag Wien, 1994.
-     * 
+     *
      * Remarks:
      *   The local variables Nf, nuf2, tf, and tf2 serve the same purpose as
@@ -113,5 +115,5 @@
      *   x1frac, x2frac, x2poly, x3poly, etc. are to enhance readability and
      *   to optimize computations.
-     * 
+     *
      * @param x The easting of the point, in meters, divided by the semi major axis of the ellipsoid
      * @param y The northing of the point, in meters, divided by the semi major axis of the ellipsoid
@@ -190,5 +192,5 @@
                         + x7frac * x7poly * pow(x, 7.0) };
     }
-    
+
     /**
      * ArcLengthOfMeridian
@@ -199,5 +201,5 @@
      * Reference: Hoffmann-Wellenhof, B., Lichtenegger, H., and Collins, J.,
      * GPS: Theory and Practice, 3rd ed.  New York: Springer-Verlag Wien, 1994.
-     * 
+     *
      * @param phi Latitude of the point, in radians
      * @return The ellipsoidal distance of the point from the equator
@@ -234,5 +236,5 @@
                     + (epsilon * sin(8.0 * phi)));
     }
-        
+
     /**
      * FootpointLatitude
@@ -243,5 +245,5 @@
      * Reference: Hoffmann-Wellenhof, B., Lichtenegger, H., and Collins, J.,
      *   GPS: Theory and Practice, 3rd ed.  New York: Springer-Verlag Wien, 1994.
-     * 
+     *
      * @param y northing coordinate, in meters, divided by the semi major axis of the ellipsoid
      * @return The footpoint latitude, in radians
@@ -280,4 +282,4 @@
             + (epsilon_ * sin(8.0 * y_));
     }
-    
+
 }
