Changeset 12669 in josm for trunk/test/unit/org/openstreetmap/josm/data/imagery/WMTSTileSourceTest.java
- Timestamp:
- 2017-08-27T00:17:49+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/imagery/WMTSTileSourceTest.java
r12224 r12669 129 129 130 130 private void verifyBounds(Bounds bounds, WMTSTileSource testSource, int z, int x, int y) { 131 LatLon ret = new LatLon(testSource.tileXYToLatLon(x, y, z));131 LatLon ret = CoordinateConversion.coorToLL(testSource.tileXYToLatLon(x, y, z)); 132 132 assertTrue(ret.toDisplayString() + " doesn't lie within: " + bounds.toString(), bounds.contains(ret)); 133 133 int tileXmax = testSource.getTileXMax(z); … … 303 303 304 304 private void verifyTile(LatLon expected, WMTSTileSource source, int x, int y, int z) { 305 LatLon ll = new LatLon(source.tileXYToLatLon(x, y, z));305 LatLon ll = CoordinateConversion.coorToLL(source.tileXYToLatLon(x, y, z)); 306 306 assertEquals("Latitude", expected.lat(), ll.lat(), 1e-05); 307 307 assertEquals("Longitude", expected.lon(), ll.lon(), 1e-05); … … 314 314 private void verifyMercatorTile(WMTSTileSource testSource, int x, int y, int z, int zoomOffset) { 315 315 TemplatedTMSTileSource verifier = new TemplatedTMSTileSource(testImageryTMS); 316 LatLon result = new LatLon(testSource.tileXYToLatLon(x, y, z));317 LatLon expected = new LatLon(verifier.tileXYToLatLon(x, y, z + zoomOffset));316 LatLon result = CoordinateConversion.coorToLL(testSource.tileXYToLatLon(x, y, z)); 317 LatLon expected = CoordinateConversion.coorToLL(verifier.tileXYToLatLon(x, y, z + zoomOffset)); 318 318 assertEquals("Longitude", LatLon.normalizeLon(expected.lon() - result.lon()), 0.0, 1e-04); 319 319 assertEquals("Latitude", expected.lat(), result.lat(), 1e-04);
Note:
See TracChangeset
for help on using the changeset viewer.