Package org.geowebcache.grid

Examples of org.geowebcache.grid.BoundingBox


        return layer;
    }

    public static WMSLayer createWMSLayer(final String format, final GridSetBroker gridSetBroker) {
        BoundingBox boundingBox = new BoundingBox(-30.0, 15.0, 45.0, 30);
        return createWMSLayer(format, gridSetBroker, 3, 3, boundingBox);
    }
View Full Code Here


        assertEquals(expectedTiles, tileKeys);
    }

    private SeedRequest createRequest(WMSLayer tl, TYPE type, int zoomStart, int zoomStop) {
        String gridSet = tl.getGridSubsets().keySet().iterator().next();
        BoundingBox bounds = null;
        int threadCount = 1;
        String format = tl.getMimeTypes().get(0).getFormat();
        SeedRequest req = new SeedRequest(tl.getName(), bounds, gridSet, threadCount, zoomStart,
                zoomStop, format, type, null);
        return req;
View Full Code Here

        List<String> formatList = Collections.singletonList(format);

        Hashtable<String, GridSubset> grids = new Hashtable<String, GridSubset>();

        GridSubset grid = GridSubsetFactory.createGridSubSet(gridSetBroker.WORLD_EPSG4326,
                new BoundingBox(-30.0, 15.0, 45.0, 30), 0, 10);

        grids.put(grid.getName(), grid);
        int[] metaWidthHeight = { 3, 3 };

        WMSLayer layer = new WMSLayer("test:layer", urls, "aStyle", "test:layer", formatList,
View Full Code Here

        List<String> formatList = Collections.singletonList(format);

        Hashtable<String, GridSubset> grids = new Hashtable<String, GridSubset>();

        GridSubset grid = GridSubsetFactory.createGridSubSet(gridSetBroker.WORLD_EPSG4326,
                new BoundingBox(-30.0, 15.0, 45.0, 30), 0, 10);

        grids.put(grid.getName(), grid);
        int[] metaWidthHeight = { 3, 3 };

        WMSLayer layer = new WMSLayer("test:layer", urls, "aStyle", "test:layer", formatList,
View Full Code Here

    protected void setUp() throws Exception {
        super.setUp();
    }

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

        GridSubset grid = GridSubsetFactory.createGridSubSet(
                gridSetBroker.WORLD_EPSG4326,
View Full Code Here

        }
        assertTrue(test);
    }

    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,
View Full Code Here

        }
        assertTrue(test);
    }

    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,
View Full Code Here

        }
        assertTrue(test);
    }

    public void test4MetaTile() throws Exception {
        BoundingBox bbox = new BoundingBox(0, 0, 20037508.34, 20037508.34);
       
        int metaHeight = 3;
        int metaWidth = 3;
       
        GridSubset grid = GridSubsetFactory.createGridSubSet(
View Full Code Here

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

        GridSubset grid = GridSubsetFactory.createGridSubSet(
                gridSetBroker.WORLD_EPSG4326,
View Full Code Here

     * @param z
     * @return
     */
    protected Map<String, String> wmsParams(WMSLayer layer, GridSubset gridSubset, int z,
            int[] widthHeight) throws GeoWebCacheException {
        BoundingBox bbox = gridSubset.getCoverageBounds(z);

        Map<String, String> params = new HashMap<String, String>();
        params.put("SERVICE", "WMS");
        params.put("REQUEST", "GetMap");
        params.put("VERSION", "1.1.1");

        if (this.wmsLayers != null) {
            params.put("LAYERS", this.wmsLayers);
        } else {
            params.put("LAYERS", layer.getName());
        }

        if (this.wmsStyles == null) {
            params.put("STYLES", "");
        } else {
            params.put("STYLES", this.wmsStyles);
        }

        params.put("SRS", layer.backendSRSOverride(gridSubset.getSRS()));

        params.put("BBOX", bbox.toString());
        params.put("WIDTH", String.valueOf(widthHeight[0]));
        params.put("HEIGHT", String.valueOf(widthHeight[1]));
        params.put("FORMAT", ImageMime.tiff.getFormat());
        params.put("FORMAT_OPTIONS", "antialias:none");
        params.put("BGCOLOR", "0xFFFFFF");
View Full Code Here

TOP

Related Classes of org.geowebcache.grid.BoundingBox

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.