Package org.geotools.geometry.jts

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


                    FeatureCollection collection = (FeatureCollection) resultsList
                    .get(i);
                    if (e == null) {
                        e = collection.getBounds();
                    } else {
                        e.expandToInclude(collection.getBounds());
                    }

                }

                if (e != null) {
View Full Code Here


        } else {
            re = new ReferencedEnvelope();
        }
       
        re.expandToInclude((Double) box.getLowerCorner().get(0), (Double) box.getLowerCorner().get(1));
        re.expandToInclude((Double) box.getUpperCorner().get(0), (Double) box.getUpperCorner().get(1));
        return re;
    }
   
    String urlEncode(String string) throws Exception {
        return URLEncoder.encode(string, "ASCII");
View Full Code Here

            pipelineCollection = pipeline.toFeatureCollection(
                Neo4jFeatureBuilder.getType(layer.getName(), geomType, layer.getCoordinateReferenceSystem(), layer.getExtraPropertyNames()));
          }
         
          ReferencedEnvelope bounds = layerCollection.getBounds();
          bounds.expandToInclude(pipelineCollection.getBounds());
          bounds.expandBy(boundsDelta, boundsDelta);
         
            StyledImageExporter exporter = new StyledImageExporter( db );
            exporter.setExportDir( "target/docs/images/" );
            exporter.saveImage(
View Full Code Here

                for (int i = 0; i < resultsList.size(); i++) {
                    FeatureCollection collection = resultsList.get(i);
                    if (e == null) {
                        e = collection.getBounds();
                    } else {
                        e.expandToInclude(collection.getBounds());
                    }

                }

                if (e != null) {
View Full Code Here

                FeatureCollection fc = (FeatureCollection) it.next();
                if(env == null) {
                    env = fc.getBounds();
                }
                else {
                    env.expandToInclude(fc.getBounds());
                }
               
                // workaround bogus collection implementation that won't return the crs
                if(env != null &&  env.getCoordinateReferenceSystem() == null) {
                    CoordinateReferenceSystem crs = fc.getSchema().getCoordinateReferenceSystem();
View Full Code Here

            re = new ReferencedEnvelope(CRS.decode(box.getCrs()));
        } else {
            re = new ReferencedEnvelope();
        }
       
        re.expandToInclude((Double) box.getLowerCorner().get(0), (Double) box.getLowerCorner().get(1));
        re.expandToInclude((Double) box.getUpperCorner().get(0), (Double) box.getUpperCorner().get(1));
        return re;
    }
   
    String urlEncode(String string) throws Exception {
View Full Code Here

        } else {
            re = new ReferencedEnvelope();
        }
       
        re.expandToInclude((Double) box.getLowerCorner().get(0), (Double) box.getLowerCorner().get(1));
        re.expandToInclude((Double) box.getUpperCorner().get(0), (Double) box.getUpperCorner().get(1));
        return re;
    }
   
    String urlEncode(String string) throws Exception {
        return URLEncoder.encode(string, "ASCII");
View Full Code Here

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

        for (int i = 1; i < layers.size(); i++) {
            l = layers.get(i);
            bounds.expandToInclude(transform(l.getResource().getLatLonBoundingBox(), crs));
        }
       
        group.setBounds(bounds);
    }
   
View Full Code Here

    private ReferencedEnvelope aggregateEnvelopes(LayerInfo... layers) {
        ReferencedEnvelope eoExpected = new ReferencedEnvelope(layers[0].getResource()
                .getNativeBoundingBox(), layers[0].getResource().getCRS());
        for (int i = 1; i < layers.length; i++) {
            eoExpected.expandToInclude(layers[i].getResource().getNativeBoundingBox());
        }

        return eoExpected;
    }
View Full Code Here

        when(mediator.getDeclaredCrs(anyString())).thenReturn(WGS84);
        listener.afterTransaction(request, result, true);

        ReferencedEnvelope expectedEnv = new ReferencedEnvelope(affectedBounds1);
        expectedEnv.expandToInclude(affectedBounds2);

        verify(mediator, times(1)).truncate(eq("theLayer"), eq(expectedEnv));
        verify(mediator, times(1)).truncate(eq("theGroup"), eq(expectedEnv));

    }
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.