- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.geotools.ysld.Ysld.parse()
方法的一些代码示例,展示了Ysld.parse()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ysld.parse()
方法的具体详情如下:
包路径:org.geotools.ysld.Ysld
类名称:Ysld
方法名:parse
[英]Parses a Ysld stream into GeoTools style objects.
[中]将Ysld流解析为GeoTools样式的对象。
代码示例来源:origin: geotools/geotools
@Test
public void testBadExpression() throws Exception {
String yaml = "polygon: \n" + " stroke-width: ${round(foo) 1000}\n";
try {
Ysld.parse(yaml);
fail("Bad expression should have thrown exception");
} catch (IllegalArgumentException e) {
// expected
}
}
代码示例来源:origin: geotools/geotools
@Test
public void testParseSymbolizers() throws Exception {
String ysld =
"symbolizers:\n"
+ "- point:\n"
+ " symbols:\n"
+ " - mark:\n"
+ " shape: triangle";
assertSLD(Ysld.parse(ysld));
}
代码示例来源:origin: geotools/geotools
@Test
public void testZoomDefault() throws IOException {
String yaml = "feature-styles: \n" + "- name: name\n" + " rules:\n" + WGS84_TEST_RULES;
StyledLayerDescriptor sld = Ysld.parse(yaml);
doTestForWGS84(sld);
}
代码示例来源:origin: geotools/geotools
@Test
public void testParseRules() throws Exception {
String ysld =
"rules:\n"
+ "- symbolizers:\n"
+ " - point:\n"
+ " symbols:\n"
+ " - mark:\n"
+ " shape: triangle";
assertSLD(Ysld.parse(ysld));
}
代码示例来源:origin: geotools/geotools
@Test
public void testDeserializationAttempt() throws Exception {
try {
String yaml = "!!java.util.Date\n" + "date: 25\n" + "month: 12\n" + "year: 2016";
Ysld.parse(yaml);
fail("Expected parsing to fail");
} catch (ConstructorException e) {
assertThat(e.getMessage(), containsString("could not determine a constructor"));
}
}
}
代码示例来源:origin: geotools/geotools
@Test
public void testExpressionAttribute() throws Exception {
String yaml = "text: \n" + " geometry: ${testAttribute}\n" + "";
StyledLayerDescriptor sld = Ysld.parse(yaml);
FeatureTypeStyle fs = SLD.defaultStyle(sld).featureTypeStyles().get(0);
TextSymbolizer symb = (TextSymbolizer) fs.rules().get(0).symbolizers().get(0);
Expression expr = symb.getGeometry();
assertThat(expr, attribute("testAttribute"));
}
代码示例来源:origin: geotools/geotools
@Test
public void testMultiplyCompositeOnFeatureTypeStyle() throws Exception {
String yaml = "feature-styles:\n" + "- name: name\n" + " x-composite: multiply\n" + "";
StyledLayerDescriptor sld = Ysld.parse(yaml);
FeatureTypeStyle fts = SLD.featureTypeStyles(sld)[0];
assertThat(fts, hasProperty("options", hasEntry("composite", "multiply")));
}
代码示例来源:origin: geotools/geotools
@Test
public void testEvilExpression1() throws Exception {
String yaml =
"point: \n" + " symbols: \n" + " - mark: \n" + " fill-color: \\$\\}\\\\\n";
StyledLayerDescriptor sld = Ysld.parse(yaml);
PointSymbolizer p = SLD.pointSymbolizer(SLD.defaultStyle(sld));
assertThat(SLD.fill(p).getColor(), literal(equalTo("$}\\")));
}
代码示例来源:origin: geotools/geotools
@Test
public void testFilterWithEscape() throws Exception {
String yaml = "rules: \n" + "- filter: ${foo = '\\$\\}'}\n";
StyledLayerDescriptor sld = Ysld.parse(yaml);
Rule r = SLD.defaultStyle(sld).featureTypeStyles().get(0).rules().get(0);
Filter f = r.getFilter();
assertThat(f, Matchers.instanceOf(PropertyIsEqualTo.class));
assertThat(((PropertyIsEqualTo) f).getExpression1(), attribute("foo"));
assertThat(((PropertyIsEqualTo) f).getExpression2(), literal("$}"));
}
代码示例来源:origin: geotools/geotools
@Test
public void testMultiplyCompositeBaseOnSymbolizer() throws Exception {
String yaml = "line:\n" + " x-composite-base: true\n" + "";
StyledLayerDescriptor sld = Ysld.parse(yaml);
LineSymbolizer p = (LineSymbolizer) SLD.lineSymbolizer(SLD.defaultStyle(sld));
assertThat(p, hasProperty("options", hasEntry("composite-base", "true")));
}
代码示例来源:origin: geotools/geotools
@Test
public void testAnchor() throws Exception {
String yaml =
"blue: &blue rgb(0,0,255)\n"
+ "point: \n"
+ " symbols: \n"
+ " - mark: \n"
+ " fill-color: *blue\n";
StyledLayerDescriptor sld = Ysld.parse(yaml);
PointSymbolizer p = SLD.pointSymbolizer(SLD.defaultStyle(sld));
assertEquals(Color.BLUE, SLD.color(SLD.fill(p)));
}
代码示例来源:origin: geotools/geotools
@Test
public void testNamedColor() throws Exception {
String yaml = "point: \n" + " symbols: \n" + " - mark: \n" + " fill-color: blue\n";
StyledLayerDescriptor sld = Ysld.parse(yaml);
PointSymbolizer p = SLD.pointSymbolizer(SLD.defaultStyle(sld));
assertEquals(Color.BLUE, SLD.color(SLD.fill(p)));
}
代码示例来源:origin: geotools/geotools
@Test
public void testDynamicColor() throws Exception {
String yaml =
"point: \n"
+ " symbols: \n"
+ " - mark: \n"
+ " fill-color: ${colourAttribute}\n";
StyledLayerDescriptor sld = Ysld.parse(yaml);
PointSymbolizer p = SLD.pointSymbolizer(SLD.defaultStyle(sld));
assertThat(SLD.fill(p).getColor(), attribute("colourAttribute"));
}
代码示例来源:origin: geotools/geotools
@Test
public void testUomFoot() throws Exception {
String yaml = "line:\n" + " uom: foot\n" + "";
StyledLayerDescriptor sld = Ysld.parse(yaml);
LineSymbolizer p = (LineSymbolizer) SLD.lineSymbolizer(SLD.defaultStyle(sld));
assertThat(p, hasProperty("unitOfMeasure", sameInstance(UomOgcMapping.FOOT.getUnit())));
}
代码示例来源:origin: geotools/geotools
@Test
public void testUomMetre() throws Exception {
String yaml = "line:\n" + " uom: metre\n" + "";
StyledLayerDescriptor sld = Ysld.parse(yaml);
LineSymbolizer p = (LineSymbolizer) SLD.lineSymbolizer(SLD.defaultStyle(sld));
assertThat(p, hasProperty("unitOfMeasure", sameInstance(UomOgcMapping.METRE.getUnit())));
}
代码示例来源:origin: geotools/geotools
@Test
public void testUomSymbol() throws Exception {
String yaml = "line:\n" + " uom: m\n" + "";
StyledLayerDescriptor sld = Ysld.parse(yaml);
LineSymbolizer p = (LineSymbolizer) SLD.lineSymbolizer(SLD.defaultStyle(sld));
assertThat(p, hasProperty("unitOfMeasure", sameInstance(UomOgcMapping.METRE.getUnit())));
}
代码示例来源:origin: geotools/geotools
@Test
public void testRasterBandSelectionGray() throws Exception {
String yaml = "raster:\n" + " channels:\n" + " gray:\n" + " name: foo\n";
StyledLayerDescriptor sld = Ysld.parse(yaml);
RasterSymbolizer r = SLD.rasterSymbolizer(SLD.defaultStyle(sld));
SelectedChannelType grayChannel = r.getChannelSelection().getGrayChannel();
assertThat(grayChannel.getChannelName().evaluate(null, String.class), equalTo("foo"));
assertThat(grayChannel.getContrastEnhancement(), nullContrast());
}
代码示例来源:origin: geotools/geotools
@Test
public void testRasterBandSelectionGrayTerse() throws Exception {
String yaml = "raster:\n" + " channels:\n" + " gray: 1\n";
StyledLayerDescriptor sld = Ysld.parse(yaml);
RasterSymbolizer r = SLD.rasterSymbolizer(SLD.defaultStyle(sld));
SelectedChannelType grayChannel = r.getChannelSelection().getGrayChannel();
assertThat(grayChannel.getChannelName().evaluate(null, String.class), equalTo("1"));
assertThat(grayChannel.getContrastEnhancement(), nullContrast());
}
代码示例来源:origin: geotools/geotools
@SuppressWarnings("unchecked")
@Test
public void testTextDisplacement() throws Exception {
String yaml = "text: \n" + " displacement: " + tuple(10, 42) + "\n";
StyledLayerDescriptor sld = Ysld.parse(yaml);
TextSymbolizer p = SLD.textSymbolizer(SLD.defaultStyle(sld));
assertThat(
((PointPlacement) p.getLabelPlacement()).getDisplacement(),
allOf(
hasProperty("displacementX", literal(10)),
hasProperty("displacementY", literal(42))));
}
代码示例来源:origin: geotools/geotools
@Test
public void testUomSEURL() throws Exception {
String yaml = "line:\n" + " uom: " + UomOgcMapping.FOOT.getSEString() + "\n" + "";
StyledLayerDescriptor sld = Ysld.parse(yaml);
LineSymbolizer p = (LineSymbolizer) SLD.lineSymbolizer(SLD.defaultStyle(sld));
assertThat(p, hasProperty("unitOfMeasure", sameInstance(UomOgcMapping.FOOT.getUnit())));
}
本文整理了Java中org.geotools.ysld.Ysld.encode()方法的一些代码示例,展示了Ysld.encode()的具体用法。这些代码示例主要来源于Github/Stackover
本文整理了Java中org.geotools.ysld.Ysld.validate()方法的一些代码示例,展示了Ysld.validate()的具体用法。这些代码示例主要来源于Github/Stack
本文整理了Java中org.geotools.ysld.Ysld.parse()方法的一些代码示例,展示了Ysld.parse()的具体用法。这些代码示例主要来源于Github/Stackoverfl
本文整理了Java中org.geotools.ysld.Ysld类的一些代码示例,展示了Ysld类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些
本文整理了Java中org.geotools.ysld.YamlSeq类的一些代码示例,展示了YamlSeq类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平
本文整理了Java中org.geotools.ysld.YamlUtil类的一些代码示例,展示了YamlUtil类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven
本文整理了Java中org.geoserver.ysld.YsldHandler类的一些代码示例,展示了YsldHandler类的具体用法。这些代码示例主要来源于Github/Stackoverflo
本文整理了Java中org.geotools.ysld.encode.YsldEncoder类的一些代码示例,展示了YsldEncoder类的具体用法。这些代码示例主要来源于Github/Stacko
本文整理了Java中org.geotools.ysld.parse.YsldParser类的一些代码示例,展示了YsldParser类的具体用法。这些代码示例主要来源于Github/Stackover
本文整理了Java中org.geotools.ysld.parse.YamlParseContext类的一些代码示例,展示了YamlParseContext类的具体用法。这些代码示例主要来源于Gith
本文整理了Java中org.geotools.ysld.parse.ZoomContext类的一些代码示例,展示了ZoomContext类的具体用法。这些代码示例主要来源于Github/Stackov
本文整理了Java中org.geotools.ysld.parse.ZoomContextFinder类的一些代码示例,展示了ZoomContextFinder类的具体用法。这些代码示例主要来源于Gi
本文整理了Java中org.geotools.ysld.YamlSeq.raw()方法的一些代码示例,展示了YamlSeq.raw()的具体用法。这些代码示例主要来源于Github/Stackover
我正在尝试在地理服务器中使用 CSS 样式来设置点图层的样式。 Geoserver 版本 2.11.3 从 tomcat:8-jre8 docker 容器构建(从这个 repo fork :https
本文整理了Java中org.geotools.ysld.encode.YsldEncoder.()方法的一些代码示例,展示了YsldEncoder.()的具体用法。这些代码示例主要来源于Github/
本文整理了Java中org.geotools.ysld.encode.YsldEncoder.encode()方法的一些代码示例,展示了YsldEncoder.encode()的具体用法。这些代码示例
本文整理了Java中org.geotools.ysld.parse.YamlParseContext.()方法的一些代码示例,展示了YamlParseContext.()的具体用法。这些代码示例主要来
本文整理了Java中org.geotools.ysld.parse.YamlParseContext.setDocHint()方法的一些代码示例,展示了YamlParseContext.setDocH
本文整理了Java中org.geotools.ysld.parse.YamlParseContext.getDocHint()方法的一些代码示例,展示了YamlParseContext.getDocH
本文整理了Java中org.geotools.ysld.parse.YamlParseContext.push()方法的一些代码示例,展示了YamlParseContext.push()的具体用法。这
我是一名优秀的程序员,十分优秀!