- Timestamp:
- 2017-03-04T03:09:43+01:00 (8 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/CONTRIBUTION
r10455 r11660 71 71 with the New (2-clause) BSD license. 72 72 73 ------------------------------- PROJECTION DATA ------------------------------- 74 75 French NTF_R93 NTV2 grid: Source: IGN - Institut national de l'information 76 géographique et forestière 77 78 German BETA2007 NTV2 grid: Source: BKG - Bundesamt für Kartographie und Geodäsie 79 80 Swiss CHENYX06 NTV2 grid: Source: Swiss Federal Office of Topography 81 73 82 ------------------------------------ ICONS ------------------------------------ 74 83 -
trunk/README
r11602 r11660 61 61 - fonts/ font files used for map rendering 62 62 - projection/ projection files 63 - *.gsb NTv2 grid files for projection support64 63 - epsg list of projection definitions 65 64 - *.lang translation data … … 78 77 - Join_Areas_Tests.osm some examples to test the 'join areas' feature 79 78 - mapcss/ sample map styles and corresponding data files for regression testing 79 - projection/ projection files 80 - *.gsb NTv2 grid files for projection support (see CONTRIBUTION) 80 81 - projection-reference-data.csv 81 82 reference data for projection tests -
trunk/data_nodist/projection/josm-epsg
r11644 r11660 78 78 <4326> +proj=lonlat +datum=WGS84 +axis=neu +bounds=-180,-90,180,90 <> 79 79 # Swiss Grid (Switzerland) 80 <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 <>80 <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 <> 81 81 # HD72 / EOV (Hungary) 82 82 <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 <> -
trunk/data_nodist/projection/projection-regression-test-data
r9950 r11660 995 995 EPSG:21781 996 996 ll 46.582471410091934 8.159223152110604 997 en 65523 1.0208778976 159275.39184032555998 ll2 46.5824714 2005926 8.159223160343661997 en 655230.9360561728 159275.55116362066 998 ll2 46.582471410091884 8.159223152110604 999 999 EPSG:21782 1000 1000 ll 34.74535187788922 167.90219295117086 -
trunk/src/org/openstreetmap/josm/data/projection/proj/SwissObliqueMercator.java
r11374 r11660 109 109 while (abs(phi - prevPhi) > EPSILON) { 110 110 if (++iteration > 30) 111 throw new JosmRuntimeException("T wo many iterations");111 throw new JosmRuntimeException("Too many iterations"); 112 112 prevPhi = phi; 113 113 double s = 1 / alpha * (log(tan(PI / 4 + b / 2)) - k) + ellps.e -
trunk/test/unit/org/openstreetmap/josm/data/projection/SwissGridTest.java
r10758 r11660 6 6 7 7 import org.junit.BeforeClass; 8 import org.junit. Ignore;8 import org.junit.Rule; 9 9 import org.junit.Test; 10 10 import org.openstreetmap.josm.Main; 11 11 import org.openstreetmap.josm.data.coor.EastNorth; 12 12 import org.openstreetmap.josm.data.coor.LatLon; 13 import org.openstreetmap.josm.testutils.JOSMTestRules; 14 15 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 13 16 14 17 public class SwissGridTest { … … 19 22 * Setup test. 20 23 */ 24 @Rule 25 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 26 public JOSMTestRules test = new JOSMTestRules().platform(); 27 28 /** 29 * Setup test. 30 */ 21 31 @BeforeClass 22 32 public static void setUp() { … … 28 38 29 39 /** 30 * source: http ://www.swisstopo.admin.ch/internet/swisstopo/en/home/topics/survey/sys/refsys/switzerland.parsysrelated1.37696.downloadList.97912.DownloadFile.tmp/swissprojectionen.pdf40 * 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 31 41 */ 32 42 ProjData[] data = { … … 56 66 } 57 67 58 private static final double EPSILON_APPROX = 1.5;59 68 private static final double EPSILON_ACCURATE = 0.05; 60 69 … … 72 81 73 82 @Test 74 public void testProjReferenceTestApprox() {75 projReferenceTest(EPSILON_APPROX);76 }77 78 @Test79 @Ignore("high accuracy of epsilon=" + EPSILON_ACCURATE + " is not met")80 83 public void testProjReferenceTestAccurate() { 81 // TODO make this test pass82 84 projReferenceTest(EPSILON_ACCURATE); 83 85 } … … 90 92 System.out.println(en); 91 93 } 92 assertTrue("Lausanne", Math.abs(en.east() - 53311 1.69) < 0.1);93 assertTrue("Lausanne", Math.abs(en.north() - 152227. 85) < 0.1);94 assertTrue("Lausanne", Math.abs(en.east() - 533112.13) < 0.1); 95 assertTrue("Lausanne", Math.abs(en.north() - 152227.35) < 0.1); 94 96 95 97 ll = new LatLon(47.78, 8.58); … … 98 100 System.out.println(en); 99 101 } 100 assertTrue("Schafouse", Math.abs(en.east() - 68554 4.16) < 0.1);101 assertTrue("Schafouse", Math.abs(en.north() - 29278 2.91) < 0.1);102 assertTrue("Schafouse", Math.abs(en.east() - 685542.97) < 0.1); 103 assertTrue("Schafouse", Math.abs(en.north() - 292783.21) < 0.1); 102 104 103 105 ll = new LatLon(46.58, 10.48); … … 106 108 System.out.println(en); 107 109 } 108 assertTrue("Grinson", Math.abs(en.east() - 83306 8.04) < 0.1);109 assertTrue("Grinson", Math.abs(en.north() - 163265.3 9) < 0.1);110 assertTrue("Grinson", Math.abs(en.east() - 833066.95) < 0.1); 111 assertTrue("Grinson", Math.abs(en.north() - 163265.32) < 0.1); 110 112 111 113 ll = new LatLon(46.0 + 57.0 / 60 + 3.89813884505 / 3600, 7.0 + 26.0 / 60 + 19.076595154147 / 3600); … … 117 119 assertTrue("Berne", Math.abs(en.north() - 200000.0) < 0.1); 118 120 119 ll = new LatLon(46.0 + 2.0 / 60 + 38.87 / 3600, 8.0 + 43.0 / 60 + 49.79 / 3600); 121 // http://geodesy.geo.admin.ch/reframe/lv03towgs84?easting=700000&northing=100000 122 ll = new LatLon(46.04412093223244, 8.730497366167727); 120 123 en = Main.getProjection().latlon2eastNorth(ll); 121 124 if (debug) { … … 128 131 @Test 129 132 public void testBeastNorth2latlon() { 130 EastNorth en = new EastNorth(53311 1.69, 152227.85);133 EastNorth en = new EastNorth(533112.13, 152227.35); 131 134 LatLon ll = Main.getProjection().eastNorth2latlon(en); 132 135 if (debug) { … … 136 139 assertTrue("Lausanne", Math.abs(ll.lon() - 6.567) < 0.00001); 137 140 138 en = new EastNorth(68554 4.16, 292782.91);141 en = new EastNorth(685542.97, 292783.21); 139 142 ll = Main.getProjection().eastNorth2latlon(en); 140 143 if (debug) { … … 144 147 assertTrue("Schafouse", Math.abs(ll.lon() - 8.58) < 0.00001); 145 148 146 en = new EastNorth(83306 8.04, 163265.39);149 en = new EastNorth(833066.95, 163265.32); 147 150 ll = Main.getProjection().eastNorth2latlon(en); 148 151 if (debug) { … … 160 163 assertTrue("Berne", Math.abs(ll.lon() - (7.0 + 26.0 / 60 + 19.076595154147 / 3600)) < 0.00001); 161 164 165 // http://geodesy.geo.admin.ch/reframe/lv03towgs84?easting=700000&northing=100000 162 166 en = new EastNorth(700000.0, 100000.0); 163 167 ll = Main.getProjection().eastNorth2latlon(en); … … 165 169 System.out.println(ll); 166 170 } 167 assertTrue("Ref", Math.abs(ll.lat() - (46.0 + 2.0 / 60 + 38.87 / 3600)) < 0.00001);168 assertTrue("Ref", Math.abs(ll.lon() - (8.0 + 43.0 / 60 + 49.79 / 3600)) < 0.00001);171 assertTrue("Ref", Math.abs(ll.lat() - 46.04412093223244) < 0.00001); 172 assertTrue("Ref", Math.abs(ll.lon() - 8.730497366167727) < 0.00001); 169 173 } 170 174
Note:
See TracChangeset
for help on using the changeset viewer.