Package org.geotools.geometry.jts

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


                    envelope = new ReferencedEnvelope(coordinateSystem);
                }
                Geometry geom = (Geometry) feature.getDefaultGeometry();
                Envelope env = geom != null ? geom.getEnvelopeInternal() : null;
                if (env != null) {
                    envelope.expandToInclude(env);
                }
            }
        }

        return envelope;
View Full Code Here


            return; // nobody is listenting

        Filter filter = idFilter(feature);
        ReferencedEnvelope bounds = new ReferencedEnvelope(feature.getBounds());
        if( bounds != null ){
            bounds.expandToInclude(before);
        }
       
        FeatureEvent event = new FeatureEvent(source, Type.CHANGED, bounds, filter);
        fireFeatureEvent(event);
    }
View Full Code Here

                it = diff.getAdded().values().iterator();
                while(it.hasNext()){
                    SimpleFeature feature = (SimpleFeature) it.next();
                    BoundingBox fb = feature.getBounds();
                    if(fb != null) {
                        bounds.expandToInclude(ReferencedEnvelope.reference(fb));
                    }
                }
               
                // modified ones
                it = diff.getModified().values().iterator();
View Full Code Here

                while(it.hasNext()){
                    SimpleFeature feature = (SimpleFeature) it.next();
                    if(feature != TransactionStateDiff.NULL) {
                        BoundingBox fb = feature.getBounds();
                        if(fb != null) {
                            bounds.expandToInclude(ReferencedEnvelope.reference(fb));
                        }
                    }
                }
            }
        } else {
View Full Code Here

                          if( cs!=null && !cs.getIdentifiers().isEmpty() )
                              g.setUserData(cs.getIdentifiers().iterator().next().toString());
                          if( bounds==null ){
                              bounds=new ReferencedEnvelope(g.getEnvelopeInternal(), schema.getCoordinateReferenceSystem() );
                          }else{
                              bounds.expandToInclude(g.getEnvelopeInternal());
                          }
                      }
                    }
                }
                ts.addAction(schema.getTypeName(), new InsertAction(newFeature));
View Full Code Here

//                    continue;
//                }
                if( bounds==null ){
                    bounds=new ReferencedEnvelope(g.getEnvelopeInternal(),cs);
                }else{
                    bounds.expandToInclude(g.getEnvelopeInternal());
                }
          }
            props.put(names[i].getLocalPart(), value[i]);
        }
View Full Code Here

                        if( g==null )
                          continue;
                        if( bounds==null ){
                            bounds=new ReferencedEnvelope(g.getEnvelopeInternal(),cs);
                        }else{
                            bounds.expandToInclude(g.getEnvelopeInternal());
                        }
                }
              }
                ts.addAction(getSchema().getTypeName(), new InsertAction(f));
            } catch (NoSuchElementException e) {
View Full Code Here

            while (oldFeatures.hasNext()) {

                SimpleFeature old = oldFeatures.next();
                BoundingBox fbounds = old.getBounds();
                if (fbounds != null) {
                    bounds.expandToInclude(new ReferencedEnvelope(fbounds));
                }

                for (int i = 0; i < properties.length; i++) {
                    Name propName = properties[i];
                    Object newValue = values[i];
View Full Code Here

                    Name propName = properties[i];
                    Object newValue = values[i];
                    old.setAttribute(propName, newValue);
                    if (newValue instanceof Geometry) {
                        Envelope envelope = ((Geometry) newValue).getEnvelopeInternal();
                        bounds.expandToInclude(envelope);
                    }
                }

                String fid = old.getID();
                super.modify(fid, old);
View Full Code Here

                    BoundingBox featureBounds;
                    // 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

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.