当前位置: 首页>>代码示例>>Java>>正文


Java PrimitiveFactory类代码示例

本文整理汇总了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);
    }
}
 
开发者ID:robward-scisys,项目名称:sldeditor,代码行数:27,代码来源:WKTConversion.java


注:本文中的org.opengis.geometry.primitive.PrimitiveFactory类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。