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

Examples of org.locationtech.udig.catalog.internal.wmt.tile.WWTile.WWTileName.WWZoomLevel


            lat = WMTTileFactory.moveInRange(lat,
                    wwSource.getBounds().getMinY(), wwSource.getBounds().getMaxY());
            lon = WMTTileFactory.moveInRange(lon,
                    wwSource.getBounds().getMinX(), wwSource.getBounds().getMaxX());
           
            WWZoomLevel wwZoomLevel = (WWZoomLevel) zoomLevel;
            int row = WMTTileName.arithmeticMod(
                        (int) Math.ceil(Math.abs((lat - WWSource.WORLD_BOUNDS.getMinY())  / wwZoomLevel.getHeightInWorldUnits())) - 1,
                        zoomLevel.getMaxTilePerColNumber());
            int col = WMTTileName.arithmeticMod(
                        (int) Math.abs((lon - WWSource.WORLD_BOUNDS.getMinX()) / wwZoomLevel.getWidthInWorldUnits()),
                        zoomLevel.getMaxTilePerRowNumber());
           
            WMTPlugin.debug("[WWTile.getTileFromCoordinate] " + zoomLevel.getZoomLevel() + //$NON-NLS-1$
                    "/" + col +  "/" + row + " lon: " + lon + " lat: " + lat, Trace.WW)//$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
           
View Full Code Here


        zoomLevels = new ArrayList<WWZoomLevel>(numberLevels);
        scales = new double[numberLevels];
       
        double tileSizeDegrees = levelZeroTileSizeDegrees;
        for (int i = 0; i < numberLevels; i++) {
            WWZoomLevel zoomLevel = new WWZoomLevel(i,
                    getBoundOfFirstTile(tileSizeDegrees, bounds),
                    getScale(tileSizeDegrees),
                    this
                    );
           
            zoomLevel.setZoomLevel(i);
            zoomLevels.add(zoomLevel);
            scales[i] = zoomLevel.getScale();
           
            // as we are having QuadTiles, the size is divided with 2 for the next zoom-level
            tileSizeDegrees /= 2.0;
        }
    }
View Full Code Here

TOP

Related Classes of org.locationtech.udig.catalog.internal.wmt.tile.WWTile.WWTileName.WWZoomLevel

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.