org.geotools.data.ows.Layer.isQueryable()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(152)

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

Layer.isQueryable介绍

[英]Determines if this layer is queryable. Implements inheritance: if this layer's Queryable attribute is null, check ancestors until the first Queryable attribute is found or no more ancestors. If a Queryable attribute is not found for this layer, it will return the default value of false.
[中]确定此层是否可查询。实现继承:如果该层的可查询属性为null,则检查祖先,直到找到第一个可查询属性或不再有祖先。如果找不到此层的可查询属性,它将返回默认值false。

代码示例

代码示例来源:origin: org.geotools/gt-wms

public static Set getQueryableLayers(WMSCapabilities capabilities) {
  Set layers = new TreeSet();
  Layer[] namedLayers = getNamedLayers(capabilities);
  for (int i = 0; i < namedLayers.length; i++) {
    Layer layer = namedLayers[i];
    if (layer.isQueryable()) {
      layers.add(layer);
    }
  }
  return layers;
}

代码示例来源:origin: org.geotools/gt2-wms

public static Set getQueryableLayers(WMSCapabilities capabilities) {
  Set layers = new TreeSet();

  Layer[] namedLayers = getNamedLayers(capabilities);

  for( int i = 0; i < namedLayers.length; i++ ) {
    Layer layer = namedLayers[i];

    if (layer.isQueryable()) {
      layers.add(layer);
    }
  }

  return layers;
}

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

/** Returns true if the layer can be queried */
public boolean isQueryable(LayerInfo layer) {
  try {
    if (layer.getResource() instanceof WMSLayerInfo) {
      WMSLayerInfo info = (WMSLayerInfo) layer.getResource();
      Layer wl = info.getWMSLayer(null);
      if (!wl.isQueryable()) {
        return false;
      }
      WMSCapabilities caps = info.getStore().getWebMapServer(null).getCapabilities();
      OperationType featureInfo = caps.getRequest().getGetFeatureInfo();
      if (featureInfo == null
          || !featureInfo.getFormats().contains("application/vnd.ogc.gml")) {
        return false;
      }
    } else if (layer.getResource() instanceof WMTSLayerInfo) {
      return false;
    }
    return layer.isQueryable();
  } catch (IOException e) {
    LOGGER.log(
        Level.INFO,
        "Failed to determine if the layer is queryable, assuming it's not",
        e);
    return false;
  }
}

代码示例来源:origin: org.geowebcache/gwc-wms

layerMetaInfo = new LayerMetaInformation(title, description, null, null);
boolean queryable = layer.isQueryable();

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

if (!layer.isQueryable()) {
  return null;

相关文章