Index: trunk/CONTRIBUTION
===================================================================
--- trunk/CONTRIBUTION	(revision 11659)
+++ trunk/CONTRIBUTION	(revision 11660)
@@ -71,4 +71,13 @@
 with the New (2-clause) BSD license.
 
+------------------------------- PROJECTION DATA -------------------------------
+
+French NTF_R93 NTV2 grid: Source: IGN - Institut national de l'information
+                                        géographique et forestière
+
+German BETA2007 NTV2 grid: Source: BKG - Bundesamt für Kartographie und Geodäsie
+
+Swiss CHENYX06 NTV2 grid: Source: Swiss Federal Office of Topography
+
 ------------------------------------ ICONS ------------------------------------
 
Index: trunk/README
===================================================================
--- trunk/README	(revision 11659)
+++ trunk/README	(revision 11660)
@@ -61,5 +61,4 @@
     - fonts/                font files used for map rendering
     - projection/           projection files
-      - *.gsb               NTv2 grid files for projection support
       - epsg                list of projection definitions
     - *.lang                translation data
@@ -78,4 +77,6 @@
     - Join_Areas_Tests.osm  some examples to test the 'join areas' feature
     - mapcss/               sample map styles and corresponding data files for regression testing
+    - projection/           projection files
+      - *.gsb               NTv2 grid files for projection support (see CONTRIBUTION)
     - projection-reference-data.csv
                             reference data for projection tests
Index: trunk/data_nodist/projection/josm-epsg
===================================================================
--- trunk/data_nodist/projection/josm-epsg	(revision 11659)
+++ trunk/data_nodist/projection/josm-epsg	(revision 11660)
@@ -78,5 +78,5 @@
 <4326> +proj=lonlat +datum=WGS84 +axis=neu +bounds=-180,-90,180,90  <>
 # Swiss Grid (Switzerland)
-<21781> +proj=somerc +lat_0=46d57'8.66" +lon_0=7d26'22.5" +x_0=600000 +y_0=200000 +ellps=bessel +towgs84=674.374,15.056,405.346 +units=m +bounds=5.7,45.7,10.6,47.9  <>
+<21781> +proj=somerc +lat_0=46d57'8.66" +lon_0=7d26'22.5" +x_0=600000 +y_0=200000 +ellps=bessel +nadgrids=CHENYX06_etrs.gsb +towgs84=674.374,15.056,405.346 +units=m +bounds=5.7,45.7,10.6,47.9  <>
 # HD72 / EOV (Hungary)
 <23700> +proj=somerc +lat_0=47.14439372222222 +lon_0=19.04857177777778 +k_0=0.99993 +x_0=650000 +y_0=200000 +ellps=GRS67 +towgs84=52.17,-71.82,-14.9 +units=m +bounds=16.1200,45.7800,22.9100,48.6000  <>
Index: trunk/data_nodist/projection/projection-regression-test-data
===================================================================
--- trunk/data_nodist/projection/projection-regression-test-data	(revision 11659)
+++ trunk/data_nodist/projection/projection-regression-test-data	(revision 11660)
@@ -995,6 +995,6 @@
 EPSG:21781
   ll  46.582471410091934 8.159223152110604
-  en  655231.0208778976 159275.39184032555
-  ll2 46.58247142005926 8.159223160343661
+  en  655230.9360561728 159275.55116362066
+  ll2 46.582471410091884 8.159223152110604
 EPSG:21782
   ll  34.74535187788922 167.90219295117086
