Package org.geotools.geometry.jts

Examples of org.geotools.geometry.jts.ReferencedEnvelope.expandToInclude()


                    // collect size to alleviate #getCount if needed
                    int collectionSize = 0;
                    while (reader.hasNext()) {
                        featureBounds = reader.next().getBounds();
                        bounds.expandToInclude(featureBounds.getMinX(), featureBounds.getMinY());
                        bounds.expandToInclude(featureBounds.getMaxX(), featureBounds.getMaxY());
                        collectionSize++;
                    }
                    if (this.cachedSize == -1) {
                        this.cachedSize = collectionSize;
                    }
View Full Code Here


            if (bounds == null) {
                ReferencedEnvelope bbox = new ReferencedEnvelope(getType()
                        .getCoordinateReferenceSystem());
                V geom = EFeatureGeometryDelegate.this.getValue();
                if (geom != null) {
                    bbox.expandToInclude(geom.getEnvelopeInternal());
                } else {
                    bbox.setToNull();
                }
                bounds = bbox;
            }
View Full Code Here

        ReferencedEnvelope env = new ReferencedEnvelope(query.getCoordinateSystem());
        FeatureReader<SimpleFeatureType, SimpleFeature> reader = getReaderInternal(query);
        if (reader != null) {
            while (reader.hasNext()) {
                Geometry geometry = (Geometry) reader.next().getDefaultGeometry();
                env.expandToInclude(geometry.getEnvelopeInternal());
            }
        }
        return env;
    }
View Full Code Here

            }
            else {
                //aggregate
                bounds = new ReferencedEnvelope(first.getBounds());
                for ( int i = 1; i < features.size(); i++ ) {
                    bounds.expandToInclude( features.get( i ).getBounds() );
                }
            }
            if (bounds == null || bounds.isNull()) {
                //wfs 2.0 does not allow for "gml:Null"
                if (WFS.NAMESPACE.equals(name.getNamespaceURI())) {
View Full Code Here

     * @param envelope
     * @return
     */
    ReferencedEnvelope reference(Envelope envelope) {
        ReferencedEnvelope env = new ReferencedEnvelope(envelope.getCoordinateReferenceSystem());
        env.expandToInclude(envelope.getMinimum(0), envelope.getMinimum(1));
        env.expandToInclude(envelope.getMaximum(0), envelope.getMaximum(1));
        return env;
    }

    /**
 
View Full Code Here

     * @return
     */
    ReferencedEnvelope reference(Envelope envelope) {
        ReferencedEnvelope env = new ReferencedEnvelope(envelope.getCoordinateReferenceSystem());
        env.expandToInclude(envelope.getMinimum(0), envelope.getMinimum(1));
        env.expandToInclude(envelope.getMaximum(0), envelope.getMaximum(1));
        return env;
    }

    /**
     * Converts a {@link GeneralEnvelope} into a {@link ReferencedEnvelope}
View Full Code Here

               
        // consider doing reprojection here into data CRS?
        Envelope bounds = new Envelope(filter.getMinX(), filter.getMaxX(), filter.getMinY(), filter
                .getMaxY());
        if(bbox != null) {
          bbox.expandToInclude(bounds);
          return bbox;
        } else {
          return bbox(bounds);
        }
    }
View Full Code Here

                       
            Geometry geometry = (Geometry) value;
            Envelope bounds = geometry.getEnvelopeInternal();
           
            if(bbox != null) {
              bbox.expandToInclude(bounds);
              return bbox;
            } else {
              return bbox(bounds);
            }
        } else {
View Full Code Here

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

        LayerInfo l = lg.getLayers().get(0);
        ReferencedEnvelope bounds = transform(l.getResource().getLatLonBoundingBox(), crs);

        for (int i = 1; i < lg.getLayers().size(); i++) {
            l = lg.getLayers().get(i);
            bounds.expandToInclude(transform(l.getResource().getLatLonBoundingBox(), crs));
        }
        lg.setBounds(bounds);
    }

    /**
 
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.