本文整理汇总了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;
}