Changeset 12224 in josm for trunk/test
- Timestamp:
- 2017-05-21T17:56:42+02:00 (7 years ago)
- Location:
- trunk/test
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/imagery/WMTSTileSourceTest.java
r11257 r12224 36 36 private ImageryInfo testImageryWALLONIE = getImagery(TestUtils.getTestDataRoot() + "wmts/WMTSCapabilities-Wallonie.xml"); 37 37 private ImageryInfo testImageryOntario = getImagery(TestUtils.getTestDataRoot() + "wmts/WMTSCapabilities-Ontario.xml"); 38 private ImageryInfo testImageryGeoAdminCh = getImagery(TestUtils.getTestDataRoot() + "wmts/WMTSCapabilities-GeoAdminCh.xml"); 38 39 private ImageryInfo testImagery12168 = getImagery(TestUtils.getTestDataRoot() + "wmts/bug12168-WMTSCapabilities.xml"); 39 40 private ImageryInfo testLotsOfLayers = getImagery(TestUtils.getTestDataRoot() + "wmts/getCapabilities-lots-of-layers.xml"); … … 245 246 WMTSTileSource testSource = new WMTSTileSource(testLotsOfLayers); 246 247 testSource.initProjection(Main.getProjection()); 247 248 248 } 249 249 … … 279 279 "http://188.253.0.155:6080/arcgis/rest/services/Mashhad_BaseMap_1/MapServer/WMTS/tile/1.0.0/Mashhad_BaseMap_1" 280 280 + "/default/default028mm/1/3/2", 281 testSource.getTileUrl(1, 2, 3) 282 ); 283 } 284 285 /** 286 * Test WMTS dimension. 287 * @throws IOException if any I/O error occurs 288 */ 289 @Test 290 public void testDimension() throws IOException { 291 Main.setProjection(Projections.getProjectionByCode("EPSG:21781")); 292 ImageryInfo info = new ImageryInfo(testImageryGeoAdminCh); 293 Collection<DefaultLayer> defaultLayers = new ArrayList<>(1); 294 defaultLayers.add(new WMTSDefaultLayer("ch.are.agglomerationen_isolierte_staedte", "21781_26")); 295 info.setDefaultLayers(defaultLayers); 296 WMTSTileSource testSource = new WMTSTileSource(info); 297 testSource.initProjection(Main.getProjection()); 298 assertEquals( 299 "http://wmts.geo.admin.ch/1.0.0/ch.are.agglomerationen_isolierte_staedte/default/20140101/21781/1/3/2.png", 281 300 testSource.getTileUrl(1, 2, 3) 282 301 );
Note:
See TracChangeset
for help on using the changeset viewer.