Examples of expandToInclude()


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

    // start with null envelope
    Envelope bounds = new Envelope();
    while (it.hasNext()) {
      Object o = it.next();
      Geometry g = featureModel.getGeometry(o);
      bounds.expandToInclude(g.getEnvelopeInternal());
    }
    return bounds;
  }

  public FeatureModel getFeatureModel() {
View Full Code Here

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

  }

  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

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

{
  private static Envelope computeVertexEnvelope(Collection vertices) {
    Envelope env = new Envelope();
    for (Iterator i = vertices.iterator(); i.hasNext();) {
      Vertex v = (Vertex) i.next();
      env.expandToInclude(v.getCoordinate());
    }
    return env;
  }

  private List initialVertices; // List<Vertex>
View Full Code Here

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

  private void computeBoundingBox() {
    Envelope vertexEnv = computeVertexEnvelope(initialVertices);
    Envelope segEnv = computeVertexEnvelope(segVertices);

    Envelope allPointsEnv = new Envelope(vertexEnv);
    allPointsEnv.expandToInclude(segEnv);

    double deltaX = allPointsEnv.getWidth() * 0.2;
    double deltaY = allPointsEnv.getHeight() * 0.2;

    double delta = Math.max(deltaX, deltaY);
View Full Code Here

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

    public void setChanged( boolean changed ) {
        if(this.changed.get() && !changed){
          synchronized(owner){
              Envelope envelope = new Envelope();
              for( int i = 0; i < shell.getNumCoords(); i++ ) {
                  envelope.expandToInclude(shell.getCoord(i));
              }
              featureBBox = envelope;
          }
        }
       
View Full Code Here

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

        Set<String> fids=new HashSet<String>();
        for( EditGeom geom : handler.getEditBlackboard(selectedLayer).getGeoms() ) {
            if( env.isNull() ){
                env.init(geom.getShell().getEnvelope() );
            }else{
                env.expandToInclude(geom.getShell().getEnvelope());
            }
            String fid = geom.getFeatureIDRef().get();
            if( fid != null ) {
              fids.add(fid);
            }
View Full Code Here

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

            bounds=null;
        }else{
            if( bounds==null )
                bounds=new Envelope(refreshBounds);
            else{
                bounds.expandToInclude(refreshBounds);
            }
        }
       
        properties.put(EDIT_FEATURE_BOUNDS, bounds);
    }
View Full Code Here

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

                        // The reason for this is that otherwise I would have to make the entire
                        // viewport re-render on a rollback.
                        // TODO This is a workaround to get around that.
                        Envelope envelope = new Envelope();
                        for (FeatureEvent event : changes) {
                            envelope.expandToInclude(event.getBounds());
                        }
                        FeatureSource<SimpleFeatureType, SimpleFeature> source = layer.getResource(
                                FeatureSource.class, null);
                        FeatureEvent event = new FeatureEvent(source,
                                FeatureEvent.FEATURES_CHANGED, envelope);
View Full Code Here

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

    }

    protected Envelope calculateBounds() {
        Envelope newBounds = new Envelope();
        for (String key : allTiles.keySet()) {
            newBounds.expandToInclude(allTiles.get(key).getBounds());
        }
        return newBounds;
    }
   
    public Tile getTile(String tileId) {
View Full Code Here

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

            Envelope bounds=new Envelope();
            for( FeatureEvent event : eventList ) {
                if( bounds.isNull() )
                    bounds.init(event.getBounds());
                else
                    bounds.expandToInclude(event.getBounds());
            }
            if( !eventList.isEmpty()){
                FeatureEvent event=eventList.get(0);
                tmp.add(new FeatureEvent(event.getFeatureSource(), event.getEventType(), 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.