Package com.vividsolutions.jts.geom

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


       
        and = ff.and(bb, bb2);
        splitter = new BBoxFilterSplitter();
        and.accept(splitter, null);
        Envelope i = new Envelope(bbenv);
        i.expandToInclude(bb2env);
        Envelope s = splitter.getEnvelope();
        assertEquals(i, s);
        assertEquals(and, splitter.getFilterPost());
    }
View Full Code Here


    public void testBinarySpatialOperator() {
        BBoxFilterSplitter splitter = new BBoxFilterSplitter();
        Filter and = ff.and(bb, bso);
        and.accept(splitter, null);
        Envelope testenv = bbenv;
        testenv.expandToInclude(bsoenv);
        assertEquals(testenv, splitter.getEnvelope());
        assertEquals(and, splitter.getFilterPost());
       
        SimpleFeature sf = createTestFeature();
        assertTrue(splitter.getFilterPre().evaluate(sf));
View Full Code Here

    }

    Envelope envelopeFrom(CircularArc arc, double... otherPoints) {
        Envelope env = new Envelope();
        // add the control points
        env.expandToInclude(arc.controlPoints[0], arc.controlPoints[1]);
        env.expandToInclude(arc.controlPoints[2], arc.controlPoints[3]);
        env.expandToInclude(arc.controlPoints[4], arc.controlPoints[5]);
        if (otherPoints != null) {
            // add the other points
            for (int i = 0; i < otherPoints.length;) {
View Full Code Here

    Envelope envelopeFrom(CircularArc arc, double... otherPoints) {
        Envelope env = new Envelope();
        // add the control points
        env.expandToInclude(arc.controlPoints[0], arc.controlPoints[1]);
        env.expandToInclude(arc.controlPoints[2], arc.controlPoints[3]);
        env.expandToInclude(arc.controlPoints[4], arc.controlPoints[5]);
        if (otherPoints != null) {
            // add the other points
            for (int i = 0; i < otherPoints.length;) {
                env.expandToInclude(otherPoints[i++], otherPoints[i++]);
View Full Code Here

    Envelope envelopeFrom(CircularArc arc, double... otherPoints) {
        Envelope env = new Envelope();
        // add the control points
        env.expandToInclude(arc.controlPoints[0], arc.controlPoints[1]);
        env.expandToInclude(arc.controlPoints[2], arc.controlPoints[3]);
        env.expandToInclude(arc.controlPoints[4], arc.controlPoints[5]);
        if (otherPoints != null) {
            // add the other points
            for (int i = 0; i < otherPoints.length;) {
                env.expandToInclude(otherPoints[i++], otherPoints[i++]);
            }
View Full Code Here

        env.expandToInclude(arc.controlPoints[2], arc.controlPoints[3]);
        env.expandToInclude(arc.controlPoints[4], arc.controlPoints[5]);
        if (otherPoints != null) {
            // add the other points
            for (int i = 0; i < otherPoints.length;) {
                env.expandToInclude(otherPoints[i++], otherPoints[i++]);
            }
        }

        return env;
    }
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 = 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

      Envelope bounds = null;
      for (SpatialRecord record : records) {
        if (bounds == null) {
          bounds = record.getGeometry().getEnvelopeInternal();
        } else {
          bounds.expandToInclude(record.getGeometry().getEnvelopeInternal());
        }
      }
     
      final Iterator<GeoPipeFlow> recordsIterator = records.iterator();
      final ReferencedEnvelope refBounds = new ReferencedEnvelope(bounds, layer.getCoordinateReferenceSystem());
View Full Code Here

    }
    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

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.