本文整理匯總了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();
}
示例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;
}
示例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;
}
示例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));
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例12: expandEnvelope
import com.vividsolutions.jts.geom.Envelope; //導入方法依賴的package包/類
@Override
public Envelope expandEnvelope(Envelope env) {
for (Coordinate coordinate : coordinates) {
env.expandToInclude(coordinate);
}
return env;
}
示例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;
}