本文整理汇总了Java中org.opengis.geometry.primitive.PrimitiveFactory类的典型用法代码示例。如果您正苦于以下问题:Java PrimitiveFactory类的具体用法?Java PrimitiveFactory怎么用?Java PrimitiveFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PrimitiveFactory类属于org.opengis.geometry.primitive包,在下文中一共展示了PrimitiveFactory类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initialise
import org.opengis.geometry.primitive.PrimitiveFactory; //导入依赖的package包/类
/**
* Initialise the WKTParser object.
*/
private static void initialise() {
Hints hints = new Hints(Hints.CRS, DefaultGeographicCRS.WGS84);
PositionFactory positionFactory = GeometryFactoryFinder.getPositionFactory(hints);
GeometryFactory geometryFactory = GeometryFactoryFinder.getGeometryFactory(hints);
PrimitiveFactory primitiveFactory = GeometryFactoryFinder.getPrimitiveFactory(hints);
AggregateFactory aggregateFactory = GeometryFactoryFinder.getAggregateFactory(hints);
wktParser = new WKTParser(geometryFactory, primitiveFactory, positionFactory,
aggregateFactory);
wktTypeList.add(new WKTType(WKT_POINT, false, 1, "Point", false, false));
wktTypeList.add(new WKTType(WKT_MULTIPOINT, true, 1, "Point", true, false));
wktTypeList.add(new WKTType(WKT_LINESTRING, false, 2, "Line", false, false));
wktTypeList.add(new WKTType("LINEARRING", false, 2, "Line", false, false));
wktTypeList.add(new WKTType(WKT_MULTILINESTRING, true, 2, "Line", true, false));
wktTypeList.add(new WKTType(WKT_POLYGON, false, -1, "Polygon", false, true));
wktTypeList.add(new WKTType(WKT_MULTIPOLYGON, true, -1, "Polygon", true, true));
for (WKTType wkyType : wktTypeList) {
wktTypeMap.put(wkyType.getName(), wkyType);
}
}