public WMTSLayerInfo buildWMTSLayer(String layerName) throws IOException { return buildWMTSLayer(this.store, layerName); }
WMTSLayerInfo rebuilt = buildWMTSLayer(rinfo.getStore(), rinfo.getNativeName()); bounds = rebuilt.getNativeBoundingBox();
@Test public void testWMTSLayer100() throws Exception { TestHttpClientProvider.startTest(); try { String baseURL = TestHttpClientProvider.MOCKSERVER + "/wmts100"; MockHttpClient client = new MockHttpClient(); URL capsURL = new URL(baseURL + "?REQUEST=GetCapabilities&VERSION=1.0.0&SERVICE=WMTS"); client.expectGet( capsURL, new MockHttpResponse(getClass().getResource("nasa.getcapa.xml"), "text/xml")); TestHttpClientProvider.bind(client, capsURL); CatalogBuilder cb = new CatalogBuilder(getCatalog()); WMTSStoreInfo store = cb.buildWMTSStore("test-wmts-store"); store.setCapabilitiesURL(capsURL.toExternalForm()); cb.setStore(store); WMTSLayerInfo layer = cb.buildWMTSLayer("AMSR2_Wind_Speed_Night"); // check the bbox has the proper axis order assertEquals("Wind Speed (Night, AMSR2, GCOM-W1)", layer.getTitle()); assertEquals("EPSG:4326", layer.getSRS()); ReferencedEnvelope bbox = layer.getLatLonBoundingBox(); assertEquals(-180, bbox.getMinX(), 0d); assertEquals(-90, bbox.getMinY(), 0d); assertEquals(180, bbox.getMaxX(), 0d); assertEquals(90, bbox.getMaxY(), 0d); } finally { TestHttpClientProvider.endTest(); } }
WMTSLayerInfo full = buildWMTSLayer(store, layer.getNativeName());
LayerInfo buildLayerInfo(LayerResource resource) { Catalog catalog = getCatalog(); StoreInfo store = catalog.getStore(storeId, StoreInfo.class); try { CatalogBuilder builder = new CatalogBuilder(catalog); builder.setStore(store); WMTSLayerInfo wli = builder.buildWMTSLayer(resource.getLocalName()); return builder.buildLayer(wli); } catch (Exception e) { throw new RuntimeException( "Error occurred while building the resources for the configuration page", e); } }
LayerInfo li; try { wli = builder.buildWMTSLayer(layer.getLocalName()); li = builder.buildLayer(wli); } catch (IOException e) {
@Override protected void onSetUp(SystemTestData testData) throws Exception { super.onSetUp(testData); // we need to add a wmts store CatalogBuilder cb = new CatalogBuilder(catalog); cb.setWorkspace(catalog.getWorkspaceByName("sf")); WMTSStoreInfo wmts = cb.buildWMTSStore("demo"); wmts.setCapabilitiesURL(capabilities); catalog.add(wmts); cb.setStore(wmts); WMTSLayerInfo layer = cb.buildWMTSLayer(LAYER_NAME); catalog.add(layer); }
return builder.buildLayer(fti); } else if (expandedStore instanceof WMTSStoreInfo) { WMTSLayerInfo wli = builder.buildWMTSLayer(resource.getLocalName()); return builder.buildLayer(wli); } else if (expandedStore instanceof WMSStoreInfo) {