Package org.geotools.coverage.grid.io

Examples of org.geotools.coverage.grid.io.ReadResolutionCalculator


            } else {
                gridGeometry = requestedGridGeometry;
                computedGridToWorld = requestedGridToWorld;
            }

            ReadResolutionCalculator calculator = new ReadResolutionCalculator(gridGeometry,
                    coverageProperties.crs2D, coverageProperties.fullResolution);
            calculator.setAccurateResolution(accurateResolution);
            computedResolution = calculator.computeRequestedResolution(ReferencedEnvelope
                    .reference(computedBBox));

            // leave
            return;
        } catch (Throwable e) {
View Full Code Here


                    (int) gridEnvelope.getHeight());
            GridGeometry2D localGridGeometry = new GridGeometry2D(readingGridRange, gridToCRS2D,
                    mapExtent.getCoordinateReferenceSystem());

            double[][] resolutionLevels = reader.getResolutionLevels();
            ReadResolutionCalculator calculator = new ReadResolutionCalculator(localGridGeometry,
                    readerCRS, resolutionLevels != null ? resolutionLevels[0] : null);
            calculator.setAccurateResolution(true);
            double[] readResolution = calculator.computeRequestedResolution(reducedEnvelope);
            int width = (int) Math.max(1,
                    Math.round(readEnvelope.getWidth() / Math.abs(readResolution[0])));
            int height = (int) Math.max(1,
                    Math.round(readEnvelope.getHeight() / Math.abs(readResolution[1])));
            GridEnvelope2D gridRange = new GridEnvelope2D(0, 0, width, height);
View Full Code Here

TOP

Related Classes of org.geotools.coverage.grid.io.ReadResolutionCalculator

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.