Package org.geotools.coverage.grid.io
Class ReadResolutionCalculator
- Object
-
- ReadResolutionCalculator
-
public class ReadResolutionCalculator extends Object
Class that supports readers in computing the proper reading resolution for a given grid geometry
-
-
Constructor Summary
Constructors Constructor Description ReadResolutionCalculator(GridGeometry2D requestedGridGeometry, CoordinateReferenceSystem nativeCrs, double[] fullResolution)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.int
getMaxOversamplingFactor()
boolean
isAccurateResolution()
void
setAccurateResolution(boolean accurateResolution)
void
setMaxOversamplingFactor(int maxOversamplingFactor)
Sets the max oversampling factor for resolution calculation.
-
-
-
Constructor Detail
-
ReadResolutionCalculator
public ReadResolutionCalculator(GridGeometry2D requestedGridGeometry, CoordinateReferenceSystem nativeCrs, double[] fullResolution) throws FactoryException
- Throws:
FactoryException
-
-
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 requestedMathTransform
. Notice that it must be aLinearTransform
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.
-
-