Changeset 8752 in josm for trunk/test
- Timestamp:
- 2015-09-13T00:06:23+02:00 (9 years ago)
- Location:
- trunk/test
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/imagery/WMTSTileSourceTest.java
r8624 r8752 26 26 private ImageryInfo testImageryWIEN = getImagery("test/data/wmts/getCapabilities-wien.xml"); 27 27 private ImageryInfo testImageryWALLONIE = getImagery("test/data/wmts/WMTSCapabilities-Wallonie.xml"); 28 private ImageryInfo testImageryOntario = getImagery("test/data/wmts/WMTSCapabilities-Ontario.xml"); 28 29 29 30 @BeforeClass … … 48 49 Main.setProjection(Projections.getProjectionByCode("EPSG:3857")); 49 50 WMTSTileSource testSource = new WMTSTileSource(testImageryPSEUDO_MERCATOR); 51 testSource.initProjection(); 50 52 51 53 verifyMercatorTile(testSource, 0, 0, 1); … … 78 80 Main.setProjection(Projections.getProjectionByCode("EPSG:31370")); 79 81 WMTSTileSource testSource = new WMTSTileSource(testImageryWALLONIE); 82 testSource.initProjection(); 83 80 84 assertEquals("http://geoservices.wallonie.be/arcgis/rest/services/DONNEES_BASE/FOND_PLAN_ANNOTATIONS_2012_RW_NB/" 81 85 + "MapServer/WMTS/tile/1.0.0/DONNEES_BASE_FOND_PLAN_ANNOTATIONS_2012_RW_NB/default/default028mm/5/1219/1063.png", … … 95 99 Main.setProjection(Projections.getProjectionByCode("EPSG:31370")); 96 100 WMTSTileSource testSource = new WMTSTileSource(getImagery("test/data/wmts/WMTSCapabilities-Wallonie-nomatrixdimension.xml")); 101 testSource.initProjection(); 102 97 103 Bounds wallonieBounds = new Bounds( 98 104 new LatLon(49.485372459967245, 2.840548314430268), … … 117 123 Main.setProjection(Projections.getProjectionByCode("EPSG:3857")); 118 124 WMTSTileSource testSource = new WMTSTileSource(testImageryWIEN); 125 testSource.initProjection(); 119 126 int zoomOffset = 9; 120 127 … … 158 165 Main.setProjection(Projections.getProjectionByCode("EPSG:4326")); 159 166 WMTSTileSource testSource = new WMTSTileSource(testImageryTOPO_PL); 167 testSource.initProjection(); 160 168 verifyTile(new LatLon(56, 12), testSource, 0, 0, 1); 161 169 verifyTile(new LatLon(56, 12), testSource, 0, 0, 2); … … 179 187 Main.setProjection(Projections.getProjectionByCode("EPSG:4326")); 180 188 WMTSTileSource testSource = new WMTSTileSource(testImageryORTO_PL); 189 testSource.initProjection(); 181 190 verifyTile(new LatLon(53.5993712684958, 19.560669777688176), testSource, 12412, 3941, 14); 182 191 verifyTile(new LatLon(49.783096954497786, 22.79034127751704), testSource, 17714, 10206, 14); … … 187 196 Main.setProjection(Projections.getProjectionByCode("EPSG:2180")); 188 197 WMTSTileSource testSource = new WMTSTileSource(testImageryORTO_PL); 198 testSource.initProjection(); 189 199 190 200 verifyTile(new LatLon(53.59940948387726, 19.560544913270064), testSource, 6453, 3140, 14); 191 201 verifyTile(new LatLon(49.782984840526055, 22.790064966993445), testSource, 9932, 9305, 14); 202 } 203 204 // disabled as this needs user action 205 // @Test 206 public void testTwoTileSetsForOneProjection() throws Exception { 207 Main.setProjection(Projections.getProjectionByCode("EPSG:3857")); 208 WMTSTileSource testSource = new WMTSTileSource(testImageryOntario); 209 testSource.initProjection(); 210 verifyTile(new LatLon(45.4105023, -75.7153702), testSource, 303751, 375502, 12); 211 verifyTile(new LatLon(45.4601306, -75.7617187), testSource, 1186, 1466, 4); 212 192 213 } 193 214
Note:
See TracChangeset
for help on using the changeset viewer.