Package org.geowebcache.grid

Examples of org.geowebcache.grid.GridSubset


        this.layer = layer;
        this.gridSetId = gridSetId;
        this.maxMaskLevel = maxMaskLevel;
        this.lastEntryUpdate = "";

        final GridSubset gridSubset = layer.getGridSubset(gridSetId);
        if (gridSubset == null) {
            throw new IllegalArgumentException("no grid subset " + gridSetId + " at "
                    + layer.getName());
        }
    }
View Full Code Here


    }

    public GeometryRasterMaskBuilder buildTileRangeMask(final GeoRSSReader reader,
            String previousEntryUpdate) throws IOException {

        final GridSubset gridSubset = layer.getGridSubset(gridSetId);
        final int[] metaTilingFactors = layer.getMetaTilingFactors();
        GeometryRasterMaskBuilder matrix = null;

        Entry entry;
        Geometry geom;
View Full Code Here

    }

    public void makeRequest(ConveyorTile tile, Resource target) throws GeoWebCacheException {
        WMSLayer layer = (WMSLayer) tile.getLayer();

        GridSubset gridSubset = layer.getGridSubset(tile.getGridSetId());

        Map<String, String> wmsParams = layer.getWMSRequestTemplate(tile.getMimeType(),
                WMSLayer.RequestType.MAP);

        wmsParams.put("FORMAT", tile.getMimeType().getMimeType());
        wmsParams.put("SRS", layer.backendSRSOverride(gridSubset.getSRS()));
        wmsParams.put("HEIGHT", String.valueOf(gridSubset.getTileHeight()));
        wmsParams.put("WIDTH", String.valueOf(gridSubset.getTileWidth()));
        // strBuilder.append("&TILED=").append(requestTiled);

        BoundingBox bbox = gridSubset.boundsFromIndex(tile.getTileIndex());

        wmsParams.put("BBOX", bbox.toString());

        Map<String, String> fullParameters = tile.getFullParameters();
        if (fullParameters.isEmpty()) {
View Full Code Here

                gridSet = GridSetFactory.createGridSet(srs.toString(), srs, gridBounds, false, zoomStop + 1,
                        null, GridSetFactory.DEFAULT_PIXEL_SIZE_METER, 256, 256, false );
            }
        }
       
        GridSubset gridSubset = GridSubsetFactory.createGridSubSet(gridSet, dataBounds, zoomStart, zoomStop);
       
        return gridSubset;
    }
View Full Code Here

    public Resource makeFeatureInfoRequest(ConveyorTile tile, BoundingBox bbox, int height,
            int width, int x, int y) throws GeoWebCacheException {
        WMSLayer layer = (WMSLayer) tile.getLayer();

        GridSubset gridSubset = tile.getGridSubset();

        Map<String, String> wmsParams = layer.getWMSRequestTemplate(tile.getMimeType(),
                WMSLayer.RequestType.FEATUREINFO);

        wmsParams.put("INFO_FORMAT", tile.getMimeType().getFormat());
        wmsParams.put("FORMAT", layer.getDefaultMimeType().getMimeType());
        wmsParams.put("SRS", layer.backendSRSOverride(gridSubset.getSRS()));
        wmsParams.put("HEIGHT", String.valueOf(height));
        wmsParams.put("WIDTH", String.valueOf(width));

        wmsParams.put("BBOX", bbox.toString());
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

        Resource tileContent = null;

        if (storageFormat.equals(CacheStorageInfo.COMPACT_FORMAT_CODE)) {
            final long[] tileIndex = tile.getTileIndex();
            final String gridSetId = tile.getGridSetId();
            final GridSubset gridSubset = this.getGridSubset(gridSetId);

            GridSet gridSet = gridSubset.getGridSet();
            final int zoom = (int) tileIndex[2];

            Grid grid = gridSet.getGridLevels()[zoom];
            long coverageMaxY = grid.getNumTilesHigh() - 1;
View Full Code Here

            for (UpdateSourceDefinition usd : layer.getUpdateSources()) {
                if (usd instanceof GeoRSSFeedDefinition) {
                    final GeoRSSFeedDefinition georssDef = (GeoRSSFeedDefinition) usd;

                    final String gridSetId = georssDef.getGridSetId();
                    final GridSubset gridSubset = layer.getGridSubset(gridSetId);
                    if (gridSubset == null) {
                        throw new IllegalStateException("Layer " + layer.getName()
                                + " has no grid subset " + gridSetId
                                + " as configured by its GeoRSS seeding feed " + georssDef);
                    }
View Full Code Here

    private String getTilePath(final ConveyorTile tile) {

        final MimeType mimeType = tile.getMimeType();
        final long[] tileIndex = tile.getTileIndex();
        final String gridSetId = tile.getGridSetId();
        final GridSubset gridSubset = this.getGridSubset(gridSetId);

        GridSet gridSet = gridSubset.getGridSet();
        final int z = (int) tileIndex[2];

        Grid grid = gridSet.getGridLevels()[z];

        // long[] coverage = gridSubset.getCoverage(z);
View Full Code Here

            String layerNameAndSRS = params[2];
            String layerAtSRS = ServletUtils.URLDecode(layerNameAndSRS, conv.servletReq.getCharacterEncoding());
            String[] layerSRSFormatExtension = layerAtSRS.split("@");
           
            TileLayer tl = tld.getTileLayer(layerSRSFormatExtension[0]);
            GridSubset gridSub = tl.getGridSubset(layerSRSFormatExtension[1]);
            MimeType mimeType =  MimeType.createFromExtension(layerSRSFormatExtension[2]);
            ret = tdf.getTileMapDoc(tl, gridSub, gsb, mimeType);
        }
       
        byte[] data = ret.getBytes(encoding);
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.