Changeset 12669 in josm for trunk/src/org/openstreetmap/josm/data/imagery/WMTSTileSource.java
- Timestamp:
- 2017-08-27T00:17:49+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/imagery/WMTSTileSource.java
r12620 r12669 808 808 TileMatrix matrix = getTileMatrix(zoom); 809 809 if (matrix == null) { 810 return tileProjection.getWorldBoundsLatLon().getCenter() .toCoordinate();810 return CoordinateConversion.llToCoor(tileProjection.getWorldBoundsLatLon().getCenter()); 811 811 } 812 812 double scale = matrix.scaleDenominator * this.crsScale; 813 813 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)); 815 815 } 816 816 … … 1014 1014 } 1015 1015 1016 private EastNorth tileToEastNorth(int x, int y, int z) { 1017 return CoordinateConversion.projToEn(this.tileXYtoProjected(x, y, z)); 1018 } 1019 1016 1020 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())); 1020 1023 return pb; 1021 1024 } … … 1025 1028 ProjectionBounds pbInner = getTileProjectionBounds(inner); 1026 1029 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 1029 1031 double epsilon = 1e-7 * (pbOuter.maxEast - pbOuter.minEast); 1030 1032 return pbOuter.minEast <= pbInner.minEast + epsilon &&
Note:
See TracChangeset
for help on using the changeset viewer.
