Class ReadResolutionCalculator


  • public class ReadResolutionCalculator
    extends Object
    Class that supports readers in computing the proper reading resolution for a given grid geometry
    • Method Detail

      • computeRequestedResolution

        public double[] computeRequestedResolution​(ReferencedEnvelope readBounds)
        Computes the requested resolution which is going to be used for selecting overviews and or deciding decimation factors on the target coverage.

        In case the requested envelope is in the same CoordinateReferenceSystem of the coverage we compute the resolution using the requested MathTransform. Notice that it must be a LinearTransform or else we fail.

        In case the requested envelope is not in the same CoordinateReferenceSystem of the coverage we

        Throws:
        DataSourceException - in case something bad happens during reprojections and/or intersections.
      • isAccurateResolution

        public boolean isAccurateResolution()
      • setAccurateResolution

        public void setAccurateResolution​(boolean accurateResolution)
      • getMaxOversamplingFactor

        public int getMaxOversamplingFactor()
      • setMaxOversamplingFactor

        public void setMaxOversamplingFactor​(int maxOversamplingFactor)
        Sets the max oversampling factor for resolution calculation. That is, in case of high deformation on reprojection, how much higher the read resolution can be, compared to the known maximum resolution. This affects raster readers that can do internal resampling operations like a heterogeneous CRS mosaic, in which there is a resampling step to go from native CRS to the declared one.