本文整理了Java中org.geotools.ysld.YamlSeq.raw()
方法的一些代码示例,展示了YamlSeq.raw()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YamlSeq.raw()
方法的具体详情如下:
包路径:org.geotools.ysld.YamlSeq
类名称: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()) {
内容来源于网络,如有侵权,请联系作者删除!