@Test public void testCreateRestURI() throws Exception { WMTSLayerParam param = new WMTSLayerParam(); param.layer = "wmts_layer"; param.matrixSet = "matrix_set"; param.baseURL = "http: "}/{TileRow}.png"; String restURI = WMTSLayer.createRestURI("the_matrix_id", 4, 5, param).toString(); assertEquals("http: restURI); }
public static URI createRestURI( final String matrixId, final int row, final int col, final WMTSLayerParam layerParam) throws URISyntaxException { String path = layerParam.baseURL; if (layerParam.dimensions != null) { for (int i = 0; i < layerParam.dimensions.length; i++) { String dimension = layerParam.dimensions[i]; String value = layerParam.dimensionParams.optString(dimension); if (value == null) { value = layerParam.dimensionParams.getString(dimension.toUpperCase()); } path = path.replace("{" + dimension + "}", value); } } path = path.replace("{TileMatrixSet}", layerParam.matrixSet); path = path.replace("{TileMatrix}", matrixId); path = path.replace("{TileRow}", String.valueOf(row)); path = path.replace("{TileCol}", String.valueOf(col)); path = path.replace("{style}", layerParam.style); path = path.replace("{Layer}", layerParam.layer); return new URI(path); }
WMTSLayer extends AbstractTiledLayer { public static URI createRestURI( final String matrixId, final int row, final int col, final WMTSLayerParam layerParam) throws URISyntaxException { String path = layerParam.baseURL; if (layerParam.dimensions != null) { for (int i = 0; i < layerParam.dimensions.length; i++) { String dimension = layerParam.dimensions[i]; String value = layerParam.dimensionParams.optString(dimension); if (value == null) { value = layerParam.dimensionParams.getString(dimension.toUpperCase()); } path = path.replace("{" + dimension + "}", value); } } path = path.replace("{TileMatrixSet}", layerParam.matrixSet); path = path.replace("{TileMatrix}", matrixId); path = path.replace("{TileRow}", String.valueOf(row)); path = path.replace("{TileCol}", String.valueOf(col)); path = path.replace("{style}", layerParam.style); path = path.replace("{Layer}", layerParam.layer); return new URI(path); } }
WMTSLayer extends AbstractTiledLayer { public static URI createRestURI( final String matrixId, final int row, final int col, final WMTSLayerParam layerParam) throws URISyntaxException { String path = layerParam.baseURL; if (layerParam.dimensions != null) { for (int i = 0; i < layerParam.dimensions.length; i++) { String dimension = layerParam.dimensions[i]; String value = layerParam.dimensionParams.optString(dimension); if (value == null) { value = layerParam.dimensionParams.getString(dimension.toUpperCase()); } path = path.replace("{" + dimension + "}", value); } } path = path.replace("{TileMatrixSet}", layerParam.matrixSet); path = path.replace("{TileMatrix}", matrixId); path = path.replace("{TileRow}", String.valueOf(row)); path = path.replace("{TileCol}", String.valueOf(col)); path = path.replace("{style}", layerParam.style); path = path.replace("{Layer}", layerParam.layer); return new URI(path); } 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 { public static URI createRestURI( final String matrixId, final int row, final int col, final WMTSLayerParam layerParam) throws URISyntaxException { String path = layerParam.baseURL; if (layerParam.dimensions != null) { for (int i = 0; i < layerParam.dimensions.length; i++) { String dimension = layerParam.dimensions[i]; String value = layerParam.dimensionParams.optString(dimension); if (value == null) { value = layerParam.dimensionParams.getString(dimension.toUpperCase()); } path = path.replace("{" + dimension + "}", value); } } path = path.replace("{TileMatrixSet}", layerParam.matrixSet); path = path.replace("{TileMatrix}", matrixId); path = path.replace("{TileRow}", String.valueOf(row)); path = path.replace("{TileCol}", String.valueOf(col)); path = path.replace("{style}", layerParam.style); path = path.replace("{Layer}", layerParam.layer); return new URI(path); } 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 { public static URI createRestURI( final String matrixId, final int row, final int col, final WMTSLayerParam layerParam) throws URISyntaxException { String path = layerParam.baseURL; if (layerParam.dimensions != null) { for (int i = 0; i < layerParam.dimensions.length; i++) { String dimension = layerParam.dimensions[i]; String value = layerParam.dimensionParams.optString(dimension); if (value == null) { value = layerParam.dimensionParams.getString(dimension.toUpperCase()); } path = path.replace("{" + dimension + "}", value); } } path = path.replace("{TileMatrixSet}", layerParam.matrixSet); path = path.replace("{TileMatrix}", matrixId); path = path.replace("{TileRow}", String.valueOf(row)); path = path.replace("{TileCol}", String.valueOf(col)); path = path.replace("{style}", layerParam.style); path = path.replace("{Layer}", layerParam.layer); return new URI(path); } 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();  }