Package org.geotools.geometry.jts

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


                    assertTrue(envOrig.intersects((Envelope) env));

                q.getHints().put(Hints.GEOMETRY_DISTANCE, 5.0);
                env = fs.getBounds(q);
                if (env != null)
                    assertTrue(envOrig.intersects((Envelope) env));

                q.getHints().put(Hints.GEOMETRY_DISTANCE, 10.0);
                env = fs.getBounds(q);
                if (env != null)
                    assertTrue(envOrig.intersects((Envelope) env));
View Full Code Here


                    assertTrue(envOrig.intersects((Envelope) env));

                q.getHints().put(Hints.GEOMETRY_DISTANCE, 10.0);
                env = fs.getBounds(q);
                if (env != null)
                    assertTrue(envOrig.intersects((Envelope) env));

                q.getHints().put(Hints.GEOMETRY_DISTANCE, 20.0);
                env = fs.getBounds(q);
                if (env != null)
                    assertTrue(envOrig.intersects((Envelope) env));
View Full Code Here

                    assertTrue(envOrig.intersects((Envelope) env));

                q.getHints().put(Hints.GEOMETRY_DISTANCE, 20.0);
                env = fs.getBounds(q);
                if (env != null)
                    assertTrue(envOrig.intersects((Envelope) env));

                q.getHints().put(Hints.GEOMETRY_DISTANCE, 25.0);
                env = fs.getBounds(q);
                if (env != null)
                    assertTrue(envOrig.intersects((Envelope) env));
View Full Code Here

                    assertTrue(envOrig.intersects((Envelope) env));

                q.getHints().put(Hints.GEOMETRY_DISTANCE, 25.0);
                env = fs.getBounds(q);
                if (env != null)
                    assertTrue(envOrig.intersects((Envelope) env));
            }
        } catch (Exception ex) {
            Assert.fail(ex.getMessage());
        }
    }
View Full Code Here

      //convert to WGS84
      final GeographicBoundingBoxImpl geographicRequestedBBox = new GeographicBoundingBoxImpl(requestedBBox);
        ReferencedEnvelope approximateWGS84requestedBBox =GridCoverageUtilities.getReferencedEnvelopeFromGeographicBoundingBox(geographicRequestedBBox);

        // checking the intersection in wgs84 with the geographicbbox for this coverage
        if (!approximateWGS84requestedBBox.intersects((BoundingBox)coverageGeographicBBox))
        {
          requestedBBox =  null;
          return;
        }
        //compute approximate full resolution
View Full Code Here

        // there is an actual intersection
        //
        ////
        try {
            final ReferencedEnvelope coverageEnvelope=new ReferencedEnvelope(reader.getOriginalEnvelope());
            if (!coverageEnvelope.intersects((BoundingBox) ReferencedEnvelope.reference(readGG.getEnvelope()))) {
                return null;
            }

        } catch (Exception e) {
            LOGGER.log(
View Full Code Here

        try {
            final CoordinateReferenceSystem coverageCRS=reader.getCoordinateReferenceSystem();
            final CoordinateReferenceSystem requestCRS= envelope.getCoordinateReferenceSystem();
            final ReferencedEnvelope coverageEnvelope=new ReferencedEnvelope(reader.getOriginalEnvelope());
            if(CRS.equalsIgnoreMetadata(coverageCRS, requestCRS)){
                if(!coverageEnvelope.intersects((BoundingBox)envelope))
                    return null;
            }else{
               
                ReferencedEnvelope dataEnvelopeWGS84 = coverageEnvelope.transform(DefaultGeographicCRS.WGS84, true);
                ReferencedEnvelope requestEnvelopeWGS84 = envelope.transform(DefaultGeographicCRS.WGS84, true);
View Full Code Here

        // bounds outside layer bounds (which are -180,0,0,90)
        bounds = new ReferencedEnvelope(10, 20, 10, 20, DefaultGeographicCRS.WGS84);
        BoundingBox layerBounds = tileLayer.getGridSubset("EPSG:4326").getGridSet()
                .getOriginalExtent();

        assertFalse(bounds.intersects(layerBounds.getMinX(), layerBounds.getMinY()));
        assertFalse(bounds.intersects(layerBounds.getMaxX(), layerBounds.getMaxY()));

        mediator.truncate(layerName, bounds);

        verify(tileBreeder, never()).dispatchTasks(any(GWCTask[].class));
View Full Code Here

        bounds = new ReferencedEnvelope(10, 20, 10, 20, DefaultGeographicCRS.WGS84);
        BoundingBox layerBounds = tileLayer.getGridSubset("EPSG:4326").getGridSet()
                .getOriginalExtent();

        assertFalse(bounds.intersects(layerBounds.getMinX(), layerBounds.getMinY()));
        assertFalse(bounds.intersects(layerBounds.getMaxX(), layerBounds.getMaxY()));

        mediator.truncate(layerName, bounds);

        verify(tileBreeder, never()).dispatchTasks(any(GWCTask[].class));
View Full Code Here

        try {
            final CoordinateReferenceSystem coverageCRS=reader.getCrs();
            final CoordinateReferenceSystem requestCRS= requestedModelArea.getCoordinateReferenceSystem();
            final ReferencedEnvelope coverageEnvelope=new ReferencedEnvelope(reader.getOriginalEnvelope());
            if(CRS.equalsIgnoreMetadata(coverageCRS, requestCRS)){
                if(!coverageEnvelope.intersects((BoundingBox)requestedModelArea))
                    return null;
            }else{
               
                ReferencedEnvelope dataEnvelopeWGS84 = coverageEnvelope.transform(DefaultGeographicCRS.WGS84, true);
                ReferencedEnvelope requestEnvelopeWGS84 = requestedModelArea.transform(
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.