Package org.locationtech.udig.catalog.internal.wmt.tile

Examples of org.locationtech.udig.catalog.internal.wmt.tile.WMTTile


       
        WMTPlugin.debug("[WMTSource.cutExtentIntoTiles] Zoom-Level: " + zoomLevel.getZoomLevel() //$NON-NLS-1$
                " Extent: " + extent, Trace.REQUEST); //$NON-NLS-1$
       
        // Let's get the first tile which covers the upper-left corner
        WMTTile firstTile = tileFactory.getTileFromCoordinate(
                extent.getMaxY(), extent.getMinX(), zoomLevel, this);
        tileList.put(firstTile.getId(), addTileToList(firstTile));
       
        WMTTile firstTileOfRow = null;
        WMTTile movingTile = firstTileOfRow = firstTile;
        // Loop column
        do {
            // Loop row
            do {
                // 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);
                   
                    movingTile = rightNeighbour;
                } else {
                    break;
                }
                if (tileList.size()>tileLimitWarning) {
                    return Collections.emptyMap();
                }
            } while(tileList.size() < maxNumberOfTiles);

            // 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);
               
                firstTileOfRow = movingTile = lowerNeighbour;
            } else {
                break;
            }           
View Full Code Here


     * @param wmtSource
     * @return
     * @throws Exception
     */
    private ReferencedEnvelope getBoundsOfCenterTileInMapCrs(int zoomLevel, WMTSource wmtSource) throws Exception {
        WMTTile centerTile = getCenterTile(zoomLevel, wmtSource);
        ReferencedEnvelope boundsInTileCrs = centerTile.getExtent();       
        ReferencedEnvelope boundsInMapCrs = projectTileToMapCrs(boundsInTileCrs);
       
        return boundsInMapCrs;
    }
View Full Code Here

TOP

Related Classes of org.locationtech.udig.catalog.internal.wmt.tile.WMTTile

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.