gpt4 book ai didi

org.geotools.ysld.YamlSeq.raw()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-19 09:55:31 27 4
gpt4 key购买 nike

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

YamlSeq.raw介绍

暂无

代码示例

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

@Override
public boolean matches(Object obj) {
  YamlSeq seq;
  if (obj instanceof YamlSeq) {
    seq = (YamlSeq) obj;
  } else {
    return false;
  }
  if (seq.raw().size() != matchers.length) {
    return false;
  }
  for (int i = 0; i < matchers.length; i++) {
    if (!matchers[i].matches(seq.get(i))) {
      return false;
    }
  }
  return true;
}

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

@SuppressWarnings("unchecked")
protected ZoomContext getZoomContext(YamlMap map) {
  ZoomContext result = null;
  if (map.has("name")) {
    result = Util.getNamedZoomContext(map.str("name"), zCtxtFinders);
  }
  if (result == null && map.has("scales")) {
    final List<?> raw = map.seq("scales").raw();
    final List<Double> scaleDenoms = new ArrayList<>(raw.size());
    for (Number s : (List<Number>) raw) {
      scaleDenoms.add(s.doubleValue());
    }
    final int initialLevel = map.intOr("initial-level", 0);
    result = new ListZoomContext(scaleDenoms, initialLevel);
  }
  if (result == null && map.has("initial-scale")) {
    final double initialScale = map.doub("initial-scale");
    final double ratio = map.doubOr("ratio", 2d);
    final int initialLevel = map.intOr("initial-level", 0);
    result = new RatioZoomContext(initialLevel, initialScale, ratio);
  }
  if (result == null) {
    throw new IllegalArgumentException();
  }
  return result;
}

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

@Override
public void handle(YamlObject<?> obj, YamlParseContext context) {
  YamlSeq seq = obj.seq();
  for (Object o : seq.raw()) {

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

@SuppressWarnings("unchecked")
protected ZoomContext getZoomContext(YamlMap map) {
  ZoomContext result = null;
  if (map.has("name")) {
    result = Util.getNamedZoomContext(map.str("name"), zCtxtFinders);
  }
  if (result == null && map.has("scales")) {
    final List<?> raw = map.seq("scales").raw();
    final List<Double> scaleDenoms = new ArrayList<>(raw.size());
    for (Number s : (List<Number>) raw) {
      scaleDenoms.add(s.doubleValue());
    }
    final int initialLevel = map.intOr("initial-level", 0);
    result = new ListZoomContext(scaleDenoms, initialLevel);
  }
  if (result == null && map.has("initial-scale")) {
    final double initialScale = map.doub("initial-scale");
    final double ratio = map.doubOr("ratio", 2d);
    final int initialLevel = map.intOr("initial-level", 0);
    result = new RatioZoomContext(initialLevel, initialScale, ratio);
  }
  if (result == null) {
    throw new IllegalArgumentException();
  }
  return result;
}

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

@Override
public void handle(YamlObject<?> obj, YamlParseContext context) {
  YamlSeq seq = obj.seq();
  for (Object o : seq.raw()) {

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