Ignore:
Timestamp:
2017-08-27T00:17:49+02:00 (9 years ago)
Author:
Don-vip
Message:

see #15182 - remove dependence on JMapViewer for package data.coor (only useful for imagery)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/imagery/WMTSTileSource.java

    r12620 r12669  
    808808        TileMatrix matrix = getTileMatrix(zoom);
    809809        if (matrix == null) {
    810             return tileProjection.getWorldBoundsLatLon().getCenter().toCoordinate();
     810            return CoordinateConversion.llToCoor(tileProjection.getWorldBoundsLatLon().getCenter());
    811811        }
    812812        double scale = matrix.scaleDenominator * this.crsScale;
    813813        EastNorth ret = new EastNorth(matrix.topLeftCorner.east() + x * scale, matrix.topLeftCorner.north() - y * scale);
    814         return tileProjection.eastNorth2latlon(ret).toCoordinate();
     814        return CoordinateConversion.llToCoor(tileProjection.eastNorth2latlon(ret));
    815815    }
    816816
     
    10141014    }
    10151015
     1016    private EastNorth tileToEastNorth(int x, int y, int z) {
     1017        return CoordinateConversion.projToEn(this.tileXYtoProjected(x, y, z));
     1018    }
     1019
    10161020    private ProjectionBounds getTileProjectionBounds(Tile tile) {
    1017         ProjectionBounds pb = new ProjectionBounds(new EastNorth(
    1018                 this.tileXYtoProjected(tile.getXtile(), tile.getYtile(), tile.getZoom())));
    1019         pb.extend(new EastNorth(this.tileXYtoProjected(tile.getXtile() + 1, tile.getYtile() + 1, tile.getZoom())));
     1021        ProjectionBounds pb = new ProjectionBounds(tileToEastNorth(tile.getXtile(), tile.getYtile(), tile.getZoom()));
     1022        pb.extend(tileToEastNorth(tile.getXtile() + 1, tile.getYtile() + 1, tile.getZoom()));
    10201023        return pb;
    10211024    }
     
    10251028        ProjectionBounds pbInner = getTileProjectionBounds(inner);
    10261029        ProjectionBounds pbOuter = getTileProjectionBounds(outer);
    1027         // a little tolerance, for when inner tile touches the border of the
    1028         // outer tile
     1030        // a little tolerance, for when inner tile touches the border of the outer tile
    10291031        double epsilon = 1e-7 * (pbOuter.maxEast - pbOuter.minEast);
    10301032        return pbOuter.minEast <= pbInner.minEast + epsilon &&
Note: See TracChangeset for help on using the changeset viewer.