@Test public void testTileBoundsCalculation() throws Exception { WMTSLayerParam params = new WMTSLayerParam(); Matrix matrix = new Matrix(); matrix.matrixSize = new long[]{67108864, 67108864}; matrix.tileSize = new int[]{256, 256}; matrix.topLeftCorner = new double[]{420000, 350000}; matrix.scaleDenominator = 7500; params.matrices = new Matrix[]{matrix}; WMTSLayer wmtsLayer = new WMTSLayer(null, null, params, null, new Configuration()); Rectangle paintArea = new Rectangle(0, 0, 256, 256); MapBounds bounds = new CenterScaleMapBounds(CRS.decode("EPSG:21781"), 595217.02, 236708.54, 7500); WMTSLayer.WMTSTileCacheInfo tileInformation = (WMTSLayer.WMTSTileCacheInfo) wmtsLayer.createTileInformation(bounds, paintArea, 256); ReferencedEnvelope tileCacheBounds = tileInformation.getTileCacheBounds(); assertEquals(tileCacheBounds.getMinX(), 420000, 0.00001); assertFalse("" + tileCacheBounds.getMinX(), Double.isInfinite(tileCacheBounds.getMinX())); assertFalse("" + tileCacheBounds.getMinX(), Double.isNaN(tileCacheBounds.getMinX())); assertTrue("" + tileCacheBounds.getMinY(), tileCacheBounds.getMinY() < 350000); assertFalse("" + tileCacheBounds.getMinY(), Double.isInfinite(tileCacheBounds.getMinY())); assertFalse("" + tileCacheBounds.getMinY(), Double.isNaN(tileCacheBounds.getMinY())); assertTrue("" + tileCacheBounds.getMaxX(), tileCacheBounds.getMaxX() > 420000); assertFalse("" + tileCacheBounds.getMaxX(), Double.isInfinite(tileCacheBounds.getMaxX())); assertFalse("" + tileCacheBounds.getMaxX(), Double.isNaN(tileCacheBounds.getMaxX())); assertEquals(tileCacheBounds.getMaxY(), 350000, 0.00001); assertFalse("" + tileCacheBounds.getMaxY(), Double.isInfinite(tileCacheBounds.getMaxY())); assertFalse("" + tileCacheBounds.getMaxY(), Double.isNaN(tileCacheBounds.getMaxY())); }
@Override protected final TileCacheInformation createTileInformation( final MapBounds bounds, final Rectangle paintArea, final double dpi) { return new WMTSTileCacheInfo(bounds, paintArea, dpi); }
WMTSLayer extends AbstractTiledLayer { @Override protected final TileCacheInformation createTileInformation( final MapBounds bounds, final Rectangle paintArea, final double dpi) { return new WMTSTileCacheInfo(bounds, paintArea, dpi); } }
WMTSLayer extends AbstractTiledLayer { @Override protected final TileCacheInformation createTileInformation( final MapBounds bounds, final Rectangle paintArea, final double dpi) { return new WMTSTileCacheInfo(bounds, paintArea, dpi); } protected  WMTSLayer(
            @Nullable final ForkJoinPool forkJoinPool,
            @Nullable final StyleSupplier<GridCoverage2D> styleSupplier,
            @Nonnull final WMTSLayerParam param,
            @Nullable final MetricRegistry registry,
            @Nonnull final Configuration configuration); }
WMTSLayer extends AbstractTiledLayer { @Override protected final TileCacheInformation createTileInformation( final MapBounds bounds, final Rectangle paintArea, final double dpi) { return new WMTSTileCacheInfo(bounds, paintArea, dpi); } protected  WMTSLayer(
            @Nullable final ForkJoinPool forkJoinPool,
            @Nullable final StyleSupplier<GridCoverage2D> styleSupplier,
            @Nonnull final WMTSLayerParam param,
            @Nullable final MetricRegistry registry,
            @Nonnull final Configuration configuration); static URI createRestURI(
            final String matrixId, final int row, final int col,
            final WMTSLayerParam layerParam); @Override final RenderType getRenderType(); }
WMTSLayer extends AbstractTiledLayer { @Override protected final TileCacheInformation createTileInformation( final MapBounds bounds, final Rectangle paintArea, final double dpi) { return new WMTSTileCacheInfo(bounds, paintArea, dpi); } protected  WMTSLayer(
            @Nullable final ForkJoinPool forkJoinPool,
            @Nullable final StyleSupplier<GridCoverage2D> styleSupplier,
            @Nonnull final WMTSLayerParam param,
            @Nullable final MetricRegistry registry,
            @Nonnull final Configuration configuration); static URI createRestURI(
            final String matrixId, final int row, final int col,
            final WMTSLayerParam layerParam); @Override final RenderType getRenderType();  }