Examples of expandToInclude()


Examples of com.vividsolutions.jts.geom.Envelope.expandToInclude()

  }

  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;
  }
View Full Code Here

Examples of com.vividsolutions.jts.geom.Envelope.expandToInclude()

{
  private static Envelope computeVertexEnvelope(Collection vertices) {
    Envelope env = new Envelope();
    for (Iterator i = vertices.iterator(); i.hasNext();) {
      Vertex v = (Vertex) i.next();
      env.expandToInclude(v.getCoordinate());
    }
    return env;
  }

  private List initialVertices; // List<Vertex>
View Full Code Here

Examples of com.vividsolutions.jts.geom.Envelope.expandToInclude()

  private void computeBoundingBox() {
    Envelope vertexEnv = computeVertexEnvelope(initialVertices);
    Envelope segEnv = computeVertexEnvelope(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);
View Full Code Here

Examples of com.vividsolutions.jts.geom.Envelope.expandToInclude()

        Envelope envelope = env;
        if (envelope == null) {
            envelope = new Envelope();
        }
        for (int i = 0; i < this.numPoints; i++) {
            envelope.expandToInclude(getOrdinate(i, 0), getOrdinate(i, 1));
        }

        return envelope;
    }
View Full Code Here

Examples of com.vividsolutions.jts.geom.Envelope.expandToInclude()

        for (Optional<Object> opt : feat.getValues()) {
            if (opt.isPresent() && opt.get() instanceof Geometry) {
                if (env == null) {
                    env = new Envelope();
                }
                env.expandToInclude(((Geometry) opt.get()).getEnvelopeInternal());
            }
        }
        return env;
    }
}
View Full Code Here

Examples of com.vividsolutions.jts.geom.Envelope.expandToInclude()

                    // TODO: check userData for crs... and ensure its of the same
                    // crs as the feature type
                    if (bounds.isNull()) {
                        bounds.init(JTS.bounds(g, crs));
                    } else {
                        bounds.expandToInclude(JTS.bounds(g, crs));
                    }
                }
            }
        } else {
            node.expand(bounds);
View Full Code Here

Examples of com.vividsolutions.jts.geom.Envelope.expandToInclude()

            if (o.isPresent() && o.get() instanceof Geometry) {
                Geometry g = (Geometry) o.get();
                if (bounds.isNull()) {
                    bounds.init(JTS.bounds(g, crs));
                } else {
                    bounds.expandToInclude(JTS.bounds(g, crs));
                }
            }
        }

        NodeRef node = new NodeRef(Node.create(NodeRef.nodeFromPath(path), objectId, ObjectId.NULL,
View Full Code Here

Examples of com.vividsolutions.jts.geom.Envelope.expandToInclude()

    }

    public Envelope getExtent() {
        Envelope env = new Envelope();
        for (Vertex v : getVertices()) {
            env.expandToInclude(v.getCoordinate());
        }
        return env;
    }

    public TransferTable getTransferTable() {
View Full Code Here

Examples of com.vividsolutions.jts.geom.Envelope.expandToInclude()

            Envelope envelope = new Envelope();
            long osmId = area.parent.getId();
            String creativeName = wayPropertySet.getCreativeNameForWay(area.parent);
            for (Ring ring : area.outermostRings) {
                for (OSMNode node : ring.nodes) {
                    envelope.expandToInclude(new Coordinate(node.lon, node.lat));
                }
            }
            BikePark bikePark = new BikePark();
            bikePark.id = "" + osmId;
            bikePark.name = creativeName;
View Full Code Here

Examples of com.vividsolutions.jts.geom.Envelope.expandToInclude()

                osmId = area.parent.getId();
                if (creativeName == null || area.parent.getTag("name") != null)
                    creativeName = wayPropertySet.getCreativeNameForWay(area.parent);
                for (Ring ring : area.outermostRings) {
                    for (OSMNode node : ring.nodes) {
                        envelope.expandToInclude(new Coordinate(node.lon, node.lat));
                        IntersectionVertex accessVertex = getVertexForOsmNode(node, area.parent);
                        if (accessVertex.getIncoming().isEmpty()
                                || accessVertex.getOutgoing().isEmpty())
                            continue;
                        accessVertexes.add(accessVertex);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.