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


Java Envelope.expandToInclude方法代码示例

本文整理汇总了Java中com.vividsolutions.jts.geom.Envelope.expandToInclude方法的典型用法代码示例。如果您正苦于以下问题:Java Envelope.expandToInclude方法的具体用法?Java Envelope.expandToInclude怎么用?Java Envelope.expandToInclude使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.vividsolutions.jts.geom.Envelope的用法示例。


在下文中一共展示了Envelope.expandToInclude方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: create

import com.vividsolutions.jts.geom.Envelope; //导入方法依赖的package包/类
private void create() {
    if (this.subdiv != null) {
        return;
    }

    Envelope siteEnv = DelaunayTriangulationBuilder.envelope(this.siteCoords);

    List segments = new ArrayList();
    if (this.constraintLines != null) {
        siteEnv.expandToInclude(this.constraintLines.getEnvelopeInternal());
        this.createVertices(this.constraintLines);
        segments = createConstraintSegments(this.constraintLines);
    }
    List sites = this.createSiteVertices(this.siteCoords);

    ConformingDelaunayTriangulator cdt = new ConformingDelaunayTriangulator(sites, this.tolerance);

    cdt.setConstraints(segments, new ArrayList(this.constraintVertexMap.values()));

    cdt.formInitialDelaunay();
    cdt.enforceConstraints();
    this.subdiv = cdt.getSubdivision();
}
 
开发者ID:gegy1000,项目名称:Earth,代码行数:24,代码来源:ConformingDelaunayTriangulationBuilder.java

示例2: enveloppe

import com.vividsolutions.jts.geom.Envelope; //导入方法依赖的package包/类
private static Envelope enveloppe(WayContainer way) {
    Envelope env = new Envelope();
    for (WayNode wn : way.getEntity().getWayNodes()) {
        LatLong geohash = Geohash.decodeGeohash(wn.getNodeId());
        env.expandToInclude(geohash.getLon(), geohash.getLat());
    }
    return env;
}
 
开发者ID:Mappy,项目名称:fpm,代码行数:9,代码来源:Splitter.java

示例3: expandEnvelope

import com.vividsolutions.jts.geom.Envelope; //导入方法依赖的package包/类
public Envelope expandEnvelope(Envelope env)
{
	for (int i = 0; i < coordinates.length; i++ ) {
		env.expandToInclude(coordinates[i]);
	}
	return env;
}
 
开发者ID:GIScience,项目名称:openrouteservice,代码行数:8,代码来源:AvoidAreasEdgeFilter.java

示例4: getEnvelopeUnion

import com.vividsolutions.jts.geom.Envelope; //导入方法依赖的package包/类
/**
 * Get the union.
 *
 * @param r the other geometry
 * @return the union of this geometry envelope and another geometry envelope
 */
public Value getEnvelopeUnion(ValueGeometry r) {
    GeometryFactory gf = new GeometryFactory();
    Envelope mergedEnvelope = new Envelope(getGeometryNoCopy().getEnvelopeInternal());
    mergedEnvelope.expandToInclude(r.getGeometryNoCopy().getEnvelopeInternal());
    return get(gf.toGeometry(mergedEnvelope));
}
 
开发者ID:vdr007,项目名称:ThriftyPaxos,代码行数:13,代码来源:ValueGeometry.java

示例5: box

import com.vividsolutions.jts.geom.Envelope; //导入方法依赖的package包/类
public static Envelope box(Collection<OsmNode> nodes) {
    Envelope env = new Envelope();
    for (OsmNode node : nodes) {
        env.expandToInclude(node.getLongitude(), node.getLatitude());
    }
    return env;
}
 
开发者ID:gegy1000,项目名称:Earth,代码行数:8,代码来源:BboxBuilder.java

示例6: getEnvelope

import com.vividsolutions.jts.geom.Envelope; //导入方法依赖的package包/类
/**
 * Computes the envelope of the edges in the subgraph.
 * The envelope is cached after being computed.
 *
 * @return the envelope of the graph.
 */
public Envelope getEnvelope() {
    if (this.env == null) {
        Envelope edgeEnv = new Envelope();
        for (Object aDirEdgeList : dirEdgeList) {
            DirectedEdge dirEdge = (DirectedEdge) aDirEdgeList;
            Coordinate[] pts = dirEdge.getEdge().getCoordinates();
            for (int i = 0; i < pts.length - 1; i++) {
                edgeEnv.expandToInclude(pts[i]);
            }
        }
        this.env = edgeEnv;
    }
    return this.env;
}
 
