Class GridCoverageRendererUtilities
Object
GridCoverageRendererUtilities
- Author:
- Simone Giannecchini, GeoSolutions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic GridCoverage2D
affine
(GridCoverage2D coverage, Interpolation interpolation, AffineTransform affineTransform, double[] bkgValues, boolean useInputSampleDimensions, GridCoverageFactory gridCoverageFactory, Hints hints) Apply an affineTransformation to a GridCoveragestatic double[]
colorToArray
(Color color) static GridCoverage2D
crop
(GridCoverage2D coverage, GeneralBounds destinationEnvelope, boolean doReprojection, double[] backgroundValues, Hints hints) Crop a coverage on a specified destination Envelopestatic List<GridCoverage2D>
displace
(List<GridCoverage2D> coverages, ProjectionHandler handler, GeneralBounds destinationEnvelope, CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, GridCoverageFactory gridCoverageFactory) Displaces a list of coverages, using a ProjectionHandler to eventually split into proper envelopes.static List<GridCoverage2D>
forceToValidBounds
(List<GridCoverage2D> coverages, ProjectionHandler handler, double[] bgValues, CoordinateReferenceSystem targetCRS, Hints hints) Forces an input list of coverages to the valid bounds of the provided target CRS, when a reprojection is needed, using a ProjectionHandler.static GridCoverage2D
mosaicSorted
(List<GridCoverage2D> coverages, GeneralBounds destinationEnvelope, double[] bgValues, Hints hints) Mosaic coverages with a preliminary sorting by sizestatic void
removeNotIntersecting
(List<GridCoverage2D> coverages, GeneralBounds destinationEnvelope) After reprojection or displacement we could have some coverage that are completely out of the destination area (due to numerical issues their source bbox was interesting the request area, but their reprojected version does not).static List<GridCoverage2D>
reproject
(List<GridCoverage2D> coverages, CoordinateReferenceSystem destinationCRS, Interpolation interpolation, GeneralBounds destinationEnvelope, double[] bkgValues, GridCoverageFactory gridCoverageFactory, Hints hints) Reproject the specified list of coveragesstatic GridCoverage2D
reproject
(GridCoverage2D coverage, CoordinateReferenceSystem destinationCRS, Interpolation interpolation, GeneralBounds destinationEnvelope, double[] bkgValues, GridCoverageFactory gridCoverageFactory, Hints hints) Reproject a coverage to the specified destination, eventually adding a ROI if missing
-
Constructor Details
-
GridCoverageRendererUtilities
public GridCoverageRendererUtilities()
-
-
Method Details
-
reproject
public static List<GridCoverage2D> reproject(List<GridCoverage2D> coverages, CoordinateReferenceSystem destinationCRS, Interpolation interpolation, GeneralBounds destinationEnvelope, double[] bkgValues, GridCoverageFactory gridCoverageFactory, Hints hints) throws FactoryException Reproject the specified list of coverages- Throws:
FactoryException
-
reproject
public static GridCoverage2D reproject(GridCoverage2D coverage, CoordinateReferenceSystem destinationCRS, Interpolation interpolation, GeneralBounds destinationEnvelope, double[] bkgValues, GridCoverageFactory gridCoverageFactory, Hints hints) throws FactoryException Reproject a coverage to the specified destination, eventually adding a ROI if missing- Throws:
FactoryException
-
colorToArray
-
removeNotIntersecting
public static void removeNotIntersecting(List<GridCoverage2D> coverages, GeneralBounds destinationEnvelope) After reprojection or displacement we could have some coverage that are completely out of the destination area (due to numerical issues their source bbox was interesting the request area, but their reprojected version does not). Cleanup the ones completely out. -
displace
public static List<GridCoverage2D> displace(List<GridCoverage2D> coverages, ProjectionHandler handler, GeneralBounds destinationEnvelope, CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, GridCoverageFactory gridCoverageFactory) throws FactoryException, TransformException Displaces a list of coverages, using a ProjectionHandler to eventually split into proper envelopes.- Throws:
FactoryException
TransformException
-
forceToValidBounds
public static List<GridCoverage2D> forceToValidBounds(List<GridCoverage2D> coverages, ProjectionHandler handler, double[] bgValues, CoordinateReferenceSystem targetCRS, Hints hints) Forces an input list of coverages to the valid bounds of the provided target CRS, when a reprojection is needed, using a ProjectionHandler. -
crop
public static GridCoverage2D crop(GridCoverage2D coverage, GeneralBounds destinationEnvelope, boolean doReprojection, double[] backgroundValues, Hints hints) Crop a coverage on a specified destination Envelope -
mosaicSorted
public static GridCoverage2D mosaicSorted(List<GridCoverage2D> coverages, GeneralBounds destinationEnvelope, double[] bgValues, Hints hints) Mosaic coverages with a preliminary sorting by size -
affine
public static GridCoverage2D affine(GridCoverage2D coverage, Interpolation interpolation, AffineTransform affineTransform, double[] bkgValues, boolean useInputSampleDimensions, GridCoverageFactory gridCoverageFactory, Hints hints) Apply an affineTransformation to a GridCoverage
-