Package org.opengis.geometry

Examples of org.opengis.geometry.BoundingBox


            }
        }
    }

    void initialize(final boolean checkDomains) throws IOException {
        final BoundingBox bounds = granuleCatalog.getBounds(typeName);
        if (checkDomains) {
            initDomains(configuration);
        }

        if (bounds.isEmpty()) {
            throw new IllegalArgumentException("Cannot create a mosaic out of an empty index");
        }

        // we might have an imposed bbox
        CoordinateReferenceSystem crs = bounds.getCoordinateReferenceSystem();
        GeneralEnvelope originalEnvelope = null;

        if (imposedEnvelope == null) {
            originalEnvelope = new GeneralEnvelope(bounds);
        } else {
View Full Code Here


       
        System.out.println(filters);
        assertEquals(2, filters.size());
        Filter f1 = filters.get(0);
        assertTrue(f1 instanceof BBOX);
        BoundingBox bbox1 = ((BBOX) f1).getBounds();
        ReferencedEnvelope expected = new ReferencedEnvelope(-11, 111, -11, 111, DefaultGeographicCRS.WGS84);
        assertEquals(expected, bbox1);
        Filter f2 = filters.get(1);
        assertTrue(f2 instanceof BBOX);
        BoundingBox bbox2 = ((BBOX) f2).getBounds();
        assertEquals(new ReferencedEnvelope(-6, 106, -6, 106, DefaultGeographicCRS.WGS84), bbox2);
    }
View Full Code Here

     * mosaic produced by this response.
     *
     */
    private void initBBOX() {
        // ok we got something to return, let's load records from the index
        final BoundingBox cropBBOX = request.spatialRequestHelper.getCropBBox();
        if (cropBBOX != null) {
            targetBBox = ReferencedEnvelope.reference(cropBBOX);
        } else {
            targetBBox = new ReferencedEnvelope(coverageEnvelope);
        }
View Full Code Here

            String typeName) {
        Utilities.ensureNonNull("index", catalog);
        //
        // save the bbox and prepare other info
        //
        final BoundingBox bounds = catalog.getBounds(typeName);
        if(bounds.isEmpty()) {
                throw new IllegalArgumentException("Cannot create a mosaic out of an empty index");
        }
       
        // we might have an imposed bbox
        this.crs=bounds.getCoordinateReferenceSystem();
        if(envelope==null)
          this.originalEnvelope=new GeneralEnvelope(bounds);
        else{
          this.originalEnvelope=new GeneralEnvelope(envelope);
          this.originalEnvelope.setCoordinateReferenceSystem(crs);
View Full Code Here

        //
        // //
        checkRequest(request);
        this.spatialRequestHelper = new SpatialRequestHelper();

        BoundingBox requestedBBox = request.getGeographicArea();
        Rectangle requestedRasterArea = request.getRasterArea();
        MathTransform2D requestedG2W = request.getGridToWorldTransform();
        spatialRequestHelper.setRequestedBBox(requestedBBox);
        spatialRequestHelper.setRequestedRasterArea(requestedRasterArea);
        spatialRequestHelper.setRequestedGridToWorld((AffineTransform) requestedG2W);
View Full Code Here

        spatialRequestHelper.setCoverageProperties(properties);
        spatialRequestHelper.prepare();
}

    private void checkRequest(CoverageReadRequest request) throws IOException {
        BoundingBox requestedBoundingBox = request.getGeographicArea();

        // //
        //
        // Checking RequestedRasterArea setting
        //
View Full Code Here

                    }
                }
            }
            //bounding box
            if (encodeFeatureBounds) {
                BoundingBox bbox = feature.getBounds();
                string("bbox", sb).append(":");
                sb.append(gjson.toString(bbox)).append(",");
            }
           
            //geometry
View Full Code Here

                LOGGER.fine("Loading level " + overviewsLevel + " with subsampling factors "
                        + baseReadParameters.getSourceXSubsampling() + " "
                        + baseReadParameters.getSourceYSubsampling());
            }

            final BoundingBox cropBBOX = request.getCropBBox();
            if (cropBBOX != null) {
                finalBBox = ReferencedEnvelope.reference(cropBBOX);
            } else {
                finalBBox = new ReferencedEnvelope(coverageEnvelope);
            }
View Full Code Here

        double area = Double.MAX_VALUE;
        SimpleFeature smallestFeature = null;
        while (indexIter.hasNext()) {
            SimpleFeature newFeature = indexIter.next();

            BoundingBox bounds = newFeature.getBounds();
            Geometry geometry = factory.toGeometry(new ReferencedEnvelope(
                    bounds));
            double newArea = geometry.getArea();

            if (smallestFeature == null || newArea < area) {
View Full Code Here

                attribute = attribute.getResolvedElementDeclaration();
            }
           
            if (gml.qName("boundedBy")
                    .equals(new QName(attribute.getTargetNamespace(), attribute.getName()))) {
                BoundingBox bounds = getBoundedBy(feature, configuration);
                if (bounds != null) {
                    properties.add(new Object[] { particle, bounds });
                }
            } else if (featureType instanceof SimpleFeatureType) {
                // first simple feature hack, if the schema "overrides" gml attributes like
View Full Code Here

TOP

Related Classes of org.opengis.geometry.BoundingBox

Copyright © 2018 www.massapicom. 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.