Package com.vividsolutions.jts.geom

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


    Envelope bbox = Utilities.fromNeo4jToJts(layer.getIndex().getBoundingBox());
    double width = bbox.getWidth() * fraction;
    double height = bbox.getWidth() * fraction;
    Envelope extent = new Envelope(point);
    extent.expandToInclude(point.x - width / 2.0, point.y - height / 2.0);
    extent.expandToInclude(point.x + width / 2.0, point.y + height / 2.0);
    return extent;
  }

}
View Full Code Here


        graphDb.shutdown();
  }

  private Envelope makeFilterEnvelope() {
    Envelope filterEnvelope = new Envelope();
    filterEnvelope.expandToInclude(new Coordinate(-71.00, 42.10));
    filterEnvelope.expandToInclude(new Coordinate(-71.70, 42.50));
    return filterEnvelope;
  }
 
  private void importOSMDatabase(String osmPath, String dbPath, String layerName) throws ParseException, IOException, XMLStreamException, InterruptedException {
View Full Code Here

  }

  private Envelope makeFilterEnvelope() {
    Envelope filterEnvelope = new Envelope();
    filterEnvelope.expandToInclude(new Coordinate(-71.00, 42.10));
    filterEnvelope.expandToInclude(new Coordinate(-71.70, 42.50));
    return filterEnvelope;
  }
 
  private void importOSMDatabase(String osmPath, String dbPath, String layerName) throws ParseException, IOException, XMLStreamException, InterruptedException {
    OSMImporter importer = new OSMImporter(layerName, new ConsoleListener(), makeFilterEnvelope());
View Full Code Here

            tx.success();
        }
        try (Transaction tx = graphDb().beginTx()) {
            // Repeat with an envelope
            Envelope env = new Envelope(point.getCoordinate().x, point.getCoordinate().x, point.getCoordinate().y, point.getCoordinate().y);
            env.expandToInclude(shortLineString.getEnvelopeInternal());
            env.expandToInclude(longLineString.getEnvelopeInternal());
            pipeline = GeoPipeline.startNearestNeighborSearch(layer, point.getCoordinate(), env)
                    .sort("Distance")
                    .getMin("Distance");
            System.out.println("Searching for geometries close to " + point + " within " + env);
View Full Code Here

        }
        try (Transaction tx = graphDb().beginTx()) {
            // Repeat with an envelope
            Envelope env = new Envelope(point.getCoordinate().x, point.getCoordinate().x, point.getCoordinate().y, point.getCoordinate().y);
            env.expandToInclude(shortLineString.getEnvelopeInternal());
            env.expandToInclude(longLineString.getEnvelopeInternal());
            pipeline = GeoPipeline.startNearestNeighborSearch(layer, point.getCoordinate(), env)
                    .sort("Distance")
                    .getMin("Distance");
            System.out.println("Searching for geometries close to " + point + " within " + env);
            for (SpatialRecord result : pipeline) {
View Full Code Here

        Style style = catalog.getStyleByName("Default").getStyle();

        FeatureTypeInfo typeInfo = catalog.getFeatureTypeByName(MockData.LAKES.getNamespaceURI(),
                MockData.LAKES.getLocalPart());
        Envelope env = typeInfo.getFeatureSource(null, null).getBounds();
        env.expandToInclude(fSource.getBounds());

        int w = 400;
        int h = (int) Math.round((env.getHeight() * w) / env.getWidth());

        double shift = env.getWidth() / 6;
View Full Code Here

                    }
                } catch (Exception e) {
                    throw new RuntimeException(e);
                }
                if (aggregateBbox != null) {
                    aggregateBbox.expandToInclude(curbbox);
                } else {
                    aggregateBbox = curbbox;
                }
            }
View Full Code Here

           }
         */
        Style style = getStyle("default.sld");

        Envelope env = getBlueLakeBounds();
        env.expandToInclude(fSource.getBounds());

        int w = 400;
        int h = (int) Math.round((env.getHeight() * w) / env.getWidth());

        double shift = env.getWidth() / 6;
View Full Code Here

  }

  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

    private double combinedEnvelopeDiagonalDistance(
        Geometry target,
        Geometry candidate) {
        Envelope envelope = new Envelope(target.getEnvelopeInternal());
        envelope.expandToInclude(candidate.getEnvelopeInternal());
        return Point2D.distance(
            envelope.getMinX(),
            envelope.getMinY(),
            envelope.getMaxX(),
            envelope.getMaxY());
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.