Changeset 9820 in josm for trunk/test/unit/org
- Timestamp:
- 2016-02-18T07:29:48+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/imagery/WMTSTileSourceTest.java
r9767 r9820 76 76 verifyMercatorTile(testSource, 2 << 9 - 1, 2 << 8 - 1, 10); 77 77 78 assertEquals("TileXMax", 1, testSource.getTileXMax( 1));79 assertEquals("TileYMax", 1, testSource.getTileYMax( 1));80 assertEquals("TileXMax", 2, testSource.getTileXMax( 2));81 assertEquals("TileYMax", 2, testSource.getTileYMax( 2));82 assertEquals("TileXMax", 4, testSource.getTileXMax( 3));83 assertEquals("TileYMax", 4, testSource.getTileYMax( 3));78 assertEquals("TileXMax", 1, testSource.getTileXMax(0)); 79 assertEquals("TileYMax", 1, testSource.getTileYMax(0)); 80 assertEquals("TileXMax", 2, testSource.getTileXMax(1)); 81 assertEquals("TileYMax", 2, testSource.getTileYMax(1)); 82 assertEquals("TileXMax", 4, testSource.getTileXMax(2)); 83 assertEquals("TileYMax", 4, testSource.getTileYMax(2)); 84 84 85 85 } … … 93 93 assertEquals("http://geoservices.wallonie.be/arcgis/rest/services/DONNEES_BASE/FOND_PLAN_ANNOTATIONS_2012_RW_NB/" 94 94 + "MapServer/WMTS/tile/1.0.0/DONNEES_BASE_FOND_PLAN_ANNOTATIONS_2012_RW_NB/default/default028mm/5/1219/1063.png", 95 testSource.getTileUrl( 6, 1063, 1219));95 testSource.getTileUrl(5, 1063, 1219)); 96 96 97 97 // +bounds=2.54,49.51,6.4,51.5 … … 100 100 new LatLon(50.820959517561256, 6.427849693016202) 101 101 ); 102 verifyBounds(wallonieBounds, testSource, 6, 1063, 1219);103 verifyBounds(wallonieBounds, testSource, 1 1, 17724, 20324);102 verifyBounds(wallonieBounds, testSource, 5, 1063, 1219); 103 verifyBounds(wallonieBounds, testSource, 10, 17724, 20324); 104 104 } 105 105 … … 134 134 WMTSTileSource testSource = new WMTSTileSource(testImageryWIEN); 135 135 testSource.initProjection(Main.getProjection()); 136 int zoomOffset = 9;136 int zoomOffset = 10; 137 137 138 138 verifyMercatorTile(testSource, 0, 0, 1, zoomOffset); … … 178 178 verifyTile(new LatLon(56, 12), testSource, 0, 0, 1); 179 179 verifyTile(new LatLon(56, 12), testSource, 0, 0, 2); 180 verifyTile(new LatLon(51.13231917844218, 16.867680821557823), testSource, 1, 1, 2);181 182 assertEquals("TileXMax", 2, testSource.getTileXMax( 1));183 assertEquals("TileYMax", 1, testSource.getTileYMax( 1));184 assertEquals("TileXMax", 3, testSource.getTileXMax( 2));185 assertEquals("TileYMax", 2, testSource.getTileYMax( 2));186 assertEquals("TileXMax", 6, testSource.getTileXMax( 3));187 assertEquals("TileYMax", 4, testSource.getTileYMax( 3));180 verifyTile(new LatLon(51.13231917844218, 16.867680821557823), testSource, 1, 1, 1); 181 182 assertEquals("TileXMax", 2, testSource.getTileXMax(0)); 183 assertEquals("TileYMax", 1, testSource.getTileYMax(0)); 184 assertEquals("TileXMax", 3, testSource.getTileXMax(1)); 185 assertEquals("TileYMax", 2, testSource.getTileYMax(1)); 186 assertEquals("TileXMax", 6, testSource.getTileXMax(2)); 187 assertEquals("TileYMax", 4, testSource.getTileYMax(2)); 188 188 assertEquals( 189 189 "http://mapy.geoportal.gov.pl/wss/service/WMTS/guest/wmts/TOPO?SERVICE=WMTS&REQUEST=GetTile&" 190 190 + "VERSION=1.0.0&LAYER=MAPA TOPOGRAFICZNA&STYLE=default&FORMAT=image/jpeg&tileMatrixSet=EPSG:4326&" 191 191 + "tileMatrix=EPSG:4326:0&tileRow=1&tileCol=1", 192 testSource.getTileUrl( 1, 1, 1));192 testSource.getTileUrl(0, 1, 1)); 193 193 } 194 194 … … 198 198 WMTSTileSource testSource = new WMTSTileSource(testImageryORTO_PL); 199 199 testSource.initProjection(Main.getProjection()); 200 verifyTile(new LatLon(53.60205873528009, 19.552206794646956), testSource, 12412, 3941, 1 4);201 verifyTile(new LatLon(49.79005619189761, 22.778262259134397), testSource, 17714, 10206, 1 4);200 verifyTile(new LatLon(53.60205873528009, 19.552206794646956), testSource, 12412, 3941, 13); 201 verifyTile(new LatLon(49.79005619189761, 22.778262259134397), testSource, 17714, 10206, 13); 202 202 } 203 203 … … 208 208 testSource.initProjection(Main.getProjection()); 209 209 210 verifyTile(new LatLon(53.59940948387726, 19.560544913270064), testSource, 6453, 3140, 1 4);211 verifyTile(new LatLon(49.782984840526055, 22.790064966993445), testSource, 9932, 9305, 1 4);210 verifyTile(new LatLon(53.59940948387726, 19.560544913270064), testSource, 6453, 3140, 13); 211 verifyTile(new LatLon(49.782984840526055, 22.790064966993445), testSource, 9932, 9305, 13); 212 212 } 213 213 … … 219 219 assertEquals( 220 220 "http://www.ngi.be/cartoweb/1.0.0/topo/default/3857/7/1/1.png", 221 testSource.getTileUrl( 1, 1, 1));221 testSource.getTileUrl(0, 1, 1)); 222 222 } 223 223 … … 251 251 252 252 private void verifyMercatorTile(WMTSTileSource testSource, int x, int y, int z) { 253 verifyMercatorTile(testSource, x, y, z, -1);253 verifyMercatorTile(testSource, x, y, z, 0); 254 254 } 255 255
Note:
See TracChangeset
for help on using the changeset viewer.