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

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

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

Layer.getChildren介绍

暂无

代码示例

代码示例来源:origin: senbox-org/snap-desktop

@Override
public int getChildCount(Object parent) {
  Layer layer = (Layer) parent;
  return layer.getChildren().length;
}

代码示例来源:origin: bcdev/beam

@Override
public boolean isLeaf(Object node) {
  Layer layer = (Layer) node;
  return layer.getChildren() != null && layer.getChildren().length == 0;
}

代码示例来源:origin: senbox-org/snap-desktop

@Override
public Object getChild(Object parent, int index) {
  Layer layer = (Layer) parent;
  return layer.getChildren()[index];
}

代码示例来源:origin: senbox-org/snap-desktop

@Override
public boolean isLeaf(Object node) {
  Layer layer = (Layer) node;
  return layer.getChildren() != null && layer.getChildren().length == 0;
}

代码示例来源:origin: bcdev/beam

@Override
public Object getChild(Object parent, int index) {
  Layer layer = (Layer) parent;
  return layer.getChildren()[index];
}

代码示例来源:origin: bcdev/beam

@Override
public int getChildCount(Object parent) {
  Layer layer = (Layer) parent;
  return layer.getChildren().length;
}

代码示例来源:origin: bcdev/beam

@Override
  public int getIndexOfChild(Object parent, Object child) {
    Layer layer = (Layer) parent;
    int index = Arrays.binarySearch(layer.getChildren(), child);
    return index < 0 ? -1 : index;
  }
}

代码示例来源:origin: senbox-org/snap-desktop

@Override
public int getIndexOfChild(Object parent, Object child) {
  Layer layer = (Layer) parent;
  int index = Arrays.binarySearch(layer.getChildren(), child);
  return index < 0 ? -1 : index;
}

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

private void addChildrenRecursive(List layers, Layer layer) {
  if (layer.getChildren() != null) {
    for (int i = 0; i < layer.getChildren().length; i++) {
      layers.add(layer.getChildren()[i]);
      addChildrenRecursive(layers, layer.getChildren()[i]);
    }
  }
}

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

private void addChildrenRecursive(List<Layer> layers, Layer layer) {
  if (layer.getChildren() != null) {
    for (Layer child : layer.getChildren()) {
      layers.add(child);
      addChildrenRecursive(layers, child);
    }
  }
}

代码示例来源:origin: senbox-org/snap-desktop

Layer[] children = layer.getChildren();
if (children.length > 1) {
  sb.append(String.format(" (%d children)", children.length));

代码示例来源:origin: bcdev/beam

Layer[] children = layer.getChildren();
if (children.length > 1) {
  sb.append(String.format(" (%d children)", children.length));

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

if (layers[i].getChildren().length == 0) {
  Layer layer = layers[i];
  members.add(new WMSGeoResource(this, layer));

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

URL image = WebMapServer.class.getResource("image.png");
icon = new ImageIcon(image);
if (layer.getChildren() != null && layer.getChildren().length != 0) {

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

/**
 * Fix the provided layer's bounding box so that it can be correctly handled.
 *
 * <p>Call layer.clearCache() after this method.
 *
 * @param layer
 * @param forceXY true prior to WMS 1.3.0, false after WMS 1.3.0
 */
static void fixLayerBoundingBox(Layer layer, boolean forceXY) {
  if (layer == null) {
    return;
  }
  if (layer.getLayerBoundingBoxes() != null) {
    for (CRSEnvelope boundingBox : layer.getLayerBoundingBoxes()) {
      String srsName = boundingBox.getSRSName();
      boundingBox.setSRSName(srsName, forceXY);
    }
  }
  for (Layer child : layer.getChildren()) {
    fixLayerBoundingBox(child, forceXY);
  }
}

相关文章