Index: trunk/src/org/openstreetmap/josm/data/projection/proj/TransverseMercator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/projection/proj/TransverseMercator.java	(revision 11546)
+++ trunk/src/org/openstreetmap/josm/data/projection/proj/TransverseMercator.java	(revision 11549)
@@ -47,5 +47,8 @@
  * at the time of migration.
  * <p>
- *
+ * The non-standard parameter <code>gamma</code> has been added as a method
+ * to rotate the projected coordinates by a certain angle (clockwise, see
+ * {@link ObliqueMercator}).
+ * <p>
  * <b>References:</b>
  * <ul>
@@ -107,4 +110,14 @@
     private double ml0;
 
+    /**
+     * The rectified bearing of the central line, in radians.
+     */
+    protected double rectifiedGridAngle;
+
+    /**
+     * Sine and Cosine values for the coordinate system rotation angle
+     */
+    private double sinrot, cosrot;
+
     @Override
     public String getName() {
@@ -125,4 +138,13 @@
         latitudeOfOrigin = params.lat0 == null ? 0 : Math.toRadians(params.lat0);
         ml0 = mlfn(latitudeOfOrigin, Math.sin(latitudeOfOrigin), Math.cos(latitudeOfOrigin));
+
+        if (params.gamma != null) {
+                rectifiedGridAngle = Math.toRadians(params.gamma);
+        } else {
+                rectifiedGridAngle = 0.0;
+        }
+        sinrot = Math.sin(rectifiedGridAngle);
+        cosrot = Math.cos(rectifiedGridAngle);
+
     }
 
@@ -131,4 +153,5 @@
         double sinphi = Math.sin(y);
         double cosphi = Math.cos(y);
+        double u, v;
 
         double t = (Math.abs(cosphi) > EPSILON) ? sinphi/cosphi : 0;
@@ -151,4 +174,8 @@
             FC7 * als * (61.0+ t*(t*(179.0 - t) - 479.0)))));
 
+        u=y; v=x;
+        x = v * cosrot + u * sinrot;
+        y = u * cosrot - v * sinrot;
+
         return new double[] {x, y};
     }
@@ -156,4 +183,8 @@
     @Override
     public double[] invproject(double x, double y) {
+        double v = x * cosrot - y * sinrot;
+        double u = y * cosrot + x * sinrot;
+        x=v; y=u;
+
         double phi = invMlfn(ml0 + y);
 
