Examples of toBounds()


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

    @Override
    public BoundingBox getBoundingBox(CoordinateReferenceSystem crs) {
        try {
            Envelope bounds = (Envelope) pedestrianIndex.getRoot().getBounds();
            ReferencedEnvelope refEnv = new ReferencedEnvelope(bounds, CRS.decode("EPSG:4326", true));
            return refEnv.toBounds(crs);
        } catch (Exception e) {
            LOG.error("error transforming graph bounding box to request CRS : {}", crs);
            return null;
        }
    }
View Full Code Here

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

            SimpleFeatureCollection coll = src.getGranules(q);
            cv.reset();
            coll.accepts(cv, null);
            assertEquals(3, cv.getCount());
            assertTrue(src.getBounds(q).contains(
                    referencedEnvelope.toBounds(referencedEnvelope.getCoordinateReferenceSystem())));
            assertEquals(src.getSchema(), schema);

            // remove
            sliceCat.removeGranules("1", Filter.INCLUDE, t);
            sliceCat.removeGranules("2", Filter.INCLUDE, t);
View Full Code Here

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

            return null;
        }
        BoundingBox bbox = new ReferencedEnvelope(env, crs);
       
        try {
            return bbox.toBounds(monitorConfig.getBboxCrs());
        } catch (TransformException e) {
            LOGGER.log(Level.WARNING, "Could not transform bounding box to logging CRS", e);
            return null;
        }
    }
View Full Code Here

Examples of org.opengis.geometry.BoundingBox.toBounds()

        for (int i = 0; i < features.length; i++) {
            Feature f = features[i];
            BoundingBox fbounds = f.getBounds();
            if (!CRS.equalsIgnoreMetadata(targetCrs, fbounds)) {
                fbounds = fbounds.toBounds(targetCrs);
            }
            bounds.include(fbounds);
        }
        return bounds;
    }
View Full Code Here

Examples of org.opengis.geometry.BoundingBox.toBounds()

        for (int i = 0; i < features.length; i++) {
            Feature f = features[i];
            BoundingBox fbounds = f.getBounds();
            if (!CRS.equalsIgnoreMetadata(targetCrs, fbounds)) {
                fbounds = fbounds.toBounds(targetCrs);
            }
            bounds.include(fbounds);
        }
        return bounds;
    }
View Full Code Here

Examples of org.opengis.geometry.BoundingBox.toBounds()

    X3DBuilder x3d = new X3DBuilder(output);
    for (W3DSLayer layer : scene.getLayers()) {
      BoundingBox bbox = null;
      try {
        bbox = layer.getLayerInfo().getLayerInfo().getResource().boundingBox();
        bbox = bbox.toBounds(gt.getCrs());
      } catch (Exception e) {
        e.printStackTrace();
      }
      x3d.createGeoOrigin(gt.getCrs(), bbox);
      x3d.addW3DSLayer(layer);
View Full Code Here

Examples of org.opengis.geometry.BoundingBox.toBounds()

            return null;
        }
        BoundingBox bbox = new ReferencedEnvelope(env, crs);
       
        try {
            return bbox.toBounds(monitorConfig.getBboxCrs());
        } catch (TransformException e) {
            LOGGER.log(Level.WARNING, "Could not transform bounding box to logging CRS", e);
            return null;
        }
    }
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.