Package com.vividsolutions.jts.geom

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


        if(geom == null) {
            return infinity();
        }
       
        Envelope env = geom.getEnvelopeInternal();
        env.expandBy(filter.getDistance());
       
        if(bbox != null) {
            bbox.expandToInclude(env);
            return bbox;
        } else {
View Full Code Here


                double mratio = mwidth / mheight;
                // Adjust bounds to be less than ideal to meet spec
                if (bbratio > mratio) {
                    // Too wide, need to increase height of bb
                    double diff = ((bbwidth / mratio) - bbheight) / 2;
                    aggregateBbox.expandBy(0, diff);
                } else {
                    // Too tall, need to increase width of bb
                    double diff = ((bbheight * mratio) - bbwidth) / 2;
                    aggregateBbox.expandBy(diff, 0);
                }
View Full Code Here

                    double diff = ((bbwidth / mratio) - bbheight) / 2;
                    aggregateBbox.expandBy(0, diff);
                } else {
                    // Too tall, need to increase width of bb
                    double diff = ((bbheight * mratio) - bbwidth) / 2;
                    aggregateBbox.expandBy(diff, 0);
                }

                adjustBounds(reqSRS, aggregateBbox);

            } else if (mheight > 0.5) {
View Full Code Here

        Utilities.fromNeo4jToJts(layer.getIndex().getBoundingBox()),
        layer.getCoordinateReferenceSystem());
    if (distance <= 0.0)
      distance = env.getSpan(0) / 100.0;
    Envelope search = new Envelope(point.getCoordinate());
    search.expandBy(distance);
    GeometryFactory factory = layer.getGeometryFactory();
    return findClosestEdges(point, layer, factory.toGeometry(search));
  }

    /**
 
View Full Code Here

                double mratio = mwidth / mheight;
                // Adjust bounds to be less than ideal to meet spec
                if (bbratio > mratio) {
                    // Too wide, need to increase height of bb
                    double diff = ((bbwidth / mratio) - bbheight) / 2;
                    aggregateBbox.expandBy(0, diff);
                } else {
                    // Too tall, need to increase width of bb
                    double diff = ((bbheight * mratio) - bbwidth) / 2;
                    aggregateBbox.expandBy(diff, 0);
                }
View Full Code Here

                    double diff = ((bbwidth / mratio) - bbheight) / 2;
                    aggregateBbox.expandBy(0, diff);
                } else {
                    // Too tall, need to increase width of bb
                    double diff = ((bbheight * mratio) - bbwidth) / 2;
                    aggregateBbox.expandBy(diff, 0);
                }

                adjustBounds(reqSRS, aggregateBbox);

            } else if (mheight > 0.5) {
View Full Code Here

             * for display
             */
            Envelope orig_bbox = layer.getLatLonBoundingBox();

            if ((orig_bbox.getWidth() == 0) || (orig_bbox.getHeight() == 0)) {
                orig_bbox.expandBy(0.1);
            }

            ReferencedEnvelope bbox = new ReferencedEnvelope(orig_bbox, latLonCrs);

            if (!CRS.equalsIgnoreMetadata(layerCrs, latLonCrs)) {
View Full Code Here

    return gf.createLineString(new Coordinate[]{a.pos, b.pos});
  }
 
  public Envelope getEnvelope(){
    Envelope e = new Envelope(a.pos, b.pos);
    e.expandBy(width); //for intersection points
    return e;
  }
}
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.