Package org.geotools.coverage.grid.io
Class ReadResolutionCalculator
Object
ReadResolutionCalculator
Class that supports readers in computing the proper reading resolution for a given grid geometry
-
Constructor Summary
ConstructorsConstructorDescriptionReadResolutionCalculator
(GridGeometry2D requestedGridGeometry, CoordinateReferenceSystem nativeCrs, double[] fullResolution) -
Method Summary
Modifier and TypeMethodDescriptiondouble[]
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
boolean
void
setAccurateResolution
(boolean accurateResolution) void
setMaxOversamplingFactor
(int maxOversamplingFactor) Sets the max oversampling factor for resolution calculation.
-
Constructor Details
-
ReadResolutionCalculator
public ReadResolutionCalculator(GridGeometry2D requestedGridGeometry, CoordinateReferenceSystem nativeCrs, double[] fullResolution) throws FactoryException - Throws:
FactoryException
-
-
Method Details
-
computeRequestedResolution
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.
-