Index: trunk/src/org/openstreetmap/josm/data/projection/proj/SwissObliqueMercator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/projection/proj/SwissObliqueMercator.java	(revision 11659)
+++ trunk/src/org/openstreetmap/josm/data/projection/proj/SwissObliqueMercator.java	(revision 11660)
@@ -109,5 +109,5 @@
         while (abs(phi - prevPhi) > EPSILON) {
             if (++iteration > 30)
-                throw new JosmRuntimeException("Two many iterations");
+                throw new JosmRuntimeException("Too many iterations");
             prevPhi = phi;
             double s = 1 / alpha * (log(tan(PI / 4 + b / 2)) - k) + ellps.e
Index: trunk/test/unit/org/openstreetmap/josm/data/projection/SwissGridTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/projection/SwissGridTest.java	(revision 11659)
+++ trunk/test/unit/org/openstreetmap/josm/data/projection/SwissGridTest.java	(revision 11660)
@@ -6,9 +6,12 @@
 
 import org.junit.BeforeClass;
-import org.junit.Ignore;
+import org.junit.Rule;
 import org.junit.Test;
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.coor.EastNorth;
 import org.openstreetmap.josm.data.coor.LatLon;
+import org.openstreetmap.josm.testutils.JOSMTestRules;
+
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 public class SwissGridTest {
@@ -19,4 +22,11 @@
      * Setup test.
      */
+    @Rule
+    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
+    public JOSMTestRules test = new JOSMTestRules().platform();
+
+    /**
+     * Setup test.
+     */
     @BeforeClass
     public static void setUp() {
@@ -28,5 +38,5 @@
 
     /**
-     * source: http://www.swisstopo.admin.ch/internet/swisstopo/en/home/topics/survey/sys/refsys/switzerland.parsysrelated1.37696.downloadList.97912.DownloadFile.tmp/swissprojectionen.pdf
+     * source: https://www.swisstopo.admin.ch/content/swisstopo-internet/en/topics/survey/reference-systems/projections/_jcr_content/contentPar/tabs/items/dokumente_publikatio/tabPar/downloadlist/downloadItems/463_1459341821844.download/refsyse.pdf
      */
     ProjData[] data = {
@@ -56,5 +66,4 @@
     }
 
-    private static final double EPSILON_APPROX = 1.5;
     private static final double EPSILON_ACCURATE = 0.05;
 
@@ -72,12 +81,5 @@
 
     @Test
-    public void testProjReferenceTestApprox() {
-        projReferenceTest(EPSILON_APPROX);
-    }
-
-    @Test
-    @Ignore("high accuracy of epsilon=" + EPSILON_ACCURATE + " is not met")
     public void testProjReferenceTestAccurate() {
-        // TODO make this test pass
         projReferenceTest(EPSILON_ACCURATE);
     }
@@ -90,6 +92,6 @@
             System.out.println(en);
         }
-        assertTrue("Lausanne", Math.abs(en.east() - 533111.69) < 0.1);
-        assertTrue("Lausanne", Math.abs(en.north() - 152227.85) < 0.1);
+        assertTrue("Lausanne", Math.abs(en.east() - 533112.13) < 0.1);
+        assertTrue("Lausanne", Math.abs(en.north() - 152227.35) < 0.1);
 
         ll = new LatLon(47.78, 8.58);
@@ -98,6 +100,6 @@
             System.out.println(en);
         }
-        assertTrue("Schafouse", Math.abs(en.east() - 685544.16) < 0.1);
-        assertTrue("Schafouse", Math.abs(en.north() - 292782.91) < 0.1);
+        assertTrue("Schafouse", Math.abs(en.east() - 685542.97) < 0.1);
+        assertTrue("Schafouse", Math.abs(en.north() - 292783.21) < 0.1);
 
         ll = new LatLon(46.58, 10.48);
@@ -106,6 +108,6 @@
             System.out.println(en);
         }
-        assertTrue("Grinson", Math.abs(en.east() - 833068.04) < 0.1);
-        assertTrue("Grinson", Math.abs(en.north() - 163265.39) < 0.1);
+        assertTrue("Grinson", Math.abs(en.east() - 833066.95) < 0.1);
+        assertTrue("Grinson", Math.abs(en.north() - 163265.32) < 0.1);
 
         ll = new LatLon(46.0 + 57.0 / 60 + 3.89813884505 / 3600, 7.0 + 26.0 / 60 + 19.076595154147 / 3600);
@@ -117,5 +119,6 @@
         assertTrue("Berne", Math.abs(en.north() - 200000.0) < 0.1);
 
-        ll = new LatLon(46.0 + 2.0 / 60 + 38.87 / 3600, 8.0 + 43.0 / 60 + 49.79 / 3600);
+        // http://geodesy.geo.admin.ch/reframe/lv03towgs84?easting=700000&northing=100000
+        ll = new LatLon(46.04412093223244, 8.730497366167727);
         en = Main.getProjection().latlon2eastNorth(ll);
         if (debug) {
@@ -128,5 +131,5 @@
     @Test
     public void testBeastNorth2latlon() {
-        EastNorth en = new EastNorth(533111.69, 152227.85);
+        EastNorth en = new EastNorth(533112.13, 152227.35);
         LatLon ll = Main.getProjection().eastNorth2latlon(en);
         if (debug) {
@@ -136,5 +139,5 @@
         assertTrue("Lausanne", Math.abs(ll.lon() - 6.567) < 0.00001);
 
-        en = new EastNorth(685544.16, 292782.91);
+        en = new EastNorth(685542.97, 292783.21);
         ll = Main.getProjection().eastNorth2latlon(en);
         if (debug) {
@@ -144,5 +147,5 @@
         assertTrue("Schafouse", Math.abs(ll.lon() - 8.58) < 0.00001);
 
-        en = new EastNorth(833068.04, 163265.39);
+        en = new EastNorth(833066.95, 163265.32);
         ll = Main.getProjection().eastNorth2latlon(en);
         if (debug) {
@@ -160,4 +163,5 @@
         assertTrue("Berne", Math.abs(ll.lon() - (7.0 + 26.0 / 60 + 19.076595154147 / 3600)) < 0.00001);
 
+        // http://geodesy.geo.admin.ch/reframe/lv03towgs84?easting=700000&northing=100000
         en = new EastNorth(700000.0, 100000.0);
         ll = Main.getProjection().eastNorth2latlon(en);
@@ -165,6 +169,6 @@
             System.out.println(ll);
         }
-        assertTrue("Ref", Math.abs(ll.lat() - (46.0 + 2.0 / 60 + 38.87 / 3600)) < 0.00001);
-        assertTrue("Ref", Math.abs(ll.lon() - (8.0 + 43.0 / 60 + 49.79 / 3600)) < 0.00001);
+        assertTrue("Ref", Math.abs(ll.lat() - 46.04412093223244) < 0.00001);
+        assertTrue("Ref", Math.abs(ll.lon() - 8.730497366167727) < 0.00001);
     }
 