开发者ID:gegy1000,项目名称:Earth,代码行数:21,代码来源:BufferSubgraph.java

示例7: getEnvelope

import com.vividsolutions.jts.geom.Envelope; //导入方法依赖的package包/类
public Envelope getEnvelope() {
    Envelope env = new Envelope();
    for (int i = this.start; i < this.end; i++) {
        env.expandToInclude(this.pts.getX(i), this.pts.getY(i));
    }
    return env;
}
 
开发者ID:gegy1000,项目名称:Earth,代码行数:8,代码来源:FacetSequence.java

示例8: computeVertexEnvelope

import com.vividsolutions.jts.geom.Envelope; //导入方法依赖的package包/类
private static Envelope computeVertexEnvelope(Collection vertices) {
    Envelope env = new Envelope();
    for (Object vertice : vertices) {
        Vertex v = (Vertex) vertice;
        env.expandToInclude(v.getCoordinate());
    }
    return env;
}
 
开发者ID:gegy1000,项目名称:Earth,代码行数:9,代码来源:ConformingDelaunayTriangulator.java

示例9: computeBoundingBox

import com.vividsolutions.jts.geom.Envelope; //导入方法依赖的package包/类
private void computeBoundingBox() {
    Envelope vertexEnv = computeVertexEnvelope(this.initialVertices);
    Envelope segEnv = computeVertexEnvelope(this.segVertices);

    Envelope allPointsEnv = new Envelope(vertexEnv);
    allPointsEnv.expandToInclude(segEnv);

    double deltaX = allPointsEnv.getWidth() * 0.2;
    double deltaY = allPointsEnv.getHeight() * 0.2;

    double delta = Math.max(deltaX, deltaY);

    this.computeAreaEnv = new Envelope(allPointsEnv);
    this.computeAreaEnv.expandBy(delta);
}
 
开发者ID:gegy1000,项目名称:Earth,代码行数:16,代码来源:ConformingDelaunayTriangulator.java

示例10: envelope

import com.vividsolutions.jts.geom.Envelope; //导入方法依赖的package包/类
/**
 * Computes the {@link Envelope} of a collection of {@link Coordinate}s.
 *
 * @param coords a List of Coordinates
 * @return the envelope of the set of coordinates
 */
public static Envelope envelope(Collection coords) {
    Envelope env = new Envelope();
    for (Object coord1 : coords) {
        Coordinate coord = (Coordinate) coord1;
        env.expandToInclude(coord);
    }
    return env;
}
 
开发者ID:gegy1000,项目名称:Earth,代码行数:15,代码来源:DelaunayTriangulationBuilder.java

示例11: createExpanded

import com.vividsolutions.jts.geom.Envelope; //导入方法依赖的package包/类
public static Node createExpanded(Node node, Envelope addEnv) {
    Envelope expandEnv = new Envelope(addEnv);
    if (node != null) {
        expandEnv.expandToInclude(node.env);
    }

    Node largerNode = createNode(expandEnv);
    if (node != null) {
        largerNode.insertNode(node);
    }
    return largerNode;
}
 
开发者ID:gegy1000,项目名称:Earth,代码行数:13,代码来源:Node.java

示例12: expandEnvelope

import com.vividsolutions.jts.geom.Envelope; //导入方法依赖的package包/类
@Override
public Envelope expandEnvelope(Envelope env) {
    for (Coordinate coordinate : coordinates) {
        env.expandToInclude(coordinate);
    }
    return env;
}
 
开发者ID:gegy1000,项目名称:Earth,代码行数:8,代码来源:CoordinateArraySequence.java

示例13: expandEnvelope

import com.vividsolutions.jts.geom.Envelope; //导入方法依赖的package包/类
@Override
public Envelope expandEnvelope(Envelope env) {
    for (int i = 0; i < this.coords.length; i += this.dimension) {
        env.expandToInclude(this.coords[i], this.coords[i + 1]);
    }
    return env;
}
 
开发者ID:gegy1000,项目名称:Earth,代码行数:8,代码来源:PackedCoordinateSequence.java


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