gpt4 book ai didi

org.geoserver.catalog.WMTSStoreInfo.setCapabilitiesURL()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-22 11:45:05 37 4
gpt4 key购买 nike

本文整理了Java中org.geoserver.catalog.WMTSStoreInfo.setCapabilitiesURL()方法的一些代码示例,展示了WMTSStoreInfo.setCapabilitiesURL()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WMTSStoreInfo.setCapabilitiesURL()方法的具体详情如下:
包路径:org.geoserver.catalog.WMTSStoreInfo
类名称:WMTSStoreInfo
方法名:setCapabilitiesURL

WMTSStoreInfo.setCapabilitiesURL介绍

暂无

代码示例

代码示例来源:origin: geoserver/geoserver

public void setCapabilitiesURL(String url) {
  delegate.setCapabilitiesURL(url);
}

代码示例来源:origin: geoserver/geoserver

/**
 * @param source
 * @param target
 */
private void setConnectionParameters(final WMTSStoreInfo source, WMTSStoreInfo target) {
  target.setCapabilitiesURL(source.getCapabilitiesURL());
  target.setUsername(source.getUsername());
  target.setPassword(source.getPassword());
  target.setUseConnectionPooling(source.isUseConnectionPooling());
  target.setMaxConnections(source.getMaxConnections());
  target.setConnectTimeout(source.getConnectTimeout());
  target.setReadTimeout(source.getReadTimeout());
}

代码示例来源:origin: geoserver/geoserver

@Test
public void testModifyWMTSStore() throws Exception {
  testAddWMTSStore();
  WMTSStoreInfo wmts = catalog.getStoreByName("acme", "demowmts", WMTSStoreInfo.class);
  assertNull(wmts.getCapabilitiesURL());
  String capsURL =
      "http://demo.opengeo.org:8080/geoserver/gwc?request=GetCapabilites&service=WMTS";
  wmts.setCapabilitiesURL(capsURL);
  catalog.save(wmts);
  File f =
      new File(testData.getDataDirectoryRoot(), "workspaces/acme/demowmts/wmtsstore.xml");
  Document dom = dom(f);
  assertXpathEvaluatesTo(capsURL, "/wmtsStore/capabilitiesURL/text()", dom);
}

代码示例来源:origin: geoserver/geoserver

@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();
  }
}

代码示例来源:origin: geoserver/geoserver

public WMTSStoreInfo clone(final WMTSStoreInfo source, boolean allowEnvParametrization) {
  WMTSStoreInfo target;
  try {
    target = (WMTSStoreInfo) SerializationUtils.clone(source);
    if (target instanceof StoreInfoImpl && target.getCatalog() == null) {
      ((StoreInfoImpl) target).setCatalog(catalog);
    }
  } catch (Exception e) {
    target = catalog.getFactory().createWebMapTileServer();
    target.setDescription(source.getDescription());
    target.setEnabled(source.isEnabled());
    target.setName(source.getName());
    target.setType(source.getType());
    target.setWorkspace(source.getWorkspace());
  }
  setConnectionParameters(source, target);
  if (allowEnvParametrization) {
    // Resolve GeoServer Environment placeholders
    final GeoServerEnvironment gsEnvironment =
        GeoServerExtensions.bean(GeoServerEnvironment.class);
    if (gsEnvironment != null && GeoServerEnvironment.ALLOW_ENV_PARAMETRIZATION) {
      target.setCapabilitiesURL(
          (String) gsEnvironment.resolveValue(source.getCapabilitiesURL()));
      target.setUsername((String) gsEnvironment.resolveValue(source.getUsername()));
      target.setPassword((String) gsEnvironment.resolveValue(source.getPassword()));
    }
  }
  return target;
}

代码示例来源:origin: geoserver/geoserver

wmts.setWorkspace(ws);
wmts.setName("foo");
wmts.setCapabilitiesURL("http://fake.host/wmts?request=getCapabilities");
catalog.add(wmts);

代码示例来源:origin: geoserver/geoserver

wmtss.setName("wmtsName");
wmtss.setType("WMTS");
wmtss.setCapabilitiesURL("http://fake.wmts.url");
wmtss.setWorkspace(ws);

代码示例来源:origin: org.geoserver/gs-restconfig

@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(
      clientMocker.getServer()
          + "/geoserver/gwc?REQUEST=GetCapabilities&VERSION=1.0.0&SERVICE=WMTS");
  catalog.add(wmts);
  // and a wmts layer as well (cannot use the builder, would turn this test into an online one
  addWmtsLayer();
}

代码示例来源:origin: org.geoserver/gs-restconfig

@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);
}

代码示例来源:origin: org.geoserver/gs-wms

store.setEnabled(true);
store.setName("wmts");
store.setCapabilitiesURL(capabilities);
catalog.add(store);

37 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com