- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.apache.sis.io.wkt.WKTFormat.<init>()
方法的一些代码示例,展示了WKTFormat.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WKTFormat.<init>()
方法的具体详情如下:
包路径:org.apache.sis.io.wkt.WKTFormat
类名称:WKTFormat
方法名:<init>
[英]Creates a format for the given locale and timezone. The given locale will be used for InternationalString localization; this is not the locale for number format.
[中]为给定的语言环境和时区创建格式。给定的语言环境将用于国际字符串本地化;这不是数字格式的区域设置。
代码示例来源:origin: Geomatys/geotoolkit
/**
* Formats the given CRS as a string.
*
* @throws ContentFormatException if the given CRS is not formattable as a WKT.
*/
private static String format(final CoordinateReferenceSystem crs) throws ContentFormatException {
final WKTFormat format = new WKTFormat(null, null);
format.setConvention(Convention.WKT1);
format.setIndentation(WKTFormat.SINGLE_LINE);
final String wkt = format.format(crs);
final Warnings warning = format.getWarnings();
if (warning != null) {
throw new ContentFormatException(warning.toString());
}
return wkt;
}
代码示例来源:origin: apache/sis
/**
* Creates a new {@link DefaultCoordinateOperationFactory} to use for testing purpose.
* The same factory will be used for all tests in this class.
*
* @throws ParseException if an error occurred while preparing the WKT parser.
*/
@BeforeClass
public static void createFactory() throws ParseException {
factory = new DefaultCoordinateOperationFactory();
parser = new WKTFormat(null, null);
parser.addFragment("NTF",
"Datum[“Nouvelle Triangulation Française (Paris)”,\n" +
" Ellipsoid[“Clarke 1880 (IGN)”, 6378249.2, 293.4660212936269]]");
}
代码示例来源:origin: apache/sis
/**
* Tests consistency between the parser and the formatter when using the WKT 1 format.
* This test parses a WKT, formats it then parses again. We should obtain the same result.
*
* @throws ParseException if a parsing failed.
*/
@Test
@DependsOnMethod("testConsistencyOfWKT1")
public void testConsistencyOfWKT1_WithCommonUnits() throws ParseException {
format = new WKTFormat(null, null);
format.setConvention(Convention.WKT1_COMMON_UNITS);
parser = new WKTFormat(null, null);
parser.setConvention(Convention.WKT1);
testConsistency();
testConsistencyWithDenormalizedBaseCRS();
}
代码示例来源:origin: apache/sis
final WKTFormat f = new WKTFormat(locale, timezone);
if (convention != null) {
f.setConvention(convention);
代码示例来源:origin: apache/sis
/**
* Tests consistency between the parser and the formatter when using the WKT 1 format.
* This test parses a WKT, formats it then parses again. We should obtain the same result.
*
* @throws ParseException if a parsing failed.
*/
@Test
public void testConsistencyOfWKT1() throws ParseException {
format = new WKTFormat(null, null);
format.setConvention(Convention.WKT1);
parser = format;
testConsistency();
testConsistencyWithDenormalizedBaseCRS();
}
代码示例来源:origin: apache/sis
/**
* Tests consistency between the parser and the formatter when using the WKT 2 format.
* This test parses a WKT, formats it then parses again. We should obtain the same result.
*
* @throws ParseException if a parsing failed.
*/
@Test
@DependsOnMethod("testConsistencyOfWKT1")
public void testConsistencyOfWKT2() throws ParseException {
format = new WKTFormat(null, null);
format.setConvention(Convention.WKT2);
parser = format;
testConsistency();
}
代码示例来源:origin: apache/sis
/**
* Tests consistency between the parser and the formatter when using the WKT 2 simplified format.
* This test parses a WKT, formats it then parses again. We should obtain the same result.
*
* @throws ParseException if a parsing failed.
*/
@Test
@DependsOnMethod("testConsistencyOfWKT2")
public void testConsistencyOfWKT2_Simplified() throws ParseException {
format = new WKTFormat(null, null);
format.setConvention(Convention.WKT2_SIMPLIFIED);
parser = format;
testConsistency();
}
代码示例来源:origin: apache/sis
/**
* Specialization of {@link #testCoordinateReferenceSystems()} for specific cases that were known to fail.
* This is used for debugging purposes only; not included in normal test execution because it is redundant
* with {@link #testCoordinateReferenceSystems()}.
*
* @throws FactoryException if the coordinate reference system can not be created.
*
* @see <a href="https://issues.apache.org/jira/browse/SIS-433">SIS-433</a>
* @see <a href="https://issues.apache.org/jira/browse/SIS-434">SIS-434</a>
*/
public void debug() throws FactoryException {
final String code = "EPSG::29871";
final CoordinateReferenceSystem crs = CRS.forCode(code);
final WKTFormat format = new WKTFormat(null, null);
format.setConvention(Convention.WKT2);
lookup(parseAndFormat(format, code, crs), crs);
}
代码示例来源:origin: apache/sis
/**
* Tests integration in {@link WKTFormat#parse(CharSequence, ParsePosition)}.
* This method tests only a simple WKT because it is not the purpose of this
* method to test the parser itself. We only want to tests its integration in
* the {@link WKTFormat} class.
*
* @throws ParseException if the parsing failed.
*/
@Test
public void testParse() throws ParseException {
format = new WKTFormat(null, null);
final VerticalCRS crs = (VerticalCRS) format.parseObject(
"VERT_CS[“Gravity-related height”,\n" +
" VERT_DATUM[“Mean Sea Level”, 2005],\n" +
" UNIT[“metre”, 1],\n" +
" AXIS[“Gravity-related height”, UP]]");
GeodeticObjectParserTest.assertNameAndIdentifierEqual("Gravity-related height", 0, crs);
GeodeticObjectParserTest.assertNameAndIdentifierEqual("Mean Sea Level", 0, crs.getDatum());
}
代码示例来源:origin: apache/sis
public static void createFactory() throws ParseException {
factory = new DefaultCoordinateOperationFactory();
parser = new WKTFormat(null, null);
代码示例来源:origin: apache/sis
public static void createFactory() throws ParseException {
factory = new DefaultCoordinateOperationFactory();
parser = new WKTFormat(null, null);
parser.addFragment("NTF",
"ProjectedCRS[“NTF (Paris) / Lambert zone II”,\n" +
代码示例来源:origin: apache/sis
public void testCoordinateReferenceSystems() throws FactoryException {
assumeTrue(RUN_EXTENSIVE_TESTS);
final WKTFormat v1 = new WKTFormat(null, null);
final WKTFormat v1c = new WKTFormat(null, null);
final WKTFormat v2 = new WKTFormat(null, null);
final WKTFormat v2s = new WKTFormat(null, null);
v1 .setConvention(Convention.WKT1);
v1c.setConvention(Convention.WKT1_COMMON_UNITS);
代码示例来源:origin: apache/sis
/**
* Parses the given Well Known Text (version 1) into a math transform.
*/
@Override
public synchronized MathTransform createFromWKT(final String wkt) throws FactoryException {
ArgumentChecks.ensureNonEmpty("wkt", wkt);
if (parser == null) {
parser = new WKTFormat(null, null);
parser.setFactory(CRSAuthorityFactory.class, this);
parser.setFactory(MathTransformFactory.class, this);
parser.setFactory(CoordinateOperationFactory.class, this);
}
try {
return (MathTransform) parser.parseObject(wkt);
} catch (ParseException | ClassCastException e) {
throw new FactoryException(e);
}
}
代码示例来源:origin: apache/sis
/**
* Prints the coordinate operation or math transform in Well Known Text format.
* This information is printed only if the {@code --verbose} option was specified.
*/
private void printDetails() throws IOException {
final boolean debug = options.containsKey(Option.DEBUG);
final WKTFormat f = new WKTFormat(locale, timezone);
if (colors) f.setColors(Colors.DEFAULT);
f.setConvention(convention);
CharSequence[] lines = CharSequences.splitOnEOL(f.format(debug ? operation.getMathTransform() : operation));
for (int i=0; i<lines.length; i++) {
if (i == 0) {
printHeader(Vocabulary.Keys.Details);
} else {
printCommentLinePrefix();
outHeader.nextColumn();
}
outHeader.append(lines[i]);
outHeader.nextLine();
}
final Warnings warnings = f.getWarnings();
if (warnings != null) {
lines = CharSequences.splitOnEOL(warnings.toString());
if (lines.length != 0) { // Paranoiac check.
printHeader(Vocabulary.Keys.Note);
outHeader.append(lines[0]);
outHeader.nextLine();
}
}
}
代码示例来源:origin: Geomatys/geotoolkit
@Test
public void testFromWKT() throws ParseException, TransformException {
final WKTFormat parser = new WKTFormat(null, null);
final MathTransform mt = (MathTransform) parser.parseObject("Param_MT[\"Ellipsoid_To_Geoid\"]");
DirectPosition pos = new GeneralDirectPosition(new double[] {45, 45, 1000});
pos = mt.transform(pos, pos);
assertEquals( 45.000, pos.getOrdinate(0), 0.001);
assertEquals( 45.000, pos.getOrdinate(1), 0.001);
assertEquals(1001.515, pos.getOrdinate(2), 0.001);
}
}
代码示例来源:origin: apache/sis
/**
* Tests the usage of {@code WKTFormat} with WKT fragments.
*
* @throws ParseException if the parsing failed.
*/
@Test
public void testFragments() throws ParseException {
format = new WKTFormat(null, null);
format.addFragment("deg", "UNIT[“degree”, 0.0174532925199433]");
format.addFragment("Bessel", "SPHEROID[“Bessel 1841”, 6377397.155, 299.1528128, AUTHORITY[“EPSG”,“7004”]]");
format.addFragment("Tokyo", "DATUM[“Tokyo”, $Bessel]");
format.addFragment("Lat", "AXIS[“Lat”, NORTH, $deg]");
format.addFragment("Lon", "AXIS[“Long”, EAST, $deg]");
final Object crs = format.parseObject("GEOGCS[“Tokyo”, $Tokyo, $Lat, $Lon]");
final String wkt = format.format(crs);
assertMultilinesEquals(
"GEODCRS[\"Tokyo\",\n" +
" DATUM[\"Tokyo\",\n" +
" ELLIPSOID[\"Bessel 1841\", 6377397.155, 299.1528128, LENGTHUNIT[\"metre\", 1]]],\n" +
" PRIMEM[\"Greenwich\", 0.0, ANGLEUNIT[\"degree\", 0.017453292519943295]],\n" +
" CS[ellipsoidal, 2],\n" +
" AXIS[\"Latitude (B)\", north, ORDER[1]],\n" +
" AXIS[\"Longitude (L)\", east, ORDER[2]],\n" +
" ANGLEUNIT[\"degree\", 0.017453292519943295]]", wkt);
}
}
代码示例来源:origin: apache/sis
DefaultPrimeMeridian pm = new DefaultPrimeMeridian(Collections.singletonMap(
DefaultPrimeMeridian.NAME_KEY, "Invalid “$name” here"), -10, Units.DEGREE);
format = new WKTFormat(null, null);
final String wkt = format.format(pm);
final Warnings warnings = format.getWarnings();
代码示例来源:origin: apache/sis
final Symbols symbols = new Symbols(Symbols.SQUARE_BRACKETS);
symbols.setPairedQuotes("“”");
parser = format = new WKTFormat(null, null);
format.setSymbols(symbols);
final DefaultProjectedCRS crs = (DefaultProjectedCRS) parser.parseObject(
我正在尝试实现 Rosariosis 并安装它。我已经按照说明修改了 config.inc.php。 $DatabaseServer = 'localhost'; $DatabaseUsername
Closed. This question is off-topic. It is not currently accepting answers. Learn more。 想改进这个问题吗?Upda
本文整理了Java中org.apache.sis.xml.XML类的一些代码示例,展示了XML类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精
我正在为 S60 第三版 FP1 手机开发应用程序。 该应用程序使用位置功能,这意味着我们需要的不仅仅是一个自签名的 sis 文件来部署它。要在 FP1 移动设备中使用位置功能,我们需要使用“打开在线
我的任务是将 flite tts 移植到 symbian 操作系统。我们曾尝试编译flite tts并将其转换为sis格式(symbian os的安装文件)。有一个名为 Qtcreator 的 IDE
我目前正在考虑为 S60 平台开发移动应用程序,尤其是 PyS60。似乎表明它可以编译成 native .sis 文件而不需要嵌入式 python 解释器。通读文档,我找不到任何明确提到这一点的陈述。
本文整理了Java中org.apache.sis.io.wkt.WKTFormat类的一些代码示例,展示了WKTFormat类的具体用法。这些代码示例主要来源于Github/Stackoverflow
本文整理了Java中org.apache.sis.internal.util.X364类的一些代码示例,展示了X364类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Ma
本文整理了Java中org.apache.sis.xml.XML.marshal()方法的一些代码示例,展示了XML.marshal()的具体用法。这些代码示例主要来源于Github/Stackove
本文整理了Java中org.apache.sis.xml.XML.unmarshal()方法的一些代码示例,展示了XML.unmarshal()的具体用法。这些代码示例主要来源于Github/Stac
我希望使用 java 读取 .sis 文件(symbian 内容),并希望尝试从二进制文件中获取尽可能多的元相关信息,例如应用程序名称、版本、平台支持和目标语言。我认为这可以通过查看 symbian
我想通过设备上的 Java ME 应用程序开始安装 sis 文件。 我知道如果我使用 Symbian,我可以使用 RSWInstLauncher,如 http://wiki.forum.nokia.c
关注我的 previous question我现在正在尝试通过 NSIS 代码执行批处理文件,以便在解压缩后成功设置 postgres 安装。批处理文件包含初始化数据库的命令,但由于权限限制而失败。我
我已经为上述模型创建了一些非常基本的实现。然而,尽管图表看起来是正确的,但数字加起来并不是一个常数。那是因为每个隔间中的易感者/感染者/康复者的总和应该加起来为 N(这是总人数),但事实并非如此,由于
本文整理了Java中org.apache.sis.io.wkt.WKTFormat.()方法的一些代码示例,展示了WKTFormat.()的具体用法。这些代码示例主要来源于Github/Stackov
本文整理了Java中org.apache.sis.io.wkt.WKTFormat.format()方法的一些代码示例,展示了WKTFormat.format()的具体用法。这些代码示例主要来源于Gi
本文整理了Java中org.apache.sis.io.wkt.WKTFormat.setConvention()方法的一些代码示例,展示了WKTFormat.setConvention()的具体用法
本文整理了Java中org.apache.sis.io.wkt.WKTFormat.parseObject()方法的一些代码示例,展示了WKTFormat.parseObject()的具体用法。这些代
本文整理了Java中org.apache.sis.io.wkt.WKTFormat.getWarnings()方法的一些代码示例,展示了WKTFormat.getWarnings()的具体用法。这些代
本文整理了Java中org.apache.sis.internal.util.X364.plain()方法的一些代码示例,展示了X364.plain()的具体用法。这些代码示例主要来源于Github/
我是一名优秀的程序员,十分优秀!