Changeset 9767 in josm for trunk/test/unit


Ignore:
Timestamp:
2016-02-09T15:05:24+01:00 (4 years ago)
Author:
bastiK
Message:

update tests for [9558] and [9642] (see #12186, see #12514)

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  
    128128        ICoordinate expected = verifier.tileXYToLatLon(x, y, z - 1);
    129129        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);
    131131        LatLon tileCenter = new Bounds(result, getTileLatLon(source, x+1, y+1, z)).getCenter();
    132132        TileXY backwardsResult = source.latLonToTileXY(tileCenter.toCoordinate(), z);
  • trunk/test/unit/org/openstreetmap/josm/data/imagery/WMTSTileSourceTest.java

    r9489 r9767  
    178178        verifyTile(new LatLon(56, 12), testSource, 0, 0, 1);
    179179        verifyTile(new LatLon(56, 12), testSource, 0, 0, 2);
    180         verifyTile(new LatLon(51.1268639, 16.8731360), testSource, 1, 1, 2);
     180        verifyTile(new LatLon(51.13231917844218, 16.867680821557823), testSource, 1, 1, 2);
    181181
    182182        assertEquals("TileXMax", 2, testSource.getTileXMax(1));
     
    198198        WMTSTileSource testSource = new WMTSTileSource(testImageryORTO_PL);
    199199        testSource.initProjection(Main.getProjection());
    200         verifyTile(new LatLon(53.5993712684958, 19.560669777688176), testSource, 12412, 3941, 14);
    201         verifyTile(new LatLon(49.783096954497786, 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);
    202202    }
    203203
     
    259259        LatLon expected = new LatLon(verifier.tileXYToLatLon(x, y, z + zoomOffset));
    260260        //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);
    262262        assertEquals("Latitude", expected.lat(), result.lat(), 1e-04);
    263263    }
Note: See TracChangeset for help on using the changeset viewer.