當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。