Changeset 9767 in josm for trunk/test/unit/org
- Timestamp:
- 2016-02-09T15:05:24+01:00 (9 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm/data/imagery
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/imagery/TemplatedWMSTileSourceTest.java
r9167 r9767 128 128 ICoordinate expected = verifier.tileXYToLatLon(x, y, z - 1); 129 129 assertEquals(expected.getLat(), result.lat(), 1e-4); 130 assertEquals( expected.getLon(), result.lon(), 1e-4);130 assertEquals(LatLon.normalizeLon(expected.getLon() - result.lon()), 0.0, 1e-4); 131 131 LatLon tileCenter = new Bounds(result, getTileLatLon(source, x+1, y+1, z)).getCenter(); 132 132 TileXY backwardsResult = source.latLonToTileXY(tileCenter.toCoordinate(), z); -
trunk/test/unit/org/openstreetmap/josm/data/imagery/WMTSTileSourceTest.java
r9489 r9767 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.1 268639, 16.8731360), testSource, 1, 1, 2);180 verifyTile(new LatLon(51.13231917844218, 16.867680821557823), testSource, 1, 1, 2); 181 181 182 182 assertEquals("TileXMax", 2, testSource.getTileXMax(1)); … … 198 198 WMTSTileSource testSource = new WMTSTileSource(testImageryORTO_PL); 199 199 testSource.initProjection(Main.getProjection()); 200 verifyTile(new LatLon(53. 5993712684958, 19.560669777688176), testSource, 12412, 3941, 14);201 verifyTile(new LatLon(49.7 83096954497786, 22.79034127751704), testSource, 17714, 10206, 14);200 verifyTile(new LatLon(53.60205873528009, 19.552206794646956), testSource, 12412, 3941, 14); 201 verifyTile(new LatLon(49.79005619189761, 22.778262259134397), testSource, 17714, 10206, 14); 202 202 } 203 203 … … 259 259 LatLon expected = new LatLon(verifier.tileXYToLatLon(x, y, z + zoomOffset)); 260 260 //System.out.println(z + "/" + x + "/" + y + " - result: " + result.toDisplayString() + " osmMercator: " + expected.toDisplayString()); 261 assertEquals("Longitude", expected.lon(), result.lon(), 1e-04);261 assertEquals("Longitude", LatLon.normalizeLon(expected.lon() - result.lon()), 0.0, 1e-04); 262 262 assertEquals("Latitude", expected.lat(), result.lat(), 1e-04); 263 263 }
Note:
See TracChangeset
for help on using the changeset viewer.