Package org.geowebcache.grid

Examples of org.geowebcache.grid.GridSubset


    public void test2MetaTile() throws Exception {
        BoundingBox bbox = new BoundingBox(0, 0, 180, 90);
        int metaHeight = 3;
        int metaWidth = 3;

        GridSubset grid = GridSubsetFactory.createGridSubSet(
                gridSetBroker.WORLD_EPSG4326,
                bbox,
                0,
                30);
       
View Full Code Here


    public void test3MetaTile() throws Exception {
        BoundingBox bbox = new BoundingBox(0, 0, 20037508.34, 20037508.34);
        int metaHeight = 1;
        int metaWidth = 1;
       
        GridSubset grid = GridSubsetFactory.createGridSubSet(
                gridSetBroker.WORLD_EPSG3857,
                bbox,
                0,
                30);
         
View Full Code Here

        BoundingBox bbox = new BoundingBox(0, 0, 20037508.34, 20037508.34);
       
        int metaHeight = 3;
        int metaWidth = 3;
       
        GridSubset grid = GridSubsetFactory.createGridSubSet(
                gridSetBroker.WORLD_EPSG3857,
                bbox,
                0,
                30);
       
View Full Code Here

    public void test5MetaTileGutter() throws Exception {
        BoundingBox bbox = new BoundingBox(0, 0, 180, 90);
       
        WMSLayer layer = createWMSLayer(bbox);

        GridSubset grid = GridSubsetFactory.createGridSubSet(
                gridSetBroker.WORLD_EPSG4326,
                bbox,
                0,
                30);
       
View Full Code Here

        List<String> formatList = new LinkedList<String>();
        formatList.add("image/png");
       
        Hashtable<String,GridSubset> grids = new Hashtable<String,GridSubset>();

        GridSubset grid = GridSubsetFactory.createGridSubSet(gridSetBroker.WORLD_EPSG4326);
       
        grids.put(grid.getName(), grid);
        int[] metaWidthHeight = {3,3};
       
        WMSLayer layer = new WMSLayer("test:layer", urls, "aStyle", "test:layer", formatList, grids, null, metaWidthHeight, "vendorparam=true", false);
       
        layer.initialize(gridSetBroker);
View Full Code Here

    public void initialize(TileLayer layer) throws GeoWebCacheException {
        if (preload != null && preload) {
            Iterator<GridSubset> iter = layer.getGridSubsets().values().iterator();
           
            while(iter.hasNext()) {
                GridSubset grid = iter.next();
               
                for (int i = 0; i <= zoomStop; i++) {
                    try {
                        setMatrix(layer, grid.getName(), i, false);
                    } catch (Exception e) {
                        log.error("Failed to load matrix for " + this.name
                                + ", " + grid.getName() + ", " + i + " : "
                                + e.getMessage());
                    }
                }
            }
        }
View Full Code Here

        if (this.gridSubsets != null) {
            Iterator<XMLGridSubset> iter = gridSubsets.iterator();
            while (iter.hasNext()) {
                XMLGridSubset xmlGridSubset = iter.next();
                GridSubset gridSubset = xmlGridSubset.getGridSubSet(gridSetBroker);

                if (gridSubset == null) {
                    log.error(xmlGridSubset.getGridSetName()
                            + " is not known by the GridSetBroker, skipping for layer " + name);
                } else {
                    subSets.put(gridSubset.getName(), gridSubset);
                }

            }

            this.gridSubsets = null;
        }

        // Convert version 1.1.x and 1.0.x grid objects
        if (grids != null && !grids.isEmpty()) {
            Iterator<XMLOldGrid> iter = grids.values().iterator();
            while (iter.hasNext()) {
                GridSubset converted = iter.next().convertToGridSubset(gridSetBroker);
                subSets.put(converted.getSRS().toString(), converted);
            }

            // Null it for the garbage collector
            grids = null;
        }
View Full Code Here

    }
   
    public void apply(ConveyorTile convTile) throws RequestFilterException {
        TileLayer tl = convTile.getLayer();
        //SRS srs = convTile.getSRS();
        GridSubset gridSubset = tl.getGridSubset(convTile.getGridSetId());
       
        int z = (int) convTile.getTileIndex()[2];
        long[] gridCoverage = gridSubset.getCoverage(z);

        // Figure out the radius
        long width = gridCoverage[2] - gridCoverage[0];
        long height = gridCoverage[3] - gridCoverage[1];
       
View Full Code Here

            log.error("WMSRasterFilter can only be used with WMS layers.");
        }

        WMSHttpHelper srcHelper = (WMSHttpHelper) layer.getSourceHelper();

        GridSubset gridSet = layer.getGridSubset(gridSetId);

        int[] widthHeight = calculateWidthHeight(gridSet, z);

        String urlStr = layer.getWMSurl()[0];
        Map<String, String> requestParams = wmsParams(layer, gridSet, z, widthHeight);
View Full Code Here

        final List<LODInfo> lodInfos = tileCacheInfo.getLodInfos();
        Integer zoomStart = lodInfos.get(0).getLevelID();
        Integer zoomStop = lodInfos.get(lodInfos.size() - 1).getLevelID();

        GridSubset subSet = GridSubsetFactory.createGridSubSet(gridSet, this.layerBounds,
                zoomStart, zoomStop);

        Hashtable<String, GridSubset> subsets = new Hashtable<String, GridSubset>();
        subsets.put(gridSet.getName(), subSet);
        return subsets;
View Full Code Here

TOP

Related Classes of org.geowebcache.grid.GridSubset

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.