Package org.geowebcache.arcgis.config

Examples of org.geowebcache.arcgis.config.TileCacheInfo


        Assert.notNull(layerName);
        Assert.notNull(info);
        Assert.notNull(layerBounds);

        final TileCacheInfo tileCacheInfo = info.getTileCacheInfo();
        final SpatialReference spatialReference = tileCacheInfo.getSpatialReference();

        final SRS srs;
        final BoundingBox gridSetExtent;

        final boolean alignTopLeft = true;
        final double[] resolutions;
        /*
         * let scale denoms be null so GridSetFactory computes them based on resolutions. The
         * resulting values will be pretty close to the ones defined in the ArcGIS tiling scheme
         */
        final double[] scaleDenominators = null;
        final Double metersPerUnit;
        final String[] scaleNames = null;
        final int tileWidth = tileCacheInfo.getTileCols();
        final int tileHeight = tileCacheInfo.getTileRows();
        final boolean yCoordinateFirst = false;
        final double pixelSize = 0.0254 / tileCacheInfo.getDPI();// see GridSubset.getDotsPerInch()
        {
            int epsgNumber = spatialReference.getWKID();
            if (0 == epsgNumber) {
            }
            srs = SRS.getSRS(epsgNumber);
        }
        {
            final List<LODInfo> lodInfos = tileCacheInfo.getLodInfos();
            double[][] resAndScales = getResolutions(lodInfos);

            resolutions = resAndScales[0];

            double[] scales = resAndScales[1];
            metersPerUnit = (0.00028 * scales[0]) / resolutions[0];
        }
        {
            // See "How to calculate the -x parameter used in the examples above" at
            // http://resources.arcgis.com/content/kbase?q=content/kbase&fa=articleShow&d=15558&print=true
            // double XOrigin = spatialReference.getXOrigin();
            // double YOrigin = spatialReference.getYOrigin();
            // XYScale = 40075017 / 360 = ~111319, where 40075017 is the circumference of the earth
            // at the ecuator and 360 the map units at the ecuator
            // final double xyScale = spatialReference.getXYScale();

            final TileOrigin tileOrigin = tileCacheInfo.getTileOrigin();// top left coordinate

            double xmin = tileOrigin.getX();
            double ymax = tileOrigin.getY();
            double ymin = layerBounds.getMinY();
            double xmax = layerBounds.getMaxX();
View Full Code Here


    }

    private Hashtable<String, GridSubset> createGridSubsets(final GridSetBroker gridSetBroker) {

        final CacheInfo info = this.cacheInfo;
        final TileCacheInfo tileCacheInfo = info.getTileCacheInfo();

        final String layerName = getName();
        final GridSetBuilder gsBuilder = new GridSetBuilder();
        GridSet gridSet = gsBuilder.buildGridset(layerName, info, layerBounds);

        gridSetBroker.put(gridSet);

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

    }

    private Hashtable<String, GridSubset> createGridSubsets(final GridSetBroker gridSetBroker) {

        final CacheInfo info = this.cacheInfo;
        final TileCacheInfo tileCacheInfo = info.getTileCacheInfo();

        final String layerName = getName();
        final GridSetBuilder gsBuilder = new GridSetBuilder();
        GridSet gridSet = gsBuilder.buildGridset(layerName, info, layerBounds);

        gridSetBroker.put(gridSet);

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

        Assert.notNull(layerName);
        Assert.notNull(info);
        Assert.notNull(layerBounds);

        final TileCacheInfo tileCacheInfo = info.getTileCacheInfo();
        final SpatialReference spatialReference = tileCacheInfo.getSpatialReference();

        final SRS srs;
        final BoundingBox gridSetExtent;

        final boolean alignTopLeft = true;
        final double[] resolutions;
        /*
         * let scale denoms be null so GridSetFactory computes them based on resolutions. The
         * resulting values will be pretty close to the ones defined in the ArcGIS tiling scheme
         */
        final double[] scaleDenominators = null;
        final Double metersPerUnit;
        final String[] scaleNames = null;
        final int tileWidth = tileCacheInfo.getTileCols();
        final int tileHeight = tileCacheInfo.getTileRows();
        final boolean yCoordinateFirst = false;
        final double pixelSize = 0.0254 / tileCacheInfo.getDPI();// see GridSubset.getDotsPerInch()
        {
            int epsgNumber = spatialReference.getWKID();
            if (0 == epsgNumber) {
            }
            srs = SRS.getSRS(epsgNumber);
        }
        {
            final List<LODInfo> lodInfos = tileCacheInfo.getLodInfos();
            double[][] resAndScales = getResolutions(lodInfos);

            resolutions = resAndScales[0];

            double[] scales = resAndScales[1];
            //TODO: check whether pixelSize computed above should be used instead
            metersPerUnit = (GridSetFactory.DEFAULT_PIXEL_SIZE_METER * scales[0]) / resolutions[0];
        }
        {
            // See "How to calculate the -x parameter used in the examples above" at
            // http://resources.arcgis.com/content/kbase?q=content/kbase&fa=articleShow&d=15558&print=true
            // double XOrigin = spatialReference.getXOrigin();
            // double YOrigin = spatialReference.getYOrigin();
            // XYScale = 40075017 / 360 = ~111319, where 40075017 is the circumference of the earth
            // at the ecuator and 360 the map units at the ecuator
            // final double xyScale = spatialReference.getXYScale();

            final TileOrigin tileOrigin = tileCacheInfo.getTileOrigin();// top left coordinate

            double xmin = tileOrigin.getX();
            double ymax = tileOrigin.getY();
            double ymin = layerBounds.getMinY();
            double xmax = layerBounds.getMaxX();
View Full Code Here

TOP

Related Classes of org.geowebcache.arcgis.config.TileCacheInfo

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.