- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.geotools.ysld.Ysld
类的一些代码示例,展示了Ysld
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ysld
类的具体详情如下:
包路径:org.geotools.ysld.Ysld
类名称:Ysld
[英]Parses, encodes, and transforms Ysld.
[中]解析、编码和转换Ysld。
代码示例来源:origin: geotools/geotools
/**
* Encodes a GeoTools style object as Ysld.
*
* @param sld The sld to encode.
* @param output The output object, anything accepted by {@link #writer(Object)}
*/
public static void encode(StyledLayerDescriptor sld, Object output) throws IOException {
encode(sld, output, new UomMapper());
}
代码示例来源:origin: geotools/geotools
/**
* Parses a Ysld stream into GeoTools style objects.
*
* @param ysld The Ysld content, anything accepted by {@link #reader(Object)}.
* @return The GeoTools SLD object.
*/
public static StyledLayerDescriptor parse(Object ysld) throws IOException {
return parse(ysld, (List<ZoomContextFinder>) null, (ResourceLocator) null, new UomMapper());
}
代码示例来源:origin: geotools/geotools
/**
* Validates a Ysld stream.
*
* @param ysld The Ysld.
* @return List of marked exceptions corresponding to validation errors.
*/
public static List<MarkedYAMLException> validate(Object ysld) throws IOException {
return validate(ysld, Collections.<ZoomContextFinder>emptyList(), new UomMapper());
}
代码示例来源:origin: geotools/geotools
/**
* Creates an XML reader from an input object.
*
* @param input THe input object, see {@link #reader(Object)} for details.
*/
public static XMLStreamReader xmlReader(Object input) throws IOException {
YsldInput in = reader(input);
try {
XMLInputFactory xmlFactory = XMLInputFactory.newFactory();
try {
return xmlFactory.createXMLStreamReader(in.reader);
} catch (XMLStreamException e) {
throw new IOException(e);
}
} finally {
in.close();
}
}
代码示例来源:origin: geotools/geotools
/**
* Encodes a GeoTools style object as Ysld.
*
* @param sld The sld to encode.
* @param output The output object, anything accepted by {@link #writer(Object)}
*/
public static void encode(StyledLayerDescriptor sld, Object output, UomMapper uomMapper)
throws IOException {
YsldEncoder e = new YsldEncoder(writer(output), uomMapper);
e.encode(sld);
}
代码示例来源:origin: geotools/geotools
Style parse(String dir, String file) throws IOException {
StringWriter writer = new StringWriter();
transform(YsldTests.sld(dir, file), writer);
// System.out.println(writer.toString());
YsldParser p = new YsldParser(new StringReader(writer.toString()));
return SLD.defaultStyle(p.parse());
}
代码示例来源:origin: geotools/geotools
/**
* Parses a Ysld stream into GeoTools style objects.
*
* @param ysld The Ysld content, anything accepted by {@link #reader(Object)}.
* @param locator Resource locator for resolving relative URIs.
* @return The GeoTools SLD object.
*/
public static StyledLayerDescriptor parse(
Object ysld,
@Nullable List<ZoomContextFinder> zCtxtFinders,
@Nullable ResourceLocator locator,
@Nullable UomMapper uomMapper)
throws IOException {
YsldInput in = reader(ysld);
try {
YsldParser parser = new YsldParser(in.reader);
if (zCtxtFinders != null) {
parser.setZoomContextFinders(zCtxtFinders);
}
if (locator != null) {
parser.setResourceLocator(locator);
}
if (uomMapper != null) {
parser.setUomMapper(uomMapper);
}
return parser.parse();
} finally {
in.close();
}
}
代码示例来源:origin: org.geotools/gt-ysld
/**
* Encodes a GeoTools style object as Ysld.
*
* @param sld The sld to encode.
* @param output The output object, anything accepted by {@link #writer(Object)}
*/
public static void encode(StyledLayerDescriptor sld, Object output, UomMapper uomMapper)
throws IOException {
YsldEncoder e = new YsldEncoder(writer(output), uomMapper);
e.encode(sld);
}
代码示例来源:origin: geotools/geotools
/**
* Transforms an SLD stream to Ysld.
*
* @param sld SLD xml reader.
* @param ysld Ysld writer.
*/
public static void transform(InputStream sld, Writer ysld) throws IOException {
SLDParser parser = new SLDParser(CommonFactoryFinder.getStyleFactory(), sld);
StyledLayerDescriptor style = parser.parseSLD();
Ysld.encode(style, ysld);
}
代码示例来源: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
List<MarkedYAMLException> validate(String ysld, List<ZoomContextFinder> ctxts)
throws IOException {
// return dump(Ysld.validate(ysld));
return Ysld.validate(ysld, ctxts, new UomMapper());
}
代码示例来源:origin: geotools/geotools
@Test
public void readerTest() throws IOException {
InputStream inputStream = YsldTest.class.getResourceAsStream("point.yml");
YsldInput reader = Ysld.reader(inputStream);
reader.close();
try {
inputStream.read();
fail("inputStream should be closed");
} catch (IOException e) {
// expect IOException reading from a closed reader
}
}
}
代码示例来源:origin: geotools/geotools
@Test
public void testFTSVendorOption() throws Exception {
PointSymbolizer p = CommonFactoryFinder.getStyleFactory().createPointSymbolizer();
FeatureTypeStyle fts = fts(p);
fts.getOptions().put("foo", "bar");
StringWriter out = new StringWriter();
Ysld.encode(sld(fts), out);
System.out.append(out.toString());
YamlMap obj = new YamlMap(YamlUtil.getSafeYaml().load(out.toString()));
YamlMap result = obj.seq("feature-styles").map(0);
assertThat(result.str("x-foo"), equalTo("bar"));
}
代码示例来源: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: org.geotools/gt-ysld
/**
* Validates a Ysld stream.
*
* @param ysld The Ysld.
* @return List of marked exceptions corresponding to validation errors.
*/
public static List<MarkedYAMLException> validate(Object ysld) throws IOException {
return validate(ysld, Collections.<ZoomContextFinder>emptyList(), new UomMapper());
}
代码示例来源:origin: geotools/geotools
/**
* Validates a Ysld stream.
*
* @param ysld The Ysld.
* @param zContextFinders additional zoom context finders in order of priority.
* @return List of marked exceptions corresponding to validation errors.
*/
public static List<MarkedYAMLException> validate(
Object ysld, List<ZoomContextFinder> zContextFinders, UomMapper uomMapper)
throws IOException {
YsldInput in = reader(ysld);
try {
YsldValidator validator = new YsldValidator();
validator.setZCtxtFinders(zContextFinders);
return validator.validate(in.reader);
} finally {
in.close();
}
}
代码示例来源:origin: geotools/geotools
@Test
public void testExpressionNil() throws Exception {
PointSymbolizer p = CommonFactoryFinder.getStyleFactory().createPointSymbolizer();
p.getGraphic().setSize(Expression.NIL);
StringWriter out = new StringWriter();
Ysld.encode(sld(p), out);
// System.out.println(out.toString());
}
代码示例来源: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: org.geoserver.community/gs-ysld
@SuppressWarnings({ "rawtypes", "unchecked" })
@Override
public List<Exception> validate(Object input, Version version, EntityResolver entityResolver) throws IOException {
return (List) Ysld.validate(toReader(input), Collections.singletonList(zoomFinder), uomMapper);
}
代码示例来源:origin: org.geotools/gt-ysld
/**
* Creates an XML reader from an input object.
*
* @param input THe input object, see {@link #reader(Object)} for details.
*/
public static XMLStreamReader xmlReader(Object input) throws IOException {
YsldInput in = reader(input);
try {
XMLInputFactory xmlFactory = XMLInputFactory.newFactory();
try {
return xmlFactory.createXMLStreamReader(in.reader);
} catch (XMLStreamException e) {
throw new IOException(e);
}
} finally {
in.close();
}
}
本文整理了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()的具体用法。这
我是一名优秀的程序员,十分优秀!