Package org.geotools.geometry.jts

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


                // get the next tile right of this one
                WMTTile rightNeighbour = movingTile.getRightNeighbour();
               
                // Check if the new tile is still part of the extent and
                // that we don't have the first tile again
                if (extent.intersects((Envelope) rightNeighbour.getExtent())
                        && !firstTileOfRow.equals(rightNeighbour)) {
                    tileList.put(rightNeighbour.getId(), addTileToList(rightNeighbour));
                   
                    WMTPlugin.debug("[WMTSource.cutExtentIntoTiles] Adding right neighbour: " //$NON-NLS-1$
                            rightNeighbour.getId(), Trace.REQUEST);
View Full Code Here


            // get the next tile under the first one of the row
            WMTTile lowerNeighbour = firstTileOfRow.getLowerNeighbour();
           
            // Check if the new tile is still part of the extent
            if (extent.intersects((Envelope) lowerNeighbour.getExtent())
                    && !firstTile.equals(lowerNeighbour)) {
                tileList.put(lowerNeighbour.getId(), addTileToList(lowerNeighbour));
               
                WMTPlugin.debug("[WMTSource.cutExtentIntoTiles] Adding lower neighbour: " //$NON-NLS-1$
                        lowerNeighbour.getId(), Trace.REQUEST);
View Full Code Here

        monitor.setTaskName(NAME);
        layer.setCRS(crs);
        ViewportModel viewportModel = layer.getMapInternal().getViewportModelInternal();
            ReferencedEnvelope bounds = (ReferencedEnvelope) layer.getMapInternal().getViewportModel().getBounds();
            if( layer.getMapInternal().getMapLayers().size()==1
                    && !bounds.intersects( (Envelope) layer.getBounds(monitor, viewportModel.getCRS()))){
                oldBounds=bounds;
               
                viewportModel.zoomToExtent();
            }
        monitor.done();
View Full Code Here

        if (layerBounds == null || layerBounds.isNull() || layerBounds.isEmpty()) {
            return context.getImageBounds(); // layer bounds are unknown so draw what is on screen!
        }
        // if the viewBounds interesect the layer at all then let us draw what is on the screen
        if( layerBounds.getCoordinateReferenceSystem() == viewBounds.getCoordinateReferenceSystem() &&
                layerBounds.intersects((BoundingBox) viewBounds)) {
            // these bounds look okay; transform them to the viewportCRS
            ReferencedEnvelope screen = new ReferencedEnvelope(viewBounds, viewCRS);
            return screen;
        }
        else {           
View Full Code Here

                if( crsBounds.isEmpty() || crsBounds.isNull() ){
                    return context.getImageBounds(); // max crs bounds are unknown so draw what is on screen!
                }
                ReferencedEnvelope maxBounds = crsBounds.transform( viewCRS, true, 10 );
                if ( maxBounds.getCoordinateReferenceSystem() == viewBounds.getCoordinateReferenceSystem() &&
                        maxBounds.intersects((BoundingBox) viewBounds)) {
                    // okay the viewBounds are at least somewhere in the maxBounds for the CRS
                    // draw what is on screen
                    ReferencedEnvelope clip = new ReferencedEnvelope( maxBounds.intersection(viewBounds), viewCRS );
                    return clip;
                }
View Full Code Here

            ReferencedEnvelope viewbounds = renderJob.projectMapToTileCrs(
                    context.getViewportModel().getBounds());
           
            if (tile != null && tile.getBufferedImage() != null &&
                    viewbounds != null &&
                    viewbounds.intersects(tile.getBounds()) &&
                    !renderedTiles.contains(tile.getId()) &&
                    notRenderedTiles.contains(tile.getId())) {
                try {
                    renderedTiles.add(tile.getId());
                    renderTile(destination, (WMTTile) tile, style, renderJob);
View Full Code Here

                    // can result in listeners being notified the same tile is ready multiple
                    // times but we don't want to draw it more than once per render cycle)
                    // ReferencedEnvelope viewbounds = getContext().getViewportModel().getBounds();
                    ReferencedEnvelope viewbounds = getContext().getImageBounds();
                    if (tile != null && tile.getBufferedImage() != null && viewbounds != null
                            && viewbounds.intersects(tile.getBounds())
                            && !renderedTiles.contains(tile.getId())) {

                        renderTile(graphics, tile, tileset.getCoordinateReferenceSystem(), style);
                        renderedTiles.add(tile.getId());
                        monitor.worked(tileWorth); // inc the monitor work by 1 tile
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

           
            canTransform = false;
            query = new Query(schema.getName().getLocalPart());
            query.setProperties(attributes);
            Envelope bounds = source.getBounds();
            if (bounds != null && envelope.intersects(bounds)) {
                LOGGER.log(Level.WARNING, "Got a tranform exception while trying to de-project the current " +
                        "envelope, bboxs intersect therefore using envelope)", e);
                filter = null;                   
                filter = createBBoxFilters(schema, attributes, Collections.singletonList(envelope));
                query.setFilter(filter);
View Full Code Here

            for (DefaultQuery q : queries) {

                q.getHints().put(Hints.GEOMETRY_DISTANCE, 1.0);
                env = fs.getBounds(q);
                if (env != null)
                    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));
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.