Examples of expandToInclude()


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

                // TODO when bounds are really available change this
                GeodeticCalculator gc = new GeodeticCalculator(tmsCrs);
                gc.setStartingGeographicPoint(c.x, c.y);
                gc.setDirection(-45, 10000.0);
                Point2D p1 = gc.getDestinationGeographicPoint();
                env.expandToInclude(p1.getX(), p1.getY());
                gc.setDirection(135, 10000.0);
                Point2D p2 = gc.getDestinationGeographicPoint();
                env.expandToInclude(p2.getX(), p2.getY());

                ReferencedEnvelope tmpBounds = new ReferencedEnvelope(env, DefaultGeographicCRS.WGS84);
View Full Code Here

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

                gc.setDirection(-45, 10000.0);
                Point2D p1 = gc.getDestinationGeographicPoint();
                env.expandToInclude(p1.getX(), p1.getY());
                gc.setDirection(135, 10000.0);
                Point2D p2 = gc.getDestinationGeographicPoint();
                env.expandToInclude(p2.getX(), p2.getY());

                ReferencedEnvelope tmpBounds = new ReferencedEnvelope(env, DefaultGeographicCRS.WGS84);
                bounds = tmpBounds.transform(tmsCrs, true);

                // bounds = new ReferencedEnvelope(env, tmsCrs);
View Full Code Here

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

                  
                    Envelope dirtyArea = dirtyAreas.get(editlayer);
                    if (dirtyArea == null) {
                        dirtyArea = editEvent.getBounds();
                    } else {
                        dirtyArea.expandToInclude(editEvent.getBounds());
                    }

                    dirtyAreas.put(editlayer, dirtyArea);

                    if (editlayer == layer && layer.getMap() == ApplicationGIS.getActiveMap()) {
View Full Code Here

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

                // ok its at least somewhat legal, we can transform to it so lets expand the legal
                // envelope.
                if (env == null) {
                    env = new Envelope();
                }
                env.expandToInclude(world);
            } else
                return "Cannot edit.  Either in a bad projection for editing layer or out of the bounds for the layer";
        }
        return null;
View Full Code Here

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

                Set<String> fids=new HashSet<String>();
                for( EditGeom geom : handler.getEditBlackboard(layer2).getGeoms() ) {
                    if( env.isNull() ){
                        env.init(geom.getShell().getEnvelope() );
                    }else{
                        env.expandToInclude(geom.getShell().getEnvelope());
                    }
                    fids.add(geom.getFeatureIDRef().get());
                }
                EditUtils.instance.refreshLayer(layer2, fids, env, true, false);
View Full Code Here

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

        if (children != null) {
            Envelope envelope = new Envelope();
            for(TrackingItem child: children) {
                Coordinate coord = child.getCoordinate();
                if (coord != null) {
                    envelope.expandToInclude(coord);
                }
            }
            return envelope;
        }
        else if (coordinate != null) {
View Full Code Here

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

        Set<String> fids = new HashSet<String>();
        for( EditGeom geom : removed ) {
            if (env.isNull()) {
                env.init(geom.getShell().getEnvelope());
            } else {
                env.expandToInclude(geom.getShell().getEnvelope());
            }
            fids.add(geom.getFeatureIDRef().get());
        }
        EditUtils.instance.refreshLayer(layer, fids, env, true, false);
        monitor.done();
View Full Code Here

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

                    }
                }catch(Exception e){
                    throw new RuntimeException(e);
                }
                if (aggregateBbox != null) {
                    aggregateBbox.expandToInclude(curbbox);
                } else {
                    aggregateBbox = curbbox;
                }
            }
  
View Full Code Here

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

        Catalog catalog = getCatalog();
        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

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

                    Envelope bounds = null;
                    for (Geometry geometry : geom) {
                        if(bounds == null) {
                            bounds = geometry.getEnvelopeInternal();
                        } else {
                            bounds.expandToInclude(geometry.getEnvelopeInternal());
                        }
                        filters.add(_types.get(relation).newInstance(query, numHits, geometry, new SpatialIndexAccessor()));
                    }
                    return new OrSpatialFilter(query, numHits, bounds, new SpatialIndexAccessor(), filters);
                }
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.